add pref to hide status bar
This commit is contained in:
parent
a24759c4dd
commit
c1f17f3e32
@ -295,6 +295,7 @@ void rwSettings(bool writing)
|
|||||||
Bool, false);
|
Bool, false);
|
||||||
SETTING_RW(prefs.noClearSearch, "/Recoll/prefs/noClearSearch", Bool, false);
|
SETTING_RW(prefs.noClearSearch, "/Recoll/prefs/noClearSearch", Bool, false);
|
||||||
SETTING_RW(prefs.noToolbars, "/Recoll/prefs/noToolbars", Bool, false);
|
SETTING_RW(prefs.noToolbars, "/Recoll/prefs/noToolbars", Bool, false);
|
||||||
|
SETTING_RW(prefs.noStatusBar, "/Recoll/prefs/noStatusBar", Bool, false);
|
||||||
SETTING_RW(prefs.showTrayIcon, "/Recoll/prefs/showTrayIcon", Bool, false);
|
SETTING_RW(prefs.showTrayIcon, "/Recoll/prefs/showTrayIcon", Bool, false);
|
||||||
SETTING_RW(prefs.closeToTray, "/Recoll/prefs/closeToTray", Bool, false);
|
SETTING_RW(prefs.closeToTray, "/Recoll/prefs/closeToTray", Bool, false);
|
||||||
SETTING_RW(prefs.trayMessages, "/Recoll/prefs/trayMessages", Bool, false);
|
SETTING_RW(prefs.trayMessages, "/Recoll/prefs/trayMessages", Bool, false);
|
||||||
|
|||||||
@ -142,6 +142,7 @@ class PrefsPack {
|
|||||||
|
|
||||||
bool noToolbars{false};
|
bool noToolbars{false};
|
||||||
bool noClearSearch{false};
|
bool noClearSearch{false};
|
||||||
|
bool noStatusBar{false};
|
||||||
bool showTrayIcon{false};
|
bool showTrayIcon{false};
|
||||||
bool closeToTray{false};
|
bool closeToTray{false};
|
||||||
bool trayMessages{false};
|
bool trayMessages{false};
|
||||||
|
|||||||
@ -151,9 +151,7 @@ void RclMain::init()
|
|||||||
qf.setPermissions(QFile::ReadOwner|QFile::WriteOwner);
|
qf.setPermissions(QFile::ReadOwner|QFile::WriteOwner);
|
||||||
qf.close();
|
qf.close();
|
||||||
m_watcher.addPath(idxfn);
|
m_watcher.addPath(idxfn);
|
||||||
// At least some versions of qt4 don't display the status bar if
|
setupStatusBar();
|
||||||
// it's not created here.
|
|
||||||
(void)statusBar();
|
|
||||||
|
|
||||||
(void)new HelpClient(this);
|
(void)new HelpClient(this);
|
||||||
HelpClient::installMap((const char *)this->objectName().toUtf8(),
|
HelpClient::installMap((const char *)this->objectName().toUtf8(),
|
||||||
@ -483,6 +481,17 @@ void RclMain::setupToolbars()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RclMain::setupStatusBar()
|
||||||
|
{
|
||||||
|
auto bar = statusBar();
|
||||||
|
if (prefs.noStatusBar) {
|
||||||
|
bar->hide();
|
||||||
|
} else {
|
||||||
|
bar->show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RclMain::enableTrayIcon(bool on)
|
void RclMain::enableTrayIcon(bool on)
|
||||||
{
|
{
|
||||||
on = on && QSystemTrayIcon::isSystemTrayAvailable();
|
on = on && QSystemTrayIcon::isSystemTrayAvailable();
|
||||||
|
|||||||
@ -90,6 +90,7 @@ public:
|
|||||||
void enableTrayIcon(bool onoff);
|
void enableTrayIcon(bool onoff);
|
||||||
QString readDarkCSS();
|
QString readDarkCSS();
|
||||||
void setupToolbars();
|
void setupToolbars();
|
||||||
|
void setupStatusBar();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void fileExit();
|
virtual void fileExit();
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="textLabelSST">
|
<widget class="QLabel" name="textLabelSST">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Start with simple search mode</string>
|
<string>Start with simple search mode: </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -172,6 +172,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="noStatusBarCB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hide status bar.</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="noClearSearchCB">
|
<widget class="QCheckBox" name="noClearSearchCB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@ -146,6 +146,7 @@ void UIPrefsDialog::setFromPrefs()
|
|||||||
|
|
||||||
noToolbarsCB->setChecked(prefs.noToolbars);
|
noToolbarsCB->setChecked(prefs.noToolbars);
|
||||||
noClearSearchCB->setChecked(prefs.noClearSearch);
|
noClearSearchCB->setChecked(prefs.noClearSearch);
|
||||||
|
noStatusBarCB->setChecked(prefs.noStatusBar);
|
||||||
showTrayIconCB->setChecked(prefs.showTrayIcon);
|
showTrayIconCB->setChecked(prefs.showTrayIcon);
|
||||||
if (!prefs.showTrayIcon) {
|
if (!prefs.showTrayIcon) {
|
||||||
prefs.closeToTray = false;
|
prefs.closeToTray = false;
|
||||||
@ -350,9 +351,11 @@ void UIPrefsDialog::accept()
|
|||||||
|
|
||||||
prefs.keepSort = keepSortCB->isChecked();
|
prefs.keepSort = keepSortCB->isChecked();
|
||||||
prefs.noToolbars = noToolbarsCB->isChecked();
|
prefs.noToolbars = noToolbarsCB->isChecked();
|
||||||
|
m_mainWindow->setupToolbars();
|
||||||
|
prefs.noStatusBar = noStatusBarCB->isChecked();
|
||||||
|
m_mainWindow->setupStatusBar();
|
||||||
prefs.noClearSearch = noClearSearchCB->isChecked();
|
prefs.noClearSearch = noClearSearchCB->isChecked();
|
||||||
m_mainWindow->sSearch->setupButtons();
|
m_mainWindow->sSearch->setupButtons();
|
||||||
m_mainWindow->setupToolbars();
|
|
||||||
prefs.showTrayIcon = showTrayIconCB->isChecked();
|
prefs.showTrayIcon = showTrayIconCB->isChecked();
|
||||||
m_mainWindow->enableTrayIcon(prefs.showTrayIcon);
|
m_mainWindow->enableTrayIcon(prefs.showTrayIcon);
|
||||||
prefs.closeToTray = closeToTrayCB->isChecked();
|
prefs.closeToTray = closeToTrayCB->isChecked();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user