[gnome-photos] source-manager: Check GoaAccount:photos-disabled when refreshing
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] source-manager: Check GoaAccount:photos-disabled when refreshing
- Date: Tue, 10 Dec 2013 23:35:09 +0000 (UTC)
commit 8d68ac80bd3d67d6fd0c296f61a04bedf58640ac
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Dec 11 00:27:05 2013 +0100
source-manager: Check GoaAccount:photos-disabled when refreshing
When the "Photos" switch is flipped in the Online Accounts panel
GoaClient::account-changed is emitted twice. Once each for:
- org.freedesktop.DBus.Properties.PropertiesChanged
- org.freedesktop.DBus.ObjectManager.Interfaces[Added|Removed]
We should filter based on GoaAccount:photos-disabled too, so that we
catch the addition or removal of an account as soon as possible.
src/photos-source-manager.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-source-manager.c b/src/photos-source-manager.c
index 2d75d13..bacc73d 100644
--- a/src/photos-source-manager.c
+++ b/src/photos-source-manager.c
@@ -55,11 +55,16 @@ photos_source_manager_refresh_accounts (PhotosSourceManager *self)
for (l = accounts; l != NULL; l = l->next)
{
+ GoaAccount *account;
GoaObject *object = GOA_OBJECT (l->data);
PhotosSource *source;
gchar *id;
- if (goa_object_peek_account (object) == NULL)
+ account = goa_object_peek_account (object);
+ if (account == NULL)
+ continue;
+
+ if (goa_account_get_photos_disabled (account))
continue;
if (goa_object_peek_photos (object) == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]