def __key_pressed(self, widget, event): if qltk.is_accel(event, "Delete"): model, iter = self.__selected_playlists() if not iter: return False playlist = model[iter][0] dialog = ConfirmRemovePlaylistDialog(self, playlist) if dialog.run() == Gtk.ResponseType.YES: playlist.delete() model.get_model().remove( model.convert_iter_to_child_iter(iter)) return True elif qltk.is_accel(event, "F2"): model, iter = self.__selected_playlists() if iter: self._start_rename(model.get_path(iter)) return True elif qltk.is_accel(event, "<Primary>I"): songs = self._get_playlist_songs() if songs: window = Information(self.library.librarian, songs, self) window.show() return True elif qltk.is_accel(event, "<Primary>Return", "<Primary>KP_Enter"): qltk.enqueue(self._get_playlist_songs()) return True elif qltk.is_accel(event, "<alt>Return"): songs = self._get_playlist_songs() if songs: window = SongProperties(self.library.librarian, songs, self) window.show() return True return False
def __key_pressed(self, widget, event): if qltk.is_accel(event, "Delete"): model, iter = self.__selected_playlists() if not iter: return False playlist = model[iter][0] if confirm_remove_playlist_dialog_invoke(self, playlist, self.Confirmer): playlist.delete() else: print_d("Playlist removal cancelled through prompt") return True elif qltk.is_accel(event, "F2"): model, iter = self.__selected_playlists() if iter: self._start_rename(model.get_path(iter)) return True elif qltk.is_accel(event, "<Primary>I"): songs = self._get_playlist_songs() if songs: window = Information(self.songs_lib.librarian, songs, self) window.show() return True elif qltk.is_accel(event, "<Primary>Return", "<Primary>KP_Enter"): qltk.enqueue(self._get_playlist_songs()) return True elif qltk.is_accel(event, "<alt>Return"): songs = self._get_playlist_songs() if songs: window = SongProperties(self.songs_lib.librarian, songs, self) window.show() return True return False
def __information(self, librarian): model, rows = self.get_selection().get_selected_rows() if rows: songs = [model[row][0] for row in rows] else: from quodlibet import app if app.player.song: songs = [app.player.song] else: return window = Information(librarian, songs, self) window.show()
def __key_pressed(self, widget, event, librarian): if qltk.is_accel(event, "<Primary>I"): songs = self.__get_selected_songs() if songs: window = Information(librarian, songs, self) window.show() return True elif qltk.is_accel(event, "<alt>Return"): songs = self.__get_selected_songs() if songs: window = SongProperties(librarian, songs, self) window.show() return True return False
def information_cb(menu_item): window = Information(librarian, songs, parent) window.show()
def on_information(*args): song = player.song window = Information(app.librarian, [song]) window.show()
def __current_song_info(self, *args): song = app.player.song if song: librarian = self.__library.librarian window = Information(librarian, [song], self) window.show()
def edit(widget): print_d("Launching lyrics editor for %s" % song("~filename")) assert isinstance(song, SongWrapper) information = Information(app.librarian, [song._song]) information.get_child()._switch_to_lyrics() information.show()
def __information(self, *args): song = app.player.song if song: window = Information(app.librarian, [song]) window.show()
def information_cb(menu_item): parent = get_menu_item_top_parent(menu_item) window = Information(librarian, songs, parent) window.show()