[PATCH] Porting NetworkManager-VPNC to GtkBuilder



Hi,

I've been working on porting the VPNC plugin to GtkBuilder. I'm sure I
broke some things, but hopefully by publishing the patch here I can
get some review. It looks fine to me except maybe for translations ;)

Patch attached...

Regards,

Mathieu Trudel-Lapierre <mathieu-tl ubuntu com>
Freenode: cyphermox, Jabber: mathieu tl gmail com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93
From: Mathieu Trudel-Lapierre <mathieu trudel-lapierre canonical com>
Subject: Port vpnc plugin to gtkbuilder

Index: network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/auth-dialog/Makefile.am
===================================================================
--- network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe.orig/auth-dialog/Makefile.am	2011-01-28 15:13:40.629904921 -0500
+++ network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/auth-dialog/Makefile.am	2011-01-28 15:16:49.459904920 -0500
@@ -9,7 +9,6 @@
 	$(GCONF_CFLAGS) \
 	$(GNOMEKEYRING_CFLAGS) \
 	-DICONDIR=\""$(datadir)/pixmaps"\" \
-	-DGLADEDIR=\""$(gladedir)"\" \
 	-DBINDIR=\""$(bindir)"\" \
 	-DG_DISABLE_DEPRECATED \
 	-DGDK_DISABLE_DEPRECATED \
Index: network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/configure.ac
===================================================================
--- network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe.orig/configure.ac	2011-01-28 15:14:55.559904920 -0500
+++ network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/configure.ac	2011-01-28 15:15:10.569904922 -0500
@@ -74,10 +74,6 @@
 	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)
Index: network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/Makefile.am
===================================================================
--- network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe.orig/properties/Makefile.am	2011-01-28 14:54:46.949904921 -0500
+++ network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/Makefile.am	2011-01-28 15:12:48.879904920 -0500
@@ -11,17 +11,16 @@
 	nm-vpnc.c \
 	nm-vpnc.h
 
-gladedir = $(datadir)/gnome-vpn-properties/vpnc
-glade_DATA = nm-vpnc-dialog.glade
+gtkbuilderdir = $(datadir)/gnome-vpn-properties/vpnc
+gtkbuilder_DATA = nm-vpnc-dialog.ui
 
 libnm_vpnc_properties_la_CPPFLAGS = \
-	$(GLADE_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GCONF_CFLAGS) \
 	$(GNOMEKEYRING_CFLAGS) \
 	$(NETWORKMANAGER_CFLAGS) \
 	-DICONDIR=\""$(datadir)/pixmaps"\" \
-	-DGLADEDIR=\""$(gladedir)"\" \
+	-DGTKBUILDERDIR=\""$(gtkbuilderdir)"\" \
 	-DG_DISABLE_DEPRECATED \
 	-DGDK_DISABLE_DEPRECATED \
 	-DGNOME_DISABLE_DEPRECATED \
@@ -29,7 +28,6 @@
 	-DVERSION=\"$(VERSION)\"
 
 libnm_vpnc_properties_la_LIBADD = \
-	$(GLADE_LIBS) \
 	$(GTK_LIBS) \
 	$(GCONF_LIBS) \
 	$(NETWORKMANAGER_LIBS) \
@@ -39,6 +37,6 @@
 libnm_vpnc_properties_la_LDFLAGS = \
         -avoid-version
 
-CLEANFILES = *.bak *.gladep *~
+CLEANFILES = *.bak *~
 
-EXTRA_DIST = $(glade_DATA)
+EXTRA_DIST = $(gtkbuilder_DATA)
Index: network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/nm-vpnc-dialog.glade
===================================================================
--- network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe.orig/properties/nm-vpnc-dialog.glade	2011-01-28 14:52:35.889904921 -0500
+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
@@ -1,391 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <widget class="GtkWindow" id="vpnc-widget">
-    <property name="title" translatable="yes">window1</property>
-    <child>
-      <widget class="GtkVBox" id="vpnc-vbox">
-        <property name="visible">True</property>
-        <property name="border_width">12</property>
-        <property name="spacing">16</property>
-        <child>
-          <widget class="GtkVBox" id="vbox8">
-            <property name="visible">True</property>
-            <property name="spacing">6</property>
-            <child>
-              <widget 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>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkAlignment" id="alignment8">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkTable" id="table2">
-                    <property name="visible">True</property>
-                    <property name="n_rows">5</property>
-                    <property name="n_columns">3</property>
-                    <property name="column_spacing">6</property>
-                    <property name="row_spacing">6</property>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <widget class="GtkComboBox" id="group_pass_type_combo">
-                        <property name="visible">True</property>
-                        <property name="items" translatable="yes"> </property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkComboBox" id="user_pass_type_combo">
-                        <property name="visible">True</property>
-                        <property name="items" translatable="yes"> </property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="right_attach">3</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="show_passwords_checkbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">Show passwords</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="group_password_entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="visibility">False</property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label4">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Gro_up password:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">group_entry</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget 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>
-                      <packing>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label24">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">G_roup name:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">group_entry</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="gateway_entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="group_entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label3">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">_User password:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">group_entry</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="user_password_entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="visibility">False</property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkVBox" id="vbox11">
-            <property name="visible">True</property>
-            <property name="spacing">6</property>
-            <child>
-              <widget class="GtkLabel" id="label25">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">&lt;b&gt;Optional&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkAlignment" id="alignment9">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkTable" id="table3">
-                    <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>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <widget class="GtkComboBox" id="encryption_combo">
-                        <property name="visible">True</property>
-                        <property name="items" translatable="yes"> </property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Encryption method:</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label26">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">User name:</property>
-                      </widget>
-                      <packing>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="user_entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label27">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Domain:</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"></property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="domain_entry">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label2">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">NAT traversal:</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkComboBox" id="natt_combo">
-                        <property name="visible">True</property>
-                        <property name="items" translatable="yes"> </property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label5">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">IKE DH Group:</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">4</property>
-                        <property name="bottom_attach">5</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkComboBox" id="dhgroup_combo">
-                        <property name="visible">True</property>
-                        <property name="items" translatable="yes"> </property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="disable_dpd_checkbutton">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">Disable Dead Peer Detection</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <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>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
Index: network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/nm-vpnc-dialog.ui
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/nm-vpnc-dialog.ui	2011-01-28 14:53:47.000000000 -0500
@@ -0,0 +1,510 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name item text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore2">
+    <columns>
+      <!-- column-name item text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore3">
+    <columns>
+      <!-- column-name item text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore4">
+    <columns>
+      <!-- column-name item text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="liststore5">
+    <columns>
+      <!-- column-name item text -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkWindow" id="vpnc-widget">
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">window1</property>
+    <child>
+      <object class="GtkVBox" id="vpnc-vbox">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="border_width">12</property>
+        <property name="spacing">16</property>
+        <child>
+          <object class="GtkVBox" id="vbox8">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="label22">
+                <property name="visible">True</property>
+                <property name="can_focus">False</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>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment8">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkTable" id="table2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="n_rows">5</property>
+                    <property name="n_columns">3</property>
+                    <property name="column_spacing">6</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <object class="GtkComboBox" id="group_pass_type_combo">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="model">liststore1</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="user_pass_type_combo">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="model">liststore2</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">2</property>
+                        <property name="right_attach">3</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="show_passwords_checkbutton">
+                        <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_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="group_password_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="visibility">False</property>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Gro_up password:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">group_entry</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label23">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</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>
+                      </object>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label24">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">G_roup name:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">group_entry</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="gateway_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="group_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_User password:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">group_entry</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="user_password_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="visibility">False</property>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkVBox" id="vbox11">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="label25">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;b&gt;Optional&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment9">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkTable" id="table3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</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>
+                      <object class="GtkComboBox" id="encryption_combo">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="model">liststore3</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext3"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Encryption method:</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label26">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">User name:</property>
+                      </object>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="user_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label27">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Domain:</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="domain_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">NAT traversal:</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="natt_combo">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="model">liststore4</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext4"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">IKE DH Group:</property>
+                      </object>
+                      <packing>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBox" id="dhgroup_combo">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="model">liststore5</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext5"/>
+                          <attributes>
+                            <attribute name="text">0</attribute>
+                          </attributes>
+                        </child>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="disable_dpd_checkbutton">
+                        <property name="label" translatable="yes">Disable Dead Peer Detection</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="draw_indicator">True</property>
+                      </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>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
Index: network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/nm-vpnc.c
===================================================================
--- network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe.orig/properties/nm-vpnc.c	2011-01-28 14:55:31.589904921 -0500
+++ network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/nm-vpnc.c	2011-01-28 15:11:30.169904922 -0500
@@ -35,7 +35,6 @@
 #include <glib/gi18n-lib.h>
 #include <string.h>
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 #include <gnome-keyring.h>
 #include <gnome-keyring-memory.h>
 
@@ -84,7 +83,7 @@
 #define VPNC_PLUGIN_UI_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VPNC_TYPE_PLUGIN_UI_WIDGET, VpncPluginUiWidgetPrivate))
 
 typedef struct {
-	GladeXML *xml;
+	GtkBuilder *xml;
 	GtkWidget *widget;
 	GtkSizeGroup *group;
 	gint orig_dpd_timeout;
@@ -137,7 +136,7 @@
 	GtkWidget *widget;
 	char *str;
 
-	widget = glade_xml_get_widget (priv->xml, "gateway_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "gateway_entry"));
 	str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 	if (!str || !strlen (str) || strstr (str, " ") || strstr (str, "\t")) {
 		g_set_error (error,
@@ -147,7 +146,7 @@
 		return FALSE;
 	}
 
-	widget = glade_xml_get_widget (priv->xml, "group_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "group_entry"));
 	str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 	if (!str || !strlen (str)) {
 		g_set_error (error,
@@ -216,7 +215,7 @@
 	}
 
 	/* User password */
-	widget = glade_xml_get_widget (priv->xml, "user_password_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_password_entry"));
 	if (!widget)
 		goto out;
 	if (password)
@@ -225,7 +224,7 @@
 	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
 
 	/* Group password */
-	widget = glade_xml_get_widget (priv->xml, "group_password_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "group_password_entry"));
 	if (!widget)
 		goto out;
 	if (group_password)
@@ -251,11 +250,11 @@
 
 	visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
 
-	widget = glade_xml_get_widget (priv->xml, "user_password_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_password_entry"));
 	g_assert (widget);
 	gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
 
-	widget = glade_xml_get_widget (priv->xml, "group_password_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "group_password_entry"));
 	g_assert (widget);
 	gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
 }
@@ -271,18 +270,18 @@
 	/* If the user chose "Not required", desensitize and clear the correct
 	 * password entry.
 	 */
-	widget = glade_xml_get_widget (priv->xml, "user_pass_type_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_pass_type_combo"));
 	if (combo == widget)
 		entry = "user_password_entry";
 	else {
-		widget = glade_xml_get_widget (priv->xml, "group_pass_type_combo");
+		widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "group_pass_type_combo"));
 		if (combo == widget)
 			entry = "group_password_entry";
 	}
 	if (!entry)
 		return;
 
-	widget = glade_xml_get_widget (priv->xml, entry);
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, entry));
 	g_assert (widget);
 
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
@@ -325,7 +324,7 @@
 	/* If there's already a password and the password type can't be found in
 	 * the VPN settings, default to saving it.  Otherwise, always ask for it.
 	 */
-	widget = glade_xml_get_widget (priv->xml, entry_name);
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, entry_name));
 	if (widget) {
 		const char *tmp;
 
@@ -359,7 +358,7 @@
 			active = 2;
 	}
 
-	widget = glade_xml_get_widget (priv->xml, combo_name);
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, combo_name));
 	g_assert (widget);
 	gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
 	g_object_unref (store);
@@ -386,7 +385,7 @@
 
 	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->xml, "gateway_entry"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
 	if (s_vpn) {
@@ -396,7 +395,7 @@
 	}
 	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
 
-	widget = glade_xml_get_widget (priv->xml, "group_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "group_entry"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
 	if (s_vpn) {
@@ -406,7 +405,7 @@
 	}
 	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
 
-	widget = glade_xml_get_widget (priv->xml, "encryption_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "encryption_combo"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
 
@@ -446,7 +445,7 @@
 	init_one_pw_combo (self, s_vpn, "group_pass_type_combo",
 	                   NM_VPNC_KEY_SECRET_TYPE, "group_password_entry");
 
-	widget = glade_xml_get_widget (priv->xml, "user_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_entry"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
 	if (s_vpn) {
@@ -456,7 +455,7 @@
 	}
 	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
 
-	widget = glade_xml_get_widget (priv->xml, "domain_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "domain_entry"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
 	if (s_vpn) {
@@ -499,7 +498,7 @@
 			active = 3;
 	}
 
-	widget = glade_xml_get_widget (priv->xml, "natt_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "natt_combo"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
 	gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
@@ -533,7 +532,7 @@
 			active = 2;
 	}
 
-	widget = glade_xml_get_widget (priv->xml, "dhgroup_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "dhgroup_combo"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget));
 	gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
@@ -542,7 +541,7 @@
 	g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self);
 
 
-	widget = glade_xml_get_widget (priv->xml, "disable_dpd_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "disable_dpd_checkbutton"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	if (s_vpn) {
 		value = nm_setting_vpn_get_data_item (s_vpn, NM_VPNC_KEY_DPD_IDLE_TIMEOUT);
@@ -560,7 +559,7 @@
 	}
 	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (stuff_changed_cb), self);
 
-	widget = glade_xml_get_widget (priv->xml, "show_passwords_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "show_passwords_checkbutton"));
 	g_return_val_if_fail (widget != NULL, FALSE);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
@@ -579,13 +578,13 @@
 }
 
 static guint32
-handle_one_pw_type (NMSettingVPN *s_vpn, GladeXML *xml, const char *name, const char *key)
+handle_one_pw_type (NMSettingVPN *s_vpn, GtkBuilder *xml, const char *name, const char *key)
 {
 	GtkWidget *widget;
 	GtkTreeModel *model;
 	guint32 pw_type;
 
-	widget = glade_xml_get_widget (xml, name);
+	widget = GTK_WIDGET (gtk_builder_get_object (xml, name));
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 
 	pw_type = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
@@ -627,28 +626,28 @@
 	g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_DBUS_SERVICE_VPNC, NULL);
 
 	/* Gateway */
-	widget = glade_xml_get_widget (priv->xml, "gateway_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "gateway_entry"));
 	str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 	if (str && strlen (str))
 		nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_GATEWAY, str);
 
 	/* Group name */
-	widget = glade_xml_get_widget (priv->xml, "group_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "group_entry"));
 	str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 	if (str && strlen (str))
 		nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_ID, str);
 
-	widget = glade_xml_get_widget (priv->xml, "user_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_entry"));
 	str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 	if (str && strlen (str))
 		nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_XAUTH_USER, str);
 
-	widget = glade_xml_get_widget (priv->xml, "domain_entry");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "domain_entry"));
 	str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 	if (str && strlen (str))
 		nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_DOMAIN, str);
 
-	widget = glade_xml_get_widget (priv->xml, "encryption_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "encryption_combo"));
 	switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) {
 	case ENC_TYPE_WEAK:
 		nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_SINGLE_DES, "yes");
@@ -661,7 +660,7 @@
 		break;
 	}
 
-	widget = glade_xml_get_widget (priv->xml, "natt_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "natt_combo"));
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 	if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
 		const char *mode = NULL;
@@ -671,7 +670,7 @@
 	} else
 		nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_NAT_TRAVERSAL_MODE, NM_VPNC_NATT_MODE_NATT);
 
-	widget = glade_xml_get_widget (priv->xml, "dhgroup_combo");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "dhgroup_combo"));
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 	if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
 		const char *dhgroup = NULL;
@@ -681,7 +680,7 @@
 	} else
 		nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_DHGROUP, NM_VPNC_DHGROUP_DH2);
 
-	widget = glade_xml_get_widget (priv->xml, "disable_dpd_checkbutton");
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "disable_dpd_checkbutton"));
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
 		nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_DPD_IDLE_TIMEOUT, "0");
 	} else {
@@ -704,13 +703,13 @@
 	 */
 	if (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM) {
 		/* User password */
-		widget = glade_xml_get_widget (priv->xml, "user_password_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "user_password_entry"));
 		str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 		if (str && strlen (str) && (upw_type != PW_TYPE_UNUSED))
 			nm_setting_vpn_add_secret (s_vpn, NM_VPNC_KEY_XAUTH_PASSWORD, str);
 
 		/* Group password */
-		widget = glade_xml_get_widget (priv->xml, "group_password_entry");
+		widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "group_password_entry"));
 		str = (char *) gtk_entry_get_text (GTK_ENTRY (widget));
 		if (str && strlen (str) && (gpw_type != PW_TYPE_UNUSED))
 			nm_setting_vpn_add_secret (s_vpn, NM_VPNC_KEY_SECRET, str);
@@ -731,7 +730,7 @@
 }
 
 static void
-save_one_password (GladeXML *xml,
+save_one_password (GtkBuilder *xml,
                    const char *keyring_tag,
                    const char *uuid,
                    const char *id,
@@ -745,11 +744,11 @@
 	GtkTreeModel *model;
 	gboolean saved = FALSE;
 
-	widget = glade_xml_get_widget (xml, combo);
+	widget = GTK_WIDGET (gtk_builder_get_object (xml, combo));
 	g_assert (widget);
 	model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
 	if (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == PW_TYPE_SAVE) {
-		widget = glade_xml_get_widget (xml, entry);
+		widget = GTK_WIDGET (gtk_builder_get_object (xml, entry));
 		g_assert (widget);
 		password = gtk_entry_get_text (GTK_ENTRY (widget));
 		if (password && strlen (password)) {
@@ -800,7 +799,7 @@
 {
 	NMVpnPluginUiWidgetInterface *object;
 	VpncPluginUiWidgetPrivate *priv;
-	char *glade_file;
+	char *gtkbuilder_file;
 
 	if (error)
 		g_return_val_if_fail (*error == NULL, NULL);
@@ -813,18 +812,18 @@
 
 	priv = VPNC_PLUGIN_UI_WIDGET_GET_PRIVATE (object);
 
-	glade_file = g_strdup_printf ("%s/%s", GLADEDIR, "nm-vpnc-dialog.glade");
-	priv->xml = glade_xml_new (glade_file, "vpnc-vbox", GETTEXT_PACKAGE);
-	if (priv->xml == NULL) {
+	gtkbuilder_file = g_strdup_printf ("%s/%s", GTKBUILDERDIR, "nm-vpnc-dialog.ui");
+	priv->xml = gtk_builder_new ();
+	if (gtk_builder_add_from_file (priv->xml, gtkbuilder_file, NULL) == 0) {
 		g_set_error (error, VPNC_PLUGIN_UI_ERROR, 0,
-		             "could not load required resources at %s", glade_file);
-		g_free (glade_file);
+		             "could not load required resources at %s", gtkbuilder_file);
+		g_free (gtkbuilder_file);
 		g_object_unref (object);
 		return NULL;
 	}
-	g_free (glade_file);
+	g_free (gtkbuilder_file);
 
-	priv->widget = glade_xml_get_widget (priv->xml, "vpnc-vbox");
+	priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->xml, "vpnc-vbox"));
 	if (!priv->widget) {
 		g_set_error (error, VPNC_PLUGIN_UI_ERROR, 0, "could not load UI widget");
 		g_object_unref (object);
Index: network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/tests/Makefile.am
===================================================================
--- network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe.orig/properties/tests/Makefile.am	2011-01-28 15:14:11.519904922 -0500
+++ network-manager-vpnc-0.8.1+git.20110127t195141.db5aafe/properties/tests/Makefile.am	2011-01-28 15:14:22.309904921 -0500
@@ -9,7 +9,6 @@
 
 test_import_export_CPPFLAGS = \
 	$(GLIB_CFLAGS) \
-	$(GLADE_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GCONF_CFLAGS) \
 	$(GNOMEKEYRING_CFLAGS) \
@@ -18,7 +17,6 @@
 
 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]