[gnome-control-center] RANDR - Desensitize the on/off radio buttons if we are in Mirror Screens mode



commit 0f0e35d5094e41b4017fa154eaf332839561e7f6
Author: Federico Mena Quintero <federico novell com>
Date:   Thu Dec 10 12:09:24 2009 -0600

    RANDR - Desensitize the on/off radio buttons if we are in Mirror Screens mode
    
    This makes it even more obvious that you don't need to turn on
    individual outputs for Mirror Screens to work properly.
    
    It also means that we don't support "combined" setups like two mirrored
    screens and one extended screen.  It seems that the majority of people only care about a few cases:
    
      - Laptop plus projector or monitor showing the same thing.
      - Computer plus secondary monitor(s) with an extended desktop.
      - Laptop plus docking station with external monitor only (built-in LCD turned off).
    
    For more exotic combinations, people can use the xrandr(1) tool.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 capplets/display/xrandr-capplet.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index 69b95f1..9612fd7 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -542,7 +542,11 @@ rebuild_on_off_radios (App *app)
     g_signal_handlers_block_by_func (app->monitor_on_radio, G_CALLBACK (monitor_on_off_toggled_cb), app);
     g_signal_handlers_block_by_func (app->monitor_off_radio, G_CALLBACK (monitor_on_off_toggled_cb), app);
 
-    if (app->current_output)
+    sensitive = FALSE;
+    on_active = FALSE;
+    off_active = FALSE;
+
+    if (!app->current_configuration->clone && app->current_output)
     {
 	if (count_active_outputs (app) > 1 || !app->current_output->on)
 	    sensitive = TRUE;
@@ -552,12 +556,6 @@ rebuild_on_off_radios (App *app)
 	on_active = app->current_output->on;
 	off_active = !on_active;
     }
-    else
-    {
-	sensitive = FALSE;
-	on_active = FALSE;
-	off_active = FALSE;
-    }
 
     gtk_widget_set_sensitive (app->monitor_on_radio, sensitive);
     gtk_widget_set_sensitive (app->monitor_off_radio, sensitive);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]