From 3957d69c54d52be1d523807138419938b0898f5e Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 6 Dec 2009 18:01:10 +0000 Subject: [PATCH] Removed dependencies on gconf, eel, gnome-desktop and gnome-vfs. Applied some patches from opensuse (thanks). Fixed to work with gnome 2.28. Version 0.3.1i. git-svn-id: http://saetta.homelinux.org/svn/nautilus-search-tool/trunk@3 20f00ee0-92f8-4baf-bd23-f7db83d90979 --- ChangeLog | 7 ++++++ configure.ac | 19 ---------------- src/nautilus-search-tool.c | 46 +++++--------------------------------- 3 files changed, 13 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index d38a2ca..2ec8cf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-12-06 Andrea Zagli + + * removed dependencies on gconf, eel, gnome-desktop and gnome-vfs + * applied some patches from opensuse (thanks) + * fixed to work with gnome 2.28 + * version 0.3.1 + 2009-04-26 Andrea Zagli * added autogen.sh (thanks to nautilus-open-terminal authors) diff --git a/configure.ac b/configure.ac index 4ac602b..f7f92ab 100644 --- a/configure.ac +++ b/configure.ac @@ -8,10 +8,7 @@ AM_INIT_AUTOMAKE AM_MAINTAINER_MODE NAUTILUS_REQUIRED=2.10.0 -EEL_REQUIRED=2.10.0 -GNOME_DESKTOP_REQUIRED=2.10.0 GLIB_REQUIRED=2.6.0 -GNOME_VFS_REQUIRED=2.10.0 # Checks for programs. AC_PROG_CXX @@ -37,26 +34,10 @@ fi # Checks for libraries. PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED) PKG_CHECK_MODULES(GLIB, glib-2.0) -PKG_CHECK_MODULES(GCONF, gconf-2.0) -PKG_CHECK_MODULES(EEL, eel-2.0 >= $EEL_REQUIRED) -PKG_CHECK_MODULES(GNOMEDESKTOP, gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED) -PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED) AC_SUBST(NAUTILUS_CFLAGS) AC_SUBST(NAUTILUS_LIBS) -AC_SUBST(GCONF_CFLAGS) -AC_SUBST(GCONF_LIBS) - -AC_SUBST(EEL_CFLAGS) -AC_SUBST(EEL_LIBS) - -AC_SUBST(GNOMEDESKTOP_CFLAGS) -AC_SUBST(GNOMEDESKTOP_LIBS) - -AC_SUBST(GNOMEVFS_CFLAGS) -AC_SUBST(GNOMEVFS_LIBS) - # Get nautilus extensions directory NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension` AC_SUBST(NAUTILUS_EXTENSION_DIR) diff --git a/src/nautilus-search-tool.c b/src/nautilus-search-tool.c index a1cb5b4..d8ea5bd 100644 --- a/src/nautilus-search-tool.c +++ b/src/nautilus-search-tool.c @@ -30,8 +30,6 @@ #include #include -//#include -//#include static void nautilus_search_tool_instance_init (NautilusSearchTool *cvs); static void nautilus_search_tool_class_init (NautilusSearchToolClass *class); @@ -43,10 +41,10 @@ static void search_tool_callback (NautilusMenuItem *item, NautilusFileInfo *file_info) { - gchar *uri, - *argv[3], - *working_directory, - *quoted_directory; + gchar *uri; + gchar *argv[3]; + gchar *working_directory; + gchar *quoted_directory; g_print ("Search Tool selected\n"); @@ -80,40 +78,8 @@ search_tool_callback (NautilusMenuItem *item, argv[0] = gnome_search_tool; quoted_directory = g_shell_quote (working_directory); -#ifdef GNOME_SEARCH_TOOL_VERSION - guint i; - gchar *version = NULL; - - gchar **array_version = g_strsplit (GNOME_SEARCH_TOOL_VERSION, " ", -1); - guint array_lenght = g_strv_length (array_version); - - for (i = 0; i < array_lenght; i++) - { - if (isdigit (array_version[i][0])) - { - version = g_strdup (array_version[i]); - g_strfreev (array_version); - - array_version = g_strsplit (version, ".", -1); - g_free (version); - break; - } - } - - if (atoi (array_version[0]) == 2 && atoi (array_version[1]) >= 22) - { - argv[1] = NULL; - } - else - { - argv[1] = g_strdup_printf ("--path=%s", quoted_directory); - argv[2] = NULL; - } - - g_strfreev (array_version); -#else - argv[1] = NULL; -#endif /* GNOME_SEARCH_TOOL_VERSION */ + argv[1] = g_strdup_printf ("--path=%s", quoted_directory); + argv[2] = NULL; g_spawn_async (working_directory, argv, -- 2.49.0