Moved MooFileView to mooedit/
This commit is contained in:
parent
9a2a4c5ee0
commit
09d4355048
@ -46,7 +46,7 @@
|
|||||||
</run>
|
</run>
|
||||||
<configurations>
|
<configurations>
|
||||||
<debug>
|
<debug>
|
||||||
<configargs>--enable-debug=full --enable-all-gcc-warnings=fatal --enable-developer-mode --disable-moo-module --without-mooui --without-mooapp --without-mooterm --without-mooedit --without-python</configargs>
|
<configargs>--enable-debug=full --enable-all-gcc-warnings=fatal --enable-developer-mode --disable-moo-module --without-mooui --without-mooapp --without-mooterm --without-python</configargs>
|
||||||
<builddir>build/debug</builddir>
|
<builddir>build/debug</builddir>
|
||||||
<ccompiler>kdevgccoptions</ccompiler>
|
<ccompiler>kdevgccoptions</ccompiler>
|
||||||
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
||||||
|
@ -54,6 +54,9 @@ libmooedit_la_SOURCES = \
|
|||||||
mooeditsearch.c \
|
mooeditsearch.c \
|
||||||
mooeditsearch.h \
|
mooeditsearch.h \
|
||||||
mooeditwindow.c \
|
mooeditwindow.c \
|
||||||
|
moofileview.c \
|
||||||
|
moofileview.h \
|
||||||
|
moofileview-icons.c \
|
||||||
mootextiter.h
|
mootextiter.h
|
||||||
|
|
||||||
if USE_XML
|
if USE_XML
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
* See COPYING file that comes with this distribution.
|
* See COPYING file that comes with this distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mooutils/moofileview.h"
|
#include "mooedit/moofileview.h"
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* mooutils/moofileview.c
|
* mooedit/moofileview.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004-2005 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
* Copyright (C) 2004-2005 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
||||||
*
|
*
|
||||||
@ -11,7 +11,11 @@
|
|||||||
* See COPYING file that comes with this distribution.
|
* See COPYING file that comes with this distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mooutils/moofileview.h"
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "mooedit/moofileview.h"
|
||||||
#include "mooutils/moomarshals.h"
|
#include "mooutils/moomarshals.h"
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
@ -19,6 +23,9 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#ifdef USE_XDGMIME
|
||||||
|
#include "mooedit/xdgmime/xdgmime.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TREEVIEW_UPDATE_TIMEOUT 0.5
|
#define TREEVIEW_UPDATE_TIMEOUT 0.5
|
||||||
|
|
||||||
@ -35,7 +42,7 @@ struct _MooFileViewFile {
|
|||||||
char *fullname;
|
char *fullname;
|
||||||
char *uri;
|
char *uri;
|
||||||
char *display_name;
|
char *display_name;
|
||||||
char *mime_type;
|
const char *mime_type;
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
gboolean is_dir;
|
gboolean is_dir;
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
@ -769,14 +776,20 @@ static MooFileViewFile *file_new (MooFileView *fileview,
|
|||||||
g_return_val_if_fail (basename != NULL, NULL);
|
g_return_val_if_fail (basename != NULL, NULL);
|
||||||
g_return_val_if_fail (fullname != NULL, NULL);
|
g_return_val_if_fail (fullname != NULL, NULL);
|
||||||
|
|
||||||
file = g_new (MooFileViewFile, 1);
|
file = g_new0 (MooFileViewFile, 1);
|
||||||
file->ref_count = 1;
|
file->ref_count = 1;
|
||||||
|
|
||||||
file->basename = g_strdup (basename);
|
file->basename = g_strdup (basename);
|
||||||
file->fullname = g_strdup (fullname);
|
file->fullname = g_strdup (fullname);
|
||||||
file->uri = g_strdup_printf ("file://%s", fullname);
|
file->uri = g_strdup_printf ("file://%s", fullname);
|
||||||
file->display_name = g_filename_display_basename (basename);
|
file->display_name = g_filename_display_basename (basename);
|
||||||
|
|
||||||
|
#ifdef USE_XDGMIME
|
||||||
|
file->mime_type = xdg_mime_get_mime_type_for_file (fullname);
|
||||||
|
#else
|
||||||
file->mime_type = NULL;
|
file->mime_type = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
file->time = NULL; /* struct tm* */
|
file->time = NULL; /* struct tm* */
|
||||||
file->date_string = NULL;
|
file->date_string = NULL;
|
||||||
@ -836,7 +849,6 @@ static void file_unref (MooFileViewFile *file)
|
|||||||
g_free (file->fullname);
|
g_free (file->fullname);
|
||||||
g_free (file->uri);
|
g_free (file->uri);
|
||||||
g_free (file->display_name);
|
g_free (file->display_name);
|
||||||
g_free (file->mime_type);
|
|
||||||
if (file->pixbuf) g_object_unref (file->pixbuf);
|
if (file->pixbuf) g_object_unref (file->pixbuf);
|
||||||
g_free (file->time); /* struct tm* */
|
g_free (file->time); /* struct tm* */
|
||||||
g_free (file->date_string);
|
g_free (file->date_string);
|
@ -48,9 +48,6 @@ libmooutils_la_SOURCES = \
|
|||||||
moodialogs.h \
|
moodialogs.h \
|
||||||
moofileutils.c \
|
moofileutils.c \
|
||||||
moofileutils.h \
|
moofileutils.h \
|
||||||
moofileview.c \
|
|
||||||
moofileview.h \
|
|
||||||
moofileview-icons.c \
|
|
||||||
moolog.c \
|
moolog.c \
|
||||||
moolog.h \
|
moolog.h \
|
||||||
moomarkup.c \
|
moomarkup.c \
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# tests/Makefile.am
|
# tests/Makefile.am
|
||||||
#
|
#
|
||||||
|
|
||||||
EXTRA_PROGRAMS = medit mterm markup editor termbuffer
|
EXTRA_PROGRAMS = medit mterm markup editor termbuffer testfileview testpaned
|
||||||
bin_PROGRAMS =
|
bin_PROGRAMS =
|
||||||
noinst_PROGRAMS =
|
noinst_PROGRAMS =
|
||||||
|
|
||||||
@ -21,13 +21,13 @@ if BUILD_MOOAPP
|
|||||||
bin_PROGRAMS += editor
|
bin_PROGRAMS += editor
|
||||||
endif
|
endif
|
||||||
if BUILD_MOOEDIT
|
if BUILD_MOOEDIT
|
||||||
noinst_PROGRAMS += medit
|
noinst_PROGRAMS += medit testfileview
|
||||||
endif
|
endif
|
||||||
if BUILD_MOOTERM
|
if BUILD_MOOTERM
|
||||||
noinst_PROGRAMS += mterm termbuffer
|
noinst_PROGRAMS += mterm termbuffer
|
||||||
endif
|
endif
|
||||||
if BUILD_MOOUTILS
|
if BUILD_MOOUTILS
|
||||||
noinst_PROGRAMS += markup testpaned testfileview
|
noinst_PROGRAMS += markup testpaned
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user