[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.

Jannis Pohlmann noreply at xfce.org
Sun Aug 29 21:14:03 CEST 2010


Updating branch refs/heads/danielm/port-to-gio
         to 4a3ee615dd7a3972cb0c8d8c69d8d462d4a4f1df (commit)
       from d5541e825e7b65d61e7875bfdc9b41e3884ab4a4 (commit)

commit 4a3ee615dd7a3972cb0c8d8c69d8d462d4a4f1df
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 ++++++++++++++++++++++++++++++++----------------------
 src/Makefile.am |   13 +++++++-
 src/main.c      |    9 ------
 3 files changed, 62 insertions(+), 46 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 5e1c9af..714bdf4 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([garcon_minimum_version], [0.1.1])
-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.1.1]) dnl TODO this needs to be set to 1.1.2 before the next release
 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/])
@@ -69,6 +70,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])
@@ -105,9 +107,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"
@@ -121,8 +123,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"
@@ -134,16 +136,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],
@@ -171,31 +211,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_WITH([file-manager-fallback],
     [AC_HELP_STRING([--with-file-manager-fallback=PATH],
@@ -264,4 +279,5 @@ fi
 echo "  Build desktop menu module:                    $build_desktop_menu"
 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/src/Makefile.am b/src/Makefile.am
index 85ee55b..a140a66 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -115,16 +115,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 de5cf2c..02b4dac 100644
--- a/src/main.c
+++ b/src/main.c
@@ -58,7 +58,6 @@
 
 #ifdef ENABLE_FILE_ICONS
 #include <dbus/dbus-glib.h>
-#include <thunar-vfs/thunar-vfs.h>
 #endif
 
 #include "xfdesktop-common.h"
@@ -334,10 +333,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();
 
@@ -404,9 +399,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