[totem] grilo: Better icon for optical discs



commit e8ea8a5f642dc0e7b913de869db1df5f21e414b0
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jan 17 08:49:16 2014 +0100

    grilo: Better icon for optical discs

 src/plugins/grilo/icon-helpers.c |   10 ++++++++++
 src/plugins/grilo/icon-helpers.h |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/grilo/icon-helpers.c b/src/plugins/grilo/icon-helpers.c
index dd28a38..bea2ca1 100644
--- a/src/plugins/grilo/icon-helpers.c
+++ b/src/plugins/grilo/icon-helpers.c
@@ -34,6 +34,7 @@ typedef enum {
        ICON_BOX = 0,
        ICON_VIDEO,
        ICON_VIDEO_THUMBNAILING,
+       ICON_OPTICAL,
        NUM_ICONS
 } IconType;
 
@@ -233,6 +234,8 @@ totem_grilo_get_icon (GrlMedia *media,
        if (GRL_IS_MEDIA_BOX (media))
                return g_object_ref (icons[ICON_BOX]);
        else if (GRL_IS_MEDIA_VIDEO (media)) {
+               if (g_str_equal (grl_media_get_source (media), "grl-optical-media"))
+                       return g_object_ref (icons[ICON_OPTICAL]);
                if (grl_media_get_thumbnail (media)) {
                        *thumbnailing = TRUE;
                        return g_object_ref (icons[ICON_VIDEO_THUMBNAILING]);
@@ -255,6 +258,12 @@ totem_grilo_get_box_icon (void)
        return icons[ICON_BOX];
 }
 
+const GdkPixbuf *
+totem_grilo_get_optical_icon (void)
+{
+       return icons[ICON_OPTICAL];
+}
+
 void
 totem_grilo_clear_icons (void)
 {
@@ -272,6 +281,7 @@ totem_grilo_setup_icons (Totem *totem)
        icons[ICON_BOX] = load_icon (totem, "folder-symbolic", THUMB_SEARCH_HEIGHT, FALSE);
        icons[ICON_VIDEO] = load_icon (totem, "folder-videos-symbolic", THUMB_SEARCH_HEIGHT, FALSE);
        icons[ICON_VIDEO_THUMBNAILING] = load_icon (totem, "folder-videos-symbolic", 24, TRUE);
+       icons[ICON_OPTICAL] = load_icon (totem, "media-optical-dvd-symbolic", THUMB_SEARCH_HEIGHT, FALSE);
 
        cache_thumbnails = g_hash_table_new_full (g_str_hash,
                                                  g_str_equal,
diff --git a/src/plugins/grilo/icon-helpers.h b/src/plugins/grilo/icon-helpers.h
index 0920ef2..a50f6cb 100644
--- a/src/plugins/grilo/icon-helpers.h
+++ b/src/plugins/grilo/icon-helpers.h
@@ -34,6 +34,7 @@ GdkPixbuf       *totem_grilo_get_icon             (GrlMedia *media,
                                                   gboolean *thumbnailing);
 const GdkPixbuf *totem_grilo_get_video_icon       (void);
 const GdkPixbuf *totem_grilo_get_box_icon         (void);
+const GdkPixbuf *totem_grilo_get_optical_icon     (void);
 
 void             totem_grilo_get_thumbnail        (GObject             *object,
                                                   GCancellable        *cancellable,


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