[gnome-music] disclistboxwidget: Hide tracknumber if 0
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] disclistboxwidget: Hide tracknumber if 0
- Date: Wed, 2 Nov 2016 14:30:56 +0000 (UTC)
commit 0321d6f95e7aab572ebb00f8f08b90d6a81e40f6
Author: Marinus Schraal <mschraal src gnome org>
Date: Wed Nov 2 15:30:14 2016 +0100
disclistboxwidget: Hide tracknumber if 0
gnomemusic/widgets/disclistboxwidget.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index fc87d0a..6c742ae 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -321,9 +321,12 @@ class DiscBox(Gtk.Box):
song_widget.itr = itr
song_widget.model = self._model
+ track_number = track.get_track_number()
+ if track_number == 0:
+ track_number = ""
song_widget.number = builder.get_object('num')
song_widget.number.set_markup(
- '<span color=\'grey\'>{}</span>'.format(track.get_track_number()))
+ '<span color=\'grey\'>{}</span>'.format(track_number))
song_widget.number.set_no_show_all(True)
song_widget.title = builder.get_object('title')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]