[evince] smclient: Update smclient from libegg



commit 8041cc524a55a9f0943b382212daefb88f7bdb9b
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sat Nov 19 13:33:58 2011 +0100

    smclient: Update smclient from libegg
    
    https://bugzilla.gnome.org/show_bug.cgi?id=631612

 cut-n-paste/smclient/eggdesktopfile.c   |   12 ++++++++++--
 cut-n-paste/smclient/eggsmclient-xsmp.c |    7 ++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/cut-n-paste/smclient/eggdesktopfile.c b/cut-n-paste/smclient/eggdesktopfile.c
index b50f225..8bc072a 100644
--- a/cut-n-paste/smclient/eggdesktopfile.c
+++ b/cut-n-paste/smclient/eggdesktopfile.c
@@ -185,6 +185,9 @@ egg_desktop_file_new_from_key_file (GKeyFile    *key_file,
 	{
 	  g_set_error (error, EGG_DESKTOP_FILE_ERROR,
 		       EGG_DESKTOP_FILE_ERROR_INVALID,
+		       /* translators: 'Version' is from a desktop file, and
+			* should not be translated. '%s' would probably be a
+			* version number. */
 		       _("Unrecognized desktop file Version '%s'"), version);
 	  g_free (version);
 	  g_key_file_free (key_file);
@@ -201,8 +204,11 @@ egg_desktop_file_new_from_key_file (GKeyFile    *key_file,
   else
     desktop_file->source = g_strdup (source);
 
-  desktop_file->name = g_key_file_get_string (key_file, EGG_DESKTOP_FILE_GROUP,
-					      EGG_DESKTOP_FILE_KEY_NAME, error);
+  desktop_file->name = g_key_file_get_locale_string (key_file,
+						     EGG_DESKTOP_FILE_GROUP,
+						     EGG_DESKTOP_FILE_KEY_NAME,
+						     NULL,
+						     error);
   if (!desktop_file->name)
     {
       egg_desktop_file_free (desktop_file);
@@ -1380,6 +1386,8 @@ egg_desktop_file_launch (EggDesktopFile *desktop_file,
 	{
 	  g_set_error (error, EGG_DESKTOP_FILE_ERROR,
 		       EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE,
+		       /* translators: The 'Type=Link' string is found in a
+			* desktop file, and should not be translated. */
 		       _("Can't pass document URIs to a 'Type=Link' desktop entry"));
 	  return FALSE;
 	}	  
diff --git a/cut-n-paste/smclient/eggsmclient-xsmp.c b/cut-n-paste/smclient/eggsmclient-xsmp.c
index 20cd23b..679df5e 100644
--- a/cut-n-paste/smclient/eggsmclient-xsmp.c
+++ b/cut-n-paste/smclient/eggsmclient-xsmp.c
@@ -193,6 +193,11 @@ egg_sm_client_xsmp_class_init (EggSMClientXSMPClass *klass)
 EggSMClient *
 egg_sm_client_xsmp_new (void)
 {
+#if GTK_CHECK_VERSION(3,0,0)
+  if (!GDK_IS_X11_DISPLAY_MANAGER (gdk_display_manager_get ()))
+    return NULL;
+#endif
+
   if (!g_getenv ("SESSION_MANAGER"))
     return NULL;
 
@@ -368,7 +373,7 @@ sm_client_xsmp_startup (EggSMClient *client,
       free (ret_client_id);
 
       gdk_threads_enter ();
-#if !GTK_CHECK_VERSION(2,91,7) && !GTK_CHECK_VERSION(3,0,0)
+#if !GTK_CHECK_VERSION(2,23,3) && !GTK_CHECK_VERSION(3,0,0)
       gdk_set_sm_client_id (xsmp->client_id);
 #else
       gdk_x11_set_sm_client_id (xsmp->client_id);



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