From f12c647031485d06eb2eb46b74a10f097f141fca Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 11 May 2009 11:32:20 +0000 Subject: lyrics plugin: added hotkey git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@935 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/lyrics/lyrics.cpp | 14 ++++++-------- .../General/lyrics/translations/lyrics_plugin_cs.ts | 9 ++++++++- .../General/lyrics/translations/lyrics_plugin_de.ts | 10 ++++++++-- .../General/lyrics/translations/lyrics_plugin_pl.ts | 5 +++++ .../General/lyrics/translations/lyrics_plugin_ru.ts | 5 +++++ .../General/lyrics/translations/lyrics_plugin_uk_UA.ts | 10 ++++++++-- .../General/lyrics/translations/lyrics_plugin_zh_CN.ts | 5 +++++ .../General/lyrics/translations/lyrics_plugin_zh_TW.ts | 5 +++++ 8 files changed, 50 insertions(+), 13 deletions(-) (limited to 'src/plugins/General/lyrics') diff --git a/src/plugins/General/lyrics/lyrics.cpp b/src/plugins/General/lyrics/lyrics.cpp index fc5589165..e0492cbf5 100644 --- a/src/plugins/General/lyrics/lyrics.cpp +++ b/src/plugins/General/lyrics/lyrics.cpp @@ -33,6 +33,7 @@ Lyrics::Lyrics(QObject *parent) : General(parent) { m_action = new QAction(tr("View Lyrics"), this); + m_action->setShortcut(tr("Ctrl+L")); GeneralHandler::instance()->addAction(m_action, GeneralHandler::PLAYLIST_MENU); connect (m_action, SIGNAL(triggered ()), SLOT(showLyrics())); } @@ -42,15 +43,12 @@ Lyrics::~Lyrics() void Lyrics::showLyrics() { - foreach (PlayListItem *item, MediaPlayer::instance()->playListModel()->items()) + QList items = MediaPlayer::instance()->playListModel()->getSelectedItems(); + if (!items.isEmpty()) { - if (item->isSelected()) - { - if (item->artist().isEmpty() || item->title().isEmpty()) - break; - LyricsWindow *w = new LyricsWindow(item->artist(), item->title(), qApp->activeWindow ()); + if (items.at(0)->artist().isEmpty() || items.at(0)->title().isEmpty()) + return; + LyricsWindow *w = new LyricsWindow(items.at(0)->artist(), items.at(0)->title(), qApp->activeWindow ()); w->show(); - break; - } } } diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts index da7019497..6b65ef153 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts @@ -1,5 +1,6 @@ - + + Lyrics @@ -7,6 +8,11 @@ View Lyrics Zobrazit text + + + Ctrl+L + + LyricsFactory @@ -44,6 +50,7 @@ Text: %1 - %2 + No connection Nespojeno diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts index 77e4eebae..f3b221c54 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts @@ -1,6 +1,6 @@ - - + + Lyrics @@ -8,6 +8,11 @@ View Lyrics Liedtext anzeigen + + + Ctrl+L + + LyricsFactory @@ -45,6 +50,7 @@ Liedtext: %1 - %2 + No connection Keine Verbindung diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts index d8e6f7c1b..cda6aefed 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts @@ -8,6 +8,11 @@ View Lyrics Pokaż tekst piosenki + + + Ctrl+L + + LyricsFactory diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts index 7046debfc..6ad177916 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts @@ -8,6 +8,11 @@ View Lyrics Показать текст + + + Ctrl+L + + LyricsFactory diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts index be6c469e5..ccd0d9f49 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts @@ -1,6 +1,6 @@ - - + + Lyrics @@ -8,6 +8,11 @@ View Lyrics Огляд текстів + + + Ctrl+L + + LyricsFactory @@ -45,6 +50,7 @@ Тексти: %1 - %2 + No connection Немає з'єднання diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts index 91c5cdd1e..2b5b84c07 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts @@ -8,6 +8,11 @@ View Lyrics + + + Ctrl+L + + LyricsFactory diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts index 91c5cdd1e..2b5b84c07 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts @@ -8,6 +8,11 @@ View Lyrics + + + Ctrl+L + + LyricsFactory -- cgit v1.2.3-13-gbd6f