Add extra entries to GrooveShark menu
This commit is contained in:
parent
2bfe5422f2
commit
44773f0ff0
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue