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_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()
def _add_song_to_playlist(self, menuitem, data=None): selected_row = self._view.get_selected_row() song_widget = selected_row.get_child() coresong = song_widget.props.coresong playlist_dialog = PlaylistDialog(self._window) if playlist_dialog.run() == Gtk.ResponseType.ACCEPT: playlist = playlist_dialog.props.selected_playlist playlist.add_songs([coresong]) self._view.unselect_all() playlist_dialog.destroy()
def _on_add_to_playlist(self, widget): if self._stack.get_visible_child() == self.views[View.PLAYLIST]: return selected_songs = self._app._coreselection.props.selected_items if len(selected_songs) < 1: return playlist_dialog = PlaylistDialog(self) if playlist_dialog.run() == Gtk.ResponseType.ACCEPT: playlist = playlist_dialog.props.selected_playlist playlist.add_songs(selected_songs) self.props.selection_mode = False playlist_dialog.destroy()
def _on_add_to_playlist(self, widget): if self.props.active_view == self.views[View.PLAYLIST]: return selected_songs = self._coreselection.props.selected_songs if len(selected_songs) < 1: return playlist_dialog = PlaylistDialog(self._app) playlist_dialog.props.transient_for = self if playlist_dialog.run() == Gtk.ResponseType.ACCEPT: playlist = playlist_dialog.props.selected_playlist playlist.add_songs(selected_songs) self.props.selection_mode = False playlist_dialog.destroy()