[Xfce4-commits] <xfce4-settings:master> Only save when we changed something.

Nick Schermer noreply at xfce.org
Sat Aug 28 23:05:01 CEST 2010


Updating branch refs/heads/master
         to 8ecc47efd30be2939a9a6c235cba9eeaab2671e2 (commit)
       from 3b4bc0226e750cd8c2d14e86bf82ee809f0cc4c2 (commit)

commit 8ecc47efd30be2939a9a6c235cba9eeaab2671e2
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Sun Jun 27 23:02:27 2010 +0200

    Only save when we changed something.

 dialogs/display-settings/main.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index a0db5e6..95f6fd4 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -800,17 +800,20 @@ display_setting_output_toggled (GtkToggleButton *togglebutton,
 
     disabling = FALSE;
     if (is_active && XFCE_RANDR_MODE (xfce_randr) == None)
+    {
         XFCE_RANDR_MODE (xfce_randr) =
             xfce_randr_preferred_mode (xfce_randr, xfce_randr->active_output);
+        /* Apply the changes */
+        xfce_randr_save (xfce_randr, "Default", display_channel);
+    }
     else if (!is_active && XFCE_RANDR_MODE (xfce_randr) != None)
     {
         XFCE_RANDR_MODE (xfce_randr) = None;
         disabling = TRUE;
+        /* Apply the changes */
+        xfce_randr_save (xfce_randr, "Default", display_channel);
     }
 
-    /* Apply the changes */
-    xfce_randr_save (xfce_randr, "Default", display_channel);
-
     /* if the user attempted to disable an output, forcefully reload the view.
      * It's possible that it failed because it was the last active output.
      */



More information about the Xfce4-commits mailing list