mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-11 07:50:31 -04:00
parent
b9370c6e79
commit
f300ca5b7b
2 changed files with 16 additions and 0 deletions
|
@ -40,6 +40,8 @@ MainWindow::MainWindow()
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
|
restoreGeometry(config()->get("Window/Geometry").toByteArray());
|
||||||
|
|
||||||
setWindowIcon(filePath()->applicationIcon());
|
setWindowIcon(filePath()->applicationIcon());
|
||||||
QAction* toggleViewAction = m_ui->toolBar->toggleViewAction();
|
QAction* toggleViewAction = m_ui->toolBar->toggleViewAction();
|
||||||
toggleViewAction->setText(tr("Show toolbar"));
|
toggleViewAction->setText(tr("Show toolbar"));
|
||||||
|
@ -413,6 +415,12 @@ void MainWindow::databaseTabChanged(int tabIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent* event)
|
void MainWindow::closeEvent(QCloseEvent* event)
|
||||||
|
{
|
||||||
|
saveWindowInformation();
|
||||||
|
saveLastDatabases(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::saveLastDatabases(QCloseEvent* event)
|
||||||
{
|
{
|
||||||
m_openDatabases.clear();
|
m_openDatabases.clear();
|
||||||
bool openPreviousDatabasesOnStartup = config()->get("OpenPreviousDatabasesOnStartup").toBool();
|
bool openPreviousDatabasesOnStartup = config()->get("OpenPreviousDatabasesOnStartup").toBool();
|
||||||
|
@ -436,6 +444,11 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::saveWindowInformation()
|
||||||
|
{
|
||||||
|
config()->set("Window/Geometry", saveGeometry());
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::showEntryContextMenu(const QPoint& globalPos)
|
void MainWindow::showEntryContextMenu(const QPoint& globalPos)
|
||||||
{
|
{
|
||||||
m_ui->menuEntries->popup(globalPos);
|
m_ui->menuEntries->popup(globalPos);
|
||||||
|
|
|
@ -67,6 +67,9 @@ private:
|
||||||
|
|
||||||
static const QString BaseWindowTitle;
|
static const QString BaseWindowTitle;
|
||||||
|
|
||||||
|
void saveWindowInformation();
|
||||||
|
void saveLastDatabases(QCloseEvent* event);
|
||||||
|
|
||||||
const QScopedPointer<Ui::MainWindow> m_ui;
|
const QScopedPointer<Ui::MainWindow> m_ui;
|
||||||
SignalMultiplexer m_actionMultiplexer;
|
SignalMultiplexer m_actionMultiplexer;
|
||||||
QAction* m_clearHistoryAction;
|
QAction* m_clearHistoryAction;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue