/* We test for the presence of a dummy file which is created once
and deleted during normal runtime, but persists in case of a crash. */
katze_assign (config_file, build_config_filename ("running"));
- if (g_file_test (config_file, G_FILE_TEST_EXISTS))
+ if (katze_object_get_boolean (settings, "show-crash-dialog")
+ && g_file_test (config_file, G_FILE_TEST_EXISTS))
{
GtkWidget* dialog = midori_create_diagnostic_dialog (settings, _session);
gtk_dialog_run (GTK_DIALOG (dialog));
/* Page "General" */
PAGE_NEW (GTK_STOCK_HOME, _("General"));
FRAME_NEW (_("Startup"));
- TABLE_NEW (2, 2);
+ TABLE_NEW (3, 2);
label = katze_property_label (settings, "load-on-startup");
INDENTED_ADD (label, 0, 1, 0, 1);
button = katze_property_proxy (settings, "load-on-startup", NULL);
/* TODO: We need something like "use current website" */
entry = katze_property_proxy (settings, "homepage", NULL);
FILLED_ADD (entry, 1, 2, 1, 2);
+ button = katze_property_proxy (settings, "show-crash-dialog", "blurb");
+ SPANNED_ADD (button, 0, 2, 2, 3);
FRAME_NEW (_("Transfers"));
TABLE_NEW (3, 2);
label = katze_property_label (settings, "download-folder");
MidoriStartup load_on_startup;
gchar* homepage;
+ gboolean show_crash_dialog;
gchar* download_folder;
gchar* download_manager;
gchar* text_editor;
PROP_LOAD_ON_STARTUP,
PROP_HOMEPAGE,
+ PROP_SHOW_CRASH_DIALOG,
PROP_DOWNLOAD_FOLDER,
PROP_DOWNLOAD_MANAGER,
PROP_TEXT_EDITOR,
"http://www.google.com",
flags));
+ /**
+ * MidoriWebSettings:show-crash-dialog:
+ *
+ * Show a dialog after Midori crashed.
+ *
+ * Since: 0.1.2
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_SHOW_CRASH_DIALOG,
+ g_param_spec_boolean (
+ "show-crash-dialog",
+ _("Show crash dialog"),
+ _("Show a dialog after Midori crashed"),
+ TRUE,
+ flags));
+
g_object_class_install_property (gobject_class,
PROP_DOWNLOAD_FOLDER,
g_param_spec_string (
case PROP_HOMEPAGE:
katze_assign (web_settings->homepage, g_value_dup_string (value));
break;
+ case PROP_SHOW_CRASH_DIALOG:
+ web_settings->show_crash_dialog = g_value_get_boolean (value);
+ break;
case PROP_DOWNLOAD_FOLDER:
katze_assign (web_settings->download_folder, g_value_dup_string (value));
break;
case PROP_HOMEPAGE:
g_value_set_string (value, web_settings->homepage);
break;
+ case PROP_SHOW_CRASH_DIALOG:
+ g_value_set_boolean (value, web_settings->show_crash_dialog);
+ break;
case PROP_DOWNLOAD_FOLDER:
g_value_set_string (value, web_settings->download_folder);
break;