[Xfce4-commits] <xfdesktop:danielm/port-to-gio> - configure.ac.in: * Droped ThunarVFS checks * file-icons: Now requires libexo. (We'll use stuff like ExoJob and ExoSimpleJob) * volume-monitoring: New arg option. This will check if GUDEV is available to enable Volume monitoring. * Droped desktop-menu-dir-monitor. Garcon will handle it and this is no longer necesary. * Bump some glib/thunarx versions. - panel-plugin/Makefile.am: - panel-plugin/desktop-menu-plugin.c: - src/Makefile.am: - src/main.c: * Droped some basic ThunarVFS stuff * Added GUDEV flags/libs to src/Makefile.am if volume monitoring is enabled.

Daniel Morales noreply at xfce.org
Tue Feb 16 20:48:02 CET 2010


Updating branch refs/heads/danielm/port-to-gio
         to 57ceb51ef0b3e6b4db8ff0325ac6aea7f40b798f (commit)
       from 625472d7025b59f49114c77c01b412d53999f333 (commit)

commit 57ceb51ef0b3e6b4db8ff0325ac6aea7f40b798f
Author: Daniel Morales <daniel at daniel.com.uy>
Date:   Mon Feb 15 23:20:54 2010 -0200

    - configure.ac.in:
            * Droped ThunarVFS checks
            * file-icons: Now requires libexo. (We'll use stuff like
                          ExoJob and ExoSimpleJob)
            * volume-monitoring: New arg option. This will check if
              GUDEV is available to enable Volume monitoring.
            * Droped desktop-menu-dir-monitor. Garcon will handle
              it and this is no longer necesary.
            * Bump some glib/thunarx versions.
    - panel-plugin/Makefile.am:
    - panel-plugin/desktop-menu-plugin.c:
    - src/Makefile.am:
    - src/main.c:
            * Droped some basic ThunarVFS stuff
            * Added GUDEV flags/libs to src/Makefile.am if volume
              monitoring is enabled.

 configure.ac.in                    |   86 +++++++++++++++++++++---------------
 panel-plugin/Makefile.am           |    2 -
 panel-plugin/desktop-menu-plugin.c |   10 ----
 src/Makefile.am                    |   13 +++++-
 src/main.c                         |    9 ----
 5 files changed, 62 insertions(+), 58 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index c6b7a03..5493255 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -19,12 +19,13 @@ m4_define([libxfce4util_minimum_version], [4.6.0])
 m4_define([libxfce4ui_minimum_version], [4.7.0])
 m4_define([xfce_minimum_version], [4.6.0])
 m4_define([xfce4menu_minimum_version], [4.6.0])
-m4_define([exo_minimum_version], [0.3.100])
-m4_define([thunar_minimum_version], [1.0.0])
+m4_define([exo_minimum_version], [0.5.1])
+m4_define([thunar_minimum_version], [1.0.1])
 m4_define([dbus_minimum_version], [0.34])
 m4_define([wnck_minimum_version], [2.12])
 m4_define([intltool_minimum_version], [0.31])
 m4_define([xfconf_minimum_version], [4.6.0])
+m4_define([gudev_minimum_version], [145])
 
 dnl init autoconf
 AC_INIT([xfdesktop], [xfdesktop_version], [http://bugzilla.xfce.org/])
@@ -67,6 +68,7 @@ dnl required
 XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [glib_minimum_version])
 XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [glib_minimum_version])
 XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [glib_minimum_version])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [glib_minimum_version])
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [gtk_minimum_version])
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],
                   [libxfce4util_minimum_version])
@@ -103,9 +105,9 @@ fi
 
 if test "x$enable_desktop_icons" = "xyes" -a "x$enable_file_icons" = "xyes"; then
     dnl here i shall abuse the XDT_CHECK_PACKAGE macro
-    XDT_CHECK_PACKAGE([THUNAR_VFS], [thunar-vfs-1],
-                      [thunar_minimum_version], [], [
-echo "*** Optional package thunar-vfs-1 was either not found on your system"
+    XDT_CHECK_PACKAGE([LIBEXO], [exo-1],
+                      [exo_minimum_version], [], [
+echo "*** Optional package exo-1 was either not found on your system"
 echo "*** or is too old.  Please install or upgrade to at least version"
 echo "*** thunar_minimum_version, or adjust the PKG_CONFIG_PATH environment variable"
 echo "*** if you installed the new version of the package in a nonstandard"
@@ -119,8 +121,8 @@ echo "*** if you installed the new version of the package in a nonstandard"
 echo "*** prefix.  File/launcher icons will be disabled."
 ])
     enable_file_icons="no"
-    if test "x$THUNAR_VFS_VERSION" != "x"; then
-        already_have_thunar_vfs=yes
+    if test "x$LIBEXO_VERSION" != "x"; then
+        already_have_libexo="yes"
         
         if test "x$DBUS_VERSION" != "x"; then
             enable_file_icons="yes"
@@ -132,16 +134,54 @@ fi
 
 AM_CONDITIONAL([ENABLE_FILE_ICONS], [test "x$enable_file_icons" = "xyes"])
 
+dnl if we want desktop icons, do we also want volume monitoring?
+AC_ARG_ENABLE([volume-monitoring],
+    [AC_HELP_STRING([--disable-volume-monitoring],
+            [Do not compile in support for Volume monitoring (default=enabled)])],
+        [ac_cv_enable_volume_monitoring=$enableval],
+        [ac_cv_enable_volume_monitoring=yes])
+if test "x$ac_cv_enable_volume_monitoring" = "xno" -o "x$enable_desktop_icons" != "xyes"; then
+    enable_volume_monitoring="no"
+else
+    enable_volume_monitoring="yes"
+fi
+
+if test "x$enable_desktop_icons" = "xyes" -a "x$enable_volume_monitoring" = "xyes"; then
+    XDT_CHECK_PACKAGE([GUDEV], [gudev-1.0],
+                      [gudev_minimum_version], [], [
+echo "*** Optional package gudev-1.0 was either not found on your system"
+echo "*** or is too old.  Please install or upgrade to at least version"
+echo "*** thunar_minimum_version, or adjust the PKG_CONFIG_PATH environment variable"
+echo "*** if you installed the new version of the package in a nonstandard"
+echo "*** prefix. Volume monitoring will be disabled."
+])
+    enable_volume_monitoring="no"
+    if test "x$GUDEV_VERSION" != "x"; then
+        enable_volume_monitoring="yes"
+        AC_DEFINE([ENABLE_VOLUME_MONITORING], [1],
+                  [Define if volume monitoring should be enabled])
+    fi
+fi
+
+AM_CONDITIONAL([ENABLE_VOLUME_MONITORING], [test "x$enable_volume_monitoring" = "xyes"])
 
 dnl i'd rather have these two only checked conditionally, but this macro also
 dnl calls AM_CONDITIONAL(), which cannot be in an 'if' block
 
-XDT_CHECK_OPTIONAL_PACKAGE([THUNARX], [thunarx-1], [thunar_minimum_version],
+XDT_CHECK_OPTIONAL_PACKAGE([THUNARX], [thunarx-2], [thunar_minimum_version],
     [thunarx],
     [Thunar's extension mechanism, to add external features to the desktop icon implementation])
-XDT_CHECK_OPTIONAL_PACKAGE([LIBEXO], [exo-1], [exo_minimum_version], [exo],
-    [libexo, for nifty icon effects])
 
+dnl maybe we already have it from file icons
+if test "x$already_have_libexo" != "xyes"; then
+    XDT_CHECK_PACKAGE([LIB], [exo-1], [exo_minimum_version], [], [
+echo "*** Optional package exo-1 was either not found on your system"
+echo "*** or is too old.  Please install or upgrade to at least version"
+echo "*** dbus_minimum_version, or adjust the PKG_CONFIG_PATH environment variable"
+echo "*** if you installed the new version of the package in a nonstandard"
+echo "*** prefix.  Nifty icon effects will be disabled."
+])
+fi
 
 AC_ARG_ENABLE([desktop-menu],
         AC_HELP_STRING([--disable-desktop-menu],
@@ -169,31 +209,6 @@ build_desktop_menu="no"
 fi
 AM_CONDITIONAL([BUILD_DESKTOP_MENU], [test "x$build_desktop_menu" = "xyes"])
 
-dnl time for more abuse.  if we don't yet have thunar-vfs, we still might want
-dnl it for desktop menu directory monitoring.
-AC_ARG_ENABLE([desktop-menu-dir-monitor],
-              [AC_HELP_STRING([--disable-desktop-menu-dir-monitor],
-                              [Don't use thunar-vfs to monitor menu files to automatically update the desktop menu when needed. (default=enabled)])],
-              [want_thunar_vfs=$enableval],
-              [want_thunar_vfs=yes])
-if test "x$want_thunar_vfs" = "xyes" -a "x$build_desktop_menu" = "xyes"; then
-    if test "x$already_have_thunar_vfs" != "xyes"; then
-        XDT_CHECK_PACKAGE([THUNAR_VFS], [thunar-vfs-1],
-                          [thunar_minimum_version], [have_thunar_vfs=yes], [
-echo "*** Optional package thunar-vfs-1 was either not found on your system"
-echo "*** or is too old.  Please install or upgrade to at least version"
-echo "*** thunar_minimum_version, or adjust the PKG_CONFIG_PATH environment variable"
-echo "*** if you installed the new version of the package in a nonstandard"
-echo "*** prefix.  Desktop menu directory monitoring will be disabled."
-])
-    fi
-
-    if test "x$have_thunar_vfs" = "xyes" \
-       -o "x$already_have_thunar_vfs" = "xyes"
-    then
-        AC_DEFINE([HAVE_THUNAR_VFS], [1], [Define if thunar-vfs is present.])
-    fi
-fi
 
 AC_ARG_ENABLE([panel-plugin],
         [AC_HELP_STRING([--disable-panel-plugin],
@@ -291,4 +306,5 @@ echo "  Build desktop menu module:                    $build_desktop_menu"
 echo "  Build desktop menu panel plugin:              $build_panel_plugin"
 echo "  Build support for desktop icons:              $enable_desktop_icons"
 echo "      Include support for file/launcher icons:  $enable_file_icons"
+echo "      Enable volume monitoring:                 $enable_volume_monitoring"
 echo
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 3cf3f6d..af06ac5 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -9,7 +9,6 @@ xfce4_menu_plugin_CFLAGS = \
 	$(LIBX11_CFLAGS) \
 	$(LIBXFCE4UI_CFLAGS) \
 	$(LIBXFCE4PANEL_CFLAGS) \
-	$(THUNAR_VFS_CFLAGS) \
 	$(LIBEXO_CFLAGS) \
 	-DDATADIR=\"$(datadir)\" \
 	-DLOCALEDIR=\"$(localedir)\" \
@@ -25,7 +24,6 @@ xfce4_menu_plugin_LDADD = \
 	$(LIBX11_LIBS) \
 	$(LIBXFCE4UI_LIBS) \
 	$(LIBXFCE4PANEL_LIBS) \
-	$(THUNAR_VFS_LIBS) \
 	$(LIBEXO_LIBS)
 
 if HAVE_CYGWIN
diff --git a/panel-plugin/desktop-menu-plugin.c b/panel-plugin/desktop-menu-plugin.c
index 4d90640..165dbcb 100644
--- a/panel-plugin/desktop-menu-plugin.c
+++ b/panel-plugin/desktop-menu-plugin.c
@@ -56,9 +56,6 @@
 #ifdef HAVE_LIBEXO
 #include <exo/exo.h>
 #endif
-#ifdef HAVE_THUNAR_VFS
-#include <thunar-vfs/thunar-vfs.h>
-#endif
 
 #include "desktop-menu-stub.h"
 #include "xfdesktop-common.h"
@@ -909,9 +906,6 @@ static gboolean
 desktop_menu_plugin_preinit(int argc,
                             char **argv)
 {
-#ifdef HAVE_THUNAR_VFS
-    g_thread_init(NULL);
-#endif
     return TRUE;
 }
 #endif
@@ -1031,10 +1025,6 @@ desktop_menu_plugin_construct(XfcePanelPlugin *plugin)
     
     xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
     
-#ifdef HAVE_THUNAR_VFS
-    thunar_vfs_init();
-#endif
-    
     if(!(dmp = dmp_new(plugin)))
         exit(1);
     
diff --git a/src/Makefile.am b/src/Makefile.am
index 43bdd49..400537a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -102,16 +102,25 @@ xfdesktop_SOURCES += $(desktop_file_icon_sources)
 
 xfdesktop_CFLAGS += \
 	-DDBUS_API_SUBJECT_TO_CHANGE \
-	$(THUNAR_VFS_CFLAGS) \
 	$(THUNARX_CFLAGS) \
 	$(DBUS_CFLAGS)
 
 xfdesktop_LDADD += \
-	$(THUNAR_VFS_LIBS) \
 	$(THUNARX_LIBS) \
 	$(DBUS_LIBS)
 
 endif
+
+if ENABLE_VOLUME_MONITORING
+
+xfdesktop_CFLAGS += \
+	-DG_UDEV_API_IS_SUBJECT_TO_CHANGE \
+	$(GUDEV_CFLAGS)
+
+xfdesktop_LDADD += \
+	$(GUDEV_LIBS)
+
+endif
 endif
 
 if MAINTAINER_MODE
diff --git a/src/main.c b/src/main.c
index 1237abd..098abaa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -59,7 +59,6 @@
 
 #ifdef ENABLE_FILE_ICONS
 #include <dbus/dbus-glib.h>
-#include <thunar-vfs/thunar-vfs.h>
 #endif
 
 #include "xfdesktop-common.h"
@@ -335,10 +334,6 @@ main(int argc, char **argv)
         g_printerr("Failed to connect to session manager: %s\n", error->message);
         g_error_free(error);
     }
-
-#ifdef ENABLE_FILE_ICONS
-    thunar_vfs_init();
-#endif
     
     gdpy = gdk_display_get_default();
 
@@ -405,9 +400,5 @@ main(int argc, char **argv)
     
     xfconf_shutdown();
     
-#ifdef ENABLE_FILE_ICONS
-    thunar_vfs_shutdown();
-#endif
-    
     return 0;
 }



More information about the Xfce4-commits mailing list