summaryrefslogtreecommitdiff
path: root/auth-dialog/main.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-10-12 12:53:57 +0200
committerGuido Günther <agx@sigxcpu.org>2014-10-12 13:16:24 +0200
commit47e0c6a709b3b0f196211e1d1ad7d84baee7940e (patch)
tree1459618c98db83650033f7bc9d8157525a391a17 /auth-dialog/main.c
parent25b418355f07ed01965aed68c25c3ce65168d5d4 (diff)
Port to libnm-gtk
so we don't have to maintain the password dialog code anymore
Diffstat (limited to 'auth-dialog/main.c')
-rw-r--r--auth-dialog/main.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 4321c64..f482cf0 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -36,11 +36,10 @@
#include <nm-setting-vpn.h>
#include <nm-vpn-plugin-utils.h>
+#include <nm-vpn-password-dialog.h>
#include "src/nm-iodine-service.h"
-#include "vpn-password-dialog.h"
-
#define KEYRING_UUID_TAG "connection-uuid"
#define KEYRING_SN_TAG "setting-name"
#define KEYRING_SK_TAG "setting-key"
@@ -132,7 +131,7 @@ get_secrets (const char *vpn_uuid,
char **out_pw,
NMSettingSecretFlags pw_flags)
{
- VpnPasswordDialog *dialog;
+ NMAVpnPasswordDialog *dialog;
char *prompt, *pw = NULL;
const char *new_password = NULL;
gboolean success = FALSE;
@@ -202,18 +201,18 @@ get_secrets (const char *vpn_uuid,
/* Otherwise, we have no saved password, or the password flags indicated
* that the password should never be saved.
*/
- dialog = (VpnPasswordDialog *) \
- vpn_password_dialog_new (_("Authenticate VPN"), prompt, NULL);
-
+ dialog = NMA_VPN_PASSWORD_DIALOG (
+ nma_vpn_password_dialog_new (_("Authenticate VPN"), prompt, NULL));
+ nma_vpn_password_dialog_set_show_password_secondary (dialog, FALSE);
/* pre-fill dialog with the password */
if (pw && !(pw_flags & NM_SETTING_SECRET_FLAG_NOT_SAVED))
- vpn_password_dialog_set_password (dialog, pw);
+ nma_vpn_password_dialog_set_password (dialog, pw);
gtk_widget_show (GTK_WIDGET (dialog));
- if (vpn_password_dialog_run_and_block (dialog)) {
+ if (nma_vpn_password_dialog_run_and_block (dialog)) {
- new_password = vpn_password_dialog_get_password (dialog);
+ new_password = nma_vpn_password_dialog_get_password (dialog);
if (new_password) {
*out_pw = g_strdup (new_password);
success = TRUE;