diff options
Diffstat (limited to 'src/plugins/General/lyrics')
8 files changed, 50 insertions, 13 deletions
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 <PlayListItem *> 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 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="1.1" language="pl"> +<!DOCTYPE TS> +<TS version="2.0" language="pl"> <context> <name>Lyrics</name> <message> @@ -7,6 +8,11 @@ <source>View Lyrics</source> <translation>Zobrazit text</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> @@ -44,6 +50,7 @@ <translation>Text: %1 - %2</translation> </message> <message> + <location filename="../lyricswindow.cpp" line="66"/> <location filename="../lyricswindow.ui" line="67"/> <source>No connection</source> <translation>Nespojeno</translation> 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 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="1.1" language="de"> -<defaultcodec></defaultcodec> +<!DOCTYPE TS> +<TS version="2.0" language="de"> <context> <name>Lyrics</name> <message> @@ -8,6 +8,11 @@ <source>View Lyrics</source> <translation>Liedtext anzeigen</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> @@ -45,6 +50,7 @@ <translation>Liedtext: %1 - %2</translation> </message> <message> + <location filename="../lyricswindow.cpp" line="66"/> <location filename="../lyricswindow.ui" line="67"/> <source>No connection</source> <translation>Keine Verbindung</translation> 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 @@ <source>View Lyrics</source> <translation>Pokaż tekst piosenki</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> 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 @@ <source>View Lyrics</source> <translation>Показать текст</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> 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 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="1.1" language="uk"> -<defaultcodec></defaultcodec> +<!DOCTYPE TS> +<TS version="2.0" language="uk"> <context> <name>Lyrics</name> <message> @@ -8,6 +8,11 @@ <source>View Lyrics</source> <translation>Огляд текстів</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> @@ -45,6 +50,7 @@ <translation>Тексти: %1 - %2</translation> </message> <message> + <location filename="../lyricswindow.cpp" line="66"/> <location filename="../lyricswindow.ui" line="67"/> <source>No connection</source> <translation>Немає з'єднання</translation> 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 @@ <source>View Lyrics</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> 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 @@ <source>View Lyrics</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> |
