From e272fc04f2724568ecbae66a5322388bca604c1a Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 17 Feb 2011 19:53:54 +0100 Subject: [PATCH] Don't save config file on state related property changes --- midori/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.39.5