From: Xavier Claessens Date: Sat, 3 Nov 2007 18:45:49 +0000 (+0000) Subject: Make use of gtk_init_with_args for command line parsing. Fixes bug #491985 X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=a3afea28b497781197b2dc7f22ec361f9a17b6d6 Make use of gtk_init_with_args for command line parsing. Fixes bug #491985 2007-11-03 Xavier Claessens * src/empathy.c: Make use of gtk_init_with_args for command line parsing. Fixes bug #491985 (Basilio Kublik). svn path=/trunk/; revision=415 --- diff --git a/ChangeLog b/ChangeLog index 12698d74..ec3dd166 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-03 Xavier Claessens + + * src/empathy.c: Make use of gtk_init_with_args for command line + parsing. Fixes bug #491985 (Basilio Kublik). + 2007-11-03 Xavier Claessens * data/icons/hicolor_status_scalable_empathy-pending.svg: @@ -15,6 +20,10 @@ * data/icons/Makefile.am: Install SVG status images as scalable. Fixes bug #492984. +2007-11-03 Xavier Claessens + + * configure.ac: Bump version to 0.21.2. + 2007-10-28 Xavier Claessens * libempathy-gtk/empathy-contact-list-view.c: diff --git a/configure.ac b/configure.ac index 95c79ffb..96f65bb0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(Empathy, 0.21.1, http://bugzilla.gnome.org/browse.cgi?product=empathy) +AC_INIT(Empathy, 0.21.2, http://bugzilla.gnome.org/browse.cgi?product=empathy) AC_PREREQ(2.59) AC_COPYRIGHT([ Copyright (C) 2003-2007 Imendio AB diff --git a/src/empathy.c b/src/empathy.c index 5786cb7a..e23795f7 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");