diff options
author | Jan Holthuis <jholthuis@mixxx.org> | 2021-07-16 12:19:43 +0200 |
---|---|---|
committer | Jan Holthuis <jholthuis@mixxx.org> | 2021-07-16 12:41:50 +0200 |
commit | b0e0a32f0ddbafdf4f353c61ec27fb75f2eadffd (patch) | |
tree | cd15c4b8079cba7be5974daf5c02fa6928eb501d /src/mixxxmainwindow.cpp | |
parent | b4e905519d95f2423bc7144fa401dc5ff366bd01 (diff) |
MixxxMainWindow: Move tooltip mode setting into preferences
Instead of letting the `DlgPrefInterface` class hold a reference to the
`MixxxMainWindow` and call its `setToolTipsCfg` method directly, we just
update the config object and emit a signal that the main window can
connect to.
Diffstat (limited to 'src/mixxxmainwindow.cpp')
-rw-r--r-- | src/mixxxmainwindow.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mixxxmainwindow.cpp b/src/mixxxmainwindow.cpp index fe8baeccee..4090bf44d2 100644 --- a/src/mixxxmainwindow.cpp +++ b/src/mixxxmainwindow.cpp @@ -232,6 +232,10 @@ MixxxMainWindow::MixxxMainWindow( m_pCoreServices->getLibrary()); m_pPrefDlg->setWindowIcon(QIcon(":/images/icons/mixxx.svg")); m_pPrefDlg->setHidden(true); + connect(m_pPrefDlg, + &DlgPreferences::tooltipModeChanged, + this, + &MixxxMainWindow::slotTooltipModeChanged); // Connect signals to the menubar. Should be done before emit newSkinLoaded. connectMenuBar(); @@ -986,10 +990,7 @@ void MixxxMainWindow::slotShowKeywheel(bool toggle) { } } -void MixxxMainWindow::setToolTipsCfg(mixxx::TooltipsPreference tt) { - UserSettingsPointer pConfig = m_pCoreServices->getSettings(); - pConfig->set(ConfigKey("[Controls]","Tooltips"), - ConfigValue(static_cast<int>(tt))); +void MixxxMainWindow::slotTooltipModeChanged(mixxx::TooltipsPreference tt) { m_toolTipsCfg = tt; } |