diff -rN -u old-bb/plugins/rb/__init__.py new-bb/plugins/rb/__init__.py
--- old-bb/plugins/rb/__init__.py	2007-06-23 16:16:39.000000000 +1000
+++ new-bb/plugins/rb/__init__.py	2007-06-23 16:16:39.000000000 +1000
@@ -10,6 +10,26 @@
 #	sys.__excepthook__ (exc_class, exc_inst, trace)
 
 
+def try_load_icon(theme, icon, size, flags):
+	try:
+		return theme.load_icon(icon, size, flags)
+	except:
+		return None
+
+def append_plugin_source_path(theme, iconpath):
+	# check for a Makefile.am in the dir the file was loaded from
+	import sys, os
+	fr = sys._getframe(1)
+	co = fr.f_code
+	filename = co.co_filename
+
+	# and if found, append the icon path
+	dir = filename[:filename.rfind(os.sep)]
+	if os.path.exists(dir + "/Makefile.am"):
+		plugindir = dir[:dir.rfind(os.sep)]
+		icondir = plugindir + iconpath
+		theme.append_search_path(icondir)
+
 class _rbdebugfile:
 	def __init__(self, fn):
 		self.fn = fn

diff -rN -u old-bb/plugins/magnatune/magnatune/__init__.py new-bb/plugins/magnatune/magnatune/__init__.py
--- old-bb/plugins/magnatune/magnatune/__init__.py	2007-06-23 16:16:39.000000000 +1000
+++ new-bb/plugins/magnatune/magnatune/__init__.py	2007-06-23 16:16:39.000000000 +1000
@@ -76,7 +76,7 @@
 	
 	def __init__(self):
 		rb.Plugin.__init__(self)
-		
+
 	def activate(self, shell):
 		self.shell = shell # so the source can update the progress bar
 		self.db = shell.get_property("db")
@@ -92,11 +92,19 @@
 		# allow changes which don't do anything
 		self.entry_type.can_sync_metadata = True
 		self.entry_type.sync_metadata = None
+		self.entry_type.category = rhythmdb.ENTRY_STREAM
+
+		theme = gtk.icon_theme_get_default()
+		rb.append_plugin_source_path(theme, "/icons")
+
+		width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)
+		icon = rb.try_load_icon(theme, "magnatune", width, 0)
 
 		self.source = gobject.new (MagnatuneSource,
  					   shell=shell,
  					   entry_type=self.entry_type,
  					   source_group=group,
+					   icon=icon,
  					   plugin=self)
 
 		shell.register_entry_type_for_source(self.source, self.entry_type)
diff -rN -u old-bb/plugins/magnatune/magnatune/MagnatuneSource.py new-bb/plugins/magnatune/magnatune/MagnatuneSource.py
--- old-bb/plugins/magnatune/magnatune/MagnatuneSource.py	2007-06-23 16:16:39.000000000 +1000
+++ new-bb/plugins/magnatune/magnatune/MagnatuneSource.py	2007-06-23 16:16:39.000000000 +1000
@@ -81,16 +81,10 @@
 		self.__download_progress = 0.0 # progress of current download(s)
 		self.purchase_filesize = 0 # total amount of bytes to download
 
+
 	def do_set_property(self, property, value):
 		if property.name == 'plugin':
 			self.__plugin = value
-
-			# we have to wait until we get the plugin to do this
-			circle_file_name = self.__plugin.find_file("magnatune_circle_small.png")
-			width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)
-			icon = gtk.gdk.pixbuf_new_from_file_at_size(circle_file_name, width, height)
-			self.set_property("icon", icon)
-
 		else:
 			raise AttributeError, 'unknown property %s' % property.name
 
diff -rN -u old-bb/plugins/magnatune/Makefile.am new-bb/plugins/magnatune/Makefile.am
--- old-bb/plugins/magnatune/Makefile.am	2007-06-23 16:16:39.000000000 +1000
+++ new-bb/plugins/magnatune/Makefile.am	2007-06-23 16:16:39.000000000 +1000
@@ -15,11 +15,16 @@
 		magnatune-purchase.glade		\
 		magnatune-prefs.glade			\
 		magnatune_logo_color_small.png		\
-		magnatune_logo_color_tiny.png		\
-		magnatune_circle_small.png
+		magnatune_logo_color_tiny.png
+
+themedir = $(pkgdatadir)/icons/hicolor
+size = 24x24
+context = places
+icondir = $(themedir)/$(size)/$(context)
+icon_DATA = icons/hicolor/$(size)/$(context)/magnatune.png
 
 gladedir = $(plugindir)
-EXTRA_DIST = $(plugin_in_files) $(glade_DATA)
+EXTRA_DIST = $(plugin_in_files) $(glade_DATA) $(icon_DATA)
 CLEANFILES = $(plugin_DATA)
 DISTCLEANFILES = $(plugin_DATA)
 

diff -rN -u old-bb/plugins/jamendo/jamendo/__init__.py new-bb/plugins/jamendo/jamendo/__init__.py
--- old-bb/plugins/jamendo/jamendo/__init__.py	2007-06-23 16:16:39.000000000 +1000
+++ new-bb/plugins/jamendo/jamendo/__init__.py	2007-06-23 16:16:39.000000000 +1000
@@ -66,7 +66,18 @@
  							     _("Stores"),
  							     rb.SOURCE_GROUP_CATEGORY_FIXED)
 
-		self.source = gobject.new (JamendoSource, shell=shell, entry_type=self.entry_type, plugin=self, source_group=group)
+		theme = gtk.icon_theme_get_default()
+		rb.append_plugin_source_path(theme, "/icons/")
+
+		width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)
+		icon = rb.try_load_icon(theme, "jamendo", width, 0)
+
+		self.source = gobject.new (JamendoSource,
+					   shell=shell,
+					   entry_type=self.entry_type,
+					   plugin=self,
+					   icon=icon,
+					   source_group=group)
 		shell.register_entry_type_for_source(self.source, self.entry_type)
 		shell.append_source(self.source, None) # Add the source to the list
 
diff -rN -u old-bb/plugins/jamendo/jamendo/JamendoSource.py new-bb/plugins/jamendo/jamendo/JamendoSource.py
--- old-bb/plugins/jamendo/jamendo/JamendoSource.py	2007-06-23 16:16:39.000000000 +1000
+++ new-bb/plugins/jamendo/jamendo/JamendoSource.py	2007-06-23 16:16:40.000000000 +1000
@@ -69,13 +69,6 @@
 	def do_set_property(self, property, value):
 		if property.name == 'plugin':
 			self.__plugin = value
-
-			# we have to wait until we get the plugin to do this
-			circle_file_name = self.__plugin.find_file("jamendo_logo_small.png")
-			width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)
-			icon = gtk.gdk.pixbuf_new_from_file_at_size(circle_file_name, width, height)
-			self.set_property("icon", icon)
-
 		else:
 			raise AttributeError, 'unknown property %s' % property.name
 
diff -rN -u old-bb/plugins/jamendo/Makefile.am new-bb/plugins/jamendo/Makefile.am
--- old-bb/plugins/jamendo/Makefile.am	2007-06-23 16:16:39.000000000 +1000
+++ new-bb/plugins/jamendo/Makefile.am	2007-06-23 16:16:40.000000000 +1000
@@ -14,8 +14,13 @@
 		jamendo-loading.glade                 \
 		jamendo-prefs.glade		      \
 		jamendo_logo.png		      \
-		jamendo_logo_medium.png		      \
-		jamendo_logo_small.png			
+		jamendo_logo_medium.png
+
+themedir = $(pkgdatadir)/icons/hicolor
+size = 24x24
+context = places
+icondir = $(themedir)/$(size)/$(context)
+icon_DATA = icons/hicolor/$(size)/$(context)/jamendo.png
 
 gladedir = $(plugindir)
 EXTRA_DIST = $(plugin_in_files) $(glade_DATA)

