[gnome-photos/wip/rishi/collection: 14/29] source: Offer symbolic icons, if possible



commit b4bad9076138373df0c59c74192145e3a52fcf24
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Jan 12 07:52:14 2018 +0100

    source: Offer symbolic icons, if possible
    
    A subsequent commit will add support for GMount-backed Sources, which
    need to be represented by symbolic icons in the UI.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751212

 src/photos-source.c | 9 +++++++++
 src/photos-source.h | 2 ++
 2 files changed, 11 insertions(+)
---
diff --git a/src/photos-source.c b/src/photos-source.c
index f9e60eb6..aabd74b0 100644
--- a/src/photos-source.c
+++ b/src/photos-source.c
@@ -35,6 +35,7 @@ struct _PhotosSource
 {
   GObject parent_instance;
   GIcon *icon;
+  GIcon *symbolic_icon;
   GoaObject *object;
   gboolean builtin;
   gchar *id;
@@ -114,6 +115,7 @@ photos_source_dispose (GObject *object)
 
   g_clear_object (&self->icon);
   g_clear_object (&self->object);
+  g_clear_object (&self->symbolic_icon);
 
   G_OBJECT_CLASS (photos_source_parent_class)->dispose (object);
 }
@@ -325,3 +327,10 @@ photos_source_get_icon (PhotosSource *self)
 {
   return self->icon;
 }
+
+
+GIcon *
+photos_source_get_symbolic_icon (PhotosSource *self)
+{
+  return self->symbolic_icon;
+}
diff --git a/src/photos-source.h b/src/photos-source.h
index db30d05b..1067137a 100644
--- a/src/photos-source.h
+++ b/src/photos-source.h
@@ -44,6 +44,8 @@ GoaObject          *photos_source_get_goa_object         (PhotosSource *self);
 
 GIcon              *photos_source_get_icon               (PhotosSource *self);
 
+GIcon              *photos_source_get_symbolic_icon      (PhotosSource *self);
+
 G_END_DECLS
 
 #endif /* PHOTOS_SOURCE_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]