mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Minimize-On-Startup: add function to minimize mainwindow if all four tray settings are true
This commit is contained in:
parent
0f0af12353
commit
3cf1a16398
@ -307,6 +307,17 @@ void MainWindow::openDatabase(const QString& fileName, const QString& pw, const
|
|||||||
m_ui->tabWidget->openDatabase(fileName, pw, keyFile);
|
m_ui->tabWidget->openDatabase(fileName, pw, keyFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::configuredMinimizeWindow()
|
||||||
|
{
|
||||||
|
bool minimize = isTrayIconEnabled() &&
|
||||||
|
config()->get("GUI/MinimizeToTray").toBool() &&
|
||||||
|
config()->get("GUI/MinimizeOnClose").toBool() &&
|
||||||
|
config()->get("GUI/MinimizeOnStartup").toBool();
|
||||||
|
if (minimize) {
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
||||||
{
|
{
|
||||||
bool inDatabaseTabWidget = (m_ui->stackedWidget->currentIndex() == 0);
|
bool inDatabaseTabWidget = (m_ui->stackedWidget->currentIndex() == 0);
|
||||||
|
@ -38,6 +38,7 @@ class MainWindow : public QMainWindow
|
|||||||
public:
|
public:
|
||||||
MainWindow();
|
MainWindow();
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
void configuredMinimizeWindow();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void openDatabase(const QString& fileName, const QString& pw = QString(),
|
void openDatabase(const QString& fileName, const QString& pw = QString(),
|
||||||
|
Loading…
Reference in New Issue
Block a user