mirror of https://github.com/OpenVPN/openvpn-gui
Suppress warning popups if silent_connection is set
Warnings dsabled if silent_connection is true - interactive service is not installed or not running - duplicate configs found and ignored v2: Update description of --silent_connection in README and English resource file (translations not updated). Signed-off-by: Selva Nair <selva.nair@gmail.com>pull/112/head
parent
91b3eef40a
commit
9cea37ad80
|
@ -185,7 +185,8 @@ log_append
|
||||||
|
|
||||||
silent_connection
|
silent_connection
|
||||||
If set to "1", the status window with the OpenVPN log output will
|
If set to "1", the status window with the OpenVPN log output will
|
||||||
not be showed while connecting.
|
not be shown while connecting. Warnings such as interactive service
|
||||||
|
not started or multiple config files with same name are also suppressed.
|
||||||
|
|
||||||
service_only
|
service_only
|
||||||
If set to "1", OpenVPN GUI's normal "Connect" and "Disconnect"
|
If set to "1", OpenVPN GUI's normal "Connect" and "Disconnect"
|
||||||
|
|
2
main.c
2
main.c
|
@ -189,7 +189,7 @@ int WINAPI _tWinMain (HINSTANCE hThisInstance,
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsUserAdmin() && strtod(o.ovpn_version, NULL) > 2.3)
|
if (!IsUserAdmin() && strtod(o.ovpn_version, NULL) > 2.3 && !o.silent_connection)
|
||||||
CheckIServiceStatus(TRUE);
|
CheckIServiceStatus(TRUE);
|
||||||
|
|
||||||
BuildFileList();
|
BuildFileList();
|
||||||
|
|
|
@ -221,6 +221,9 @@ BuildFileList()
|
||||||
{
|
{
|
||||||
static bool issue_warnings = true;
|
static bool issue_warnings = true;
|
||||||
|
|
||||||
|
if (o.silent_connection)
|
||||||
|
issue_warnings = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If no connections are active reset num_configs and rescan
|
* If no connections are active reset num_configs and rescan
|
||||||
* to make a new list. Else we keep all current configs and
|
* to make a new list. Else we keep all current configs and
|
||||||
|
|
|
@ -355,7 +355,7 @@ BEGIN
|
||||||
"--allow_proxy\t\t: 1=Show Proxy Settings menu.\n" \
|
"--allow_proxy\t\t: 1=Show Proxy Settings menu.\n" \
|
||||||
"--show_balloon\t\t: 0=Never, 1=At initial connect, 2=At every re-connect.\n" \
|
"--show_balloon\t\t: 0=Never, 1=At initial connect, 2=At every re-connect.\n" \
|
||||||
"--service_only\t\t: 1=Enable Service Only mode.\n" \
|
"--service_only\t\t: 1=Enable Service Only mode.\n" \
|
||||||
"--silent_connection\t\t: 1=Do not show the status dialog while connecting.\n" \
|
"--silent_connection\t\t: 1=Do not show the status dialog while connecting or non-critical warnings at startup.\n" \
|
||||||
"--show_script_window\t: 0=Hide Script execution window, 1=Show it.\n" \
|
"--show_script_window\t: 0=Hide Script execution window, 1=Show it.\n" \
|
||||||
"--passphrase_attempts\t: Number of passphrase attempts to allow.\n" \
|
"--passphrase_attempts\t: Number of passphrase attempts to allow.\n" \
|
||||||
"--connectscript_timeout\t: Time to wait for connect script to finish.\n" \
|
"--connectscript_timeout\t: Time to wait for connect script to finish.\n" \
|
||||||
|
|
Loading…
Reference in New Issue