[network-manager-openvpn/jk/bgo731891-gui-password-types: 1/6] properties: use libnm-gtk password menu funcs for cert-pass (bgo #731891)
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/jk/bgo731891-gui-password-types: 1/6] properties: use libnm-gtk password menu funcs for cert-pass (bgo #731891)
- Date: Fri, 24 Apr 2015 12:26:31 +0000 (UTC)
commit a911de68e8423ae7e675523d73a7cd03548ad31c
Author: Jiří Klimeš <jklimes redhat com>
Date: Wed Apr 1 12:23:21 2015 +0200
properties: use libnm-gtk password menu funcs for cert-pass (bgo #731891)
https://bugzilla.gnome.org/show_bug.cgi?id=731891
properties/Makefile.am | 2 ++
properties/auth-helpers.c | 6 +++++-
properties/tests/Makefile.am | 4 +++-
3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index ab97d37..a8d9395 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -18,6 +18,7 @@ libnm_openvpn_properties_la_CFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(NM_CFLAGS) \
+ $(NMGTK_CFLAGS) \
-I$(top_srcdir)/src \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
@@ -27,6 +28,7 @@ libnm_openvpn_properties_la_CFLAGS = \
libnm_openvpn_properties_la_LIBADD = \
$(GTK_LIBS) \
$(NM_LIBS) \
+ $(NMGTK_LIBS) \
$(top_builddir)/common/libnm-openvpn-common.la
libnm_openvpn_properties_la_LDFLAGS = \
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 084882c..e18421c 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -37,6 +37,7 @@
#include <nm-setting-connection.h>
#include <nm-setting-8021x.h>
#include <nm-utils.h>
+#include <nm-ui-utils.h>
#include "auth-helpers.h"
#include "nm-openvpn.h"
@@ -233,6 +234,9 @@ tls_setup (GtkBuilder *builder,
g_free (tmp);
gtk_size_group_add_widget (group, widget);
g_signal_connect (widget, "changed", G_CALLBACK (changed_cb), user_data);
+
+ nma_utils_setup_password_storage (widget, 0, (NMSetting *) s_vpn, NM_OPENVPN_KEY_CERTPASS,
+ TRUE, FALSE);
}
static void
@@ -693,7 +697,7 @@ update_tls (GtkBuilder *builder, const char *prefix, NMSettingVPN *s_vpn)
if (str && strlen (str))
nm_setting_vpn_add_secret (s_vpn, NM_OPENVPN_KEY_CERTPASS, str);
- pw_flags = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (widget), "flags"));
+ pw_flags = nma_utils_menu_to_secret_flags (widget);
nm_setting_set_secret_flags (NM_SETTING (s_vpn), NM_OPENVPN_KEY_CERTPASS, pw_flags, NULL);
}
diff --git a/properties/tests/Makefile.am b/properties/tests/Makefile.am
index 779ccc4..3ebab55 100644
--- a/properties/tests/Makefile.am
+++ b/properties/tests/Makefile.am
@@ -10,12 +10,14 @@ test_import_export_SOURCES = \
test_import_export_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
- $(NM_CFLAGS)
+ $(NM_CFLAGS) \
+ $(NMGTK_CFLAGS)
test_import_export_LDADD = \
$(GTHREAD_LIBS) \
$(GTK_LIBS) \
$(NM_LIBS) \
+ $(NMGTK_LIBS) \
$(top_builddir)/properties/libnm-openvpn-properties.la
if WITH_TESTS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]