On mercredi 6 août 2014 17:50:31 CEST, Jan Kundrát wrote:
On Tuesday, 5 August 2014 17:45:20 CEST, Dimitrios Glentadakis wrote:
I suppose that it will receive an argument from the command
line, or it has to have a checkbox in the settings?
Either will do.
For a command line argument i did this:
--- trojita-0.4.1.orig/src/Gui/main.cpp 2014-03-20 20:44:27.000000000 +0100
+++ trojita-0.4.1/src/Gui/main.cpp 2014-08-07 06:11:29.382757418 +0200
@@ -82,6 +82,10 @@
QSettings settings(Common::Application::organization,
profileName.isEmpty() ? Common::Application::name :
Common::Application::name + QLatin1Char('-') + profileName);
Gui::MainWindow win(&settings);
- win.show();
+ if (argc == 2 && argv[1] == QByteArray("--tray")) {
+ return app.exec();
+ } else {
+ win.show();
+ }
return app.exec();
}