r44313 - in /packages/unstable/rhythmbox/debian: changelog patches/0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch patches/series

laney at users.alioth.debian.org laney at users.alioth.debian.org
Wed May 6 14:20:31 UTC 2015


Author: laney
Date: Wed May  6 14:20:31 2015
New Revision: 44313

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=44313
Log:
debian/patches/0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch:
Take patch from upstream bug to display the correct icon for the libre.fm
plugin.

Added:
    packages/unstable/rhythmbox/debian/patches/0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch
Modified:
    packages/unstable/rhythmbox/debian/changelog
    packages/unstable/rhythmbox/debian/patches/series

Modified: packages/unstable/rhythmbox/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/rhythmbox/debian/changelog?rev=44313&op=diff
==============================================================================
--- packages/unstable/rhythmbox/debian/changelog	[utf-8] (original)
+++ packages/unstable/rhythmbox/debian/changelog	[utf-8] Wed May  6 14:20:31 2015
@@ -10,6 +10,9 @@
   * debian/rhythmbox-plugins.install: Install the soundcloud plugin.
   * debian/rules: Build with --fail-missing so we always install or explicitly
     exclude everything.
+  * debian/patches/0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch:
+    Take patch from upstream bug to display the correct icon for the libre.fm
+    plugin.
 
  -- Iain Lane <laney at debian.org>  Fri, 01 May 2015 17:23:45 +0100
 

Added: packages/unstable/rhythmbox/debian/patches/0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/rhythmbox/debian/patches/0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch?rev=44313&op=file
==============================================================================
--- packages/unstable/rhythmbox/debian/patches/0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch	(added)
+++ packages/unstable/rhythmbox/debian/patches/0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch	[utf-8] Wed May  6 14:20:31 2015
@@ -0,0 +1,103 @@
+From eaf9f423320e8c15087c1a81e3368adf00e17f8f Mon Sep 17 00:00:00 2001
+From: Iain Lane <iain.lane at canonical.com>
+Date: Wed, 6 May 2015 14:31:32 +0100
+Subject: [PATCH] audioscrobbler: Fix displaying icon for libre.fm
+
+We don't ship an icon for libre.fm, so fall back to a default in order
+to avoid displaying a not found icon in the sidebar. We attempted to do
+this by constructing a GThemedIcon with both the desired name
+("Libre.fm-symbolic") and the fallback.
+
+Unfortunately, with this method (once the 'len' parameter to
+g_themed_icon_new_for_names () is fixed - another bug), we always get
+the fallback icon.
+
+To fix this, we can look the icon up in the Gtk icon theme and only use
+it if it is found, falling back otherwise.
+---
+ plugins/audioscrobbler/rb-audioscrobbler-plugin.c  | 24 +++++++++++-----------
+ .../rb-audioscrobbler-profile-page.c               | 14 ++++++-------
+ 2 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/plugins/audioscrobbler/rb-audioscrobbler-plugin.c b/plugins/audioscrobbler/rb-audioscrobbler-plugin.c
+index 98eacf9..cc882e3 100644
+--- a/plugins/audioscrobbler/rb-audioscrobbler-plugin.c
++++ b/plugins/audioscrobbler/rb-audioscrobbler-plugin.c
+@@ -121,18 +121,6 @@ impl_activate (PeasActivatable *bplugin)
+ 
+ 	plugin = RB_AUDIOSCROBBLER_PLUGIN (bplugin);
+ 
+-	g_signal_connect_object (plugin->lastfm_settings,
+-				 "changed",
+-				 G_CALLBACK (lastfm_settings_changed_cb),
+-				 plugin, 0);
+-	lastfm_settings_changed_cb (plugin->lastfm_settings, AUDIOSCROBBLER_SERVICE_ENABLED_KEY, plugin);
+-
+-	g_signal_connect_object (plugin->librefm_settings,
+-				 "changed",
+-				 G_CALLBACK (librefm_settings_changed_cb),
+-				 plugin, 0);
+-	librefm_settings_changed_cb (plugin->librefm_settings, AUDIOSCROBBLER_SERVICE_ENABLED_KEY, plugin);
+-
+ 	g_object_get (plugin, "plugin-info", &plugin_info, NULL);
+ 	theme = gtk_icon_theme_get_default ();
+ 
+@@ -146,6 +134,18 @@ impl_activate (PeasActivatable *bplugin)
+ 	gtk_icon_theme_append_search_path (theme, icondir);
+ 	g_free (icondir);
+ #endif
++
++	g_signal_connect_object (plugin->lastfm_settings,
++				 "changed",
++				 G_CALLBACK (lastfm_settings_changed_cb),
++				 plugin, 0);
++	lastfm_settings_changed_cb (plugin->lastfm_settings, AUDIOSCROBBLER_SERVICE_ENABLED_KEY, plugin);
++
++	g_signal_connect_object (plugin->librefm_settings,
++				 "changed",
++				 G_CALLBACK (librefm_settings_changed_cb),
++				 plugin, 0);
++	librefm_settings_changed_cb (plugin->librefm_settings, AUDIOSCROBBLER_SERVICE_ENABLED_KEY, plugin);
+ }
+ 
+ static void
+diff --git a/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c b/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
+index 10a68d5..9e6bca0 100644
+--- a/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
++++ b/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
+@@ -243,17 +243,17 @@ rb_audioscrobbler_profile_page_new (RBShell *shell, GObject *plugin, RBAudioscro
+ 	RBDisplayPage *page;
+ 	RhythmDB *db;
+ 	char *name;
+-	char *iconnames[] = {
+-		NULL,
+-		"network-server-symbolic",
+-	};
++	gchar *icon_name;
+ 	GIcon *icon;
+ 
+ 	g_object_get (shell, "db", &db, NULL);
+ 	g_object_get (service, "name", &name, NULL);
+ 
+-	iconnames[0] = g_strconcat (rb_audioscrobbler_service_get_name (service), "-symbolic", NULL);
+-	icon = g_themed_icon_new_from_names (iconnames, 1);
++	icon_name = g_strconcat (rb_audioscrobbler_service_get_name (service), "-symbolic", NULL);
++	if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default (), icon_name))
++		icon = g_themed_icon_new (icon_name);
++	else
++		icon = g_themed_icon_new ("network-server-symbolic");
+ 
+ 	page = RB_DISPLAY_PAGE (g_object_new (RB_TYPE_AUDIOSCROBBLER_PROFILE_PAGE,
+ 					      "shell", shell,
+@@ -265,7 +265,7 @@ rb_audioscrobbler_profile_page_new (RBShell *shell, GObject *plugin, RBAudioscro
+ 
+ 	g_object_unref (db);
+ 	g_free (name);
+-	g_free (iconnames[0]);
++	g_free (icon_name);
+ 	g_object_unref (icon);
+ 
+ 	return page;
+-- 
+2.1.4
+

Modified: packages/unstable/rhythmbox/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/rhythmbox/debian/patches/series?rev=44313&op=diff
==============================================================================
--- packages/unstable/rhythmbox/debian/patches/series	[utf-8] (original)
+++ packages/unstable/rhythmbox/debian/patches/series	[utf-8] Wed May  6 14:20:31 2015
@@ -0,0 +1 @@
+0001-audioscrobbler-Fix-displaying-icon-for-libre.fm.patch




More information about the pkg-gnome-commits mailing list