summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-10-30 23:34:12 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-10-30 23:34:12 +0900
commit95f2a9c8979cb2606027efd7e1a831676860a8b6 (patch)
treee20c98802ba0866c2c6815c941249e72d5c3687e
parentd54efa8cb872b6ecc7657dd215efeeabf04821e1 (diff)
downloaduniversal-indent-gui-tqt-95f2a9c8979cb2606027efd7e1a831676860a8b6.tar.gz
universal-indent-gui-tqt-95f2a9c8979cb2606027efd7e1a831676860a8b6.zip
Fix functionality of 'Parameter tooltips' menu action
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--src/MainWindow.cpp8
-rw-r--r--src/UiGuiSettings.cpp1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index e771580..e4602ee 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -231,6 +231,14 @@ void MainWindow::initMainWindow()
// Tell the TQScintilla editor if it has to show white space.
connect(m_settings, SIGNAL(whiteSpaceIsVisible(bool)), this, SLOT(setWhiteSpaceVisibility(bool)));
+ // Register the indenter parameter tooltip setting in the menu to the settings object
+ connect(actionIndenterParameterTooltipsEnabled, SIGNAL(toggled(bool)),
+ m_settings, SLOT(handleValueChangeFromExtern(bool)));
+ connect(m_settings, SIGNAL(indenterParameterTooltipsEnabled(bool)),
+ actionIndenterParameterTooltipsEnabled, SLOT(setOn(bool)));
+ actionIndenterParameterTooltipsEnabled->setOn(
+ m_settings->getValueByName("IndenterParameterTooltipsEnabled").toBool());
+
// Connect the remaining menu items.
connect(actionOpenSourceFile, SIGNAL(activated()), this, SLOT(openSourceFileDialog()));
connect(actionSaveSourceFile, SIGNAL(activated()), this, SLOT(saveSourceFile()));
diff --git a/src/UiGuiSettings.cpp b/src/UiGuiSettings.cpp
index c3fccbb..2bce20f 100644
--- a/src/UiGuiSettings.cpp
+++ b/src/UiGuiSettings.cpp
@@ -57,6 +57,7 @@ UiGuiSettings::UiGuiSettings() : TQObject()
m_actionSettings["actionEnableSyntaxHighlighting"] = "SyntaxHighlightingEnabled";
m_actionSettings["actionLoadLastOpenedFileOnStartup"] = "LoadLastOpenedFileOnStartup";
m_actionSettings["actionWhiteSpaceIsVisible"] = "WhiteSpaceIsVisible";
+ m_actionSettings["actionIndenterParameterTooltipsEnabled"] = "IndenterParameterTooltipsEnabled";
readAvailableTranslations();
loadSettings();