...
  View open merge request
Commits (1)
  • Lubomir Rintel's avatar
    auth-dialog: don't connect to Gtk+ display until necessary · 33d26e5d
    Lubomir Rintel authored
    In the external UI mode we may end up not needing a connection to the
    display server at all.
    
    This splits the parsing of Gtk+ command line arguments from connection
    to the display. This also fixes the --help output to actually include
    the Gtk+ arguments (such as --display).
    33d26e5d
=======================================================
NetworkManager-openvpn-1.8.10 (not released yet)
Overview of changes since NetworkManager-openvpn-1.8.8
=======================================================
* The auth helper in external UI mode can now be run without a display
server. Future nmcli version will utilize this for handling the
secrets without a graphical desktop.
=======================================================
NetworkManager-openvpn-1.8.8
Overview of changes since NetworkManager-openvpn-1.8.6
......
......@@ -18,7 +18,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2004 - 2008 Red Hat, Inc.
* (C) Copyright 2004 - 2018 Red Hat, Inc.
* 2005 Tim Niemueller [www.niemueller.de]
*/
......@@ -231,6 +231,8 @@ std_ask_user (const char *vpn_name,
g_return_val_if_fail (out_new_certpass != NULL, FALSE);
g_return_val_if_fail (out_new_proxypass != NULL, FALSE);
gtk_init (NULL, NULL);
dialog = NMA_VPN_PASSWORD_DIALOG (nma_vpn_password_dialog_new (_("Authenticate VPN"), prompt, NULL));
/* pre-fill dialog with existing passwords */
......@@ -475,10 +477,9 @@ main (int argc, char *argv[])
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
gtk_init (&argc, &argv);
context = g_option_context_new ("- openvpn auth dialog");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
g_option_context_add_group (context, gtk_get_option_group (FALSE));
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
......