def __init__(self, shell, song_info): self.visible = False self.art_key = None self.shell = shell self.song_info = song_info self.entry = song_info.props.current_entry self.art_store = RB.ExtDB(name="album-art") self.art_store.connect("added", self.art_added_cb) grid = Gtk.Grid(hexpand=True, vexpand=True, margin=6, row_spacing=6) self.image = RB.FadingImage(fallback="rhythmbox-missing-artwork", use_tooltip=False) self.image.props.hexpand = True self.image.props.vexpand = True grid.attach(self.image, 0, 0, 1, 1) buttons = Gtk.ButtonBox(orientation=Gtk.Orientation.HORIZONTAL) buttons.set_spacing(6) buttons.set_layout(Gtk.ButtonBoxStyle.CENTER) grid.attach(buttons, 0, 1, 1, 1) clear = Gtk.Button(label=_("Clear"), use_underline=True) clear.connect('clicked', self.clear_button_cb) buttons.add(clear) fetch = Gtk.Button(label=_("_Fetch"), use_underline=True) fetch.connect('clicked', self.fetch_button_cb) buttons.add(fetch) browse_file = Gtk.Button(label=_("_Browse"), use_underline=True) browse_file.connect('clicked', self.browse_button_cb) buttons.add(browse_file) self.page_num = song_info.append_page(_("Album Art"), grid) self.ec_id = song_info.connect("notify::current-entry", self.entry_changed_cb) self.sp_id = grid.get_parent().connect("switch-page", self.switch_page_cb)