[gnome-photos/wip/rishi/collection: 11/20] source-notification: Be more strict about what is acceptable
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/collection: 11/20] source-notification: Be more strict about what is acceptable
- Date: Wed, 6 Sep 2017 07:31:28 +0000 (UTC)
commit c905ae20bf6a38cc7d20f96cdbd5d60fb94f21b0
Author: Debarshi Ray <debarshir gnome org>
Date: Sun Sep 3 14:28:18 2017 +0200
source-notification: Be more strict about what is acceptable
https://bugzilla.gnome.org/show_bug.cgi?id=751212
src/photos-source-notification.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-source-notification.c b/src/photos-source-notification.c
index 0aaafbd..5637651 100644
--- a/src/photos-source-notification.c
+++ b/src/photos-source-notification.c
@@ -249,7 +249,21 @@ photos_source_notification_class_init (PhotosSourceNotificationClass *class)
GtkWidget *
photos_source_notification_new (PhotosSource *source)
{
+ GoaAccount *account;
+ GoaObject *object;
+ gboolean attention_needed;
+
g_return_val_if_fail (PHOTOS_IS_SOURCE (source), NULL);
+
+ object = photos_source_get_goa_object (source);
+ g_return_val_if_fail (GOA_IS_OBJECT (object), NULL);
+
+ account = goa_object_peek_account (object);
+ g_return_val_if_fail (GOA_IS_ACCOUNT (account), NULL);
+
+ attention_needed = goa_account_get_attention_needed (account);
+ g_return_val_if_fail (attention_needed, NULL);
+
return g_object_new (PHOTOS_TYPE_SOURCE_NOTIFICATION, "source", source, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]