예제 #1
0
    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
예제 #2
0
파일: main.py 프로젝트: zsau/quodlibet
    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
예제 #3
0
    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
예제 #4
0
 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()
예제 #5
0
 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()
예제 #6
0
파일: main.py 프로젝트: pfps/quodlibet
 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
예제 #7
0
파일: main.py 프로젝트: markshep/quodlibet
 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
예제 #8
0
 def information_cb(menu_item):
     window = Information(librarian, songs, parent)
     window.show()
예제 #9
0
 def on_information(*args):
     song = player.song
     window = Information(app.librarian, [song])
     window.show()
예제 #10
0
 def __current_song_info(self, *args):
     song = app.player.song
     if song:
         librarian = self.__library.librarian
         window = Information(librarian, [song], self)
         window.show()
예제 #11
0
 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()
예제 #12
0
 def __information(self, *args):
     song = app.player.song
     if song:
         window = Information(app.librarian, [song])
         window.show()
예제 #13
0
파일: menu.py 프로젝트: azarmadr/quodlibet
 def on_information(*args):
     song = player.song
     window = Information(app.librarian, [song])
     window.show()
예제 #14
0
 def __current_song_info(self, *args):
     song = app.player.song
     if song:
         librarian = self.__library.librarian
         window = Information(librarian, [song], self)
         window.show()
예제 #15
0
파일: songsmenu.py 프로젝트: bp0/quodlibet
 def information_cb(menu_item):
     parent = get_menu_item_top_parent(menu_item)
     window = Information(librarian, songs, parent)
     window.show()
예제 #16
0
 def information_cb(menu_item):
     parent = get_menu_item_top_parent(menu_item)
     window = Information(librarian, songs, parent)
     window.show()
예제 #17
0
 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()
예제 #18
0
 def __information(self, *args):
     song = app.player.song
     if song:
         window = Information(app.librarian, [song])
         window.show()