[Xfce4-commits] <xfce4-settings:bluesabre/display-settings2> Make mirror button insensitive if not possible

Sean Davis noreply at xfce.org
Sat Jan 25 20:06:06 CET 2014


Updating branch refs/heads/bluesabre/display-settings2
         to 85831c2b33f50f7e3fa2e1a62fcbc03477635f8e (commit)
       from 14f6f4320815330bd8ed1095d80e8dd1fc12a61f (commit)

commit 85831c2b33f50f7e3fa2e1a62fcbc03477635f8e
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Dec 11 10:56:51 2013 +0000

    Make mirror button insensitive if not possible
    
    Signed-off-by: Sean Davis <smd.seandavis at gmail.com>

 dialogs/display-settings/main.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 0789517..a6f90a2 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1869,6 +1869,7 @@ display_settings_show_minimal_dialog (GdkDisplay *display)
     GObject    *only_display1, *only_display2, *mirror_displays;
     GObject    *extend_right, *advanced, *fake_button, *label;
     GError     *error = NULL;
+    RRMode      mode;
 
     builder = gtk_builder_new ();
 
@@ -1911,6 +1912,12 @@ display_settings_show_minimal_dialog (GdkDisplay *display)
             gtk_widget_set_tooltip_text(GTK_WIDGET(label), xfce_randr->friendly_name[1]);
             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (only_display2),
                                           xfce_randr->mode[1] != None);
+                                          
+            /* Can outputs be cloned? */
+            if (display_settings_get_n_active_outputs () > 1)
+                mode = xfce_randr_clonable_mode (xfce_randr);
+
+            gtk_widget_set_sensitive (GTK_WIDGET (mirror_displays), mode != None);
 
             if (xfce_randr->mode[0] != None && xfce_randr->mode[1] != None)
             {


More information about the Xfce4-commits mailing list