aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-13 20:41:11 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-13 20:55:03 +0100
commitcffc6f01a5a2f84f520872e1f8335d479c9390d6 (patch)
tree0c8dfb48ac853f23975e573fad470831054f5ec9 /src
parentebd4cd3a17cec7ef5690d60ed5125839c75c5a0c (diff)
downloadlogdiag-cffc6f01a5a2f84f520872e1f8335d479c9390d6.tar.gz
logdiag-cffc6f01a5a2f84f520872e1f8335d479c9390d6.tar.xz
logdiag-cffc6f01a5a2f84f520872e1f8335d479c9390d6.zip
Use gtk_init_with_args().
Diffstat (limited to 'src')
-rw-r--r--src/logdiag.c21
1 files 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;