- if (argc >= 2) {
- if (strcmp (argv[1], "showui") == 0)
- show_ui_without_top_application_method = TRUE;
+ GError *error;
+ GOptionContext *context;
+
+ context = g_option_context_new ("- Modest email client");
+ g_option_context_add_main_entries (context, option_entries, GETTEXT_PACKAGE);
+ g_option_context_add_group (context, gtk_get_option_group (TRUE));
+ if (!g_option_context_parse (context, &argc, &argv, &error)) {
+ g_print ("option parsing failed: %s\n", error->message);
+ exit (1);