No more MOO_USE_GIO

This commit is contained in:
Yevgen Muntyan 2008-11-26 22:50:19 -06:00
parent 8a6d67c600
commit 770631a59a
4 changed files with 8 additions and 22 deletions

View File

@ -73,9 +73,7 @@ AM_CONDITIONAL(GDK_X11, $GDK_X11)
AM_CONDITIONAL(GDK_WIN32, $GDK_WIN32)
AM_CONDITIONAL(GDK_QUARTZ, $GDK_QUARTZ)
MOO_USE_GIO=false
if test "x$GLIB_2_16" = xyes; then
MOO_USE_GIO=true
MOO_CHECK_VERSION(GIO, gio-2.0, [16, 18])
else
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(chown lchown fchmod fchown link statvfs statfs utimes getgrgid getpwuid)
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
])

View File

@ -14,6 +14,12 @@
</vars>
</configure>
</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">
<build_dir>/home/muntyan/projects/gtk-2.6/moo</build_dir>
<configure>

View File

@ -21,6 +21,7 @@
#include "mooutils/mooutils-fs.h"
#include "mooutils/mooutils-mem.h"
#include "marshals.h"
#include <gio/gio.h>
#include <errno.h>
#include <stdio.h>
#ifndef __WIN32__
@ -31,10 +32,6 @@
#include <shellapi.h>
#endif
#ifdef MOO_USE_GIO
#include <gio/gio.h>
#endif
#if 0 && MOO_DEBUG_ENABLED
#define DEBUG_MESSAGE g_message
#else
@ -740,21 +737,12 @@ delete_file (G_GNUC_UNUSED MooFileSystem *fs,
g_return_val_if_fail (!error || !*error, FALSE);
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);
gboolean retval = g_file_trash (file, NULL, error);
g_object_unref (file);
return retval;
}
#endif
#if defined(__WIN32__) && 0
return delete_file_win32 (path, (flags & MOO_DELETE_RECURSIVE) != 0, error);

View File

@ -3448,12 +3448,11 @@ do_popup (MooFileView *fileview,
fileview->priv->actions,
NULL);
MOO_OBJECT_REF_SINK (menu);
#ifdef MOO_USE_GIO
g_signal_connect_swapped (menu, "alternate-toggled",
G_CALLBACK (update_delete_action),
fileview);
update_delete_action (fileview, NULL);
#endif
_moo_file_view_tools_check (fileview);
g_signal_emit (fileview, signals[POPULATE_POPUP], 0, files, menu);