From cffc6f01a5a2f84f520872e1f8335d479c9390d6 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sun, 13 Feb 2011 20:41:11 +0100 Subject: Use gtk_init_with_args(). --- src/logdiag.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/logdiag.c b/src/logdiag.c index 8191d7f..a7821e7 100644 --- a/src/logdiag.c +++ b/src/logdiag.c @@ -19,7 +19,8 @@ int main (int argc, char *argv[]) { - GtkWidget *wnd; + GtkWidget *window; + GError *error; setlocale (LC_ALL, ""); @@ -27,13 +28,19 @@ main (int argc, char *argv[]) bind_textdomain_codeset (GETTEXT_DOMAIN, "UTF-8"); textdomain (GETTEXT_DOMAIN); - /* For custom command line arguments, see: - * http://git.gnome.org/browse/glade3/tree/src/main.c - */ - - gtk_init (&argc, &argv); + error = NULL; + gtk_init_with_args (&argc, &argv, + N_("[FILE] - Schematic editor"), NULL, GETTEXT_DOMAIN, &error); + if (error) + { + g_warning ("%s", error->message); + g_error_free (error); + return 1; + } + + /* TODO: Open the file in the parameter, if present. */ gtk_window_set_default_icon_name (PROJECT_NAME); - wnd = ld_window_main_new (); + window = ld_window_main_new (); gtk_main (); return 0; -- cgit v1.2.3-70-g09d2