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
13
src/main.cpp
13
src/main.cpp
@@ -86,11 +86,11 @@ int main(int argc, char** argv)
|
||||
#endif
|
||||
|
||||
MainWindow mainWindow;
|
||||
mainWindow.show();
|
||||
app.setMainWindow(&mainWindow);
|
||||
|
||||
mainWindow.show();
|
||||
|
||||
QObject::connect(&app, SIGNAL(openFile(QString)), &mainWindow, SLOT(openDatabase(QString)));
|
||||
|
||||
|
||||
for (int ii=0; ii < args.length(); ii++) {
|
||||
QString filename = args[ii];
|
||||
if (!filename.isEmpty() && QFile::exists(filename)) {
|
||||
@@ -111,6 +111,11 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// start minimized if configured
|
||||
if (config()->get("GUI/MinimizeOnStartup").toBool()) {
|
||||
mainWindow.minimizeWindow();
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user