]> spindle.queued.net Git - midori/commitdiff
Don't save config file on state related property changes
authorChristian Dywan <christian@twotoasts.de>
Thu, 17 Feb 2011 18:53:54 +0000 (19:53 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 17 Feb 2011 18:54:36 +0000 (19:54 +0100)
midori/main.c

index 06b9e7a507e1de29fce68d09fdf2562702e473f1..805a69307186153cd2f3ca4b18930c0e603cefdf 100644 (file)
@@ -596,8 +596,15 @@ settings_notify_cb (MidoriWebSettings* settings,
                     GParamSpec*        pspec,
                     MidoriApp*         app)
 {
-    gchar* config_file = build_config_filename ("config");
     GError* error = NULL;
+    gchar* config_file;
+
+    /* Skip state related properties to avoid disk IO */
+    if (g_str_has_prefix (pspec->name, "last-window-")
+     || g_str_has_prefix (pspec->name, "last-panel-"))
+        return;
+
+    config_file = build_config_filename ("config");
     if (!settings_save_to_file (settings, app, config_file, &error))
     {
         g_warning (_("The configuration couldn't be saved. %s"), error->message);