Fresh new 'open in new playlist' action (Updates issue #1431).
This commit is contained in:
parent
fb36940d5e
commit
60ac6768b8
@ -65,9 +65,11 @@ class DigitallyImportedServiceBase(clementine.RadioService):
|
|||||||
if not self.menu:
|
if not self.menu:
|
||||||
self.menu = QMenu()
|
self.menu = QMenu()
|
||||||
self.menu.addAction(clementine.IconLoader.Load("media-playback-start"),
|
self.menu.addAction(clementine.IconLoader.Load("media-playback-start"),
|
||||||
self.tr("Add to playlist"), self.AddToPlaylist)
|
self.tr("Append to current playlist"), self.AddToPlaylist)
|
||||||
self.menu.addAction(clementine.IconLoader.Load("media-playback-start"),
|
self.menu.addAction(clementine.IconLoader.Load("media-playback-start"),
|
||||||
self.tr("Load"), self.LoadToPlaylist)
|
self.tr("Replace current playlist"), self.LoadToPlaylist)
|
||||||
|
self.menu.addAction(clementine.IconLoader.Load("document-new"),
|
||||||
|
self.tr("Open in new playlist"), self.OpenInNewPlaylist)
|
||||||
|
|
||||||
self.menu.addSeparator()
|
self.menu.addSeparator()
|
||||||
|
|
||||||
@ -90,6 +92,9 @@ class DigitallyImportedServiceBase(clementine.RadioService):
|
|||||||
def LoadToPlaylist(self):
|
def LoadToPlaylist(self):
|
||||||
self.AddItemToPlaylist(self.context_index, True)
|
self.AddItemToPlaylist(self.context_index, True)
|
||||||
|
|
||||||
|
def OpenInNewPlaylist(self):
|
||||||
|
self.AddItemToPlaylist(self.context_index, False, False, True)
|
||||||
|
|
||||||
def Homepage(self):
|
def Homepage(self):
|
||||||
QDesktopServices.openUrl(self.HOMEPAGE_URL)
|
QDesktopServices.openUrl(self.HOMEPAGE_URL)
|
||||||
|
|
||||||
|
@ -24,10 +24,12 @@ class MimeData : public QMimeData {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MimeData(bool clear = false, bool play_now = false, bool enqueue = false)
|
MimeData(bool clear = false, bool play_now = false,
|
||||||
|
bool enqueue = false, bool new_playlist = false)
|
||||||
: clear_first_(clear),
|
: clear_first_(clear),
|
||||||
play_now_(play_now),
|
play_now_(play_now),
|
||||||
enqueue_now_(enqueue),
|
enqueue_now_(enqueue),
|
||||||
|
new_playlist_(new_playlist),
|
||||||
from_doubleclick_(false) {}
|
from_doubleclick_(false) {}
|
||||||
|
|
||||||
// If this is set then the playlist will be cleared before these songs
|
// If this is set then the playlist will be cleared before these songs
|
||||||
@ -42,6 +44,9 @@ public:
|
|||||||
// If this is set then the items are added to the queue after being inserted.
|
// If this is set then the items are added to the queue after being inserted.
|
||||||
bool enqueue_now_;
|
bool enqueue_now_;
|
||||||
|
|
||||||
|
// If this is set then the items are inserted into a newly created playlist.
|
||||||
|
bool new_playlist_;
|
||||||
|
|
||||||
// This can be set if this MimeData goes via MainWindow (ie. it is created
|
// This can be set if this MimeData goes via MainWindow (ie. it is created
|
||||||
// manually in a double-click). The MainWindow will set the above three
|
// manually in a double-click). The MainWindow will set the above three
|
||||||
// flags to the defaults set by the user.
|
// flags to the defaults set by the user.
|
||||||
|
@ -214,6 +214,8 @@ void DeviceView::contextMenuEvent(QContextMenuEvent* e) {
|
|||||||
tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
||||||
load_action_ = library_menu_->addAction(IconLoader::Load("media-playback-start"),
|
load_action_ = library_menu_->addAction(IconLoader::Load("media-playback-start"),
|
||||||
tr("Replace current playlist"), this, SLOT(Load()));
|
tr("Replace current playlist"), this, SLOT(Load()));
|
||||||
|
open_in_new_playlist_ = library_menu_->addAction(IconLoader::Load("document-new"),
|
||||||
|
tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
|
||||||
library_menu_->addSeparator();
|
library_menu_->addSeparator();
|
||||||
organise_action_ = library_menu_->addAction(IconLoader::Load("edit-copy"),
|
organise_action_ = library_menu_->addAction(IconLoader::Load("edit-copy"),
|
||||||
tr("Copy to library..."), this, SLOT(Organise()));
|
tr("Copy to library..."), this, SLOT(Organise()));
|
||||||
@ -365,6 +367,14 @@ void DeviceView::AddToPlaylist() {
|
|||||||
emit AddToPlaylistSignal(model()->mimeData(selectedIndexes()));
|
emit AddToPlaylistSignal(model()->mimeData(selectedIndexes()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DeviceView::OpenInNewPlaylist() {
|
||||||
|
QMimeData* data = model()->mimeData(selectedIndexes());
|
||||||
|
if (MimeData* mime_data = qobject_cast<MimeData*>(data)) {
|
||||||
|
mime_data->new_playlist_ = true;
|
||||||
|
}
|
||||||
|
emit AddToPlaylistSignal(data);
|
||||||
|
}
|
||||||
|
|
||||||
void DeviceView::Delete() {
|
void DeviceView::Delete() {
|
||||||
if (selectedIndexes().isEmpty())
|
if (selectedIndexes().isEmpty())
|
||||||
return;
|
return;
|
||||||
|
@ -65,6 +65,7 @@ private slots:
|
|||||||
// Library menu actions
|
// Library menu actions
|
||||||
void Load();
|
void Load();
|
||||||
void AddToPlaylist();
|
void AddToPlaylist();
|
||||||
|
void OpenInNewPlaylist();
|
||||||
void Organise();
|
void Organise();
|
||||||
void Delete();
|
void Delete();
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ private:
|
|||||||
QMenu* library_menu_;
|
QMenu* library_menu_;
|
||||||
QAction* load_action_;
|
QAction* load_action_;
|
||||||
QAction* add_to_playlist_action_;
|
QAction* add_to_playlist_action_;
|
||||||
|
QAction* open_in_new_playlist_;
|
||||||
QAction* organise_action_;
|
QAction* organise_action_;
|
||||||
QAction* delete_action_;
|
QAction* delete_action_;
|
||||||
|
|
||||||
|
@ -236,6 +236,8 @@ void LibraryView::contextMenuEvent(QContextMenuEvent *e) {
|
|||||||
tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
||||||
load_ = context_menu_->addAction(IconLoader::Load("media-playback-start"),
|
load_ = context_menu_->addAction(IconLoader::Load("media-playback-start"),
|
||||||
tr("Replace current playlist"), this, SLOT(Load()));
|
tr("Replace current playlist"), this, SLOT(Load()));
|
||||||
|
open_in_new_playlist_ = context_menu_->addAction(IconLoader::Load("document-new"),
|
||||||
|
tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
|
||||||
|
|
||||||
context_menu_->addSeparator();
|
context_menu_->addSeparator();
|
||||||
add_to_playlist_enqueue_ = context_menu_->addAction(IconLoader::Load("go-next"),
|
add_to_playlist_enqueue_ = context_menu_->addAction(IconLoader::Load("go-next"),
|
||||||
@ -301,6 +303,7 @@ void LibraryView::contextMenuEvent(QContextMenuEvent *e) {
|
|||||||
|
|
||||||
load_->setEnabled(enable_add);
|
load_->setEnabled(enable_add);
|
||||||
add_to_playlist_->setEnabled(enable_add);
|
add_to_playlist_->setEnabled(enable_add);
|
||||||
|
open_in_new_playlist_->setEnabled(enable_add);
|
||||||
edit_tracks_->setVisible(many_songs);
|
edit_tracks_->setVisible(many_songs);
|
||||||
edit_track_->setVisible(!many_songs);
|
edit_track_->setVisible(!many_songs);
|
||||||
edit_tracks_->setEnabled(enable_add);
|
edit_tracks_->setEnabled(enable_add);
|
||||||
@ -368,6 +371,14 @@ void LibraryView::AddToPlaylistEnqueue() {
|
|||||||
emit AddToPlaylistSignal(data);
|
emit AddToPlaylistSignal(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LibraryView::OpenInNewPlaylist() {
|
||||||
|
QMimeData* data = model()->mimeData(selectedIndexes());
|
||||||
|
if (MimeData* mime_data = qobject_cast<MimeData*>(data)) {
|
||||||
|
mime_data->new_playlist_ = true;
|
||||||
|
}
|
||||||
|
emit AddToPlaylistSignal(data);
|
||||||
|
}
|
||||||
|
|
||||||
void LibraryView::keyboardSearch(const QString& search) {
|
void LibraryView::keyboardSearch(const QString& search) {
|
||||||
is_in_keyboard_search_ = true;
|
is_in_keyboard_search_ = true;
|
||||||
QTreeView::keyboardSearch(search);
|
QTreeView::keyboardSearch(search);
|
||||||
|
@ -92,6 +92,7 @@ class LibraryView : public AutoExpandingTreeView {
|
|||||||
void Load();
|
void Load();
|
||||||
void AddToPlaylist();
|
void AddToPlaylist();
|
||||||
void AddToPlaylistEnqueue();
|
void AddToPlaylistEnqueue();
|
||||||
|
void OpenInNewPlaylist();
|
||||||
void Organise();
|
void Organise();
|
||||||
void CopyToDevice();
|
void CopyToDevice();
|
||||||
void Delete();
|
void Delete();
|
||||||
@ -128,6 +129,7 @@ class LibraryView : public AutoExpandingTreeView {
|
|||||||
QAction* load_;
|
QAction* load_;
|
||||||
QAction* add_to_playlist_;
|
QAction* add_to_playlist_;
|
||||||
QAction* add_to_playlist_enqueue_;
|
QAction* add_to_playlist_enqueue_;
|
||||||
|
QAction* open_in_new_playlist_;
|
||||||
QAction* organise_;
|
QAction* organise_;
|
||||||
QAction* copy_to_device_;
|
QAction* copy_to_device_;
|
||||||
QAction* delete_;
|
QAction* delete_;
|
||||||
|
@ -273,6 +273,7 @@ void IcecastService::ShowContextMenu(const QModelIndex& index,
|
|||||||
|
|
||||||
add_to_playlist_->setEnabled(can_play);
|
add_to_playlist_->setEnabled(can_play);
|
||||||
load_to_playlist_->setEnabled(can_play);
|
load_to_playlist_->setEnabled(can_play);
|
||||||
|
open_in_new_playlist_->setEnabled(can_play);
|
||||||
context_menu_->popup(global_pos);
|
context_menu_->popup(global_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,6 +287,8 @@ void IcecastService::EnsureMenuCreated() {
|
|||||||
IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
||||||
load_to_playlist_ = context_menu_->addAction(
|
load_to_playlist_ = context_menu_->addAction(
|
||||||
IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
||||||
|
open_in_new_playlist_ = context_menu_->addAction(
|
||||||
|
IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
|
||||||
context_menu_->addSeparator();
|
context_menu_->addSeparator();
|
||||||
context_menu_->addAction(IconLoader::Load("download"), tr("Open dir.xiph.org in browser"), this, SLOT(Homepage()));
|
context_menu_->addAction(IconLoader::Load("download"), tr("Open dir.xiph.org in browser"), this, SLOT(Homepage()));
|
||||||
context_menu_->addAction(IconLoader::Load("view-refresh"), tr("Refresh station list"), this, SLOT(LoadDirectory()));
|
context_menu_->addAction(IconLoader::Load("view-refresh"), tr("Refresh station list"), this, SLOT(LoadDirectory()));
|
||||||
@ -302,3 +305,7 @@ void IcecastService::AddToPlaylist() {
|
|||||||
void IcecastService::LoadToPlaylist() {
|
void IcecastService::LoadToPlaylist() {
|
||||||
AddItemToPlaylist(context_item_, true);
|
AddItemToPlaylist(context_item_, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IcecastService::OpenInNewPlaylist() {
|
||||||
|
AddItemToPlaylist(context_item_, false, false, true);
|
||||||
|
}
|
||||||
|
@ -57,6 +57,7 @@ class IcecastService : public RadioService {
|
|||||||
void Homepage();
|
void Homepage();
|
||||||
void AddToPlaylist();
|
void AddToPlaylist();
|
||||||
void LoadToPlaylist();
|
void LoadToPlaylist();
|
||||||
|
void OpenInNewPlaylist();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void EnsureMenuCreated();
|
void EnsureMenuCreated();
|
||||||
@ -69,6 +70,7 @@ class IcecastService : public RadioService {
|
|||||||
QModelIndex context_item_;
|
QModelIndex context_item_;
|
||||||
QAction* add_to_playlist_;
|
QAction* add_to_playlist_;
|
||||||
QAction* load_to_playlist_;
|
QAction* load_to_playlist_;
|
||||||
|
QAction* open_in_new_playlist_;
|
||||||
|
|
||||||
IcecastBackend* backend_;
|
IcecastBackend* backend_;
|
||||||
IcecastModel* model_;
|
IcecastModel* model_;
|
||||||
|
@ -382,6 +382,9 @@ void JamendoService::EnsureMenuCreated() {
|
|||||||
tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
||||||
load_to_playlist_ = context_menu_->addAction(IconLoader::Load("media-playback-start"),
|
load_to_playlist_ = context_menu_->addAction(IconLoader::Load("media-playback-start"),
|
||||||
tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
||||||
|
open_in_new_playlist_ = context_menu_->addAction(IconLoader::Load("document-new"),
|
||||||
|
tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
|
||||||
|
context_menu_->addSeparator();
|
||||||
album_info_ = context_menu_->addAction(IconLoader::Load("view-media-lyrics"),
|
album_info_ = context_menu_->addAction(IconLoader::Load("view-media-lyrics"),
|
||||||
tr("Album info on jamendo.com..."), this, SLOT(AlbumInfo()));
|
tr("Album info on jamendo.com..."), this, SLOT(AlbumInfo()));
|
||||||
download_album_ = context_menu_->addAction(IconLoader::Load("download"),
|
download_album_ = context_menu_->addAction(IconLoader::Load("download"),
|
||||||
@ -408,6 +411,7 @@ void JamendoService::ShowContextMenu(const QModelIndex& index, const QPoint& glo
|
|||||||
|
|
||||||
add_to_playlist_->setEnabled(context_item_.isValid());
|
add_to_playlist_->setEnabled(context_item_.isValid());
|
||||||
load_to_playlist_->setEnabled(context_item_.isValid());
|
load_to_playlist_->setEnabled(context_item_.isValid());
|
||||||
|
open_in_new_playlist_->setEnabled(context_item_.isValid());
|
||||||
album_info_->setEnabled(context_item_.isValid());
|
album_info_->setEnabled(context_item_.isValid());
|
||||||
download_album_->setEnabled(context_item_.isValid());
|
download_album_->setEnabled(context_item_.isValid());
|
||||||
context_menu_->popup(global_pos);
|
context_menu_->popup(global_pos);
|
||||||
@ -426,6 +430,10 @@ void JamendoService::LoadToPlaylist() {
|
|||||||
AddItemToPlaylist(context_item_, true);
|
AddItemToPlaylist(context_item_, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JamendoService::OpenInNewPlaylist() {
|
||||||
|
AddItemToPlaylist(context_item_, false, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
void JamendoService::AlbumInfo() {
|
void JamendoService::AlbumInfo() {
|
||||||
SongList songs(library_model_->GetChildSongs(
|
SongList songs(library_model_->GetChildSongs(
|
||||||
library_sort_model_->mapToSource(context_item_)));
|
library_sort_model_->mapToSource(context_item_)));
|
||||||
|
@ -93,6 +93,7 @@ class JamendoService : public RadioService {
|
|||||||
|
|
||||||
void AddToPlaylist();
|
void AddToPlaylist();
|
||||||
void LoadToPlaylist();
|
void LoadToPlaylist();
|
||||||
|
void OpenInNewPlaylist();
|
||||||
void AlbumInfo();
|
void AlbumInfo();
|
||||||
void DownloadAlbum();
|
void DownloadAlbum();
|
||||||
void Homepage();
|
void Homepage();
|
||||||
@ -105,6 +106,7 @@ class JamendoService : public RadioService {
|
|||||||
|
|
||||||
QAction* add_to_playlist_;
|
QAction* add_to_playlist_;
|
||||||
QAction* load_to_playlist_;
|
QAction* load_to_playlist_;
|
||||||
|
QAction* open_in_new_playlist_;
|
||||||
QAction* album_info_;
|
QAction* album_info_;
|
||||||
QAction* download_album_;
|
QAction* download_album_;
|
||||||
|
|
||||||
|
@ -78,6 +78,9 @@ LastFMService::LastFMService(RadioModel* parent)
|
|||||||
IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
||||||
load_action_ = context_menu_->addAction(
|
load_action_ = context_menu_->addAction(
|
||||||
IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
||||||
|
open_in_new_playlist_ = context_menu_->addAction(IconLoader::Load("document-new"),
|
||||||
|
tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
|
||||||
|
context_menu_->addSeparator();
|
||||||
remove_action_ = context_menu_->addAction(
|
remove_action_ = context_menu_->addAction(
|
||||||
IconLoader::Load("list-remove"), tr("Remove"), this, SLOT(Remove()));
|
IconLoader::Load("list-remove"), tr("Remove"), this, SLOT(Remove()));
|
||||||
context_menu_->addSeparator();
|
context_menu_->addSeparator();
|
||||||
@ -469,6 +472,7 @@ void LastFMService::ShowContextMenu(const QModelIndex& index, const QPoint &glob
|
|||||||
const bool playable = model()->IsPlayable(index);
|
const bool playable = model()->IsPlayable(index);
|
||||||
play_action_->setEnabled(playable);
|
play_action_->setEnabled(playable);
|
||||||
load_action_->setEnabled(playable);
|
load_action_->setEnabled(playable);
|
||||||
|
open_in_new_playlist_->setEnabled(playable);
|
||||||
context_menu_->popup(global_pos);
|
context_menu_->popup(global_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,6 +566,10 @@ void LastFMService::LoadToPlaylist() {
|
|||||||
AddItemToPlaylist(context_item_->index(), true);
|
AddItemToPlaylist(context_item_->index(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LastFMService::OpenInNewPlaylist() {
|
||||||
|
AddItemToPlaylist(context_item_->index(), false, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
void LastFMService::AddArtistRadio() {
|
void LastFMService::AddArtistRadio() {
|
||||||
AddArtistOrTag("artists", LastFMStationDialog::Artist,
|
AddArtistOrTag("artists", LastFMStationDialog::Artist,
|
||||||
kUrlArtist, tr(kTitleArtist),
|
kUrlArtist, tr(kTitleArtist),
|
||||||
|
@ -126,6 +126,7 @@ class LastFMService : public RadioService {
|
|||||||
|
|
||||||
void AddToPlaylist();
|
void AddToPlaylist();
|
||||||
void LoadToPlaylist();
|
void LoadToPlaylist();
|
||||||
|
void OpenInNewPlaylist();
|
||||||
void AddArtistRadio();
|
void AddArtistRadio();
|
||||||
void AddTagRadio();
|
void AddTagRadio();
|
||||||
void AddCustomRadio();
|
void AddCustomRadio();
|
||||||
@ -173,6 +174,7 @@ class LastFMService : public RadioService {
|
|||||||
boost::scoped_ptr<QMenu> context_menu_;
|
boost::scoped_ptr<QMenu> context_menu_;
|
||||||
QAction* play_action_;
|
QAction* play_action_;
|
||||||
QAction* load_action_;
|
QAction* load_action_;
|
||||||
|
QAction* open_in_new_playlist_;
|
||||||
QAction* remove_action_;
|
QAction* remove_action_;
|
||||||
QAction* add_artist_action_;
|
QAction* add_artist_action_;
|
||||||
QAction* add_tag_action_;
|
QAction* add_tag_action_;
|
||||||
|
@ -252,6 +252,9 @@ void MagnatuneService::EnsureMenuCreated() {
|
|||||||
IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
||||||
load_to_playlist_ = context_menu_->addAction(
|
load_to_playlist_ = context_menu_->addAction(
|
||||||
IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
||||||
|
open_in_new_playlist_ = context_menu_->addAction(IconLoader::Load("document-new"),
|
||||||
|
tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
|
||||||
|
context_menu_->addSeparator();
|
||||||
download_ = context_menu_->addAction(
|
download_ = context_menu_->addAction(
|
||||||
IconLoader::Load("download"), tr("Download this album"), this, SLOT(Download()));
|
IconLoader::Load("download"), tr("Download this album"), this, SLOT(Download()));
|
||||||
context_menu_->addSeparator();
|
context_menu_->addSeparator();
|
||||||
@ -277,6 +280,7 @@ void MagnatuneService::ShowContextMenu(const QModelIndex& index, const QPoint& g
|
|||||||
|
|
||||||
add_to_playlist_->setEnabled(context_item_.isValid());
|
add_to_playlist_->setEnabled(context_item_.isValid());
|
||||||
load_to_playlist_->setEnabled(context_item_.isValid());
|
load_to_playlist_->setEnabled(context_item_.isValid());
|
||||||
|
open_in_new_playlist_->setEnabled(context_item_.isValid());
|
||||||
download_->setEnabled(context_item_.isValid() && membership_ == Membership_Download);
|
download_->setEnabled(context_item_.isValid() && membership_ == Membership_Download);
|
||||||
context_menu_->popup(global_pos);
|
context_menu_->popup(global_pos);
|
||||||
}
|
}
|
||||||
@ -289,6 +293,10 @@ void MagnatuneService::LoadToPlaylist() {
|
|||||||
AddItemToPlaylist(context_item_, true);
|
AddItemToPlaylist(context_item_, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MagnatuneService::OpenInNewPlaylist() {
|
||||||
|
AddItemToPlaylist(context_item_, false, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
void MagnatuneService::Homepage() {
|
void MagnatuneService::Homepage() {
|
||||||
QDesktopServices::openUrl(QUrl(kHomepage));
|
QDesktopServices::openUrl(QUrl(kHomepage));
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ class MagnatuneService : public RadioService {
|
|||||||
|
|
||||||
void AddToPlaylist();
|
void AddToPlaylist();
|
||||||
void LoadToPlaylist();
|
void LoadToPlaylist();
|
||||||
|
void OpenInNewPlaylist();
|
||||||
void Download();
|
void Download();
|
||||||
void Homepage();
|
void Homepage();
|
||||||
void ShowConfig();
|
void ShowConfig();
|
||||||
@ -111,6 +112,7 @@ class MagnatuneService : public RadioService {
|
|||||||
|
|
||||||
QAction* add_to_playlist_;
|
QAction* add_to_playlist_;
|
||||||
QAction* load_to_playlist_;
|
QAction* load_to_playlist_;
|
||||||
|
QAction* open_in_new_playlist_;
|
||||||
QAction* download_;
|
QAction* download_;
|
||||||
|
|
||||||
LibraryBackend* library_backend_;
|
LibraryBackend* library_backend_;
|
||||||
|
@ -36,16 +36,17 @@ PlaylistItem::SpecialLoadResult RadioService::LoadNext(const QUrl&) {
|
|||||||
return PlaylistItem::SpecialLoadResult();
|
return PlaylistItem::SpecialLoadResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioService::AddItemToPlaylist(const QModelIndex& index, bool clear, bool enqueue) {
|
void RadioService::AddItemToPlaylist(const QModelIndex& index, bool clear, bool enqueue, bool start_new) {
|
||||||
AddItemsToPlaylist(QModelIndexList() << index, clear, enqueue);
|
AddItemsToPlaylist(QModelIndexList() << index, clear, enqueue, start_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioService::AddItemsToPlaylist(const QModelIndexList& indexes, bool clear, bool enqueue) {
|
void RadioService::AddItemsToPlaylist(const QModelIndexList& indexes, bool clear, bool enqueue, bool start_new) {
|
||||||
QMimeData* data = model()->merged_model()->mimeData(
|
QMimeData* data = model()->merged_model()->mimeData(
|
||||||
model()->merged_model()->mapFromSource(indexes));
|
model()->merged_model()->mapFromSource(indexes));
|
||||||
if (MimeData* mime_data = qobject_cast<MimeData*>(data)) {
|
if (MimeData* mime_data = qobject_cast<MimeData*>(data)) {
|
||||||
mime_data->clear_first_ = clear;
|
mime_data->clear_first_ = clear;
|
||||||
mime_data->enqueue_now_ = enqueue;
|
mime_data->enqueue_now_ = enqueue;
|
||||||
|
mime_data->new_playlist_ = start_new;
|
||||||
}
|
}
|
||||||
emit AddToPlaylistSignal(data);
|
emit AddToPlaylistSignal(data);
|
||||||
}
|
}
|
||||||
|
@ -66,8 +66,8 @@ signals:
|
|||||||
void AddToPlaylistSignal(QMimeData* data);
|
void AddToPlaylistSignal(QMimeData* data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void AddItemToPlaylist(const QModelIndex& index, bool clear = false, bool enqueue = false);
|
void AddItemToPlaylist(const QModelIndex& index, bool clear = false, bool enqueue = false, bool start_new = false);
|
||||||
void AddItemsToPlaylist(const QModelIndexList& indexes, bool clear = false, bool enqueue = false);
|
void AddItemsToPlaylist(const QModelIndexList& indexes, bool clear = false, bool enqueue = false, bool start_new = false);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RadioModel* model_;
|
RadioModel* model_;
|
||||||
|
@ -92,6 +92,8 @@ void SavedRadio::ShowContextMenu(const QModelIndex& index,
|
|||||||
context_menu_ = new QMenu;
|
context_menu_ = new QMenu;
|
||||||
add_action_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
add_action_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
||||||
load_action_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
load_action_ = context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
||||||
|
open_in_new_playlist_ = context_menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
|
||||||
|
context_menu_->addSeparator();
|
||||||
remove_action_ = context_menu_->addAction(IconLoader::Load("list-remove"), tr("Remove"), this, SLOT(Remove()));
|
remove_action_ = context_menu_->addAction(IconLoader::Load("list-remove"), tr("Remove"), this, SLOT(Remove()));
|
||||||
edit_action_ = context_menu_->addAction(IconLoader::Load("edit-rename"), tr("Edit..."), this, SLOT(Edit()));
|
edit_action_ = context_menu_->addAction(IconLoader::Load("edit-rename"), tr("Edit..."), this, SLOT(Edit()));
|
||||||
context_menu_->addSeparator();
|
context_menu_->addSeparator();
|
||||||
@ -103,6 +105,7 @@ void SavedRadio::ShowContextMenu(const QModelIndex& index,
|
|||||||
|
|
||||||
add_action_->setEnabled(!is_root);
|
add_action_->setEnabled(!is_root);
|
||||||
load_action_->setEnabled(!is_root);
|
load_action_->setEnabled(!is_root);
|
||||||
|
open_in_new_playlist_->setEnabled(!is_root);
|
||||||
remove_action_->setEnabled(!is_root);
|
remove_action_->setEnabled(!is_root);
|
||||||
edit_action_->setEnabled(!is_root);
|
edit_action_->setEnabled(!is_root);
|
||||||
|
|
||||||
@ -145,6 +148,10 @@ void SavedRadio::LoadToPlaylist() {
|
|||||||
AddItemToPlaylist(context_item_->index(), true);
|
AddItemToPlaylist(context_item_->index(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SavedRadio::OpenInNewPlaylist() {
|
||||||
|
AddItemToPlaylist(context_item_->index(), false, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
void SavedRadio::AddStreamToList(const Stream& stream, QStandardItem* parent) {
|
void SavedRadio::AddStreamToList(const Stream& stream, QStandardItem* parent) {
|
||||||
QStandardItem* s = new QStandardItem(QIcon(":last.fm/icon_radio.png"), stream.name_);
|
QStandardItem* s = new QStandardItem(QIcon(":last.fm/icon_radio.png"), stream.name_);
|
||||||
s->setData(stream.url_, RadioModel::Role_Url);
|
s->setData(stream.url_, RadioModel::Role_Url);
|
||||||
|
@ -53,6 +53,7 @@ class SavedRadio : public RadioService {
|
|||||||
private slots:
|
private slots:
|
||||||
void AddToPlaylist();
|
void AddToPlaylist();
|
||||||
void LoadToPlaylist();
|
void LoadToPlaylist();
|
||||||
|
void OpenInNewPlaylist();
|
||||||
void Remove();
|
void Remove();
|
||||||
void Edit();
|
void Edit();
|
||||||
|
|
||||||
@ -79,6 +80,7 @@ class SavedRadio : public RadioService {
|
|||||||
|
|
||||||
QAction* add_action_;
|
QAction* add_action_;
|
||||||
QAction* load_action_;
|
QAction* load_action_;
|
||||||
|
QAction* open_in_new_playlist_;
|
||||||
QAction* remove_action_;
|
QAction* remove_action_;
|
||||||
QAction* edit_action_;
|
QAction* edit_action_;
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ void SomaFMService::ShowContextMenu(const QModelIndex& index, const QPoint& glob
|
|||||||
context_menu_ = new QMenu;
|
context_menu_ = new QMenu;
|
||||||
context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, SLOT(AddToPlaylist()));
|
||||||
context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, SLOT(LoadToPlaylist()));
|
||||||
|
context_menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylist()));
|
||||||
context_menu_->addSeparator();
|
context_menu_->addSeparator();
|
||||||
context_menu_->addAction(IconLoader::Load("download"), tr("Open somafm.com in browser"), this, SLOT(Homepage()));
|
context_menu_->addAction(IconLoader::Load("download"), tr("Open somafm.com in browser"), this, SLOT(Homepage()));
|
||||||
context_menu_->addAction(IconLoader::Load("view-refresh"), tr("Refresh channels"), this, SLOT(RefreshChannels()));
|
context_menu_->addAction(IconLoader::Load("view-refresh"), tr("Refresh channels"), this, SLOT(RefreshChannels()));
|
||||||
@ -220,6 +221,10 @@ void SomaFMService::LoadToPlaylist() {
|
|||||||
AddItemToPlaylist(context_item_->index(), true);
|
AddItemToPlaylist(context_item_->index(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SomaFMService::OpenInNewPlaylist() {
|
||||||
|
AddItemToPlaylist(context_item_->index(), false, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
PlaylistItem::Options SomaFMService::playlistitem_options() const {
|
PlaylistItem::Options SomaFMService::playlistitem_options() const {
|
||||||
return PlaylistItem::SpecialPlayBehaviour |
|
return PlaylistItem::SpecialPlayBehaviour |
|
||||||
PlaylistItem::PauseDisabled;
|
PlaylistItem::PauseDisabled;
|
||||||
|
@ -55,6 +55,7 @@ class SomaFMService : public RadioService {
|
|||||||
|
|
||||||
void AddToPlaylist();
|
void AddToPlaylist();
|
||||||
void LoadToPlaylist();
|
void LoadToPlaylist();
|
||||||
|
void OpenInNewPlaylist();
|
||||||
void Homepage();
|
void Homepage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -35,6 +35,6 @@ signals:
|
|||||||
void AddToPlaylistSignal(QMimeData* data);
|
void AddToPlaylistSignal(QMimeData* data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void AddItemToPlaylist(const QModelIndex& index, bool clear = false, bool enqueue = false);
|
void AddItemToPlaylist(const QModelIndex& index, bool clear = false, bool enqueue = false, bool start_new = false);
|
||||||
void AddItemsToPlaylist(const QModelIndexList& indexes, bool clear = false, bool enqueue = false);
|
void AddItemsToPlaylist(const QModelIndexList& indexes, bool clear = false, bool enqueue = false, bool start_new = false);
|
||||||
};
|
};
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1635,6 +1635,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1657,6 +1657,9 @@ msgstr "Отворено устройство"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Отворете dir.xiph.org във уеб браузър"
|
msgstr "Отворете dir.xiph.org във уеб браузър"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Отворете jamendo.com в уеб браузър"
|
msgstr "Отворете jamendo.com в уеб браузър"
|
||||||
|
|
||||||
|
@ -1623,6 +1623,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1658,6 +1658,9 @@ msgstr "Obrir dispositiu"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1660,6 +1660,9 @@ msgstr "Otevřít zařízení"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Otevřít dir.xiph.org v prohlížeči"
|
msgstr "Otevřít dir.xiph.org v prohlížeči"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Otevřít jamendo.com v prohlížeči"
|
msgstr "Otevřít jamendo.com v prohlížeči"
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1624,6 +1624,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1662,6 +1662,9 @@ msgstr "Gerät öffnen"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Öffne dir.xiph.org im Browser"
|
msgstr "Öffne dir.xiph.org im Browser"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Öffne jamendo.com in einem Browser"
|
msgstr "Öffne jamendo.com in einem Browser"
|
||||||
|
|
||||||
|
@ -1669,6 +1669,9 @@ msgstr "Άνοιγμα συσκευής"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Άνοιγμα του dir.xiph.org στον περιηγητή"
|
msgstr "Άνοιγμα του dir.xiph.org στον περιηγητή"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "άνοιγμα του jamendo.com στον περιηγητή"
|
msgstr "άνοιγμα του jamendo.com στον περιηγητή"
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1625,6 +1625,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1622,6 +1622,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1670,6 +1670,9 @@ msgstr "Abrir dispositivo"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Abrir dir.xiph.org en el navegador"
|
msgstr "Abrir dir.xiph.org en el navegador"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Abrir jamendo.com en el navegador"
|
msgstr "Abrir jamendo.com en el navegador"
|
||||||
|
|
||||||
|
@ -1622,6 +1622,9 @@ msgstr "Ava seade"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1622,6 +1622,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1676,6 +1676,9 @@ msgstr "Ouvrir le périphérique"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Ouvrir dir.xiph.org dans le navigateur"
|
msgstr "Ouvrir dir.xiph.org dans le navigateur"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Ouvrir Jamendo.com dans le navigateur"
|
msgstr "Ouvrir Jamendo.com dans le navigateur"
|
||||||
|
|
||||||
|
@ -1630,6 +1630,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1641,6 +1641,9 @@ msgstr "פתח התקן"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "פתח את dir.xiph.org בדפדפן"
|
msgstr "פתח את dir.xiph.org בדפדפן"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "פתח את jamendo.com בדפדפן"
|
msgstr "פתח את jamendo.com בדפדפן"
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1653,6 +1653,9 @@ msgstr "Otvori uređaj"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Otvori dir.xiph.org u Internet pretraživaču"
|
msgstr "Otvori dir.xiph.org u Internet pretraživaču"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Otvori jamendo.com u Internet pretraživaču"
|
msgstr "Otvori jamendo.com u Internet pretraživaču"
|
||||||
|
|
||||||
|
@ -1658,6 +1658,9 @@ msgstr "Eszköz megnyitása"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "dir.xiph.org megnyitása böngészőben"
|
msgstr "dir.xiph.org megnyitása böngészőben"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "jamendo.com megnyitása böngészőben"
|
msgstr "jamendo.com megnyitása böngészőben"
|
||||||
|
|
||||||
|
@ -1665,6 +1665,9 @@ msgstr "Apri dispositivo"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Apri dir.xiph.org nel browser"
|
msgstr "Apri dir.xiph.org nel browser"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Apri jamendo.com nel browser"
|
msgstr "Apri jamendo.com nel browser"
|
||||||
|
|
||||||
|
@ -1650,6 +1650,9 @@ msgstr "デバイスを開く"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "ブラウザで dir.xiph.org を開きます"
|
msgstr "ブラウザで dir.xiph.org を開きます"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "ブラウザで jamendo.com を開きます"
|
msgstr "ブラウザで jamendo.com を開きます"
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1653,6 +1653,9 @@ msgstr "Atverti įrenginį"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Atverti dir.xiph.org interneto naršyklėje"
|
msgstr "Atverti dir.xiph.org interneto naršyklėje"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Atverti jamendo.com interneto naršyklėje"
|
msgstr "Atverti jamendo.com interneto naršyklėje"
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1633,6 +1633,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1657,6 +1657,9 @@ msgstr "Apparaat openen"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1658,6 +1658,9 @@ msgstr "Otwórz urządzenie"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Otwórz dir.xiph.org w przeglądarce"
|
msgstr "Otwórz dir.xiph.org w przeglądarce"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Otwórz jamendo.com w przeglądarce"
|
msgstr "Otwórz jamendo.com w przeglądarce"
|
||||||
|
|
||||||
|
@ -1661,6 +1661,9 @@ msgstr "Abrir dispositivo"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Abrir dir.xiph.org no navegador"
|
msgstr "Abrir dir.xiph.org no navegador"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Abrir jamendo.com no navegador"
|
msgstr "Abrir jamendo.com no navegador"
|
||||||
|
|
||||||
|
@ -1659,6 +1659,9 @@ msgstr "Abrir dispositivo"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Abrir dir.xiph.org no navegador"
|
msgstr "Abrir dir.xiph.org no navegador"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Abrir jamendo.com no navegador"
|
msgstr "Abrir jamendo.com no navegador"
|
||||||
|
|
||||||
|
@ -1621,6 +1621,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1652,6 +1652,9 @@ msgstr "Открыть устройство"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Открыть dir.xiph.org в браузере"
|
msgstr "Открыть dir.xiph.org в браузере"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Перейдите в браузере по адресу jamendo.com"
|
msgstr "Перейдите в браузере по адресу jamendo.com"
|
||||||
|
|
||||||
|
@ -1650,6 +1650,9 @@ msgstr "Otvoriť zariadenie"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Otvoriť dir.xiph.org v prehliadači"
|
msgstr "Otvoriť dir.xiph.org v prehliadači"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Otvoriť jamendo.com v prehliadači"
|
msgstr "Otvoriť jamendo.com v prehliadači"
|
||||||
|
|
||||||
|
@ -1652,6 +1652,9 @@ msgstr "Odpri napravo"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Odpri dir.xiph.org v brskalniku"
|
msgstr "Odpri dir.xiph.org v brskalniku"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Odpri jamendo.com v brskalniku"
|
msgstr "Odpri jamendo.com v brskalniku"
|
||||||
|
|
||||||
|
@ -1625,6 +1625,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1654,6 +1654,9 @@ msgstr "Öppna enhet"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1651,6 +1651,9 @@ msgstr "Aygıtı aç"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "dir.xiph.org sayfasını tarayıcıda aç"
|
msgstr "dir.xiph.org sayfasını tarayıcıda aç"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "İnternet tarayıcıda jamendo.com'u aç"
|
msgstr "İnternet tarayıcıda jamendo.com'u aç"
|
||||||
|
|
||||||
|
@ -1611,6 +1611,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1651,6 +1651,9 @@ msgstr "Відкрити пристрій"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "Відкрити dir.xiph.org в оглядачі"
|
msgstr "Відкрити dir.xiph.org в оглядачі"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "Відкрити jamendo.com в оглядачі"
|
msgstr "Відкрити jamendo.com в оглядачі"
|
||||||
|
|
||||||
|
@ -1623,6 +1623,9 @@ msgstr "打开设备"
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr "在浏览器中打开 dir.xiph.org"
|
msgstr "在浏览器中打开 dir.xiph.org"
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr "在浏览器中打开 jamendo.com"
|
msgstr "在浏览器中打开 jamendo.com"
|
||||||
|
|
||||||
|
@ -1625,6 +1625,9 @@ msgstr ""
|
|||||||
msgid "Open dir.xiph.org in browser"
|
msgid "Open dir.xiph.org in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open in new playlist"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Open jamendo.com in browser"
|
msgid "Open jamendo.com in browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -982,6 +982,10 @@ void MainWindow::ApplyAddBehaviour(MainWindow::AddBehaviour b, MimeData* data) c
|
|||||||
data->clear_first_ = true;
|
data->clear_first_ = true;
|
||||||
data->enqueue_now_ = false;
|
data->enqueue_now_ = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case AddBehaviour_OpenInNew:
|
||||||
|
data->new_playlist_ = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1013,6 +1017,11 @@ void MainWindow::AddToPlaylist(QMimeData* data) {
|
|||||||
} else {
|
} else {
|
||||||
ApplyPlayBehaviour(menu_playmode_, mime_data);
|
ApplyPlayBehaviour(menu_playmode_, mime_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Should we create a new playlist for the songs?
|
||||||
|
if(mime_data->new_playlist_) {
|
||||||
|
playlists_->New(tr("Playlist"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
playlists_->current()->dropMimeData(data, Qt::CopyAction, -1, 0, QModelIndex());
|
playlists_->current()->dropMimeData(data, Qt::CopyAction, -1, 0, QModelIndex());
|
||||||
|
@ -107,6 +107,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||||||
AddBehaviour_Append = 1,
|
AddBehaviour_Append = 1,
|
||||||
AddBehaviour_Enqueue = 2,
|
AddBehaviour_Enqueue = 2,
|
||||||
AddBehaviour_Load = 3,
|
AddBehaviour_Load = 3,
|
||||||
|
AddBehaviour_OpenInNew = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
// Don't change the values
|
// Don't change the values
|
||||||
|
@ -159,7 +159,8 @@ SettingsDialog::SettingsDialog(BackgroundStreams* streams, QWidget* parent)
|
|||||||
|
|
||||||
ui_->doubleclick_addmode->setItemData(0, MainWindow::AddBehaviour_Append);
|
ui_->doubleclick_addmode->setItemData(0, MainWindow::AddBehaviour_Append);
|
||||||
ui_->doubleclick_addmode->setItemData(1, MainWindow::AddBehaviour_Load);
|
ui_->doubleclick_addmode->setItemData(1, MainWindow::AddBehaviour_Load);
|
||||||
ui_->doubleclick_addmode->setItemData(2, MainWindow::AddBehaviour_Enqueue);
|
ui_->doubleclick_addmode->setItemData(2, MainWindow::AddBehaviour_OpenInNew);
|
||||||
|
ui_->doubleclick_addmode->setItemData(3, MainWindow::AddBehaviour_Enqueue);
|
||||||
|
|
||||||
ui_->doubleclick_playmode->setItemData(0, MainWindow::PlayBehaviour_Never);
|
ui_->doubleclick_playmode->setItemData(0, MainWindow::PlayBehaviour_Never);
|
||||||
ui_->doubleclick_playmode->setItemData(1, MainWindow::PlayBehaviour_IfStopped);
|
ui_->doubleclick_playmode->setItemData(1, MainWindow::PlayBehaviour_IfStopped);
|
||||||
|
@ -463,6 +463,11 @@
|
|||||||
<string>Replace the playlist</string>
|
<string>Replace the playlist</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open in new playlist</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add to the queue</string>
|
<string>Add to the queue</string>
|
||||||
|
@ -32,6 +32,8 @@ FileViewList::FileViewList(QWidget* parent)
|
|||||||
this, SLOT(AddToPlaylistSlot()));
|
this, SLOT(AddToPlaylistSlot()));
|
||||||
menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"),
|
menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"),
|
||||||
this, SLOT(LoadSlot()));
|
this, SLOT(LoadSlot()));
|
||||||
|
menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"),
|
||||||
|
this, SLOT(OpenInNewPlaylistSlot()));
|
||||||
menu_->addSeparator();
|
menu_->addSeparator();
|
||||||
menu_->addAction(IconLoader::Load("edit-copy"), tr("Copy to library..."),
|
menu_->addAction(IconLoader::Load("edit-copy"), tr("Copy to library..."),
|
||||||
this, SLOT(CopyToLibrarySlot()));
|
this, SLOT(CopyToLibrarySlot()));
|
||||||
@ -86,6 +88,12 @@ void FileViewList::AddToPlaylistSlot() {
|
|||||||
emit AddToPlaylist(MimeDataFromSelection());
|
emit AddToPlaylist(MimeDataFromSelection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileViewList::OpenInNewPlaylistSlot() {
|
||||||
|
MimeData* data = MimeDataFromSelection();
|
||||||
|
data->new_playlist_ = true;
|
||||||
|
emit AddToPlaylist(data);
|
||||||
|
}
|
||||||
|
|
||||||
void FileViewList::CopyToLibrarySlot() {
|
void FileViewList::CopyToLibrarySlot() {
|
||||||
emit CopyToLibrary(UrlListFromSelection());
|
emit CopyToLibrary(UrlListFromSelection());
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ class FileViewList : public QListView {
|
|||||||
private slots:
|
private slots:
|
||||||
void LoadSlot();
|
void LoadSlot();
|
||||||
void AddToPlaylistSlot();
|
void AddToPlaylistSlot();
|
||||||
|
void OpenInNewPlaylistSlot();
|
||||||
void CopyToLibrarySlot();
|
void CopyToLibrarySlot();
|
||||||
void MoveToLibrarySlot();
|
void MoveToLibrarySlot();
|
||||||
void CopyToDeviceSlot();
|
void CopyToDeviceSlot();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user