diff --git a/src/internet/groovesharkservice.cpp b/src/internet/groovesharkservice.cpp index 6364671f5..3a8599566 100644 --- a/src/internet/groovesharkservice.cpp +++ b/src/internet/groovesharkservice.cpp @@ -111,7 +111,7 @@ QStandardItem* GrooveSharkService::CreateRootItem() { void GrooveSharkService::LazyPopulate(QStandardItem* item) { if (session_id_.isEmpty()) { - emit OpenSettingsAtPage(SettingsDialog::Page_GrooveShark); + ShowConfig(); } switch (item->data(InternetModel::Role_Type).toInt()) { case InternetModel::Type_Service: { @@ -123,6 +123,10 @@ void GrooveSharkService::LazyPopulate(QStandardItem* item) { } } +void GrooveSharkService::ShowConfig() { + emit OpenSettingsAtPage(SettingsDialog::Page_GrooveShark); +} + void GrooveSharkService::Search(const QString& text, Playlist* playlist, bool now) { pending_search_ = text; pending_search_playlist_ = playlist; @@ -327,6 +331,10 @@ void GrooveSharkService::EnsureMenuCreated() { if(!context_menu_) { context_menu_ = new QMenu; context_menu_->addActions(GetPlaylistActions()); + context_menu_->addSeparator(); + context_menu_->addAction(IconLoader::Load("edit-find"), tr("Search GrooveShark (opens a new tab)") + "...", this, SLOT(OpenSearchTab())); + context_menu_->addSeparator(); + context_menu_->addAction(IconLoader::Load("configure"), tr("Configure GrooveShark..."), this, SLOT(ShowConfig())); } } diff --git a/src/internet/groovesharkservice.h b/src/internet/groovesharkservice.h index 083d5cff8..6e84ea333 100644 --- a/src/internet/groovesharkservice.h +++ b/src/internet/groovesharkservice.h @@ -83,7 +83,9 @@ class GrooveSharkService : public InternetService { private slots: void UpdateTotalSongCount(int count); + void ShowConfig(); void SessionCreated(); + void OpenSearchTab(); void DoSearch(); void SearchSongsFinished(); void Authenticated(); @@ -92,7 +94,6 @@ class GrooveSharkService : public InternetService { void EnsureMenuCreated(); void EnsureConnected(); - void OpenSearchTab(); void AuthenticateSession(); void InitCountry();