[gnome-control-center/gnome-3-12] 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/gnome-3-12] display: make the Apply button unsensitive for invalid configuration
- Date: Wed, 4 Jun 2014 14:50:46 +0000 (UTC)
commit 9230a8504e28bfc6a6e34166726ae371fdb4670b
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 5a41d80..aa6085c 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]