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

Jérôme Guelfucci noreply at xfce.org
Sun Jun 27 23:04:04 CEST 2010


Updating branch refs/heads/xrandr-display-settings
         to 25be646475477e210acef87330af596ea2bcc92b (commit)
       from 99bf2e28ee1db5d5273f2120eafd7fba3a9295ee (commit)

commit 25be646475477e210acef87330af596ea2bcc92b
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