+
+ // show everything...
+
+ gtk_widget_show (winMain);
+ update_cursor();
+
+ // load the MRU
+
+ init_mru();
+
+ // and finally, open a file specified on the command line
+ // (moved here because display parameters weren't initialized yet...)
+
+ if (argc == 1) return;
+ set_cursor_busy(TRUE);
+ if (g_path_is_absolute(argv[1]))
+ tmpfn = g_strdup(argv[1]);
+ else {
+ tmppath = g_get_current_dir();
+ tmpfn = g_build_filename(tmppath, argv[1], NULL);
+ g_free(tmppath);
+ }
+ success = open_journal(tmpfn);
+ g_free(tmpfn);
+ set_cursor_busy(FALSE);
+ if (!success) {
+ w = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Error opening file '%s'", argv[1]);
+ gtk_dialog_run(GTK_DIALOG(w));
+ gtk_widget_destroy(w);
+ }