]> spindle.queued.net Git - midori/commitdiff
Remove session when quitting cleanly and it's not loaded at startup
authorChristian Dywan <christian@twotoasts.de>
Sun, 23 Aug 2009 21:58:13 +0000 (23:58 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 23 Aug 2009 21:58:13 +0000 (23:58 +0200)
midori/main.c

index ffbf2b28eb571bdc3609d9b222c93db86b7904fb..6996ccd90fcbfec5aa3d91f3f42a27ab735bfcfc 100644 (file)
@@ -1984,6 +1984,14 @@ main (int    argc,
         midori_remove_config_file (clear_prefs, MIDORI_CLEAR_TRASH, "tabtrash.xbel");
     }
 
+    if (katze_object_get_boolean (settings, "load-on-startup")
+        != MIDORI_STARTUP_LAST_OPEN_PAGES)
+    {
+        katze_assign (config_file, build_config_filename ("session.xbel"));
+        if (is_writable (config_file))
+            g_unlink (config_file);
+    }
+
     g_object_unref (settings);
     g_object_unref (app);
     g_free (config_file);