No more MOO_USE_GIO
This commit is contained in:
parent
8a6d67c600
commit
770631a59a
@ -73,9 +73,7 @@ AM_CONDITIONAL(GDK_X11, $GDK_X11)
|
|||||||
AM_CONDITIONAL(GDK_WIN32, $GDK_WIN32)
|
AM_CONDITIONAL(GDK_WIN32, $GDK_WIN32)
|
||||||
AM_CONDITIONAL(GDK_QUARTZ, $GDK_QUARTZ)
|
AM_CONDITIONAL(GDK_QUARTZ, $GDK_QUARTZ)
|
||||||
|
|
||||||
MOO_USE_GIO=false
|
|
||||||
if test "x$GLIB_2_16" = xyes; then
|
if test "x$GLIB_2_16" = xyes; then
|
||||||
MOO_USE_GIO=true
|
|
||||||
MOO_CHECK_VERSION(GIO, gio-2.0, [16, 18])
|
MOO_CHECK_VERSION(GIO, gio-2.0, [16, 18])
|
||||||
else
|
else
|
||||||
AM_CONDITIONAL(GIO_2_16, false)
|
AM_CONDITIONAL(GIO_2_16, false)
|
||||||
@ -109,10 +107,5 @@ else
|
|||||||
AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf stpcpy strcasecmp strncasecmp poll getcwd vasprintf setenv unsetenv getc_unlocked readlink symlink fdwalk)
|
AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf stpcpy strcasecmp strncasecmp poll getcwd vasprintf setenv unsetenv getc_unlocked readlink symlink fdwalk)
|
||||||
AC_CHECK_FUNCS(chown lchown fchmod fchown link statvfs statfs utimes getgrgid getpwuid)
|
AC_CHECK_FUNCS(chown lchown fchmod fchown link statvfs statfs utimes getgrgid getpwuid)
|
||||||
AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getmntinfo)
|
AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getmntinfo)
|
||||||
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL([MOO_USE_GIO], [$MOO_USE_GIO])
|
|
||||||
if $MOO_USE_GIO; then
|
|
||||||
AC_DEFINE([MOO_USE_GIO], [1], [Use GIO library])
|
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
6
moo.mprj
6
moo.mprj
@ -14,6 +14,12 @@
|
|||||||
</vars>
|
</vars>
|
||||||
</configure>
|
</configure>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration name="gtk-2.10">
|
||||||
|
<build_dir>/home/muntyan/projects/gtk-2.10/moo</build_dir>
|
||||||
|
<configure>
|
||||||
|
<args>--configure-manually</args>
|
||||||
|
</configure>
|
||||||
|
</configuration>
|
||||||
<configuration name="gtk-2.6">
|
<configuration name="gtk-2.6">
|
||||||
<build_dir>/home/muntyan/projects/gtk-2.6/moo</build_dir>
|
<build_dir>/home/muntyan/projects/gtk-2.6/moo</build_dir>
|
||||||
<configure>
|
<configure>
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "mooutils/mooutils-fs.h"
|
#include "mooutils/mooutils-fs.h"
|
||||||
#include "mooutils/mooutils-mem.h"
|
#include "mooutils/mooutils-mem.h"
|
||||||
#include "marshals.h"
|
#include "marshals.h"
|
||||||
|
#include <gio/gio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifndef __WIN32__
|
#ifndef __WIN32__
|
||||||
@ -31,10 +32,6 @@
|
|||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOO_USE_GIO
|
|
||||||
#include <gio/gio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 && MOO_DEBUG_ENABLED
|
#if 0 && MOO_DEBUG_ENABLED
|
||||||
#define DEBUG_MESSAGE g_message
|
#define DEBUG_MESSAGE g_message
|
||||||
#else
|
#else
|
||||||
@ -740,21 +737,12 @@ delete_file (G_GNUC_UNUSED MooFileSystem *fs,
|
|||||||
g_return_val_if_fail (!error || !*error, FALSE);
|
g_return_val_if_fail (!error || !*error, FALSE);
|
||||||
|
|
||||||
if (flags & MOO_DELETE_TO_TRASH)
|
if (flags & MOO_DELETE_TO_TRASH)
|
||||||
#if !defined(MOO_USE_GIO)
|
|
||||||
{
|
|
||||||
g_set_error (error, MOO_FILE_ERROR,
|
|
||||||
MOO_FILE_ERROR_NOT_IMPLEMENTED,
|
|
||||||
"Moving files to trash is not implemented");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
{
|
{
|
||||||
GFile *file = g_file_new_for_path (path);
|
GFile *file = g_file_new_for_path (path);
|
||||||
gboolean retval = g_file_trash (file, NULL, error);
|
gboolean retval = g_file_trash (file, NULL, error);
|
||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__WIN32__) && 0
|
#if defined(__WIN32__) && 0
|
||||||
return delete_file_win32 (path, (flags & MOO_DELETE_RECURSIVE) != 0, error);
|
return delete_file_win32 (path, (flags & MOO_DELETE_RECURSIVE) != 0, error);
|
||||||
|
@ -3448,12 +3448,11 @@ do_popup (MooFileView *fileview,
|
|||||||
fileview->priv->actions,
|
fileview->priv->actions,
|
||||||
NULL);
|
NULL);
|
||||||
MOO_OBJECT_REF_SINK (menu);
|
MOO_OBJECT_REF_SINK (menu);
|
||||||
#ifdef MOO_USE_GIO
|
|
||||||
g_signal_connect_swapped (menu, "alternate-toggled",
|
g_signal_connect_swapped (menu, "alternate-toggled",
|
||||||
G_CALLBACK (update_delete_action),
|
G_CALLBACK (update_delete_action),
|
||||||
fileview);
|
fileview);
|
||||||
update_delete_action (fileview, NULL);
|
update_delete_action (fileview, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
_moo_file_view_tools_check (fileview);
|
_moo_file_view_tools_check (fileview);
|
||||||
g_signal_emit (fileview, signals[POPULATE_POPUP], 0, files, menu);
|
g_signal_emit (fileview, signals[POPULATE_POPUP], 0, files, menu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user