Use gtk_init_with_args().

This commit is contained in:
Přemysl Eric Janouch 2011-02-13 20:41:11 +01:00
parent ebd4cd3a17
commit cffc6f01a5
1 changed files with 13 additions and 6 deletions

View File

@ -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
*/
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;
}
gtk_init (&argc, &argv);
/* 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;