[gnome-online-accounts] exchange: Update to work with the new *Disabled properties
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] exchange: Update to work with the new *Disabled properties
- Date: Thu, 5 Apr 2012 14:44:48 +0000 (UTC)
commit 0af6612505d0b1c9216cd5d01a5a1cc5575073a8
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Apr 4 21:03:49 2012 +0200
exchange: Update to work with the new *Disabled properties
Fixes: https://bugzilla.gnome.org/667889
src/goabackend/goaexchangeprovider.c | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/src/goabackend/goaexchangeprovider.c b/src/goabackend/goaexchangeprovider.c
index d613424..d021306 100644
--- a/src/goabackend/goaexchangeprovider.c
+++ b/src/goabackend/goaexchangeprovider.c
@@ -88,6 +88,7 @@ build_object (GoaProvider *provider,
GoaObjectSkeleton *object,
GKeyFile *key_file,
const gchar *group,
+ gboolean just_added,
GError **error)
{
GoaAccount *account;
@@ -114,6 +115,7 @@ build_object (GoaProvider *provider,
object,
key_file,
group,
+ just_added,
error))
goto out;
@@ -201,6 +203,26 @@ build_object (GoaProvider *provider,
g_free (host);
}
+ if (just_added)
+ {
+ goa_account_set_mail_disabled (account, !mail_enabled);
+ goa_account_set_calendar_disabled (account, !calendar_enabled);
+ goa_account_set_contacts_disabled (account, !contacts_enabled);
+
+ g_signal_connect (account,
+ "notify::mail-disabled",
+ G_CALLBACK (goa_util_account_notify_property_cb),
+ "MailEnabled");
+ g_signal_connect (account,
+ "notify::calendar-disabled",
+ G_CALLBACK (goa_util_account_notify_property_cb),
+ "CalendarEnabled");
+ g_signal_connect (account,
+ "notify::contacts-disabled",
+ G_CALLBACK (goa_util_account_notify_property_cb),
+ "ContactsEnabled");
+ }
+
ret = TRUE;
out:
@@ -545,17 +567,17 @@ show_account (GoaProvider *provider,
goa_util_add_row_switch_from_keyfile_with_blurb (GTK_TABLE (table), object,
_("Use for"),
- "MailEnabled",
+ "mail-disabled",
_("Mail"));
goa_util_add_row_switch_from_keyfile_with_blurb (GTK_TABLE (table), object,
NULL,
- "CalendarEnabled",
+ "calendar-disabled",
_("Calendar"));
goa_util_add_row_switch_from_keyfile_with_blurb (GTK_TABLE (table), object,
NULL,
- "ContactsEnabled",
+ "contacts-disabled",
_("Contacts"));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]