kov changed gksu/trunk/ChangeLog, gksu/trunk/nautilus-gksu/libnautilus-gksu.c

Gustavo Noronha kov at costa.debian.org
Wed Aug 9 11:29:28 UTC 2006


Mensagem de log: 
do not show the menu item for x-nautilus-desktop uri schemes


-----


Modified: gksu/trunk/ChangeLog
===================================================================
--- gksu/trunk/ChangeLog	2006-08-09 03:07:26 UTC (rev 687)
+++ gksu/trunk/ChangeLog	2006-08-09 11:29:27 UTC (rev 688)
@@ -5,6 +5,8 @@
 	  what program to run for the file; that should address the
 	  segfault related in the Debian BTS:
 	    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380407
+	- do not show the menu item for items using the x-nautilus-desktop
+	  uri scheme; finishes the solution of the bug mentioned above
 
 2006-08-06  Gustavo Noronha Silva  <kov at debian.org>
 

Modified: gksu/trunk/nautilus-gksu/libnautilus-gksu.c
===================================================================
--- gksu/trunk/nautilus-gksu/libnautilus-gksu.c	2006-08-09 03:07:26 UTC (rev 687)
+++ gksu/trunk/nautilus-gksu/libnautilus-gksu.c	2006-08-09 11:29:27 UTC (rev 688)
@@ -112,12 +112,25 @@
     if (geteuid () == 0)
       return NULL;
 
-    /* only add a menu item if a single file is selected */
+    /* only add a menu item if a single file is selected ... */
     if (files == NULL || files->next != NULL)
       return NULL;
 
     file = files->data;
 
+    /* ... and if it is not a nautilus special item */
+    {
+      gchar *uri_scheme = NULL;
+
+      uri_scheme = nautilus_file_info_get_uri_scheme (file);
+      if (!strncmp (uri_scheme, "x-nautilus-desktop", 18))
+	{
+	  g_free (uri_scheme);
+	  return NULL;
+	}
+      g_free (uri_scheme);
+    }
+
     /* create the context menu item */
     item = nautilus_menu_item_new ("Gksu::open_as_root",
 				   _("Open as administrator"),




More information about the gksu-commits mailing list