mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
feat: add option to start minimized
This commit is contained in:
parent
64bec9660a
commit
fb2b148b72
@ -45,6 +45,7 @@ int main(int argc, char *argv[])
|
||||
parser.addOptions({
|
||||
{"json", "Write the result of the handshake with the GlobalConnect server to stdout as JSON and terminate. Useful for scripting."},
|
||||
{"now", "Do not show the dialog with the connect button; connect immediately instead."},
|
||||
{"start-minimized", "Launch the client minimized."},
|
||||
});
|
||||
parser.process(app);
|
||||
|
||||
@ -54,7 +55,7 @@ int main(int argc, char *argv[])
|
||||
? static_cast<IVpn*>(new VpnJson(nullptr)) // Print to stdout and exit
|
||||
: static_cast<IVpn*>(new VpnDbus(nullptr)); // Contact GPService daemon via dbus
|
||||
GPClient w(nullptr, vpn);
|
||||
w.show();
|
||||
parser.isSet("start-minimized") ? w.showMinimized() : w.show();
|
||||
|
||||
if (positional.size() > 0) {
|
||||
w.portal(positional.at(0));
|
||||
|
Loading…
Reference in New Issue
Block a user