file-roller r2648 - in trunk: . copy-n-paste



Author: paobac
Date: Thu Apr  9 08:58:16 2009
New Revision: 2648
URL: http://svn.gnome.org/viewvc/file-roller?rev=2648&view=rev

Log:
2009-04-09  Paolo Bacchilega  <paobac svn gnome org>

	* copy-n-paste/eggdesktopfile.c: 
	* copy-n-paste/eggsmclient.c: 
	* copy-n-paste/eggsmclient-xsmp.c: 

	updated from libegg


Modified:
   trunk/ChangeLog
   trunk/copy-n-paste/eggdesktopfile.c
   trunk/copy-n-paste/eggsmclient-xsmp.c
   trunk/copy-n-paste/eggsmclient.c

Modified: trunk/copy-n-paste/eggdesktopfile.c
==============================================================================
--- trunk/copy-n-paste/eggdesktopfile.c	(original)
+++ trunk/copy-n-paste/eggdesktopfile.c	Thu Apr  9 08:58:16 2009
@@ -987,7 +987,7 @@
 					     NULL);
 }
 
-#define EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH (30 /* seconds */ * 1000)
+#define EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH (30 /* seconds */)
 
 typedef struct {
   GdkDisplay *display;
@@ -1017,8 +1017,8 @@
   sn_data->display = g_object_ref (display);
   sn_data->startup_id = g_strdup (startup_id);
 
-  g_timeout_add (EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH,
-		 startup_notification_timeout, sn_data);
+  g_timeout_add_seconds (EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH,
+			 startup_notification_timeout, sn_data);
 }
 #endif /* GTK 2.12 */
 
@@ -1072,7 +1072,7 @@
 			  GError **error)
 {
   EggDesktopFileLaunchOption option;
-  GSList *translated_documents, *docs;
+  GSList *translated_documents = NULL, *docs = NULL;
   char *command, **argv;
   int argc, i, screen_num;
   gboolean success, current_success;
@@ -1440,16 +1440,18 @@
       g_error_free (error);
     }
 
-  /* Set localized application name and default window icon */
-  if (egg_desktop_file->name)
-    g_set_application_name (egg_desktop_file->name);
-  if (egg_desktop_file->icon)
-    {
-      if (g_path_is_absolute (egg_desktop_file->icon))
-	gtk_window_set_default_icon_from_file (egg_desktop_file->icon, NULL);
-      else
-	gtk_window_set_default_icon_name (egg_desktop_file->icon);
-    }
+  if (egg_desktop_file) {
+    /* Set localized application name and default window icon */
+    if (egg_desktop_file->name)
+      g_set_application_name (egg_desktop_file->name);
+    if (egg_desktop_file->icon)
+      {
+        if (g_path_is_absolute (egg_desktop_file->icon))
+          gtk_window_set_default_icon_from_file (egg_desktop_file->icon, NULL);
+        else
+          gtk_window_set_default_icon_name (egg_desktop_file->icon);
+      }
+  }
 
   G_UNLOCK (egg_desktop_file);
 }

Modified: trunk/copy-n-paste/eggsmclient-xsmp.c
==============================================================================
--- trunk/copy-n-paste/eggsmclient-xsmp.c	(original)
+++ trunk/copy-n-paste/eggsmclient-xsmp.c	Thu Apr  9 08:58:16 2009
@@ -795,10 +795,14 @@
   if (desktop_file)
     {
       GKeyFile *merged_file;
+      char *desktop_file_path;
 
       merged_file = g_key_file_new ();
-      if (g_key_file_load_from_file (merged_file,
-				     egg_desktop_file_get_source (desktop_file),
+      desktop_file_path =
+	g_filename_from_uri (egg_desktop_file_get_source (desktop_file),
+			     NULL, NULL);
+      if (desktop_file_path &&
+	  g_key_file_load_from_file (merged_file, desktop_file_path,
 				     G_KEY_FILE_KEEP_COMMENTS |
 				     G_KEY_FILE_KEEP_TRANSLATIONS, NULL))
 	{
@@ -841,8 +845,11 @@
 				 EGG_DESKTOP_FILE_KEY_EXEC,
 				 exec);
 	  g_free (exec);
-
 	}
+      else
+	desktop_file = NULL;
+
+      g_free (desktop_file_path);
     }
 
   /* Now write state_file to disk. (We can't use mktemp(), because

Modified: trunk/copy-n-paste/eggsmclient.c
==============================================================================
--- trunk/copy-n-paste/eggsmclient.c	(original)
+++ trunk/copy-n-paste/eggsmclient.c	Thu Apr  9 08:58:16 2009
@@ -178,6 +178,7 @@
 static gboolean sm_client_disable = FALSE;
 static char *sm_client_state_file = NULL;
 static char *sm_client_id = NULL;
+static char *sm_config_prefix = NULL;
 
 static gboolean
 sm_client_post_parse_func (GOptionContext  *context,
@@ -228,10 +229,17 @@
     { "sm-client-id", 0, 0,
       G_OPTION_ARG_STRING, &sm_client_id,
       N_("Specify session management ID"), N_("ID") },
-    /* Compatibility options */
+    /* GnomeClient compatibility option */
     { "sm-disable", 0, G_OPTION_FLAG_HIDDEN,
       G_OPTION_ARG_NONE, &sm_client_disable,
       NULL, NULL },
+    /* GnomeClient compatibility option. This is a dummy option that only
+     * exists so that sessions saved by apps with GnomeClient can be restored
+     * later when they've switched to EggSMClient. See bug #575308.
+     */
+    { "sm-config-prefix", 0, G_OPTION_FLAG_HIDDEN,
+      G_OPTION_ARG_STRING, &sm_config_prefix,
+      NULL, NULL },
     { NULL }
   };
   GOptionGroup *group;



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