[gnome-online-accounts] provider: Desensitize and turn off the switches if there is an error
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] provider: Desensitize and turn off the switches if there is an error
- Date: Wed, 23 Jan 2013 13:53:10 +0000 (UTC)
commit f256ee54b566fb9d4f1edfaa98f24a8d4f77c901
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jan 23 14:43:16 2013 +0100
provider: Desensitize and turn off the switches if there is an error
Fixes: https://bugzilla.gnome.org/689645
src/goabackend/goaprovider.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index b0abd64..0b36dfa 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -982,11 +982,19 @@ goa_util_add_row_switch_from_keyfile_with_blurb (GtkGrid *left,
account = goa_object_peek_account (object);
g_object_get (account, property, &value, NULL);
switch_ = gtk_switch_new ();
- gtk_switch_set_active (GTK_SWITCH (switch_), !value);
- g_object_bind_property (switch_, "active",
- account, property,
- G_BINDING_BIDIRECTIONAL | G_BINDING_INVERT_BOOLEAN);
+ if (goa_account_get_attention_needed (account))
+ {
+ gtk_widget_set_sensitive (switch_, FALSE);
+ gtk_switch_set_active (GTK_SWITCH (switch_), FALSE);
+ }
+ else
+ {
+ gtk_switch_set_active (GTK_SWITCH (switch_), !value);
+ g_object_bind_property (switch_, "active",
+ account, property,
+ G_BINDING_BIDIRECTIONAL | G_BINDING_INVERT_BOOLEAN);
+ }
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX (hbox), FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]