[Xfce4-commits] <midori:master> Don't save config file on state related property changes

Christian Dywan noreply at xfce.org
Thu Feb 17 19:56:04 CET 2011


Updating branch refs/heads/master
         to e272fc04f2724568ecbae66a5322388bca604c1a (commit)
       from 503ed3ac9471f67082a2d9bc2563edfaf2b1b0b3 (commit)

commit e272fc04f2724568ecbae66a5322388bca604c1a
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Feb 17 19:53:54 2011 +0100

    Don't save config file on state related property changes

 midori/main.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 06b9e7a..805a693 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);



More information about the Xfce4-commits mailing list