[network-manager-openvpn/NM_0_8] ui: migrate to GtkBuilder (bgo #625248)



commit 2ce3f5254d3e7bfe4cf5c87a7959ff928892f578
Author: Pablo Castellano <pablog src gnome org>
Date:   Sun Nov 28 13:22:33 2010 -0600

    ui: migrate to GtkBuilder (bgo #625248)
    
    [dcbw: updates to handle new UI options after patch was posted]

 auth-dialog/Makefile.am                            |    2 +-
 configure.ac                                       |    4 -
 po/POTFILES.in                                     |    2 +-
 properties/Makefile.am                             |   12 +-
 properties/auth-helpers.c                          |  342 ++++----
 properties/auth-helpers.h                          |   13 +-
 ...m-openvpn-dialog.glade => nm-openvpn-dialog.ui} |  886 +++++++++++---------
 properties/nm-openvpn.c                            |   76 +-
 properties/tests/Makefile.am                       |    2 -
 9 files changed, 723 insertions(+), 616 deletions(-)
---
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index 5a748e3..5d671f0 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -8,7 +8,7 @@ nm_openvpn_auth_dialog_CPPFLAGS =			\
 	$(GNOMEKEYRING_CFLAGS) \
 	-I$(top_srcdir)/
 	-DICONDIR=\""$(datadir)/pixmaps"\"	\
-	-DGLADEDIR=\""$(gladedir)"\"		\
+	-DUIDIR=\""$(uidir)"\"		\
 	-DBINDIR=\""$(bindir)"\"		\
 	-DG_DISABLE_DEPRECATED			\
 	-DGDK_DISABLE_DEPRECATED		\
diff --git a/configure.ac b/configure.ac
index ce7d058..e9b9122 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,10 +82,6 @@ if test x"$with_gnome" != xno; then
 	AC_SUBST(GDK_PIXBUF_CFLAGS)
 	AC_SUBST(GDK_PIXBUF_LIBS)
 
-	PKG_CHECK_MODULES(GLADE, libglade-2.0)
-	AC_SUBST(GLADE_CFLAGS)
-	AC_SUBST(GLADE_LIBS)
-
 	PKG_CHECK_MODULES(GCONF, gconf-2.0)
 	AC_SUBST(GCONF_CFLAGS)
 	AC_SUBST(GCONF_LIBS)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 572edf5..72fe405 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,7 +5,7 @@ auth-dialog/main.c
 nm-openvpn.desktop.in
 properties/auth-helpers.c
 properties/nm-openvpn.c
-properties/nm-openvpn-dialog.glade
+properties/nm-openvpn-dialog.ui
 src/nm-openvpn-service.c
 src/nm-openvpn-service-openvpn-helper.c
 
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 77b9e5d..bbd80a7 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -11,11 +11,10 @@ libnm_openvpn_properties_la_SOURCES = \
 	import-export.c \
 	import-export.h
 
-gladedir = $(datadir)/gnome-vpn-properties/openvpn
-glade_DATA = nm-openvpn-dialog.glade
+uidir = $(datadir)/gnome-vpn-properties/openvpn
+ui_DATA = nm-openvpn-dialog.ui
 
 libnm_openvpn_properties_la_CFLAGS =                    \
-        $(GLADE_CFLAGS)                                 \
         $(GTK_CFLAGS)                                   \
         $(GCONF_CFLAGS)                                 \
         $(NETWORK_MANAGER_CFLAGS)                       \
@@ -23,7 +22,7 @@ libnm_openvpn_properties_la_CFLAGS =                    \
         $(DISABLE_DEPRECATED)                           \
         -I$(top_srcdir)/                                \
         -DICONDIR=\""$(datadir)/pixmaps"\"              \
-        -DGLADEDIR=\""$(gladedir)"\"                    \
+        -DUIDIR=\""$(uidir)"\"                    \
         -DG_DISABLE_DEPRECATED                          \
         -DGDK_DISABLE_DEPRECATED                        \
         -DGNOME_DISABLE_DEPRECATED                      \
@@ -31,7 +30,6 @@ libnm_openvpn_properties_la_CFLAGS =                    \
         -DVERSION=\"$(VERSION)\"
 
 libnm_openvpn_properties_la_LIBADD =    \
-        $(GLADE_LIBS)                   \
         $(GTK_LIBS)                     \
         $(GCONF_LIBS)                   \
         $(NETWORK_MANAGER_LIBS)         \
@@ -41,7 +39,7 @@ libnm_openvpn_properties_la_LIBADD =    \
 libnm_openvpn_properties_la_LDFLAGS =   \
         -avoid-version
 
-CLEANFILES = *.bak *.gladep *~
+CLEANFILES = *.bak *~
 
 EXTRA_DIST =                            \
-        $(glade_DATA)
+        $(ui_DATA)
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 631be2b..0c0df63 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -50,19 +50,19 @@ show_password (GtkToggleButton *togglebutton, GtkEntry *password_entry)
 }
 
 static GtkWidget *
-fill_password (GladeXML *xml,
-			   const char *widget_name,
-			   NMConnection *connection,
-			   gboolean priv_key_password)
+fill_password (GtkBuilder *builder,
+               const char *widget_name,
+               NMConnection *connection,
+               gboolean priv_key_password)
 {
 	GtkWidget *widget;
 	GtkWidget *show_passwords;
 	char *password;
 
-	widget = glade_xml_get_widget (xml, widget_name);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, widget_name));
 	g_assert (widget);
 
-	show_passwords = glade_xml_get_widget (xml, "show_passwords");
+	show_passwords = GTK_WIDGET (gtk_builder_get_object (builder, "show_passwords"));
 	g_signal_connect (show_passwords, "toggled", G_CALLBACK (show_password), widget);
 
 	if (!connection)
@@ -100,25 +100,25 @@ fill_password (GladeXML *xml,
 }
 
 void
-fill_vpn_passwords (GladeXML *xml,
-					GtkSizeGroup *group,
-					NMConnection *connection,
-					const char *contype,
-					ChangedCallback changed_cb,
-					gpointer user_data)
+fill_vpn_passwords (GtkBuilder *builder,
+                    GtkSizeGroup *group,
+                    NMConnection *connection,
+                    const char *contype,
+                    ChangedCallback changed_cb,
+                    gpointer user_data)
 {
 	GtkWidget *w = NULL;
 
 	if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS))
-		w = fill_password (xml, "tls_private_key_password_entry", connection, TRUE);
+		w = fill_password (builder, "tls_private_key_password_entry", connection, TRUE);
 	else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD))
-		w = fill_password (xml, "pw_password_entry", connection, FALSE);
+		w = fill_password (builder, "pw_password_entry", connection, FALSE);
 	else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
 		GtkWidget *w2 = NULL;
 
-		w = fill_password (xml, "pw_tls_password_entry", connection, FALSE);
+		w = fill_password (builder, "pw_tls_password_entry", connection, FALSE);
 	
-		w2 = fill_password (xml, "pw_tls_private_key_password_entry", connection, TRUE);
+		w2 = fill_password (builder, "pw_tls_private_key_password_entry", connection, TRUE);
 		if (w2) {
 			gtk_size_group_add_widget (group, w2);
 			g_signal_connect (w2, "changed", G_CALLBACK (changed_cb), user_data);
@@ -173,7 +173,7 @@ tls_cert_changed_cb (GtkWidget *widget, GtkWidget *next_widget)
 }
 
 void
-tls_pw_init_auth_widget (GladeXML *xml,
+tls_pw_init_auth_widget (GtkBuilder *builder,
                          GtkSizeGroup *group,
                          NMSettingVPN *s_vpn,
                          const char *contype,
@@ -186,13 +186,13 @@ tls_pw_init_auth_widget (GladeXML *xml,
 	char *tmp;
 	GtkFileFilter *filter;
 
-	g_return_if_fail (xml != NULL);
+	g_return_if_fail (builder != NULL);
 	g_return_if_fail (group != NULL);
 	g_return_if_fail (changed_cb != NULL);
 	g_return_if_fail (prefix != NULL);
 
 	tmp = g_strdup_printf ("%s_ca_cert_chooser", prefix);
-	ca = glade_xml_get_widget (xml, tmp);
+	ca = GTK_WIDGET (gtk_builder_get_object (builder, tmp));
 	g_free (tmp);
 
 	gtk_size_group_add_widget (group, ca);
@@ -215,7 +215,7 @@ tls_pw_init_auth_widget (GladeXML *xml,
 
 	if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS) || !strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
 		tmp = g_strdup_printf ("%s_user_cert_chooser", prefix);
-		cert = glade_xml_get_widget (xml, tmp);
+		cert = GTK_WIDGET (gtk_builder_get_object (builder, tmp));
 		g_free (tmp);
 
 		gtk_size_group_add_widget (group, cert);
@@ -233,7 +233,7 @@ tls_pw_init_auth_widget (GladeXML *xml,
 		}
 
 		tmp = g_strdup_printf ("%s_private_key_chooser", prefix);
-		key = glade_xml_get_widget (xml, tmp);
+		key = GTK_WIDGET (gtk_builder_get_object (builder, tmp));
 		g_free (tmp);
 
 		gtk_size_group_add_widget (group, key);
@@ -258,7 +258,7 @@ tls_pw_init_auth_widget (GladeXML *xml,
 
 	if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD) || !strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
 		tmp = g_strdup_printf ("%s_username_entry", prefix);
-		widget = glade_xml_get_widget (xml, tmp);
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, tmp));
 		g_free (tmp);
 
 		gtk_size_group_add_widget (group, widget);
@@ -275,7 +275,7 @@ tls_pw_init_auth_widget (GladeXML *xml,
 #define SK_DIR_COL_NUM  1
 
 void
-sk_init_auth_widget (GladeXML *xml,
+sk_init_auth_widget (GtkBuilder *builder,
                      GtkSizeGroup *group,
                      NMSettingVPN *s_vpn,
                      ChangedCallback changed_cb,
@@ -289,11 +289,11 @@ sk_init_auth_widget (GladeXML *xml,
 	gint direction = -1;
 	GtkFileFilter *filter;
 
-	g_return_if_fail (xml != NULL);
+	g_return_if_fail (builder != NULL);
 	g_return_if_fail (group != NULL);
 	g_return_if_fail (changed_cb != NULL);
 
-	widget = glade_xml_get_widget (xml, "sk_key_chooser");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_key_chooser"));
 	gtk_size_group_add_widget (group, widget);
 	filter = sk_file_chooser_filter_new ();
 	gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter);
@@ -335,17 +335,17 @@ sk_init_auth_widget (GladeXML *xml,
 	if (direction == 1)
 		active = 2;
 
-	widget = glade_xml_get_widget (xml, "sk_direction_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_direction_combo"));
 	gtk_size_group_add_widget (group, widget);
 
 	gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
 	g_object_unref (store);
 	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), active < 0 ? 0 : active);
 
-	widget = glade_xml_get_widget (xml, "sk_dir_help_label");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_dir_help_label"));
 	gtk_size_group_add_widget (group, widget);
 
-	widget = glade_xml_get_widget (xml, "sk_local_address_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_local_address_entry"));
 	gtk_size_group_add_widget (group, widget);
 	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (changed_cb), user_data);
 	if (s_vpn) {
@@ -354,7 +354,7 @@ sk_init_auth_widget (GladeXML *xml,
 			gtk_entry_set_text (GTK_ENTRY (widget), value);
 	}
 
-	widget = glade_xml_get_widget (xml, "sk_remote_address_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_remote_address_entry"));
 	gtk_size_group_add_widget (group, widget);
 	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (changed_cb), user_data);
 	if (s_vpn) {
@@ -365,13 +365,13 @@ sk_init_auth_widget (GladeXML *xml,
 }
 
 static gboolean
-validate_file_chooser (GladeXML *xml, const char *name)
+validate_file_chooser (GtkBuilder *builder, const char *name)
 {
 	GtkWidget *widget;
 	char *str;
 	gboolean valid = FALSE;
 
-	widget = glade_xml_get_widget (xml, name);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, name));
 	str = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
 	if (str && strlen (str))
 		valid = TRUE;
@@ -380,7 +380,7 @@ validate_file_chooser (GladeXML *xml, const char *name)
 }
 
 static gboolean
-validate_tls (GladeXML *xml, const char *prefix, GError **error)
+validate_tls (GtkBuilder *builder, const char *prefix, GError **error)
 {
 	char *tmp;
 	gboolean valid, encrypted = FALSE;
@@ -388,7 +388,7 @@ validate_tls (GladeXML *xml, const char *prefix, GError **error)
 	char *str;
 
 	tmp = g_strdup_printf ("%s_ca_cert_chooser", prefix);
-	valid = validate_file_chooser (xml, tmp);
+	valid = validate_file_chooser (builder, tmp);
 	g_free (tmp);
 	if (!valid) {
 		g_set_error (error,
@@ -399,7 +399,7 @@ validate_tls (GladeXML *xml, const char *prefix, GError **error)
 	}
 
 	tmp = g_strdup_printf ("%s_user_cert_chooser", prefix);
-	valid = validate_file_chooser (xml, tmp);
+	valid = validate_file_chooser (builder, tmp);
 	g_free (tmp);
 	if (!valid) {
 		g_set_error (error,
@@ -410,8 +410,8 @@ validate_tls (GladeXML *xml, const char *prefix, GError **error)
 	}
 
 	tmp = g_strdup_printf ("%s_private_key_chooser", prefix);
-	widget = glade_xml_get_widget (xml, tmp);
-	valid = validate_file_chooser (xml, tmp);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, tmp));
+	valid = validate_file_chooser (builder, tmp);
 	g_free (tmp);
 	if (!valid) {
 		g_set_error (error,
@@ -427,7 +427,7 @@ validate_tls (GladeXML *xml, const char *prefix, GError **error)
 	g_free (str);
 	if (encrypted) {
 		tmp = g_strdup_printf ("%s_private_key_password_entry", prefix);
-		widget = glade_xml_get_widget (xml, tmp);
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, tmp));
 		g_free (tmp);
 
 		if (!gtk_entry_get_text_length (GTK_ENTRY (widget))) {
@@ -443,19 +443,19 @@ validate_tls (GladeXML *xml, const char *prefix, GError **error)
 }
 
 gboolean
-auth_widget_check_validity (GladeXML *xml, const char *contype, GError **error)
+auth_widget_check_validity (GtkBuilder *builder, const char *contype, GError **error)
 {
 	GtkWidget *widget;
 	const char *str;
 
 	if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS)) {
-		if (!validate_tls (xml, "tls", error))
+		if (!validate_tls (builder, "tls", error))
 			return FALSE;
 	} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
-		if (!validate_tls (xml, "pw_tls", error))
+		if (!validate_tls (builder, "pw_tls", error))
 			return FALSE;
 
-		widget = glade_xml_get_widget (xml, "pw_tls_username_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "pw_tls_username_entry"));
 		str = gtk_entry_get_text (GTK_ENTRY (widget));
 		if (!str || !strlen (str)) {
 			g_set_error (error,
@@ -465,14 +465,14 @@ auth_widget_check_validity (GladeXML *xml, const char *contype, GError **error)
 			return FALSE;
 		}
 	} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD)) {
-		if (!validate_file_chooser (xml, "pw_ca_cert_chooser")) {
+		if (!validate_file_chooser (builder, "pw_ca_cert_chooser")) {
 			g_set_error (error,
 			             OPENVPN_PLUGIN_UI_ERROR,
 			             OPENVPN_PLUGIN_UI_ERROR_INVALID_PROPERTY,
 			             NM_OPENVPN_KEY_CA);
 			return FALSE;
 		}
-		widget = glade_xml_get_widget (xml, "pw_username_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "pw_username_entry"));
 		str = gtk_entry_get_text (GTK_ENTRY (widget));
 		if (!str || !strlen (str)) {
 			g_set_error (error,
@@ -482,7 +482,7 @@ auth_widget_check_validity (GladeXML *xml, const char *contype, GError **error)
 			return FALSE;
 		}
 	} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_STATIC_KEY)) {
-		if (!validate_file_chooser (xml, "sk_key_chooser")) {
+		if (!validate_file_chooser (builder, "sk_key_chooser")) {
 			g_set_error (error,
 			             OPENVPN_PLUGIN_UI_ERROR,
 			             OPENVPN_PLUGIN_UI_ERROR_INVALID_PROPERTY,
@@ -490,7 +490,7 @@ auth_widget_check_validity (GladeXML *xml, const char *contype, GError **error)
 			return FALSE;
 		}
 
-		widget = glade_xml_get_widget (xml, "sk_local_address_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_local_address_entry"));
 		str = gtk_entry_get_text (GTK_ENTRY (widget));
 		if (!str || !strlen (str)) {
 			g_set_error (error,
@@ -500,7 +500,7 @@ auth_widget_check_validity (GladeXML *xml, const char *contype, GError **error)
 			return FALSE;
 		}
 
-		widget = glade_xml_get_widget (xml, "sk_remote_address_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_remote_address_entry"));
 		str = gtk_entry_get_text (GTK_ENTRY (widget));
 		if (!str || !strlen (str)) {
 			g_set_error (error,
@@ -516,7 +516,7 @@ auth_widget_check_validity (GladeXML *xml, const char *contype, GError **error)
 }
 
 static void
-update_from_filechooser (GladeXML *xml,
+update_from_filechooser (GtkBuilder *builder,
                          const char *key,
                          const char *prefix,
                          const char *widget_name,
@@ -525,14 +525,14 @@ update_from_filechooser (GladeXML *xml,
 	GtkWidget *widget;
 	char *tmp, *filename;
 
-	g_return_if_fail (xml != NULL);
+	g_return_if_fail (builder != NULL);
 	g_return_if_fail (key != NULL);
 	g_return_if_fail (prefix != NULL);
 	g_return_if_fail (widget_name != NULL);
 	g_return_if_fail (s_vpn != NULL);
 
 	tmp = g_strdup_printf ("%s_%s", prefix, widget_name);
-	widget = glade_xml_get_widget (xml, tmp);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, tmp));
 	g_free (tmp);
 
 	filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
@@ -542,26 +542,26 @@ update_from_filechooser (GladeXML *xml,
 }
 
 static void
-update_tls (GladeXML *xml, const char *prefix, NMSettingVPN *s_vpn)
+update_tls (GtkBuilder *builder, const char *prefix, NMSettingVPN *s_vpn)
 {
-	update_from_filechooser (xml, NM_OPENVPN_KEY_CA, prefix, "ca_cert_chooser", s_vpn);
-	update_from_filechooser (xml, NM_OPENVPN_KEY_CERT, prefix, "user_cert_chooser", s_vpn);
-	update_from_filechooser (xml, NM_OPENVPN_KEY_KEY, prefix, "private_key_chooser", s_vpn);
+	update_from_filechooser (builder, NM_OPENVPN_KEY_CA, prefix, "ca_cert_chooser", s_vpn);
+	update_from_filechooser (builder, NM_OPENVPN_KEY_CERT, prefix, "user_cert_chooser", s_vpn);
+	update_from_filechooser (builder, NM_OPENVPN_KEY_KEY, prefix, "private_key_chooser", s_vpn);
 }
 
 static void
-update_username (GladeXML *xml, const char *prefix, NMSettingVPN *s_vpn)
+update_username (GtkBuilder *builder, const char *prefix, NMSettingVPN *s_vpn)
 {
 	GtkWidget *widget;
 	char *tmp;
 	const char *str;
 
-	g_return_if_fail (xml != NULL);
+	g_return_if_fail (builder != NULL);
 	g_return_if_fail (prefix != NULL);
 	g_return_if_fail (s_vpn != NULL);
 
 	tmp = g_strdup_printf ("%s_username_entry", prefix);
-	widget = glade_xml_get_widget (xml, tmp);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, tmp));
 	g_free (tmp);
 
 	str = gtk_entry_get_text (GTK_ENTRY (widget));
@@ -570,7 +570,7 @@ update_username (GladeXML *xml, const char *prefix, NMSettingVPN *s_vpn)
 }
 
 gboolean
-auth_widget_update_connection (GladeXML *xml,
+auth_widget_update_connection (GtkBuilder *builder,
                                const char *contype,
                                NMSettingVPN *s_vpn)
 {
@@ -580,19 +580,19 @@ auth_widget_update_connection (GladeXML *xml,
 	const char *str;
 
 	if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS)) {
-		update_tls (xml, "tls", s_vpn);
+		update_tls (builder, "tls", s_vpn);
 	} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD)) {
-		update_from_filechooser (xml, NM_OPENVPN_KEY_CA, "pw", "ca_cert_chooser", s_vpn);
-		update_username (xml, "pw", s_vpn);
+		update_from_filechooser (builder, NM_OPENVPN_KEY_CA, "pw", "ca_cert_chooser", s_vpn);
+		update_username (builder, "pw", s_vpn);
 	} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
-		update_tls (xml, "pw_tls", s_vpn);
-		update_username (xml, "pw_tls", s_vpn);
+		update_tls (builder, "pw_tls", s_vpn);
+		update_username (builder, "pw_tls", s_vpn);
 	} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_STATIC_KEY)) {
 		/* Update static key */
-		update_from_filechooser (xml, NM_OPENVPN_KEY_STATIC_KEY, "sk", "key_chooser", s_vpn);
+		update_from_filechooser (builder, NM_OPENVPN_KEY_STATIC_KEY, "sk", "key_chooser", s_vpn);
 
 		/* Update direction */
-		widget = glade_xml_get_widget (xml, "sk_direction_combo");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_direction_combo"));
 		g_assert (widget);
 		model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 		if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
@@ -607,14 +607,14 @@ auth_widget_update_connection (GladeXML *xml,
 		}
 
 		/* Update local address */
-		widget = glade_xml_get_widget (xml, "sk_local_address_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_local_address_entry"));
 		g_assert (widget);
 		str = gtk_entry_get_text (GTK_ENTRY (widget));
 		if (str && strlen (str))
 			nm_setting_vpn_add_data_item (s_vpn, NM_OPENVPN_KEY_LOCAL_IP, str);
 
 		/* Update remote address */
-		widget = glade_xml_get_widget (xml, "sk_remote_address_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "sk_remote_address_entry"));
 		g_assert (widget);
 		str = gtk_entry_get_text (GTK_ENTRY (widget));
 		if (str && strlen (str))
@@ -626,7 +626,7 @@ auth_widget_update_connection (GladeXML *xml,
 }
 
 static gboolean
-save_secret (GladeXML *xml,
+save_secret (GtkBuilder *builder,
 			 const char *widget_name,
 			 const char *vpn_uuid,
 			 const char *vpn_name,
@@ -637,7 +637,7 @@ save_secret (GladeXML *xml,
 	GnomeKeyringResult result;
 	gboolean ret;
 
-	w = glade_xml_get_widget (xml, widget_name);
+	w = GTK_WIDGET (gtk_builder_get_object (builder, widget_name));
 	g_assert (w);
 	secret = gtk_entry_get_text (GTK_ENTRY (w));
 	if (secret && strlen (secret)) {
@@ -652,7 +652,7 @@ save_secret (GladeXML *xml,
 }
 
 gboolean
-auth_widget_save_secrets (GladeXML *xml,
+auth_widget_save_secrets (GtkBuilder *builder,
 						  const char *contype,
 						  const char *uuid,
 						  const char *name)
@@ -660,12 +660,12 @@ auth_widget_save_secrets (GladeXML *xml,
 	gboolean ret;
 
 	if (!strcmp (contype, NM_OPENVPN_CONTYPE_TLS))
-		ret = save_secret (xml, "tls_private_key_password_entry", uuid, name, NM_OPENVPN_KEY_CERTPASS);
+		ret = save_secret (builder, "tls_private_key_password_entry", uuid, name, NM_OPENVPN_KEY_CERTPASS);
 	else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD))
-		ret = save_secret (xml, "pw_password_entry", uuid, name, NM_OPENVPN_KEY_PASSWORD);
+		ret = save_secret (builder, "pw_password_entry", uuid, name, NM_OPENVPN_KEY_PASSWORD);
 	else if (!strcmp (contype, NM_OPENVPN_CONTYPE_PASSWORD_TLS)) {
-		ret = save_secret (xml, "pw_tls_password_entry", uuid, name, NM_OPENVPN_KEY_PASSWORD);
-		ret = save_secret (xml, "pw_tls_private_key_password_entry", uuid, name, NM_OPENVPN_KEY_CERTPASS);
+		ret = save_secret (builder, "pw_tls_password_entry", uuid, name, NM_OPENVPN_KEY_PASSWORD);
+		ret = save_secret (builder, "pw_tls_private_key_password_entry", uuid, name, NM_OPENVPN_KEY_CERTPASS);
 	} else if (!strcmp (contype, NM_OPENVPN_CONTYPE_STATIC_KEY))
 		/* No secrets here */
 		ret = TRUE;
@@ -900,40 +900,40 @@ advanced_dialog_new_hash_from_connection (NMConnection *connection,
 static void
 port_toggled_cb (GtkWidget *check, gpointer user_data)
 {
-	GladeXML *xml = (GladeXML *) user_data;
+	GtkBuilder *builder = (GtkBuilder *) user_data;
 	GtkWidget *widget;
 
-	widget = glade_xml_get_widget (xml, "port_spinbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "port_spinbutton"));
 	gtk_widget_set_sensitive (widget, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)));
 }
 
 static void
 tunmtu_toggled_cb (GtkWidget *check, gpointer user_data)
 {
-	GladeXML *xml = (GladeXML *) user_data;
+	GtkBuilder *builder = (GtkBuilder *) user_data;
 	GtkWidget *widget;
 
-	widget = glade_xml_get_widget (xml, "tunmtu_spinbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tunmtu_spinbutton"));
 	gtk_widget_set_sensitive (widget, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)));
 }
 
 static void
 fragment_toggled_cb (GtkWidget *check, gpointer user_data)
 {
-	GladeXML *xml = (GladeXML *) user_data;
+	GtkBuilder *builder = (GtkBuilder *) user_data;
 	GtkWidget *widget;
 
-	widget = glade_xml_get_widget (xml, "fragment_spinbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "fragment_spinbutton"));
 	gtk_widget_set_sensitive (widget, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)));
 }
 
 static void
 reneg_toggled_cb (GtkWidget *check, gpointer user_data)
 {
-	GladeXML *xml = (GladeXML *) user_data;
+	GtkBuilder *builder = (GtkBuilder *) user_data;
 	GtkWidget *widget;
 
-	widget = glade_xml_get_widget (xml, "reneg_spinbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "reneg_spinbutton"));
 	gtk_widget_set_sensitive (widget, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)));
 }
 
@@ -1113,21 +1113,21 @@ populate_hmacauth_combo (GtkComboBox *box, const char *hmacauth)
 static void
 tls_auth_toggled_cb (GtkWidget *widget, gpointer user_data)
 {
-	GladeXML *xml = (GladeXML *) user_data;
+	GtkBuilder *builder = (GtkBuilder *) user_data;
 	gboolean use_auth = FALSE;
 
-	widget = glade_xml_get_widget (xml, "tls_auth_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_auth_checkbutton"));
 	use_auth = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 
-	widget = glade_xml_get_widget (xml, "tls_dir_help_label");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_dir_help_label"));
 	gtk_widget_set_sensitive (widget, use_auth);
-	widget = glade_xml_get_widget (xml, "direction_label");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "direction_label"));
 	gtk_widget_set_sensitive (widget, use_auth);
-	widget = glade_xml_get_widget (xml, "tls_auth_label");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_auth_label"));
 	gtk_widget_set_sensitive (widget, use_auth);
-	widget = glade_xml_get_widget (xml, "tls_auth_chooser");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_auth_chooser"));
 	gtk_widget_set_sensitive (widget, use_auth);
-	widget = glade_xml_get_widget (xml, "direction_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "direction_combo"));
 	gtk_widget_set_sensitive (widget, use_auth);
 }
 
@@ -1138,7 +1138,7 @@ tls_auth_toggled_cb (GtkWidget *widget, gpointer user_data)
 static void
 proxy_type_changed (GtkComboBox *combo, gpointer user_data)
 {
-	GladeXML *xml = GLADE_XML (user_data);
+	GtkBuilder *builder = GTK_BUILDER (user_data);
 	gboolean sensitive;
 	GtkWidget *widget;
 	guint32 i = 0;
@@ -1158,7 +1158,7 @@ proxy_type_changed (GtkComboBox *combo, gpointer user_data)
 	sensitive = (active > PROXY_TYPE_NONE);
 
 	while (widgets[i]) {
-		widget = glade_xml_get_widget (xml, widgets[i++]);
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, widgets[i++]));
 		gtk_widget_set_sensitive (widget, sensitive);
 	}
 
@@ -1166,7 +1166,7 @@ proxy_type_changed (GtkComboBox *combo, gpointer user_data)
 	if (active == PROXY_TYPE_SOCKS) {
 		i = 0;
 		while (user_pass_widgets[i]) {
-			widget = glade_xml_get_widget (xml, user_pass_widgets[i++]);
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, user_pass_widgets[i++]));
 			gtk_widget_set_sensitive (widget, FALSE);
 		}
 	}
@@ -1174,7 +1174,7 @@ proxy_type_changed (GtkComboBox *combo, gpointer user_data)
 	/* Proxy options require TCP; but don't reset the TCP checkbutton
 	 * to false when the user disables HTTP proxy; leave it checked.
 	 */
-	widget = glade_xml_get_widget (xml, "tcp_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tcp_checkbutton"));
 	if (sensitive == TRUE)
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 	gtk_widget_set_sensitive (widget, !sensitive);
@@ -1186,35 +1186,43 @@ proxy_type_changed (GtkComboBox *combo, gpointer user_data)
 GtkWidget *
 advanced_dialog_new (GHashTable *hash, const char *contype)
 {
-	GladeXML *xml;
+	GtkBuilder *builder;
 	GtkWidget *dialog = NULL;
-	char *glade_file = NULL;
+	char *ui_file = NULL;
 	GtkWidget *widget, *combo;
 	const char *value, *value2;
 	GtkListStore *store;
 	GtkTreeIter iter;
 	guint32 active = PROXY_TYPE_NONE;
+	GError *error = NULL;
 
 	g_return_val_if_fail (hash != NULL, NULL);
 
-	glade_file = g_strdup_printf ("%s/%s", GLADEDIR, "nm-openvpn-dialog.glade");
-	xml = glade_xml_new (glade_file, "openvpn-advanced-dialog", GETTEXT_PACKAGE);
-	if (xml == NULL)
+	ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openvpn-dialog.ui");
+	builder = gtk_builder_new ();
+
+	if (!gtk_builder_add_from_file (builder, ui_file, &error)) {
+		g_warning ("Couldn't load builder file: %s", error->message);
+		g_error_free (error);
+		g_object_unref (G_OBJECT (builder));
 		goto out;
+	}
+
+	gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE);
 
-	dialog = glade_xml_get_widget (xml, "openvpn-advanced-dialog");
+	dialog = GTK_WIDGET (gtk_builder_get_object (builder, "openvpn-advanced-dialog"));
 	if (!dialog) {
-		g_object_unref (G_OBJECT (xml));
+		g_object_unref (G_OBJECT (builder));
 		goto out;
 	}
 	gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
 
-	g_object_set_data_full (G_OBJECT (dialog), "glade-xml",
-	                        xml, (GDestroyNotify) g_object_unref);
+	g_object_set_data_full (G_OBJECT (dialog), "builder",
+	                        builder, (GDestroyNotify) g_object_unref);
 	g_object_set_data (G_OBJECT (dialog), "connection-type", GINT_TO_POINTER (contype));
 
-	widget = glade_xml_get_widget (xml, "reneg_checkbutton");
-	g_signal_connect ( G_OBJECT (widget), "toggled", G_CALLBACK (reneg_toggled_cb), xml);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "reneg_checkbutton"));
+	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (reneg_toggled_cb), builder);
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_RENEG_SECONDS);
 	if (value && strlen (value)) {
@@ -1225,20 +1233,20 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 		if (errno == 0 && tmp >= 0 && tmp < 604800) {  /* up to a week? */
 			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 
-			widget = glade_xml_get_widget (xml, "reneg_spinbutton");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "reneg_spinbutton"));
 			gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), (gdouble) tmp);
 		}
 		gtk_widget_set_sensitive (widget, TRUE);
 	} else {
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
 
-		widget = glade_xml_get_widget (xml, "reneg_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "reneg_spinbutton"));
 		gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), 0.0);
 		gtk_widget_set_sensitive (widget, FALSE);
 	}
 
 	/* Proxy support */
-	combo = glade_xml_get_widget (xml, "proxy_type_combo");
+	combo = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_type_combo"));
 
 	store = gtk_list_store_new (1, G_TYPE_STRING);
 	gtk_list_store_append (store, &iter);
@@ -1253,30 +1261,30 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 	if (value && strlen (value) && value2 && strlen (value2)) {
 		long int tmp = 0;
 
-		widget = glade_xml_get_widget (xml, "proxy_server_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_server_entry"));
 		gtk_entry_set_text (GTK_ENTRY (widget), value);
 
 		errno = 0;
 		tmp = strtol (value2, NULL, 10);
 		if (errno != 0 || tmp < 0 || tmp > 65535)
 			tmp = 0;
-		widget = glade_xml_get_widget (xml, "proxy_port_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_port_spinbutton"));
 		gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), (gdouble) tmp);
 
-		widget = glade_xml_get_widget (xml, "proxy_retry_checkbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_retry_checkbutton"));
 		value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_PROXY_RETRY);
 		if (value && !strcmp (value, "yes"))
 			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 
 		value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_HTTP_PROXY_USERNAME);
 		if (value && strlen (value)) {
-			widget = glade_xml_get_widget (xml, "proxy_username_entry");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_username_entry"));
 			gtk_entry_set_text (GTK_ENTRY (widget), value);
 		}
 
 		value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD);
 		if (value && strlen (value)) {
-			widget = glade_xml_get_widget (xml, "proxy_password_entry");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_password_entry"));
 			gtk_entry_set_text (GTK_ENTRY (widget), value);
 		}
 	}
@@ -1294,11 +1302,11 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 	gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (store));
 	g_object_unref (store);
 	gtk_combo_box_set_active (GTK_COMBO_BOX (combo), active);
-	proxy_type_changed (GTK_COMBO_BOX (combo), xml);
-	g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (proxy_type_changed), xml);
+	proxy_type_changed (GTK_COMBO_BOX (combo), builder);
+	g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (proxy_type_changed), builder);
 
-	widget = glade_xml_get_widget (xml, "port_checkbutton");
-	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (port_toggled_cb), xml);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "port_checkbutton"));
+	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (port_toggled_cb), builder);
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_PORT);
 	if (value && strlen (value)) {
@@ -1309,7 +1317,7 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 		if (errno == 0 && tmp > 0 && tmp < 65536 && tmp != 1194) {
 			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 
-			widget = glade_xml_get_widget (xml, "port_spinbutton");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "port_spinbutton"));
 			gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget),
 			                           (gdouble) tmp);
 		}
@@ -1317,14 +1325,14 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 	} else {
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
 
-		widget = glade_xml_get_widget (xml, "port_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "port_spinbutton"));
 		gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), 1194.0);
 		gtk_widget_set_sensitive (widget, FALSE);
 	}
 
-	widget = glade_xml_get_widget (xml, "tunmtu_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tunmtu_checkbutton"));
 	g_assert (widget);
-	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (tunmtu_toggled_cb), xml);
+	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (tunmtu_toggled_cb), builder);
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TUNNEL_MTU);
 	if (value && strlen (value)) {
@@ -1335,20 +1343,20 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 		if (errno == 0 && tmp > 0 && tmp < 65536) {
 			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 
-			widget = glade_xml_get_widget (xml, "tunmtu_spinbutton");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "tunmtu_spinbutton"));
 			gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), (gdouble) tmp);
 			gtk_widget_set_sensitive (widget, TRUE);
 		}
 	} else {
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
 
-		widget = glade_xml_get_widget (xml, "tunmtu_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "tunmtu_spinbutton"));
 		gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), 1500.0);
 		gtk_widget_set_sensitive (widget, FALSE);
 	}
 
-	widget = glade_xml_get_widget (xml, "fragment_checkbutton");
-	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (fragment_toggled_cb), xml);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "fragment_checkbutton"));
+	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (fragment_toggled_cb), builder);
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_FRAGMENT_SIZE);
 	if (value && strlen (value)) {
@@ -1359,59 +1367,59 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 		if (errno == 0 && tmp > 0 && tmp < 65536) {
 			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 
-			widget = glade_xml_get_widget (xml, "fragment_spinbutton");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "fragment_spinbutton"));
 			gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), (gdouble) tmp);
 			gtk_widget_set_sensitive (widget, TRUE);
 		}
 	} else {
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
 
-		widget = glade_xml_get_widget (xml, "fragment_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "fragment_spinbutton"));
 		gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), 1300.0);
 		gtk_widget_set_sensitive (widget, FALSE);
 	}
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_MSSFIX);
 	if (value && !strcmp (value, "yes")) {
-		widget = glade_xml_get_widget (xml, "mssfix_checkbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "mssfix_checkbutton"));
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 	}
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_COMP_LZO);
 	if (value && !strcmp (value, "yes")) {
-		widget = glade_xml_get_widget (xml, "lzo_checkbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "lzo_checkbutton"));
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 	}
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_MSSFIX);
 	if (value && !strcmp (value, "yes")) {
-		widget = glade_xml_get_widget (xml, "mssfix_checkbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "mssfix_checkbutton"));
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 	}
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_PROTO_TCP);
 	if (value && !strcmp (value, "yes")) {
-		widget = glade_xml_get_widget (xml, "tcp_checkbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "tcp_checkbutton"));
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 	}
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TAP_DEV);
 	if (value && !strcmp (value, "yes")) {
-		widget = glade_xml_get_widget (xml, "tap_checkbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "tap_checkbutton"));
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 	}
 
-	widget = glade_xml_get_widget (xml, "cipher_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "cipher_combo"));
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_CIPHER);
 	populate_cipher_combo (GTK_COMBO_BOX (widget), value);
 
-	widget = glade_xml_get_widget (xml, "hmacauth_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "hmacauth_combo"));
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_AUTH);
 	populate_hmacauth_combo (GTK_COMBO_BOX (widget), value);
 
 	value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TLS_REMOTE);
 	if (value && strlen (value)) {
-		widget = glade_xml_get_widget (xml, "tls_remote_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_remote_entry"));
 		gtk_entry_set_text (GTK_ENTRY(widget), value);
 	}
 
@@ -1421,14 +1429,14 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 		int direction = -1;
 
 		active = -1;
-		widget = glade_xml_get_widget (xml, "tls_auth_checkbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_auth_checkbutton"));
 		value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TA);
 		if (value && strlen (value))
 			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
-		g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (tls_auth_toggled_cb), xml);
-		tls_auth_toggled_cb (widget, xml);
+		g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (tls_auth_toggled_cb), builder);
+		tls_auth_toggled_cb (widget, builder);
 
-		widget = glade_xml_get_widget (xml, "direction_combo");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "direction_combo"));
 		value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TA_DIR);
 		if (value && strlen (value)) {
 			direction = (int) strtol (value, NULL, 10);
@@ -1458,16 +1466,16 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 
 		value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_TA);
 		if (value && strlen (value)) {
-			widget = glade_xml_get_widget (xml, "tls_auth_chooser");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_auth_chooser"));
 			gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), value);
 		}
 	} else {
-		widget = glade_xml_get_widget (xml, "options_notebook");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "options_notebook"));
 		gtk_notebook_remove_page (GTK_NOTEBOOK (widget), 2);
 	}
 
 out:
-	g_free (glade_file);
+	g_free (ui_file);
 	return dialog;
 }
 
@@ -1476,7 +1484,7 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
 {
 	GHashTable *hash;
 	GtkWidget *widget;
-	GladeXML *xml;
+	GtkBuilder *builder;
 	const char *contype = NULL;
 	const char *value;
 	int proxy_type = PROXY_TYPE_NONE;
@@ -1485,52 +1493,52 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
 	if (error)
 		g_return_val_if_fail (*error == NULL, NULL);
 
-	xml = g_object_get_data (G_OBJECT (dialog), "glade-xml");
-	g_return_val_if_fail (xml != NULL, NULL);
+	builder = g_object_get_data (G_OBJECT (dialog), "builder");
+	g_return_val_if_fail (builder != NULL, NULL);
 
 	hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
-	widget = glade_xml_get_widget (xml, "reneg_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "reneg_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
 		int reneg_seconds;
 
-		widget = glade_xml_get_widget (xml, "reneg_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "reneg_spinbutton"));
 		reneg_seconds = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
 		g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_RENEG_SECONDS), g_strdup_printf ("%d", reneg_seconds));
 	}
 
-	widget = glade_xml_get_widget (xml, "tunmtu_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tunmtu_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
 		int tunmtu_size;
 
-		widget = glade_xml_get_widget (xml, "tunmtu_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "tunmtu_spinbutton"));
 		tunmtu_size = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
 		g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_TUNNEL_MTU), g_strdup_printf ("%d", tunmtu_size));
 	}
 
-	widget = glade_xml_get_widget (xml, "fragment_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "fragment_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
 		int fragment_size;
 
-		widget = glade_xml_get_widget (xml, "fragment_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "fragment_spinbutton"));
 		fragment_size = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
 		g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_FRAGMENT_SIZE), g_strdup_printf ("%d", fragment_size));
 	}
 
-	widget = glade_xml_get_widget (xml, "port_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "port_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
 		int port;
 
-		widget = glade_xml_get_widget (xml, "port_spinbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "port_spinbutton"));
 		port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
 		g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_PORT), g_strdup_printf ("%d", port));
 	}
 
 	/* Proxy support */
-	widget = glade_xml_get_widget (xml, "proxy_type_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_type_combo"));
 	proxy_type = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
 	if (proxy_type != PROXY_TYPE_NONE) {
-		widget = glade_xml_get_widget (xml, "proxy_server_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_server_entry"));
 		value = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 		if (value && strlen (value)) {
 			int proxy_port;
@@ -1542,19 +1550,19 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
 
 			g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_PROXY_SERVER), g_strdup (value));
 
-			widget = glade_xml_get_widget (xml, "proxy_port_spinbutton");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_port_spinbutton"));
 			proxy_port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
 			if (proxy_port > 0) {
 				g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_PROXY_PORT),
 				                     g_strdup_printf ("%d", proxy_port));
 			}
 
-			widget = glade_xml_get_widget (xml, "proxy_retry_checkbutton");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_retry_checkbutton"));
 			if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
 				g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_PROXY_RETRY), g_strdup ("yes"));
 
 			if (proxy_type == PROXY_TYPE_HTTP) {
-				widget = glade_xml_get_widget (xml, "proxy_username_entry");
+				widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_username_entry"));
 				value = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 				if (value && strlen (value)) {
 					g_hash_table_insert (hash,
@@ -1562,7 +1570,7 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
 					                     g_strdup (value));
 				}
 
-				widget = glade_xml_get_widget (xml, "proxy_password_entry");
+				widget = GTK_WIDGET (gtk_builder_get_object (builder, "proxy_password_entry"));
 				value = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 				if (value && strlen (value)) {
 					g_hash_table_insert (hash,
@@ -1573,19 +1581,19 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
 		}
 	}
 
-	widget = glade_xml_get_widget (xml, "lzo_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "lzo_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
 		g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_COMP_LZO), g_strdup ("yes"));
 
-	widget = glade_xml_get_widget (xml, "mssfix_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "mssfix_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
 		g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_MSSFIX), g_strdup ("yes"));
 
-	widget = glade_xml_get_widget (xml, "tcp_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tcp_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
 		g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_PROTO_TCP), g_strdup ("yes"));
 
-	widget = glade_xml_get_widget (xml, "tap_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "tap_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
 		g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_TAP_DEV), g_strdup ("yes"));
 
@@ -1596,7 +1604,7 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
 		GtkTreeModel *model;
 		GtkTreeIter iter;
 
-		widget = glade_xml_get_widget (xml, "cipher_combo");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "cipher_combo"));
 		model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 		if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
 			char *cipher = NULL;
@@ -1610,7 +1618,7 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
 			}
 		}
 		
-		widget = glade_xml_get_widget (xml, "hmacauth_combo");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "hmacauth_combo"));
 		model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 		if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
 			char *hmacauth = NULL;
@@ -1624,23 +1632,23 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
 			}
 		}
 
-		widget = glade_xml_get_widget (xml, "tls_remote_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_remote_entry"));
 		value = gtk_entry_get_text (GTK_ENTRY(widget));
 		if (value && strlen (value))
 			g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_TLS_REMOTE), g_strdup (value));
 
-		widget = glade_xml_get_widget (xml, "tls_auth_checkbutton");
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_auth_checkbutton"));
 		if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
 			char *filename;
 
-			widget = glade_xml_get_widget (xml, "tls_auth_chooser");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "tls_auth_chooser"));
 			filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
 			if (filename && strlen (filename)) {
 				g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_TA), g_strdup (filename));
 			}
 			g_free (filename);
 
-			widget = glade_xml_get_widget (xml, "direction_combo");
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "direction_combo"));
 			model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 			if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
 				int direction = -1;
diff --git a/properties/auth-helpers.h b/properties/auth-helpers.h
index 8dcb618..21ced60 100644
--- a/properties/auth-helpers.h
+++ b/properties/auth-helpers.h
@@ -24,21 +24,20 @@
 
 #include <glib.h>
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 
 #include <nm-connection.h>
 #include <nm-setting-vpn.h>
 
 typedef void (*ChangedCallback) (GtkWidget *widget, gpointer user_data);
 
-void fill_vpn_passwords (GladeXML *xml,
+void fill_vpn_passwords (GtkBuilder *builder,
 						 GtkSizeGroup *group,
 						 NMConnection *connection,
 						 const char *contype,
 						 ChangedCallback changed_cb,
 						 gpointer user_data);
 
-void tls_pw_init_auth_widget (GladeXML *xml,
+void tls_pw_init_auth_widget (GtkBuilder *builder,
                               GtkSizeGroup *group,
                               NMSettingVPN *s_vpn,
                               const char *contype,
@@ -46,19 +45,19 @@ void tls_pw_init_auth_widget (GladeXML *xml,
                               ChangedCallback changed_cb,
                               gpointer user_data);
 
-void sk_init_auth_widget (GladeXML *xml,
+void sk_init_auth_widget (GtkBuilder *builder,
                           GtkSizeGroup *group,
                           NMSettingVPN *s_vpn,
                           ChangedCallback changed_cb,
                           gpointer user_data);
 
-gboolean auth_widget_check_validity (GladeXML *xml, const char *contype, GError **error);
+gboolean auth_widget_check_validity (GtkBuilder *builder, const char *contype, GError **error);
 
-gboolean auth_widget_update_connection (GladeXML *xml,
+gboolean auth_widget_update_connection (GtkBuilder *builder,
                                         const char *contype,
                                         NMSettingVPN *s_vpn);
 
-gboolean auth_widget_save_secrets (GladeXML *xml,
+gboolean auth_widget_save_secrets (GtkBuilder *builder,
 								   const char *contype,
 								   const char *uuid,
 								   const char *name);
diff --git a/properties/nm-openvpn-dialog.glade b/properties/nm-openvpn-dialog.ui
similarity index 75%
rename from properties/nm-openvpn-dialog.glade
rename to properties/nm-openvpn-dialog.ui
index 78cc383..c159d01 100644
--- a/properties/nm-openvpn-dialog.glade
+++ b/properties/nm-openvpn-dialog.ui
@@ -1,27 +1,119 @@
 <?xml version="1.0"?>
-<glade-interface>
+<interface>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">65535</property>
+    <property name="lower">1</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="value">1194</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">10000</property>
+    <property name="lower">0</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">65535</property>
+    <property name="lower">1</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="value">1500</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="upper">65535</property>
+    <property name="lower">1</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="value">1300</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment5">
+    <property name="upper">65535</property>
+    <property name="lower">0</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model2">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model3">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model4">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model5">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model6">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Not required</col>
+      </row>
+    </data>
+  </object>
   <!-- interface-requires gtk+ 2.16 -->
   <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="openvpn-widget">
-    <property name="title" translatable="yes">window1</property>
-    <child>
-      <widget class="GtkVBox" id="openvpn-vbox">
+      <object class="GtkVBox" id="openvpn-vbox">
         <property name="visible">True</property>
         <property name="border_width">12</property>
         <property name="orientation">vertical</property>
         <property name="spacing">16</property>
         <child>
-          <widget class="GtkVBox" id="vbox8">
+          <object class="GtkVBox" id="vbox8">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
-              <widget class="GtkLabel" id="label22">
+              <object class="GtkLabel" id="label22">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;b&gt;General&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
@@ -29,71 +121,71 @@
               </packing>
             </child>
             <child>
-              <widget class="GtkAlignment" id="alignment8">
+              <object class="GtkAlignment" id="alignment8">
                 <property name="visible">True</property>
                 <property name="left_padding">12</property>
                 <child>
-                  <widget class="GtkTable" id="table2">
+                  <object class="GtkTable" id="table2">
                     <property name="visible">True</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">6</property>
                     <property name="row_spacing">6</property>
                     <child>
-                      <widget class="GtkLabel" id="label23">
+                      <object class="GtkLabel" id="label23">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">_Gateway:</property>
                         <property name="use_underline">True</property>
                         <property name="mnemonic_widget">gateway_entry</property>
-                      </widget>
+                      </object>
                       <packing>
-                        <property name="x_options"></property>
-                        <property name="y_options"></property>
+                        <property name="x_options"/>
+                        <property name="y_options"/>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment2">
+                      <object class="GtkAlignment" id="alignment2">
                         <property name="visible">True</property>
                         <property name="xalign">1</property>
                         <property name="xscale">0</property>
                         <child>
-                          <widget class="GtkEntry" id="gateway_entry">
+                          <object class="GtkEntry" id="gateway_entry">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
-                        <property name="y_options"></property>
+                        <property name="y_options"/>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                 </child>
-              </widget>
+              </object>
               <packing>
                 <property name="position">1</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
-          <widget class="GtkVBox" id="vbox11">
+          <object class="GtkVBox" id="vbox11">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
             <property name="spacing">6</property>
             <child>
-              <widget class="GtkLabel" id="label25">
+              <object class="GtkLabel" id="label25">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">&lt;b&gt;Authentication&lt;/b&gt;</property>
                 <property name="use_markup">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
@@ -101,677 +193,670 @@
               </packing>
             </child>
             <child>
-              <widget class="GtkAlignment" id="alignment9">
+              <object class="GtkAlignment" id="alignment9">
                 <property name="visible">True</property>
                 <property name="left_padding">12</property>
                 <child>
-                  <widget class="GtkTable" id="table3">
+                  <object class="GtkTable" id="table3">
                     <property name="visible">True</property>
                     <property name="n_rows">3</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">6</property>
                     <property name="row_spacing">6</property>
                     <child>
-                      <widget class="GtkCheckButton" id="show_passwords">
+                      <object class="GtkCheckButton" id="show_passwords">
                         <property name="label" translatable="yes">Show passwords</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="right_attach">2</property>
                         <property name="top_attach">2</property>
                         <property name="bottom_attach">3</property>
-                        <property name="x_options"></property>
-                        <property name="y_options"></property>
+                        <property name="x_options"/>
+                        <property name="y_options"/>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkNotebook" id="auth_notebook">
+                      <object class="GtkNotebook" id="auth_notebook">
                         <property name="visible">True</property>
                         <property name="show_tabs">False</property>
                         <property name="show_border">False</property>
                         <child>
-                          <widget class="GtkTable" id="table1">
+                          <object class="GtkTable" id="table1">
                             <property name="visible">True</property>
                             <property name="n_rows">4</property>
                             <property name="n_columns">2</property>
                             <property name="column_spacing">6</property>
                             <property name="row_spacing">6</property>
                             <child>
-                              <widget class="GtkAlignment" id="alignment22">
+                              <object class="GtkAlignment" id="alignment22">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkEntry" id="tls_private_key_password_entry">
+                                  <object class="GtkEntry" id="tls_private_key_password_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="visibility">False</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">3</property>
                                 <property name="bottom_attach">4</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label29">
+                              <object class="GtkLabel" id="label29">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Private Key Password:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">3</property>
                                 <property name="bottom_attach">4</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment6">
+                              <object class="GtkAlignment" id="alignment6">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0.019999999552965164</property>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="tls_private_key_chooser">
+                                  <object class="GtkFileChooserButton" id="tls_private_key_chooser">
                                     <property name="visible">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label4">
+                              <object class="GtkLabel" id="label4">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Private Key:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment4">
+                              <object class="GtkAlignment" id="alignment4">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="tls_ca_cert_chooser">
+                                  <object class="GtkFileChooserButton" id="tls_ca_cert_chooser">
                                     <property name="visible">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label2">
+                              <object class="GtkLabel" id="label2">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">CA Certificate:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label3">
+                              <object class="GtkLabel" id="label3">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">User Certificate:</property>
-                              </widget>
+                              </object>
                               <packing>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment5">
+                              <object class="GtkAlignment" id="alignment5">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="tls_user_cert_chooser">
+                                  <object class="GtkFileChooserButton" id="tls_user_cert_chooser">
                                     <property name="visible">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label14">
+                        <child type="tab">
+                          <object class="GtkLabel" id="label14">
                             <property name="visible">True</property>
                             <property name="label">page 1</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="tab_fill">False</property>
-                            <property name="type">tab</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkTable" id="table4">
+                          <object class="GtkTable" id="table4">
                             <property name="visible">True</property>
                             <property name="n_rows">3</property>
                             <property name="n_columns">2</property>
                             <property name="column_spacing">6</property>
                             <property name="row_spacing">6</property>
                             <child>
-                              <widget class="GtkAlignment" id="alignment20">
+                              <object class="GtkAlignment" id="alignment20">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkEntry" id="pw_password_entry">
+                                  <object class="GtkEntry" id="pw_password_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="visibility">False</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment10">
+                              <object class="GtkAlignment" id="alignment10">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="pw_ca_cert_chooser">
+                                  <object class="GtkFileChooserButton" id="pw_ca_cert_chooser">
                                     <property name="visible">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label27">
+                              <object class="GtkLabel" id="label27">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Password:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label7">
+                              <object class="GtkLabel" id="label7">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">CA Certificate:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label5">
+                              <object class="GtkLabel" id="label5">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">User name:</property>
-                              </widget>
+                              </object>
                               <packing>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment7">
+                              <object class="GtkAlignment" id="alignment7">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkEntry" id="pw_username_entry">
+                                  <object class="GtkEntry" id="pw_username_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label15">
+                        <child type="tab">
+                          <object class="GtkLabel" id="label15">
                             <property name="visible">True</property>
                             <property name="label">page 2</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="position">1</property>
                             <property name="tab_fill">False</property>
-                            <property name="type">tab</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkTable" id="table5">
+                          <object class="GtkTable" id="table5">
                             <property name="visible">True</property>
                             <property name="n_rows">6</property>
                             <property name="n_columns">2</property>
                             <property name="column_spacing">6</property>
                             <property name="row_spacing">6</property>
                             <child>
-                              <widget class="GtkAlignment" id="alignment23">
+                              <object class="GtkAlignment" id="alignment23">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkEntry" id="pw_tls_private_key_password_entry">
+                                  <object class="GtkEntry" id="pw_tls_private_key_password_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="visibility">False</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">5</property>
                                 <property name="bottom_attach">6</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label30">
+                              <object class="GtkLabel" id="label30">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Private Key Password:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">5</property>
                                 <property name="bottom_attach">6</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment12">
+                              <object class="GtkAlignment" id="alignment12">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="pw_tls_private_key_chooser">
+                                  <object class="GtkFileChooserButton" id="pw_tls_private_key_chooser">
                                     <property name="visible">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">4</property>
                                 <property name="bottom_attach">5</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label9">
+                              <object class="GtkLabel" id="label9">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Private Key:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">4</property>
                                 <property name="bottom_attach">5</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label28">
+                              <object class="GtkLabel" id="label28">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Password:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment21">
+                              <object class="GtkAlignment" id="alignment21">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkEntry" id="pw_tls_password_entry">
+                                  <object class="GtkEntry" id="pw_tls_password_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="visibility">False</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment14">
+                              <object class="GtkAlignment" id="alignment14">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="pw_tls_user_cert_chooser">
+                                  <object class="GtkFileChooserButton" id="pw_tls_user_cert_chooser">
                                     <property name="visible">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment13">
+                              <object class="GtkAlignment" id="alignment13">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="pw_tls_ca_cert_chooser">
+                                  <object class="GtkFileChooserButton" id="pw_tls_ca_cert_chooser">
                                     <property name="visible">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">3</property>
                                 <property name="bottom_attach">4</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label8">
+                              <object class="GtkLabel" id="label8">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">User Certificate:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label6">
+                              <object class="GtkLabel" id="label6">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">CA Certificate:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">3</property>
                                 <property name="bottom_attach">4</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label10">
+                              <object class="GtkLabel" id="label10">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">User name:</property>
-                              </widget>
+                              </object>
                               <packing>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment11">
+                              <object class="GtkAlignment" id="alignment11">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkEntry" id="pw_tls_username_entry">
+                                  <object class="GtkEntry" id="pw_tls_username_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label16">
+                        <child type="tab">
+                          <object class="GtkLabel" id="label16">
                             <property name="visible">True</property>
                             <property name="label">page 3</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="position">2</property>
                             <property name="tab_fill">False</property>
-                            <property name="type">tab</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkTable" id="table6">
+                          <object class="GtkTable" id="table6">
                             <property name="visible">True</property>
                             <property name="n_rows">5</property>
                             <property name="n_columns">2</property>
                             <property name="column_spacing">6</property>
                             <property name="row_spacing">6</property>
                             <child>
-                              <widget class="GtkAlignment" id="alignment25">
+                              <object class="GtkAlignment" id="alignment25">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkEntry" id="sk_local_address_entry">
+                                  <object class="GtkEntry" id="sk_local_address_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">4</property>
                                 <property name="bottom_attach">5</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label31">
+                              <object class="GtkLabel" id="label31">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Remote IP Address:</property>
                                 <property name="justify">right</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">3</property>
                                 <property name="bottom_attach">4</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label20">
+                              <object class="GtkLabel" id="label20">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Local IP Address:</property>
                                 <property name="justify">right</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">4</property>
                                 <property name="bottom_attach">5</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment18">
+                              <object class="GtkAlignment" id="alignment18">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkEntry" id="sk_remote_address_entry">
+                                  <object class="GtkEntry" id="sk_remote_address_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">3</property>
                                 <property name="bottom_attach">4</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label12">
+                              <object class="GtkLabel" id="label12">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Key Direction:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label11">
+                              <object class="GtkLabel" id="label11">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Static Key:</property>
-                              </widget>
+                              </object>
                               <packing>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment15">
+                              <object class="GtkAlignment" id="alignment15">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="sk_key_chooser">
+                                  <object class="GtkFileChooserButton" id="sk_key_chooser">
                                     <property name="visible">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment16">
+                              <object class="GtkAlignment" id="alignment16">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkComboBox" id="sk_direction_combo">
+                                  <object class="GtkComboBox" id="sk_direction_combo">
                                     <property name="visible">True</property>
-                                    <property name="items" translatable="yes"> </property>
-                                  </widget>
+                                    <property name="model">model1</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer1"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment17">
+                              <object class="GtkAlignment" id="alignment17">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkLabel" id="sk_dir_help_label">
+                                  <object class="GtkLabel" id="sk_dir_help_label">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
                                     <property name="label" translatable="yes">&lt;i&gt;If key direction is used, it must be the opposite of that used on the VPN peer.  For example, if the peer uses '1', this connection must use '0'.  If you are unsure what value to use, contact your system administrator.&lt;/i&gt;</property>
                                     <property name="use_markup">True</property>
                                     <property name="wrap">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
                               <placeholder/>
                             </child>
-                          </widget>
-                          <packing>
-                            <property name="position">3</property>
-                          </packing>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label17">
+                        <child type="tab">
+                          <object class="GtkLabel" id="label17">
                             <property name="visible">True</property>
                             <property name="label">page 4</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="position">3</property>
                             <property name="tab_fill">False</property>
-                            <property name="type">tab</property>
                           </packing>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="right_attach">2</property>
                         <property name="top_attach">1</property>
@@ -779,41 +864,47 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label26">
+                      <object class="GtkLabel" id="label26">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">Type:</property>
-                      </widget>
+                      </object>
                       <packing>
-                        <property name="x_options"></property>
-                        <property name="y_options"></property>
+                        <property name="x_options"/>
+                        <property name="y_options"/>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment3">
+                      <object class="GtkAlignment" id="alignment3">
                         <property name="visible">True</property>
                         <property name="xalign">1</property>
                         <property name="xscale">0</property>
                         <child>
-                          <widget class="GtkComboBox" id="auth_combo">
+                          <object class="GtkComboBox" id="auth_combo">
                             <property name="visible">True</property>
-                            <property name="items" translatable="yes"> </property>
-                          </widget>
+                            <property name="model">model2</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="renderer2"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                 </child>
-              </widget>
+              </object>
               <packing>
                 <property name="position">1</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
@@ -821,24 +912,24 @@
           </packing>
         </child>
         <child>
-          <widget class="GtkAlignment" id="alignment1">
+          <object class="GtkAlignment" id="alignment1">
             <property name="visible">True</property>
             <property name="xalign">1</property>
             <property name="xscale">0</property>
             <child>
-              <widget class="GtkButton" id="advanced_button">
+              <object class="GtkButton" id="advanced_button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <child>
-                  <widget class="GtkHBox" id="hbox2">
+                  <object class="GtkHBox" id="hbox2">
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkImage" id="image1">
+                      <object class="GtkImage" id="image1">
                         <property name="visible">True</property>
                         <property name="stock">gtk-preferences</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -846,23 +937,23 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label1">
+                      <object class="GtkLabel" id="label1">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">Ad_vanced...</property>
                         <property name="use_markup">True</property>
                         <property name="use_underline">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                 </child>
-              </widget>
+              </object>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
@@ -870,10 +961,8 @@
             <property name="position">2</property>
           </packing>
         </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="openvpn-advanced-dialog">
+      </object>
+  <object class="GtkDialog" id="openvpn-advanced-dialog">
     <property name="border_width">5</property>
     <property name="title" translatable="yes">OpenVPN Advanced Options</property>
     <property name="window_position">center-on-parent</property>
@@ -883,244 +972,243 @@
     <property name="skip_pager_hint">True</property>
     <property name="has_separator">False</property>
     <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child>
-          <widget class="GtkNotebook" id="options_notebook">
+          <object class="GtkNotebook" id="options_notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <child>
-              <widget class="GtkVBox" id="vbox1">
+              <object class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
-                  <widget class="GtkHBox" id="hbox1">
+                  <object class="GtkHBox" id="hbox1">
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkCheckButton" id="port_checkbutton">
+                      <object class="GtkCheckButton" id="port_checkbutton">
                         <property name="label" translatable="yes">Use custom gateway p_ort:</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkSpinButton" id="port_spinbutton">
+                      <object class="GtkSpinButton" id="port_spinbutton">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="adjustment">1194 1 65535 1 10 10</property>
+                        <property name="adjustment">adjustment1</property>
                         <property name="climb_rate">1</property>
                         <property name="numeric">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkHBox" id="hbox3">
+                  <object class="GtkHBox" id="hbox3">
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkCheckButton" id="reneg_checkbutton">
+                      <object class="GtkCheckButton" id="reneg_checkbutton">
                         <property name="label" translatable="yes">Use custom _renegotiation interval:</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkSpinButton" id="reneg_spinbutton">
+                      <object class="GtkSpinButton" id="reneg_spinbutton">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="adjustment">0 0 10000 1 10 10</property>
+                        <property name="adjustment">adjustment2</property>
                         <property name="climb_rate">1</property>
                         <property name="numeric">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkCheckButton" id="lzo_checkbutton">
+                  <object class="GtkCheckButton" id="lzo_checkbutton">
                     <property name="label" translatable="yes">Use L_ZO data compression</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkCheckButton" id="tcp_checkbutton">
+                  <object class="GtkCheckButton" id="tcp_checkbutton">
                     <property name="label" translatable="yes">Use a _TCP connection</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">3</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkCheckButton" id="tap_checkbutton">
+                  <object class="GtkCheckButton" id="tap_checkbutton">
                     <property name="label" translatable="yes">Use a TA_P device</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">4</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkHBox" id="hbox4">
+                  <object class="GtkHBox" id="hbox4">
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkCheckButton" id="tunmtu_checkbutton">
+                      <object class="GtkCheckButton" id="tunmtu_checkbutton">
                         <property name="label" translatable="yes">Use custom _tunnel Maximum Transmission Unit (MTU):</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkSpinButton" id="tunmtu_spinbutton">
+                      <object class="GtkSpinButton" id="tunmtu_spinbutton">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x25CF;</property>
-                        <property name="adjustment">1500 1 65535 1 10 10</property>
+                        <property name="adjustment">adjustment3</property>
                         <property name="climb_rate">1</property>
                         <property name="numeric">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">5</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkHBox" id="hbox5">
+                  <object class="GtkHBox" id="hbox5">
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkCheckButton" id="fragment_checkbutton">
+                      <object class="GtkCheckButton" id="fragment_checkbutton">
                         <property name="label" translatable="yes">Use custom UDP _fragment size:</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkSpinButton" id="fragment_spinbutton">
+                      <object class="GtkSpinButton" id="fragment_spinbutton">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x25CF;</property>
-                        <property name="adjustment">1300 1 65535 1 10 10</property>
+                        <property name="adjustment">adjustment4</property>
                         <property name="climb_rate">1</property>
                         <property name="numeric">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">6</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkCheckButton" id="mssfix_checkbutton">
+                  <object class="GtkCheckButton" id="mssfix_checkbutton">
                     <property name="label" translatable="yes">Restrict tunnel TCP Maximum Segment Size (MSS)</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">7</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label13">
+            <child type="tab">
+              <object class="GtkLabel" id="label13">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">General</property>
-              </widget>
+              </object>
               <packing>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkAlignment" id="alignment24">
+              <object class="GtkAlignment" id="alignment24">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
                 <property name="yalign">0</property>
@@ -1131,27 +1219,39 @@
                 <property name="left_padding">12</property>
                 <property name="right_padding">12</property>
                 <child>
-                  <widget class="GtkTable" id="table9">
+                  <object class="GtkTable" id="table9">
                     <property name="visible">True</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">12</property>
                     <property name="row_spacing">12</property>
                     <child>
-                      <widget class="GtkComboBox" id="cipher_combo">
+                      <object class="GtkComboBox" id="cipher_combo">
                         <property name="visible">True</property>
-                        <property name="items" translatable="yes"> </property>
-                      </widget>
+                        <property name="model">model3</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="renderer3"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkComboBox" id="hmacauth_combo">
+                      <object class="GtkComboBox" id="hmacauth_combo">
                         <property name="visible">True</property>
-                        <property name="items" translatable="yes"> </property>
-                      </widget>
+                        <property name="model">model4</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="renderer4"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -1160,88 +1260,84 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label19">
+                      <object class="GtkLabel" id="label19">
                         <property name="visible">True</property>
                         <property name="xalign">1</property>
                         <property name="label" translatable="yes">Cipher:</property>
                         <property name="justify">right</property>
-                      </widget>
+                      </object>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label24">
+                      <object class="GtkLabel" id="label24">
                         <property name="visible">True</property>
                         <property name="xalign">1</property>
                         <property name="label" translatable="yes">HMAC Authentication:</property>
                         <property name="justify">right</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="top_attach">1</property>
                         <property name="bottom_attach">2</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                 </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
+              </object>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label21">
+            <child type="tab">
+              <object class="GtkLabel" id="label21">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">Security</property>
-              </widget>
+              </object>
               <packing>
                 <property name="position">1</property>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkAlignment" id="alignment1">
+              <object class="GtkAlignment" id="alignment27">
                 <property name="visible">True</property>
                 <property name="top_padding">12</property>
                 <property name="bottom_padding">12</property>
                 <property name="left_padding">12</property>
                 <property name="right_padding">12</property>
                 <child>
-                  <widget class="GtkVBox" id="vbox3">
+                  <object class="GtkVBox" id="vbox3">
                     <property name="visible">True</property>
                     <property name="orientation">vertical</property>
                     <property name="spacing">12</property>
                     <child>
-                      <widget class="GtkTable" id="table10">
+                      <object class="GtkTable" id="table10">
                         <property name="visible">True</property>
                         <property name="n_rows">2</property>
                         <property name="n_columns">2</property>
                         <property name="column_spacing">12</property>
                         <property name="row_spacing">6</property>
                         <child>
-                          <widget class="GtkLabel" id="tls_remote_label">
+                          <object class="GtkLabel" id="tls_remote_label">
                             <property name="visible">True</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Subject Match:</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="x_options">GTK_FILL</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkAlignment" id="alignment26">
+                          <object class="GtkAlignment" id="alignment26">
                             <property name="visible">True</property>
                             <property name="xalign">0</property>
                             <property name="xscale">0</property>
                             <child>
-                              <widget class="GtkLabel" id="label33">
+                              <object class="GtkLabel" id="label33">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">&lt;i&gt;Connect only to servers whose certificate matches the given subject.
 Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                                 <property name="use_markup">True</property>
                                 <property name="wrap">True</property>
-                              </widget>
+                              </object>
                             </child>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="left_attach">1</property>
                             <property name="right_attach">2</property>
@@ -1250,11 +1346,11 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkEntry" id="tls_remote_entry">
+                          <object class="GtkEntry" id="tls_remote_entry">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">&#x25CF;</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="left_attach">1</property>
                             <property name="right_attach">2</property>
@@ -1263,86 +1359,92 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                         <child>
                           <placeholder/>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkTable" id="table7">
+                      <object class="GtkTable" id="table7">
                         <property name="visible">True</property>
                         <property name="n_rows">2</property>
                         <property name="n_columns">2</property>
                         <property name="column_spacing">12</property>
                         <property name="row_spacing">6</property>
                         <child>
-                          <widget class="GtkCheckButton" id="tls_auth_checkbutton">
+                          <object class="GtkCheckButton" id="tls_auth_checkbutton">
                             <property name="label" translatable="yes">Use additional TLS authentication</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="right_attach">2</property>
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkTable" id="table8">
+                          <object class="GtkTable" id="table8">
                             <property name="visible">True</property>
                             <property name="n_rows">3</property>
                             <property name="n_columns">2</property>
                             <property name="column_spacing">12</property>
                             <property name="row_spacing">6</property>
                             <child>
-                              <widget class="GtkLabel" id="direction_label">
+                              <object class="GtkLabel" id="direction_label">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Key Direction:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkAlignment" id="alignment19">
+                              <object class="GtkAlignment" id="alignment19">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="xscale">0</property>
                                 <child>
-                                  <widget class="GtkLabel" id="tls_dir_help_label">
+                                  <object class="GtkLabel" id="tls_dir_help_label">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
                                     <property name="label" translatable="yes">&lt;i&gt;If key direction is used, it must be the opposite of that used on the VPN peer.  For example, if the peer uses '1', this connection must use '0'.  If you are unsure what value to use, contact your system administrator.&lt;/i&gt;</property>
                                     <property name="use_markup">True</property>
                                     <property name="wrap">True</property>
-                                  </widget>
+                                  </object>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
-                                <property name="y_options"></property>
+                                <property name="y_options"/>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkFileChooserButton" id="tls_auth_chooser">
+                              <object class="GtkFileChooserButton" id="tls_auth_chooser">
                                 <property name="visible">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkComboBox" id="direction_combo">
+                              <object class="GtkComboBox" id="direction_combo">
                                 <property name="visible">True</property>
-                                <property name="items" translatable="yes"> </property>
-                              </widget>
+                                <property name="model">model5</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer5"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
@@ -1351,16 +1453,16 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="tls_auth_label">
+                              <object class="GtkLabel" id="tls_auth_label">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Key File:</property>
-                              </widget>
+                              </object>
                             </child>
                             <child>
                               <placeholder/>
                             </child>
-                          </widget>
+                          </object>
                           <packing>
                             <property name="left_attach">1</property>
                             <property name="right_attach">2</property>
@@ -1371,31 +1473,27 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                         <child>
                           <placeholder/>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                 </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
+              </object>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label18">
+            <child type="tab">
+              <object class="GtkLabel" id="label18">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">TLS Authentication</property>
-              </widget>
+              </object>
               <packing>
                 <property name="position">2</property>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkAlignment" id="alignment2">
+              <object class="GtkAlignment" id="alignment28">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
                 <property name="yalign">0</property>
@@ -1405,18 +1503,24 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                 <property name="left_padding">12</property>
                 <property name="right_padding">12</property>
                 <child>
-                  <widget class="GtkTable" id="table1">
+                  <object class="GtkTable" id="table11">
                     <property name="visible">True</property>
                     <property name="n_rows">6</property>
                     <property name="n_columns">2</property>
                     <property name="column_spacing">6</property>
                     <property name="row_spacing">6</property>
                     <child>
-                      <widget class="GtkComboBox" id="proxy_type_combo">
+                      <object class="GtkComboBox" id="proxy_type_combo">
                         <property name="visible">True</property>
                         <property name="button_sensitivity">on</property>
-                        <property name="items" translatable="yes">Not required</property>
-                      </widget>
+                        <property name="model">model6</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="renderer6"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -1424,24 +1528,24 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="label1">
+                      <object class="GtkLabel" id="label34">
                         <property name="visible">True</property>
                         <property name="xalign">1</property>
                         <property name="label" translatable="yes">Proxy Type:</property>
                         <property name="justify">right</property>
-                      </widget>
+                      </object>
                       <packing>
-                        <property name="y_options"></property>
+                        <property name="y_options"/>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="proxy_desc_label">
+                      <object class="GtkLabel" id="proxy_desc_label">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">&lt;i&gt;Select this option if your organization requires the use of a proxy server to access the Internet.&lt;/i&gt;</property>
                         <property name="use_markup">True</property>
                         <property name="wrap">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -1450,64 +1554,64 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="proxy_server_label">
+                      <object class="GtkLabel" id="proxy_server_label">
                         <property name="visible">True</property>
                         <property name="xalign">1</property>
                         <property name="label" translatable="yes">Server Address:</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="top_attach">2</property>
                         <property name="bottom_attach">3</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkAlignment" id="alignment4">
+                      <object class="GtkAlignment" id="alignment29">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
                         <property name="yalign">0</property>
                         <property name="xscale">0</property>
                         <child>
-                          <widget class="GtkHBox" id="hbox2">
+                          <object class="GtkHBox" id="hbox6">
                             <property name="visible">True</property>
                             <child>
-                              <widget class="GtkEntry" id="proxy_server_entry">
+                              <object class="GtkEntry" id="proxy_server_entry">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">&#x25CF;</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="proxy_port_label">
+                              <object class="GtkLabel" id="proxy_port_label">
                                 <property name="visible">True</property>
                                 <property name="xalign">1</property>
                                 <property name="label" translatable="yes">Port:</property>
                                 <property name="justify">right</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="padding">6</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkSpinButton" id="proxy_port_spinbutton">
+                              <object class="GtkSpinButton" id="proxy_port_spinbutton">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">&#x25CF;</property>
                                 <property name="width_chars">5</property>
-                                <property name="adjustment">0 0 65535 1 10 0</property>
+                                <property name="adjustment">adjustment5</property>
                                 <property name="climb_rate">1</property>
                                 <property name="numeric">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="position">2</property>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -1516,13 +1620,13 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkCheckButton" id="proxy_retry_checkbutton">
+                      <object class="GtkCheckButton" id="proxy_retry_checkbutton">
                         <property name="label" translatable="yes">Retry indefinitely when errors occur</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="draw_indicator">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -1531,35 +1635,35 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="proxy_username_label">
+                      <object class="GtkLabel" id="proxy_username_label">
                         <property name="visible">True</property>
                         <property name="xalign">1</property>
                         <property name="label" translatable="yes">Proxy Username:</property>
                         <property name="justify">right</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="top_attach">4</property>
                         <property name="bottom_attach">5</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="proxy_password_label">
+                      <object class="GtkLabel" id="proxy_password_label">
                         <property name="visible">True</property>
                         <property name="xalign">1</property>
                         <property name="label" translatable="yes">Proxy Password:</property>
                         <property name="justify">right</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="top_attach">5</property>
                         <property name="bottom_attach">6</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkEntry" id="proxy_username_entry">
+                      <object class="GtkEntry" id="proxy_username_entry">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">&#x25CF;</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -1568,12 +1672,12 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkEntry" id="proxy_password_entry">
+                      <object class="GtkEntry" id="proxy_password_entry">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="visibility">False</property>
                         <property name="invisible_char">&#x25CF;</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
@@ -1587,25 +1691,21 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
                     <child>
                       <placeholder/>
                     </child>
-                  </widget>
+                  </object>
                 </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-              </packing>
+              </object>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label32">
+            <child type="tab">
+              <object class="GtkLabel" id="label32">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">Proxies</property>
-              </widget>
+              </object>
               <packing>
                 <property name="position">3</property>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
@@ -1613,18 +1713,17 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
           </packing>
         </child>
         <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="layout_style">end</property>
             <child>
-              <widget class="GtkButton" id="cancel_button">
+              <object class="GtkButton" id="cancel_button">
                 <property name="label">gtk-cancel</property>
-                <property name="response_id">-6</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
@@ -1632,28 +1731,31 @@ Example: /CN=myvpn.company.com&lt;/i&gt;</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkButton" id="ok_button">
+              <object class="GtkButton" id="ok_button">
                 <property name="label">gtk-ok</property>
-                <property name="response_id">-5</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
-      </widget>
+      </object>
     </child>
-  </widget>
-</glade-interface>
+    <action-widgets>
+      <action-widget response="-6">cancel_button</action-widget>
+      <action-widget response="-5">ok_button</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index 5cbdd9c..11cf3bc 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -35,7 +35,6 @@
 #include <glib/gi18n-lib.h>
 #include <string.h>
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 
 #define NM_VPN_API_SUBJECT_TO_CHANGE
 
@@ -74,7 +73,7 @@ G_DEFINE_TYPE_EXTENDED (OpenvpnPluginUiWidget, openvpn_plugin_ui_widget, G_TYPE_
 #define OPENVPN_PLUGIN_UI_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), OPENVPN_TYPE_PLUGIN_UI_WIDGET, OpenvpnPluginUiWidgetPrivate))
 
 typedef struct {
-	GladeXML *xml;
+	GtkBuilder *builder;
 	GtkWidget *widget;
 	GtkSizeGroup *group;
 	GtkWindowGroup *window_group;
@@ -137,7 +136,7 @@ check_validity (OpenvpnPluginUiWidget *self, GError **error)
 	GtkTreeIter iter;
 	const char *contype = NULL;
 
-	widget = glade_xml_get_widget (priv->xml, "gateway_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "gateway_entry"));
 	str = gtk_entry_get_text (GTK_ENTRY (widget));
 	if (!str || !strlen (str)) {
 		g_set_error (error,
@@ -147,13 +146,13 @@ check_validity (OpenvpnPluginUiWidget *self, GError **error)
 		return FALSE;
 	}
 
-	widget = glade_xml_get_widget (priv->xml, "auth_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "auth_combo"));
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 	g_assert (model);
 	g_assert (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter));
 
 	gtk_tree_model_get (model, &iter, COL_AUTH_TYPE, &contype, -1);
-	if (!auth_widget_check_validity (priv->xml, contype, error))
+	if (!auth_widget_check_validity (priv->builder, contype, error))
 		return FALSE;
 
 	return TRUE;
@@ -176,9 +175,9 @@ auth_combo_changed_cb (GtkWidget *combo, gpointer user_data)
 	GtkTreeIter iter;
 	gint new_page = 0;
 
-	auth_notebook = glade_xml_get_widget (priv->xml, "auth_notebook");
+	auth_notebook = GTK_WIDGET (gtk_builder_get_object (priv->builder, "auth_notebook"));
 	g_assert (auth_notebook);
-	show_passwords = glade_xml_get_widget (priv->xml, "show_passwords");
+	show_passwords = GTK_WIDGET (gtk_builder_get_object (priv->builder, "show_passwords"));
 	g_assert (auth_notebook);
 
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
@@ -244,7 +243,7 @@ advanced_button_clicked_cb (GtkWidget *button, gpointer user_data)
 	g_return_if_fail (GTK_WIDGET_TOPLEVEL (toplevel));
 #endif
 
-	widget = glade_xml_get_widget (priv->xml, "auth_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "auth_combo"));
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 	if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter))
 		gtk_tree_model_get (model, &iter, COL_AUTH_TYPE, &contype, -1);
@@ -284,7 +283,7 @@ init_plugin_ui (OpenvpnPluginUiWidget *self, NMConnection *connection, GError **
 
 	priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
-	widget = glade_xml_get_widget (priv->xml, "gateway_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "gateway_entry"));
 	if (!widget)
 		return FALSE;
 	gtk_size_group_add_widget (priv->group, widget);
@@ -295,7 +294,7 @@ init_plugin_ui (OpenvpnPluginUiWidget *self, NMConnection *connection, GError **
 	}
 	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
 
-	widget = glade_xml_get_widget (priv->xml, "auth_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "auth_combo"));
 	if (!widget)
 		return FALSE;
 	gtk_size_group_add_widget (priv->group, widget);
@@ -315,10 +314,10 @@ init_plugin_ui (OpenvpnPluginUiWidget *self, NMConnection *connection, GError **
 	}
 
 	/* TLS auth widget */
-	tls_pw_init_auth_widget (priv->xml, priv->group, s_vpn,
+	tls_pw_init_auth_widget (priv->builder, priv->group, s_vpn,
 	                         NM_OPENVPN_CONTYPE_TLS, "tls",
 	                         stuff_changed_cb, self);
-	fill_vpn_passwords (priv->xml, priv->group, connection,
+	fill_vpn_passwords (priv->builder, priv->group, connection,
 						NM_OPENVPN_CONTYPE_TLS, stuff_changed_cb, self);
 
 	gtk_list_store_append (store, &iter);
@@ -329,10 +328,10 @@ init_plugin_ui (OpenvpnPluginUiWidget *self, NMConnection *connection, GError **
 	                    -1);
 
 	/* Password auth widget */
-	tls_pw_init_auth_widget (priv->xml, priv->group, s_vpn,
+	tls_pw_init_auth_widget (priv->builder, priv->group, s_vpn,
 	                         NM_OPENVPN_CONTYPE_PASSWORD, "pw",
 	                         stuff_changed_cb, self);
-	fill_vpn_passwords (priv->xml, priv->group, connection,
+	fill_vpn_passwords (priv->builder, priv->group, connection,
 						NM_OPENVPN_CONTYPE_PASSWORD, stuff_changed_cb, self);
 
 	gtk_list_store_append (store, &iter);
@@ -345,10 +344,10 @@ init_plugin_ui (OpenvpnPluginUiWidget *self, NMConnection *connection, GError **
 		active = 1;
 
 	/* Password+TLS auth widget */
-	tls_pw_init_auth_widget (priv->xml, priv->group, s_vpn,
+	tls_pw_init_auth_widget (priv->builder, priv->group, s_vpn,
 	                         NM_OPENVPN_CONTYPE_PASSWORD_TLS, "pw_tls",
 	                         stuff_changed_cb, self);
-	fill_vpn_passwords (priv->xml, priv->group, connection,
+	fill_vpn_passwords (priv->builder, priv->group, connection,
 						NM_OPENVPN_CONTYPE_PASSWORD_TLS, stuff_changed_cb, self);
 
 
@@ -362,7 +361,7 @@ init_plugin_ui (OpenvpnPluginUiWidget *self, NMConnection *connection, GError **
 		active = 2;
 
 	/* Static key auth widget */
-	sk_init_auth_widget (priv->xml, priv->group, s_vpn, stuff_changed_cb, self);
+	sk_init_auth_widget (priv->builder, priv->group, s_vpn, stuff_changed_cb, self);
 
 	gtk_list_store_append (store, &iter);
 	gtk_list_store_set (store, &iter,
@@ -378,7 +377,7 @@ init_plugin_ui (OpenvpnPluginUiWidget *self, NMConnection *connection, GError **
 	g_signal_connect (widget, "changed", G_CALLBACK (auth_combo_changed_cb), self);
 	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), active < 0 ? 0 : active);
 
-	widget = glade_xml_get_widget (priv->xml, "advanced_button");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "advanced_button"));
 	g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (advanced_button_clicked_cb), self);
 
 	return TRUE;
@@ -409,14 +408,14 @@ hash_copy_advanced (gpointer key, gpointer data, gpointer user_data)
 }
 
 static const char *
-get_auth_type (GladeXML *glade_xml)
+get_auth_type (GtkBuilder *builder)
 {
 	GtkComboBox *combo;
 	GtkTreeModel *model;
 	GtkTreeIter iter;
 	const char *auth_type = NULL;
 
-	combo = GTK_COMBO_BOX (glade_xml_get_widget (glade_xml, "auth_combo"));
+	combo = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, "auth_combo")));
 	model = gtk_combo_box_get_model (combo);
 	if (gtk_combo_box_get_active_iter (combo, &iter))
 		gtk_tree_model_get (model, &iter, COL_AUTH_TYPE, &auth_type, -1);
@@ -444,15 +443,15 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
 	g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_DBUS_SERVICE_OPENVPN, NULL);
 
 	/* Gateway */
-	widget = glade_xml_get_widget (priv->xml, "gateway_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "gateway_entry"));
 	str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 	if (str && strlen (str))
 		nm_setting_vpn_add_data_item (s_vpn, NM_OPENVPN_KEY_REMOTE, str);
 
-	auth_type = get_auth_type (priv->xml);
+	auth_type = get_auth_type (priv->builder);
 	if (auth_type) {
 		nm_setting_vpn_add_data_item (s_vpn, NM_OPENVPN_KEY_CONNECTION_TYPE, auth_type);
-		auth_widget_update_connection (priv->xml, auth_type, s_vpn);
+		auth_widget_update_connection (priv->builder, auth_type, s_vpn);
 	}
 
 	if (priv->advanced)
@@ -486,9 +485,9 @@ save_secrets (NMVpnPluginUiWidgetInterface *iface,
 	id = nm_setting_connection_get_id (s_con);
 	uuid = nm_setting_connection_get_uuid (s_con);
 
-	auth_type = get_auth_type (priv->xml);
+	auth_type = get_auth_type (priv->builder);
 	if (auth_type)
-		ret = auth_widget_save_secrets (priv->xml, auth_type, uuid, id);
+		ret = auth_widget_save_secrets (priv->builder, auth_type, uuid, id);
 	if (ret)
 		ret = advanced_save_secrets (priv->advanced, uuid, id);
 
@@ -504,7 +503,7 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
 {
 	NMVpnPluginUiWidgetInterface *object;
 	OpenvpnPluginUiWidgetPrivate *priv;
-	char *glade_file;
+	char *ui_file;
 
 	if (error)
 		g_return_val_if_fail (*error == NULL, NULL);
@@ -517,18 +516,25 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
 
 	priv = OPENVPN_PLUGIN_UI_WIDGET_GET_PRIVATE (object);
 
-	glade_file = g_strdup_printf ("%s/%s", GLADEDIR, "nm-openvpn-dialog.glade");
-	priv->xml = glade_xml_new (glade_file, "openvpn-vbox", GETTEXT_PACKAGE);
-	if (priv->xml == NULL) {
+	ui_file = g_strdup_printf ("%s/%s", UIDIR, "nm-openvpn-dialog.ui");
+	priv->builder = gtk_builder_new ();
+
+	if (!gtk_builder_add_from_file (priv->builder, ui_file, error)) {
+		g_warning ("Couldn't load builder file: %s",
+		           error && *error ? (*error)->message : "(unknown)");
+		g_clear_error (error);
 		g_set_error (error, OPENVPN_PLUGIN_UI_ERROR, 0,
-		             "could not load required resources at %s", glade_file);
-		g_free (glade_file);
+		             "could not load required resources from %s", ui_file);
+		g_free (ui_file);
 		g_object_unref (object);
 		return NULL;
 	}
-	g_free (glade_file);
 
-	priv->widget = glade_xml_get_widget (priv->xml, "openvpn-vbox");
+	gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
+
+	g_free (ui_file);
+
+	priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "openvpn-vbox"));
 	if (!priv->widget) {
 		g_set_error (error, OPENVPN_PLUGIN_UI_ERROR, 0, "could not load UI widget");
 		g_object_unref (object);
@@ -567,8 +573,8 @@ dispose (GObject *object)
 	if (priv->widget)
 		g_object_unref (priv->widget);
 
-	if (priv->xml)
-		g_object_unref (priv->xml);
+	if (priv->builder)
+		g_object_unref (priv->builder);
 
 	if (priv->advanced)
 		g_hash_table_destroy (priv->advanced);
diff --git a/properties/tests/Makefile.am b/properties/tests/Makefile.am
index 61bd22e..6d2314b 100644
--- a/properties/tests/Makefile.am
+++ b/properties/tests/Makefile.am
@@ -9,7 +9,6 @@ test_import_export_SOURCES = \
 
 test_import_export_CPPFLAGS = \
 	$(GLIB_CFLAGS) \
-	$(GLADE_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GCONF_CFLAGS) \
 	$(GNOMEKEYRING_CFLAGS) \
@@ -18,7 +17,6 @@ test_import_export_CPPFLAGS = \
 
 test_import_export_LDADD = \
 	$(GTHREAD_LIBS) \
-	$(GLADE_LIBS) \
 	$(GTK_LIBS) \
 	$(GCONF_LIBS) \
 	$(GNOMEKEYRING_LIBS) \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]