[gnome-music/wip/jfelder/smartplaylists-ui-v2: 24/29] playlist: Add an icon_name property



commit 355b56f253c221a82eb7521d5afb3536631dcc47
Author: Jean Felder <jfelder src gnome org>
Date:   Thu Sep 12 22:44:00 2019 +0200

    playlist: Add an icon_name property

 gnomemusic/grilowrappers/grltrackerplaylists.py | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index d1707d89..755b115b 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -708,6 +708,7 @@ class SmartPlaylist(Playlist):
     """Base class for smart playlists"""
 
     color = GObject.Property(type=Gdk.RGBA)
+    icon_name = GObject.Property(type=str, default=None)
 
     def __repr__(self):
         return "<SmartPlaylist>"
@@ -758,6 +759,7 @@ class MostPlayed(SmartPlaylist):
         # TRANSLATORS: this is a playlist name
         self._title = _("Most Played")
         self.props.color = Gdk.RGBA(0.96, 0.47, 0.0)
+        self.props.icon_name = "audio-speakers-symbolic"
         self.props.query = """
         SELECT
             rdf:type(?song)
@@ -796,6 +798,7 @@ class NeverPlayed(SmartPlaylist):
         # TRANSLATORS: this is a playlist name
         self._title = _("Never Played")
         self.props.color = Gdk.RGBA(0.45, 0.62, 0.81)
+        self.props.icon_name = "dialog-question-symbolic"
         self.props.query = """
         SELECT
             rdf:type(?song)
@@ -833,6 +836,7 @@ class RecentlyPlayed(SmartPlaylist):
         # TRANSLATORS: this is a playlist name
         self._title = _("Recently Played")
         self.props.color = Gdk.RGBA(0.68, 0.50, 0.66)
+        self.props.icon_name = "document-open-recent-symbolic"
 
         sparql_midnight_dateTime_format = "%Y-%m-%dT00:00:00Z"
         days_difference = 7
@@ -880,6 +884,7 @@ class RecentlyAdded(SmartPlaylist):
         # TRANSLATORS: this is a playlist name
         self._title = _("Recently Added")
         self.props.color = Gdk.RGBA(0.31, 0.60, 0.02)
+        self.props.icon_name = "list-add-symbolic"
 
         sparql_midnight_dateTime_format = "%Y-%m-%dT00:00:00Z"
         days_difference = 7
@@ -926,6 +931,7 @@ class Favorites(SmartPlaylist):
         # TRANSLATORS: this is a playlist name
         self._title = _("Favorite Songs")
         self.props.color = Gdk.RGBA(0.93, 0.83, 0.0)
+        self.props.icon_name = "starred-symbolic"
         self.props.query = """
             SELECT
                 rdf:type(?song)


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