diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-11-04 02:45:49 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-11-04 02:45:49 +0800 |
commit | a3afea28b497781197b2dc7f22ec361f9a17b6d6 (patch) | |
tree | 65c725683a43c8b36f2e6d4b14573f84f9fa0035 /src/empathy.c | |
parent | 328c9b7cf5449f84b629c163680dea5a5a72f1b7 (diff) | |
download | gsoc2013-empathy-a3afea28b497781197b2dc7f22ec361f9a17b6d6.tar gsoc2013-empathy-a3afea28b497781197b2dc7f22ec361f9a17b6d6.tar.gz gsoc2013-empathy-a3afea28b497781197b2dc7f22ec361f9a17b6d6.tar.bz2 gsoc2013-empathy-a3afea28b497781197b2dc7f22ec361f9a17b6d6.tar.lz gsoc2013-empathy-a3afea28b497781197b2dc7f22ec361f9a17b6d6.tar.xz gsoc2013-empathy-a3afea28b497781197b2dc7f22ec361f9a17b6d6.tar.zst gsoc2013-empathy-a3afea28b497781197b2dc7f22ec361f9a17b6d6.zip |
Make use of gtk_init_with_args for command line parsing. Fixes bug #491985
2007-11-03 Xavier Claessens <xclaesse@gmail.com>
* src/empathy.c: Make use of gtk_init_with_args for command line
parsing. Fixes bug #491985 (Basilio Kublik).
svn path=/trunk/; revision=415
Diffstat (limited to 'src/empathy.c')
-rw-r--r-- | src/empathy.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/empathy.c b/src/empathy.c index 5786cb7ae..e23795f72 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -265,7 +265,7 @@ main (int argc, char *argv[]) EmpathyIdle *idle; EmpathyChandler *chandler; gboolean no_connect = FALSE; - GOptionContext *context; + GError *error = NULL; GOptionEntry options[] = { { "no-connect", 'n', 0, G_OPTION_ARG_NONE, &no_connect, @@ -280,12 +280,15 @@ main (int argc, char *argv[]) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); - context = g_option_context_new (_("- Empathy Instant Messenger")); - g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE); + if (!gtk_init_with_args (&argc, &argv, + _("- Empathy Instant Messenger"), + options, GETTEXT_PACKAGE, &error)) { + empathy_debug (DEBUG_DOMAIN, error->message); + return EXIT_FAILURE; + } g_set_application_name (PACKAGE_NAME); - gtk_init (&argc, &argv); gtk_window_set_default_icon_name ("empathy"); gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), PKGDATADIR G_DIR_SEPARATOR_S "icons"); |