From 64b3fdc2fcdde46e99f657a3da1ffc7c2f7c508c Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Tue, 25 Mar 2014 18:03:43 +0100 Subject: [PATCH] display: make the Apply button unsensitive for invalid configuration If the configuration is not applicable, due to HW constraints we know about, make the button insensitive, to avoid an error dialog later on. https://bugzilla.gnome.org/show_bug.cgi?id=727023 --- panels/display/cc-display-panel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c index 4ca89fb1a..d806fcb4e 100644 --- a/panels/display/cc-display-panel.c +++ b/panels/display/cc-display-panel.c @@ -1114,6 +1114,13 @@ update_apply_button (CcDisplayPanel *panel) gboolean config_equal; GnomeRRConfig *current_configuration; + if (!gnome_rr_config_applicable (priv->current_configuration, + priv->screen, NULL)) + { + gtk_widget_set_sensitive (priv->apply_button, FALSE); + return; + } + current_configuration = gnome_rr_config_new_current (priv->screen, NULL); /* this checks if the same modes will be set on the outputs */