def _add_song_to_playlist(self, menuitem, data=None): model, _iter = self._view.get_selection().get_selected() song = model[_iter][5] playlist_dialog = PlaylistDialog(self._window, self.pls_todelete) if playlist_dialog.run() == Gtk.ResponseType.ACCEPT: playlists.add_to_playlist(playlist_dialog.get_selected(), [song]) playlist_dialog.destroy()
def _add_song_to_playlist(self, menuitem, data=None): model, _iter = self._view.get_selection().get_selected() song = model[_iter][5] playlist_dialog = PlaylistDialog( self._window, self.pls_todelete) if playlist_dialog.run() == Gtk.ResponseType.ACCEPT: playlists.add_to_playlist(playlist_dialog.get_selected(), [song]) playlist_dialog.destroy()
def callback(selected_songs): if len(selected_songs) < 1: return playlist_dialog = PlaylistDialog(self, self.views[3].pl_todelete) if playlist_dialog.run() == Gtk.ResponseType.ACCEPT: playlist.add_to_playlist(playlist_dialog.get_selected(), selected_songs) self.toolbar.set_selection_mode(False) playlist_dialog.destroy()
def callback(selected_tracks): if len(selected_tracks) < 1: return add_to_playlist = PlaylistDialog(self) if add_to_playlist.dialog_box.run() == Gtk.ResponseType.ACCEPT: playlist.add_to_playlist(add_to_playlist.get_selected(), selected_tracks) self.toolbar.set_selection_mode(False) add_to_playlist.dialog_box.destroy()
def callback(selected_tracks): if len(selected_tracks) < 1: return add_to_playlist = PlaylistDialog(self) if add_to_playlist.dialog_box.run() == Gtk.ResponseType.ACCEPT: playlist.add_to_playlist( add_to_playlist.get_selected(), selected_tracks) self.toolbar.set_selection_mode(False) add_to_playlist.dialog_box.destroy()
def callback(selected_songs): if len(selected_songs) < 1: return playlist_dialog = PlaylistDialog( self, self.views[View.PLAYLIST].pls_todelete) if playlist_dialog.run() == Gtk.ResponseType.ACCEPT: playlists.add_to_playlist( playlist_dialog.get_selected(), selected_songs) self.props.selection_mode = False playlist_dialog.destroy()