}
#endif
-static void
-midori_app_quit_cb (MidoriApp* app)
-{
- gchar* config_file = build_config_filename ("running");
- g_unlink (config_file);
- g_free (config_file);
-}
-
static void
settings_notify_cb (MidoriWebSettings* settings,
GParamSpec* pspec,
}
}
+static void
+midori_app_quit_cb (MidoriBrowser* browser,
+ KatzeArray* session)
+{
+ gchar* config_file = build_config_filename ("running");
+ g_unlink (config_file);
+ g_free (config_file);
+
+ if (save_timeout && session)
+ midori_session_save_timeout_cb (session);
+}
+
static void
midori_browser_weak_notify_cb (MidoriBrowser* browser,
KatzeArray* session)
G_CALLBACK (midori_browser_session_cb), session);
g_signal_connect_after (browser, "remove-tab",
G_CALLBACK (midori_browser_session_cb), session);
+ g_signal_connect (app, "quit",
+ G_CALLBACK (midori_app_quit_cb), session);
g_object_weak_ref (G_OBJECT (session),
(GWeakNotify)(midori_browser_weak_notify_cb), browser);
signal_handler (int signal_id)
{
signal (signal_id, 0);
- midori_app_quit_cb (NULL);
+ midori_app_quit_cb (NULL, NULL);
if (kill (getpid (), signal_id))
exit (1);
}
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
- g_signal_connect (app, "quit", G_CALLBACK (midori_app_quit_cb), NULL);
midori_startup_timer ("Signal setup: \t%f");
g_object_set (app, "settings", settings,