[gnome-music/wip/merge: 315/343] view: escape titles in album view title
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 315/343] view: escape titles in album view title
- Date: Thu, 25 Jul 2013 11:39:06 +0000 (UTC)
commit 0e414158175cd81ed01e7b0c40bfad8bb5e0bf87
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Sun Jul 21 12:03:26 2013 +0200
view: escape titles in album view title
Fixes #89
gnomemusic/albumArtCache.py | 5 ++++-
gnomemusic/view.py | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index 4d49e3e..13092ee 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -29,7 +29,10 @@ class AlbumArtCache:
def get_media_title(self, media, escaped=False):
title = media.get_title()
if title:
- return GLib.markup_escape_text(title)
+ if escaped:
+ return GLib.markup_escape_text(title)
+ else:
+ return title
uri = media.get_url()
if uri is None:
return "Untitled"
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index dae77a2..dd57ea6 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -247,8 +247,8 @@ class Albums(ViewContainer):
self._albumWidget.update(artist, title, item,
self.header_bar, self.selection_toolbar)
self.header_bar.set_state(0)
- self.header_bar.header_bar.title = title
- self.header_bar.header_bar.set_title(title)
+ escaped_title = albumArtCache.get_media_title(item)
+ self.header_bar.header_bar.set_title(escaped_title)
self.header_bar.header_bar.sub_title = artist
self.set_visible_child(self._albumWidget)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]