diff --git a/src/songinfo/songinfobase.cpp b/src/songinfo/songinfobase.cpp index 0eaecd6e6..827da9dae 100644 --- a/src/songinfo/songinfobase.cpp +++ b/src/songinfo/songinfobase.cpp @@ -88,12 +88,16 @@ void SongInfoBase::AddSection(CollapsibleInfoPane* section) { break; } + ConnectWidget(section->data().contents_); + sections_.insert(index, section); qobject_cast(section_container_->layout())->insertWidget(index, section); section->show(); } void SongInfoBase::AddWidget(QWidget* widget) { + ConnectWidget(widget); + container_->insertWidget(container_->count() - 2, widget); widgets_ << widget; } @@ -203,3 +207,9 @@ void SongInfoBase::ReloadSettings() { QMetaObject::invokeMethod(contents, "ReloadSettings"); } } + +void SongInfoBase::ConnectWidget(QWidget* widget) { + if (widget->metaObject()->indexOfSignal("ShowSettingsDialog()") != -1) { + connect(widget, SIGNAL(ShowSettingsDialog()), SIGNAL(ShowSettingsDialog())); + } +} diff --git a/src/songinfo/songinfobase.h b/src/songinfo/songinfobase.h index 2b10a8368..3e3a269a0 100644 --- a/src/songinfo/songinfobase.h +++ b/src/songinfo/songinfobase.h @@ -44,6 +44,9 @@ public slots: void SongFinished(); virtual void ReloadSettings(); +signals: + void ShowSettingsDialog(); + protected: void showEvent(QShowEvent* e); @@ -65,6 +68,7 @@ protected: private: void MaybeUpdate(const Song& metadata); + void ConnectWidget(QWidget* widget); private slots: void SectionToggled(bool value); diff --git a/src/songinfo/songinfotextview.cpp b/src/songinfo/songinfotextview.cpp index f1aa3bc20..6c8530a7f 100644 --- a/src/songinfo/songinfotextview.cpp +++ b/src/songinfo/songinfotextview.cpp @@ -17,6 +17,7 @@ #include "songinfotextview.h" #include +#include #include #include @@ -63,3 +64,12 @@ QSize SongInfoTextView::sizeHint() const { void SongInfoTextView::wheelEvent(QWheelEvent* e) { e->ignore(); } + +void SongInfoTextView::contextMenuEvent(QContextMenuEvent* e) { + QMenu* menu = createStandardContextMenu(e->pos()); + menu->setAttribute(Qt::WA_DeleteOnClose); + + menu->addAction(tr("Change font size..."), this, SIGNAL(ShowSettingsDialog())); + + menu->popup(e->globalPos()); +} diff --git a/src/songinfo/songinfotextview.h b/src/songinfo/songinfotextview.h index 24108f88d..4af2bb43d 100644 --- a/src/songinfo/songinfotextview.h +++ b/src/songinfo/songinfotextview.h @@ -33,9 +33,13 @@ public: public slots: void ReloadSettings(); +signals: + void ShowSettingsDialog(); + protected: void resizeEvent(QResizeEvent* e); void wheelEvent(QWheelEvent* e); + void contextMenuEvent(QContextMenuEvent* e); private: int last_width_; diff --git a/src/translations/ar.po b/src/translations/ar.po index 615bef15a..5a39bb469 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -357,6 +357,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/bg.po b/src/translations/bg.po index 1ea9089ae..727827e07 100644 --- a/src/translations/bg.po +++ b/src/translations/bg.po @@ -358,6 +358,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/ca.po b/src/translations/ca.po index 4ab9782f5..2fcf577ed 100644 --- a/src/translations/ca.po +++ b/src/translations/ca.po @@ -367,6 +367,9 @@ msgstr "" msgid "Buttons" msgstr "Botons" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Canviar combinació de tecles" diff --git a/src/translations/cs.po b/src/translations/cs.po index be9798ca4..2f2289e3f 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -359,6 +359,9 @@ msgstr "" msgid "Buttons" msgstr "Tlačítka" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/da.po b/src/translations/da.po index ea2367835..37b9435d8 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -359,6 +359,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Ændrer smutvej..." diff --git a/src/translations/de.po b/src/translations/de.po index fe9bf2354..d3f517047 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -365,6 +365,9 @@ msgstr "" msgid "Buttons" msgstr "Tasten" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Tastenkürzel ändern..." diff --git a/src/translations/el.po b/src/translations/el.po index 158195c27..cddcfb101 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -366,6 +366,9 @@ msgstr "" msgid "Buttons" msgstr "Κουμπιά" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Αλλαγή συντόμευσης..." diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index eb313c733..d2cf38786 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -357,6 +357,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Change shortcut..." diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index c8fc2cbe1..f764912b5 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -357,6 +357,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/es.po b/src/translations/es.po index 91f76f6ea..ca83a091c 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -367,6 +367,9 @@ msgstr "" msgid "Buttons" msgstr "Botones" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Cambiar combinación de teclas" diff --git a/src/translations/fi.po b/src/translations/fi.po index 4372ef6c8..e3395b2a1 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -358,6 +358,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/fr.po b/src/translations/fr.po index 0285ce2be..f4ba3c55b 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -370,6 +370,9 @@ msgstr "" msgid "Buttons" msgstr "Boutons" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Changer le raccourci..." diff --git a/src/translations/gl.po b/src/translations/gl.po index 5f5ee90f7..d03d2302b 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -358,6 +358,9 @@ msgstr "" msgid "Buttons" msgstr "Botóns" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Cambiar combinación de teclas" diff --git a/src/translations/hu.po b/src/translations/hu.po index cc543b93a..f15f789af 100644 --- a/src/translations/hu.po +++ b/src/translations/hu.po @@ -363,6 +363,9 @@ msgstr "" msgid "Buttons" msgstr "Gombok" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Billentyűparancs módosítása..." diff --git a/src/translations/it.po b/src/translations/it.po index d9ff91321..7501a9abd 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -370,6 +370,9 @@ msgstr "" msgid "Buttons" msgstr "Pulsanti" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Cambia la scorciatoia" diff --git a/src/translations/kk.po b/src/translations/kk.po index 33e6e17a5..b0229ddc5 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -357,6 +357,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/lt.po b/src/translations/lt.po index d184f3cc9..409aa0735 100644 --- a/src/translations/lt.po +++ b/src/translations/lt.po @@ -358,6 +358,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/nb.po b/src/translations/nb.po index 0016feecc..d397daed1 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -358,6 +358,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/nl.po b/src/translations/nl.po index 78f63ad2f..5d7ed33d7 100644 --- a/src/translations/nl.po +++ b/src/translations/nl.po @@ -366,6 +366,9 @@ msgstr "" msgid "Buttons" msgstr "Knoppen" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Sneltoets wijzigen" diff --git a/src/translations/oc.po b/src/translations/oc.po index ee54642d7..e3a307b78 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -357,6 +357,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/pl.po b/src/translations/pl.po index 5eeacac97..9275ba0b5 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -366,6 +366,9 @@ msgstr "" msgid "Buttons" msgstr "Przyciski" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Zmień skrót..." diff --git a/src/translations/pt.po b/src/translations/pt.po index a545cc465..a562d72c8 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -366,6 +366,9 @@ msgstr "" msgid "Buttons" msgstr "Botões" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Alterar atalho..." diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index c601b3429..2e34d0edf 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -363,6 +363,9 @@ msgstr "" msgid "Buttons" msgstr "Botões" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Mudar atalho..." diff --git a/src/translations/ro.po b/src/translations/ro.po index 7dcd1024f..7df6fdfb9 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -357,6 +357,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/ru.po b/src/translations/ru.po index 4a4717d4a..a3bbbd080 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -361,6 +361,9 @@ msgstr "" msgid "Buttons" msgstr "Клавиши" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Изменить горячую клавишу..." diff --git a/src/translations/sk.po b/src/translations/sk.po index 2ffd2378c..2c075c875 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -363,6 +363,9 @@ msgstr "" msgid "Buttons" msgstr "Tlačidlá" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Zmeniť skratku..." diff --git a/src/translations/sl.po b/src/translations/sl.po index 8eb8bdfe8..9dd62dd13 100644 --- a/src/translations/sl.po +++ b/src/translations/sl.po @@ -362,6 +362,9 @@ msgstr "" msgid "Buttons" msgstr "Gumbi" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Spremeni bližnjico ..." diff --git a/src/translations/sr.po b/src/translations/sr.po index b695e61b5..232b89c0d 100644 --- a/src/translations/sr.po +++ b/src/translations/sr.po @@ -358,6 +358,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Промени пречицу..." diff --git a/src/translations/sv.po b/src/translations/sv.po index 8b54e1b09..55dbc85aa 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -358,6 +358,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Ändra genväg..." diff --git a/src/translations/tr.po b/src/translations/tr.po index ee584f7a2..71855391b 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -362,6 +362,9 @@ msgstr "" msgid "Buttons" msgstr "Düğmeler" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Kısayolu değiştir..." diff --git a/src/translations/translations.pot b/src/translations/translations.pot index d7cc76c47..25d85c304 100644 --- a/src/translations/translations.pot +++ b/src/translations/translations.pot @@ -348,6 +348,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/uk.po b/src/translations/uk.po index 145601eb1..1c3e512ff 100644 --- a/src/translations/uk.po +++ b/src/translations/uk.po @@ -362,6 +362,9 @@ msgstr "" msgid "Buttons" msgstr "Кнопки" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "Змінити комбінацію клавіш..." diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index 6228e720a..e1ffc9bb9 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -357,6 +357,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index b8c6e9a50..c69bb43e4 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -362,6 +362,9 @@ msgstr "" msgid "Buttons" msgstr "" +msgid "Change font size..." +msgstr "" + msgid "Change shortcut..." msgstr "更改快速鍵..." diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index d61c435c3..f51af9d9e 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -1594,4 +1594,10 @@ void MainWindow::ConnectInfoView(SongInfoBase* view) { connect(playlists_, SIGNAL(CurrentSongChanged(Song)), view, SLOT(SongChanged(Song))); connect(player_, SIGNAL(PlaylistFinished()), view, SLOT(SongFinished())); connect(player_, SIGNAL(Stopped()), view, SLOT(SongFinished())); + + connect(view, SIGNAL(ShowSettingsDialog()), SLOT(ShowSongInfoConfig())); +} + +void MainWindow::ShowSongInfoConfig() { + OpenSettingsDialogAtPage(SettingsDialog::Page_SongInformation); } diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h index 27749d1f4..324f8321e 100644 --- a/src/ui/mainwindow.h +++ b/src/ui/mainwindow.h @@ -189,6 +189,7 @@ class MainWindow : public QMainWindow, public PlatformInterface { void EnsureEditTagDialogCreated(); void OpenSettingsDialog(); void OpenSettingsDialogAtPage(SettingsDialog::Page page); + void ShowSongInfoConfig(); void SaveGeometry();