From 95f2a9c8979cb2606027efd7e1a831676860a8b6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 30 Oct 2023 23:34:12 +0900 Subject: Fix functionality of 'Parameter tooltips' menu action Signed-off-by: Michele Calgaro --- src/MainWindow.cpp | 8 ++++++++ src/UiGuiSettings.cpp | 1 + 2 files changed, 9 insertions(+) (limited to 'src') 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(); -- cgit v1.2.1