Add preference to hide the simple search type combobox

This commit is contained in:
Jean-Francois Dockes 2020-11-23 09:33:42 +01:00
parent d35abb9abc
commit 76bdc955a5
6 changed files with 20 additions and 0 deletions

View File

@ -405,6 +405,7 @@ qtgui/images/asearch.png \
qtgui/images/cancel.png \
qtgui/images/close.png \
qtgui/images/clock.png \
qtgui/images/menu.png \
qtgui/images/code-block.png \
qtgui/images/down.png \
qtgui/images/firstpage.png \

View File

@ -297,6 +297,7 @@ void rwSettings(bool writing)
SETTING_RW(prefs.noToolbars, "/Recoll/prefs/noToolbars", Bool, false);
SETTING_RW(prefs.noStatusBar, "/Recoll/prefs/noStatusBar", Bool, false);
SETTING_RW(prefs.noMenuBar, "/Recoll/prefs/noMenuBar", Bool, false);
SETTING_RW(prefs.noSSTypCMB, "/Recoll/prefs/noSSTypCMB", Bool, false);
SETTING_RW(prefs.showTrayIcon, "/Recoll/prefs/showTrayIcon", Bool, false);
SETTING_RW(prefs.closeToTray, "/Recoll/prefs/closeToTray", Bool, false);
SETTING_RW(prefs.trayMessages, "/Recoll/prefs/trayMessages", Bool, false);

View File

@ -144,6 +144,7 @@ class PrefsPack {
bool noClearSearch{false};
bool noStatusBar{false};
bool noMenuBar{false};
bool noSSTypCMB{false};
bool showTrayIcon{false};
bool closeToTray{false};
bool trayMessages{false};

View File

@ -201,6 +201,11 @@ void SSearch::setupButtons()
searchPB->show();
queryText->setClearButtonEnabled(false);
}
if (prefs.noSSTypCMB) {
searchTypCMB->hide();
} else {
searchTypCMB->show();
}
}
void SSearch::takeFocus()

View File

@ -192,6 +192,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="noSSTypCMBCB">
<property name="text">
<string>Hide simple search type (show in menu only).</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="noClearSearchCB">
<property name="text">

View File

@ -148,6 +148,7 @@ void UIPrefsDialog::setFromPrefs()
noClearSearchCB->setChecked(prefs.noClearSearch);
noStatusBarCB->setChecked(prefs.noStatusBar);
noMenuBarCB->setChecked(prefs.noMenuBar);
noSSTypCMBCB->setChecked(prefs.noSSTypCMB);
showTrayIconCB->setChecked(prefs.showTrayIcon);
if (!prefs.showTrayIcon) {
prefs.closeToTray = false;
@ -355,6 +356,7 @@ void UIPrefsDialog::accept()
m_mainWindow->setupToolbars();
prefs.noMenuBar = noMenuBarCB->isChecked();
m_mainWindow->setupMenus();
prefs.noSSTypCMB = noSSTypCMBCB->isChecked();
prefs.noStatusBar = noStatusBarCB->isChecked();
m_mainWindow->setupStatusBar();
prefs.noClearSearch = noClearSearchCB->isChecked();