From: Christian Dywan Date: Thu, 17 Feb 2011 18:53:54 +0000 (+0100) Subject: Don't save config file on state related property changes X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e272fc04f2724568ecbae66a5322388bca604c1a;p=midori Don't save config file on state related property changes --- diff --git a/midori/main.c b/midori/main.c index 06b9e7a5..805a6930 100644 --- a/midori/main.c +++ b/midori/main.c @@ -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);