[seahorse-nautilus] Report GTK+ initialization errors



commit 29c4c93d62e25c2030313fced7cc7eac9af1ff03
Author: Jérémy Bobbio <lunar debian org>
Date:   Thu May 16 09:27:15 2013 +0000

    Report GTK+ initialization errors

 tool/seahorse-tool.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/tool/seahorse-tool.c b/tool/seahorse-tool.c
index ad82097..076d448 100644
--- a/tool/seahorse-tool.c
+++ b/tool/seahorse-tool.c
@@ -671,6 +671,7 @@ check_dialogs (gpointer dummy)
 int
 main (int argc, char **argv)
 {
+    GError *err = NULL;
     GOptionContext *octx = NULL;
     SeahorseToolMode mode;
     gchar **uris = NULL;
@@ -692,7 +693,11 @@ main (int argc, char **argv)
     octx = g_option_context_new ("");
     g_option_context_add_main_entries (octx, options, GETTEXT_PACKAGE);
 
-    gtk_init_with_args (&argc, &argv, _("File Encryption Tool"), (GOptionEntry *) options, GETTEXT_PACKAGE, 
NULL);
+    if (!gtk_init_with_args (&argc, &argv, _("File Encryption Tool"), (GOptionEntry *) options, 
GETTEXT_PACKAGE, &err)) {
+        fprintf (stderr, "seahorse-tool: %s\n", err->message);
+        g_error_free (err);
+        return 2;
+    }
 
     /* Load up all our arguments */
     uris = read_uri_arguments ();


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