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

Gustavo Noronha kov at costa.debian.org
Wed Aug 9 03:06:31 UTC 2006


Mensagem de log: 
implemented error checking for the code that finds out
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


-----


Modified: gksu/trunk/ChangeLog
===================================================================
--- gksu/trunk/ChangeLog	2006-08-06 19:53:26 UTC (rev 685)
+++ gksu/trunk/ChangeLog	2006-08-09 03:06:30 UTC (rev 686)
@@ -1,3 +1,11 @@
+2006-08-09  Gustavo Noronha Silva  <kov at debian.org>
+
+	* nautilus-gksu/libnautilus-gksu.c:
+	- implemented error checking for the code that finds out
+	  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
+
 2006-08-06  Gustavo Noronha Silva  <kov at debian.org>
 
 	* gksu/gksu.c:

Modified: gksu/trunk/nautilus-gksu/libnautilus-gksu.c
===================================================================
--- gksu/trunk/nautilus-gksu/libnautilus-gksu.c	2006-08-06 19:53:26 UTC (rev 685)
+++ gksu/trunk/nautilus-gksu/libnautilus-gksu.c	2006-08-09 03:06:30 UTC (rev 686)
@@ -200,9 +200,29 @@
   else
     {
       vfsapp = gnome_vfs_mime_get_default_application_for_uri (uri, mime_type);
+      if (vfsapp)
+	{
+	  cmd = g_strdup (gnome_vfs_mime_application_get_exec (vfsapp));
+	  gnome_vfs_mime_application_free (vfsapp);
+	}
+    }
 
-      cmd = g_strdup (gnome_vfs_mime_application_get_exec (vfsapp));
-      gnome_vfs_mime_application_free (vfsapp);
+  if (cmd == NULL)
+    {
+      GtkWidget *dialog;
+
+      dialog = gtk_message_dialog_new_with_markup (NULL, 0,
+						   GTK_MESSAGE_ERROR,
+						   GTK_BUTTONS_CLOSE,
+						   _("<big><b>"
+						     "Unable to determine the program to run."
+						     "</b></big>\n\n"
+						     "The item you selected cannot be open with "
+						     "administrator powers because the correct "
+						     "application cannot be determined."));
+      gtk_dialog_run (GTK_DIALOG(dialog));
+      gtk_widget_destroy (dialog);
+      return;
     }
 
   /*




More information about the gksu-commits mailing list