[gnome-photos] 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] source-notification: Be more strict about what is acceptable
- Date: Thu, 11 Jan 2018 10:27:17 +0000 (UTC)
commit 4764d4209333c415cbbd904b54369948349cb642
Author: Debarshi Ray <debarshir gnome org>
Date: Sun Sep 3 14:28:18 2017 +0200
source-notification: Be more strict about what is acceptable
src/photos-source-notification.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/src/photos-source-notification.c b/src/photos-source-notification.c
index d723a8bb..6d0d5416 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]