[gnome-control-center] display: make the Apply button unsensitive for invalid configuration
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] display: make the Apply button unsensitive for invalid configuration
- Date: Wed, 4 Jun 2014 14:50:08 +0000 (UTC)
commit 64b3fdc2fcdde46e99f657a3da1ffc7c2f7c508c
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Mar 25 18:03:43 2014 +0100
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 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 4ca89fb..d806fcb 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]