Fix minimize at startup and decouple various tray and minimization options (#109)
* Hide window on startup when configured to start minimized, fixes #105 * Decouple different systray and minimization options, fixes #64 * Commit missing changes in main.cpp to minimize at startup * Remove obsolete code
This commit is contained in:
committed by
Jonathan White
parent
02d2ac904d
commit
19a960856c
@@ -74,11 +74,7 @@ SettingsWidget::SettingsWidget(QWidget* parent)
|
||||
connect(m_generalUi->autoSaveAfterEveryChangeCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(enableAutoSaveOnExit(bool)));
|
||||
connect(m_generalUi->systrayShowCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(enableSystrayMinimizeToTray(bool)));
|
||||
connect(m_generalUi->systrayMinimizeToTrayCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(enableSystrayMinimizeToTray2(bool)));
|
||||
connect(m_generalUi->systrayMinimizeOnCloseCheckBox, SIGNAL(toggled(bool)),
|
||||
m_generalUi->systrayMinimizeOnStartup, SLOT(setEnabled(bool)));
|
||||
this, SLOT(enableSystray(bool)));
|
||||
|
||||
connect(m_secUi->clearClipboardCheckBox, SIGNAL(toggled(bool)),
|
||||
m_secUi->clearClipboardSpinBox, SLOT(setEnabled(bool)));
|
||||
@@ -209,18 +205,8 @@ void SettingsWidget::enableAutoSaveOnExit(bool checked)
|
||||
m_generalUi->autoSaveOnExitCheckBox->setEnabled(!checked);
|
||||
}
|
||||
|
||||
void SettingsWidget::enableSystrayMinimizeToTray(bool checked)
|
||||
void SettingsWidget::enableSystray(bool checked)
|
||||
{
|
||||
m_generalUi->systrayMinimizeToTrayCheckBox->setEnabled(checked);
|
||||
bool checked2 = m_generalUi->systrayMinimizeToTrayCheckBox->checkState();
|
||||
m_generalUi->systrayMinimizeOnCloseCheckBox->setEnabled(checked && checked2);
|
||||
bool checked3 = m_generalUi->systrayMinimizeOnCloseCheckBox->checkState();
|
||||
m_generalUi->systrayMinimizeOnStartup->setEnabled(checked && checked2 && checked3);
|
||||
}
|
||||
|
||||
void SettingsWidget::enableSystrayMinimizeToTray2(bool checked)
|
||||
{
|
||||
m_generalUi->systrayMinimizeOnCloseCheckBox->setEnabled(checked);
|
||||
bool checked2 = m_generalUi->systrayMinimizeOnCloseCheckBox->checkState();
|
||||
m_generalUi->systrayMinimizeOnStartup->setEnabled(checked && checked2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user