[gnome-photos/wip/rishi/collection: 7/8] 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: 7/8] source-notification: Be more strict about what is acceptable
- Date: Sun, 3 Sep 2017 19:07:43 +0000 (UTC)
commit 90697cc063f5351c43fa1ee2d50697c4b63dfefd
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]