seahorse r2507 - in trunk: . daemon src
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: seahorse r2507 - in trunk: . daemon src
- Date: Sun, 14 Sep 2008 13:41:42 +0000 (UTC)
Author: nnielsen
Date: Sun Sep 14 13:41:42 2008
New Revision: 2507
URL: http://svn.gnome.org/viewvc/seahorse?rev=2507&view=rev
Log:
* src/main.c:
* daemon/seahorse-daemon.c: Check result of gtk_init_with_args().
Should fix bug #544352. Patch by Christian Persch.
Modified:
trunk/ChangeLog
trunk/daemon/seahorse-daemon.c
trunk/src/main.c
Modified: trunk/daemon/seahorse-daemon.c
==============================================================================
--- trunk/daemon/seahorse-daemon.c (original)
+++ trunk/daemon/seahorse-daemon.c Sun Sep 14 13:41:42 2008
@@ -182,13 +182,22 @@
{
SeahorseOperation *op;
GOptionContext *octx = NULL;
+ GError *error = NULL;
+ g_thread_init (NULL);
+
seahorse_secure_memory_init ();
octx = g_option_context_new ("");
g_option_context_add_main_entries (octx, options, GETTEXT_PACKAGE);
- gtk_init_with_args (&argc, &argv, _("Encryption Daemon (Seahorse)"), (GOptionEntry *) options, GETTEXT_PACKAGE, NULL);
+ if (!gtk_init_with_args (&argc, &argv, _("Encryption Daemon (Seahorse)"),
+ (GOptionEntry *)options, GETTEXT_PACKAGE, &error)) {
+ g_printerr ("seahorse-daemon: %s\n", error->message);
+ g_error_free (error);
+ exit (1);
+ }
+
/*
* All functions after this point have to print messages
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Sun Sep 14 13:41:42 2008
@@ -57,8 +57,11 @@
main (int argc, char **argv)
{
SeahorseOperation *op = NULL;
+ GError *error = NULL;
int ret = 0;
+ g_thread_init (NULL);
+
seahorse_secure_memory_init ();
#ifdef ENABLE_NLS
@@ -67,7 +70,11 @@
textdomain (GETTEXT_PACKAGE);
#endif
- gtk_init_with_args (&argc, &argv, _("Encryption Key Manager"), NULL, GETTEXT_PACKAGE, NULL);
+ if (!gtk_init_with_args (&argc, &argv, _("Encryption Key Manager"), NULL, GETTEXT_PACKAGE, &error)) {
+ g_printerr ("seahorse: %s\n", error->message);
+ g_error_free (error);
+ exit (1);
+ }
/* Insert Icons into Stock */
seahorse_gtkstock_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]