eog r4819 - in trunk: . src



Author: friemann
Date: Mon Oct 13 19:08:20 2008
New Revision: 4819
URL: http://svn.gnome.org/viewvc/eog?rev=4819&view=rev

Log:
2008-10-13  Felix Riemann  <friemann svn gnome org>

	* configure.ac:
	* src/eog-util.c:
	Drop gnome-desktop dependency. Fixes bug #556029.


Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/src/eog-util.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Mon Oct 13 19:08:20 2008
@@ -88,7 +88,6 @@
 GDKPIXBUF_REQUIRED=2.4.0
 GCONF_REQUIRED=2.5.90
 LIBART_REQUIRED=2.3.16
-GNOME_DESKTOP_REQUIRED=2.10.0
 GTK_PRINT_REQUIRED=2.10.0
 GNOME_ICON_THEME_REQUIRED=2.19.1
 SHARED_MIME_INFO_REQUIRED=0.20
@@ -103,7 +102,6 @@
              gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED \
              gconf-2.0 >= $GCONF_REQUIRED \
              libart-2.0 >= $LIBART_REQUIRED \
-             gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED \
              gtk+-unix-print-2.0 >= $GTK_PRINT_REQUIRED \
 	     gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED \
 	     shared-mime-info >= $SHARED_MIME_INFO_REQUIRED"

Modified: trunk/src/eog-util.c
==============================================================================
--- trunk/src/eog-util.c	(original)
+++ trunk/src/eog-util.c	Mon Oct 13 19:08:20 2008
@@ -44,7 +44,6 @@
 #include <glib/gi18n.h>
 #include <libgnome/gnome-help.h>
 #include <libgnome/gnome-init.h>
-#include <libgnome/gnome-desktop-item.h>
 
 void 
 eog_util_show_help (const gchar *section, GtkWindow *parent)
@@ -231,74 +230,6 @@
 	return abs_files;
 }
 
-static int
-launch_desktop_item (const char *desktop_file,
-                     guint32 user_time,
-                     GError **error)
-{
-	GnomeDesktopItem *item = NULL;
-	GList *uris = NULL;
-	int ret = -1;
-	
-	item = gnome_desktop_item_new_from_file (desktop_file, 0, NULL);
-
-	if (item == NULL) return FALSE;
-	
-	gnome_desktop_item_set_launch_time (item, user_time);
-
-	ret = gnome_desktop_item_launch (item, uris, 0, error);
-	
-	g_list_foreach (uris, (GFunc) g_free, NULL);
-	g_list_free (uris);
-	gnome_desktop_item_unref (item);
-	
-	return ret;
-}
-
-gboolean
-eog_util_launch_desktop_file (const gchar *filename,
-                              guint32      user_time)
-{
-	GError *error = NULL;
-	const char * const *dirs;
-	char *path = NULL;
-	int i, ret = -1;
-	
-	dirs = g_get_system_data_dirs ();
-
-	if (dirs == NULL) return FALSE;
-	
-	for (i = 0; dirs[i] != NULL; i++) {
-	        path = g_build_filename (dirs[i], 
-					 "applications", 
-					 filename, 
-					 NULL);
-
-	        if (g_file_test (path, G_FILE_TEST_IS_REGULAR)) break;
-	
-	        g_free (path);
-		path = NULL;
-	}
-	
-	if (path != NULL) {
-	        ret = launch_desktop_item (path, user_time, &error);
-	
-	        if (ret == -1 || error != NULL) {
-	                g_warning ("Cannot launch desktop item '%s': %s\n",
-	                           path, 
-				   error ? error->message : "unknown error");
-
-	                g_clear_error (&error);
-	        }
-	
-	        g_free (path);
-	}
-	
-	return ret >= 0;
-}
-
-/* Above code courtesy of Evince hackers */
-
 static gchar *dot_dir = NULL;
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]