--- media_control.py-old 2011-08-15 15:47:32.165056393 -0500 +++ media_control.py 2011-08-15 16:18:22.355056623 -0500 @@ -487,8 +487,28 @@ album_art_file = song_info['album-art'] if self.album_art_enabled and album_art_file != '': self.album_art_pixbuf = gtk.gdk.pixbuf_new_from_file(album_art_file) - self.album_overlay.props.pixbuf = self.album_art_pixbuf - self.album_overlay.props.active = True + icon = gtk.gdk.pixbuf_new_from_file(album_art_file) + + if icon: + if icon.get_height() > 48: + _icon = icon.scale_simple( + int(round(48 * icon.get_width() / icon.get_height())), + int(round(48)), + gtk.gdk.INTERP_BILINEAR) + if _icon is not None: + icon = _icon + if icon.get_width() > 48: + _icon = icon.scale_simple( + int(round(48)), + int(round(48 * icon.get_height() / icon.get_width())), + gtk.gdk.INTERP_BILINEAR) + if _icon is not None: + icon = _icon + + self.set_icon_pixbuf(icon) + +# self.album_overlay.props.pixbuf = self.album_art_pixbuf +# self.album_overlay.props.active = True else: raise RuntimeError('No album art') except: @@ -604,7 +624,12 @@ wTree.add_from_file(self.ui_path) window = wTree.get_object("dialog1") - window.set_icon(self.get_icon().get_icon_at_size(48)) + file_name = __file__[0:__file__.rfind('/')] + file_name += "/icons/media-control.png" + + window.set_icon(gtk.gdk.pixbuf_new_from_file(file_name)) + +# window.set_icon(self.get_icon()) client = awn.config_get_default_for_applet(self)