def _on_artwork_press_event(self, widget, event): """ Popover with album art downloaded from the web (in fact google :-/) @param: widget as Gtk.EventBox @param: event as Gdk.Event """ self._popover = True popover = CoversPopover(self._album.artist_id, self._album.id) popover.set_relative_to(widget) popover.populate() popover.connect('closed', self._on_pop_cover_closed) popover.show() return True
def _on_cover_press_event(self, widget, event): """ Popover with album art downloaded from the web (in fact google :-/) If no popover allowed or 'auto-play' is on, play album @param: widget as Gtk.EventBox @param: event as Gdk.Event """ if event.button == 1: Lp.player.play_album(self._album.id) elif self._pop_allowed: popover = CoversPopover(self._album.artist_id, self._album.id) popover.set_relative_to(widget) popover.populate() popover.show()
def _on_cover_press_event(self, widget, event): """ Popover with album art downloaded from the web (in fact google :-/) If no popover allowed or 'auto-play' is on, play album @param: widget as Gtk.EventBox @param: event as Gdk.Event """ if event.button == 1: Lp().player.play_album(self._album) elif self._pop_allowed: popover = CoversPopover(self._album.artist_id, self._album.id) popover.set_relative_to(widget) popover.populate() popover.show()
def _on_cover_press_event(self, widget, event): """ Popover with album art downloaded from the web (in fact google :-/) @param: widget as Gtk.EventBox @param: event as Gdk.Event """ show_popover = True if Lp.settings.get_value('auto-play'): if event.button == 1: show_popover = False Lp.player.play_album(self._album.id, self._album.genre_id) if show_popover: popover = CoversPopover(self._album.artist_id, self._album.id) popover.set_relative_to(widget) popover.populate() popover.show()
def _show_web_art(self, widget, data): popover = CoversPopover(self._artist_id, self._album_id) popover.set_relative_to(widget) popover.populate() popover.show()