[network-manager-netbook: 1/3] Fix "Show Password" checkboxes on wireless security pages.



commit c0477bdc1fb07afc1d32d3009cd972482dc9f19a
Author: Tambet Ingo <tambet gmail com>
Date:   Fri Jul 17 11:27:43 2009 +0300

    Fix "Show Password" checkboxes on wireless security pages.
    
    Should fix a lot of different issues we had with wireless security dialogs.
    nm-applet loads the glade file once for each wireless security type/eap method,
    which takes ages on Moblin. So I tried to "optimize" it by loading the UI file
    once, sharing it's parts between all security widgets. Turns out, this doesn't
    really work because the same eap method widgets are shared, which broke a lot
    of stuff. It's solved by splitting the UI file to one per security/EAP method,
    to reduce the stuff we load.
    
    Should fix bnc #522710 and bnc #524476.

 src/wireless-dialog.c                     |   12 +-
 src/wireless-security.ui                  | 1413 +----------------------------
 src/wireless-security/Makefile.am         |   17 +-
 src/wireless-security/ca-nag-dialog.ui    |  191 ++++
 src/wireless-security/dynamic-wep.ui      |   85 ++
 src/wireless-security/eap-leap.ui         |  102 +++
 src/wireless-security/eap-method-leap.c   |   25 +-
 src/wireless-security/eap-method-leap.h   |    3 +-
 src/wireless-security/eap-method-peap.c   |   45 +-
 src/wireless-security/eap-method-peap.h   |    3 +-
 src/wireless-security/eap-method-simple.c |   26 +-
 src/wireless-security/eap-method-simple.h |    3 +-
 src/wireless-security/eap-method-tls.c    |   31 +-
 src/wireless-security/eap-method-tls.h    |    3 +-
 src/wireless-security/eap-method-ttls.c   |   47 +-
 src/wireless-security/eap-method-ttls.h   |    3 +-
 src/wireless-security/eap-method.c        |   80 ++-
 src/wireless-security/eap-method.h        |   16 +-
 src/wireless-security/eap-peap.ui         |  188 ++++
 src/wireless-security/eap-simple.ui       |  102 +++
 src/wireless-security/eap-tls.ui          |  180 ++++
 src/wireless-security/eap-ttls.ui         |  138 +++
 src/wireless-security/leap.ui             |  102 +++
 src/wireless-security/wep-key.ui          |  185 ++++
 src/wireless-security/wireless-security.c |   44 +-
 src/wireless-security/wireless-security.h |   15 +-
 src/wireless-security/wpa-eap.ui          |   85 ++
 src/wireless-security/wpa-psk.ui          |  112 +++
 src/wireless-security/ws-dynamic-wep.c    |   22 +-
 src/wireless-security/ws-dynamic-wep.h    |    3 +-
 src/wireless-security/ws-leap.c           |   25 +-
 src/wireless-security/ws-leap.h           |    3 +-
 src/wireless-security/ws-wep-key.c        |   39 +-
 src/wireless-security/ws-wep-key.h        |    3 +-
 src/wireless-security/ws-wpa-eap.c        |   22 +-
 src/wireless-security/ws-wpa-eap.h        |    3 +-
 src/wireless-security/ws-wpa-psk.c        |   25 +-
 src/wireless-security/ws-wpa-psk.h        |    3 +-
 38 files changed, 1721 insertions(+), 1683 deletions(-)
---
diff --git a/src/wireless-dialog.c b/src/wireless-dialog.c
index 5443d02..6b5788e 100644
--- a/src/wireless-dialog.c
+++ b/src/wireless-dialog.c
@@ -665,7 +665,7 @@ security_combo_init (NMAWirelessDialog *self)
            && ((!ap_wpa && !ap_rsn) || !(dev_caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN)))) {
         WirelessSecurityWEPKey *ws_wep;
 
-        ws_wep = ws_wep_key_new (priv->builder, priv->connection, WEP_KEY_TYPE_KEY, priv->adhoc_create);
+        ws_wep = ws_wep_key_new (priv->connection, WEP_KEY_TYPE_KEY, priv->adhoc_create);
         if (ws_wep) {
             add_security_item (self, WIRELESS_SECURITY (ws_wep), sec_model,
                                &iter, _("WEP 40/128-bit Key"));
@@ -674,7 +674,7 @@ security_combo_init (NMAWirelessDialog *self)
             item++;
         }
 
-        ws_wep = ws_wep_key_new (priv->builder, priv->connection, WEP_KEY_TYPE_PASSPHRASE, priv->adhoc_create);
+        ws_wep = ws_wep_key_new (priv->connection, WEP_KEY_TYPE_PASSPHRASE, priv->adhoc_create);
         if (ws_wep) {
             add_security_item (self, WIRELESS_SECURITY (ws_wep), sec_model,
                                &iter, _("WEP 128-bit Passphrase"));
@@ -691,7 +691,7 @@ security_combo_init (NMAWirelessDialog *self)
            && ((!ap_wpa && !ap_rsn) || !(dev_caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN)))) {
         WirelessSecurityLEAP *ws_leap;
 
-        ws_leap = ws_leap_new (priv->builder, priv->connection);
+        ws_leap = ws_leap_new (priv->connection);
         if (ws_leap) {
             add_security_item (self, WIRELESS_SECURITY (ws_leap), sec_model,
                                &iter, _("LEAP"));
@@ -704,7 +704,7 @@ security_combo_init (NMAWirelessDialog *self)
     if (nm_utils_security_valid (NMU_SEC_DYNAMIC_WEP, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
         WirelessSecurityDynamicWEP *ws_dynamic_wep;
 
-        ws_dynamic_wep = ws_dynamic_wep_new (priv->builder, priv->connection);
+        ws_dynamic_wep = ws_dynamic_wep_new (priv->connection);
         if (ws_dynamic_wep) {
             add_security_item (self, WIRELESS_SECURITY (ws_dynamic_wep), sec_model,
                                &iter, _("Dynamic WEP (802.1x)"));
@@ -718,7 +718,7 @@ security_combo_init (NMAWirelessDialog *self)
            || nm_utils_security_valid (NMU_SEC_WPA2_PSK, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
         WirelessSecurityWPAPSK *ws_wpa_psk;
 
-        ws_wpa_psk = ws_wpa_psk_new (priv->builder, priv->connection);
+        ws_wpa_psk = ws_wpa_psk_new (priv->connection);
         if (ws_wpa_psk) {
             add_security_item (self, WIRELESS_SECURITY (ws_wpa_psk), sec_model,
                                &iter, _("WPA & WPA2 Personal"));
@@ -732,7 +732,7 @@ security_combo_init (NMAWirelessDialog *self)
            || nm_utils_security_valid (NMU_SEC_WPA2_ENTERPRISE, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
         WirelessSecurityWPAEAP *ws_wpa_eap;
 
-        ws_wpa_eap = ws_wpa_eap_new (priv->builder, priv->connection);
+        ws_wpa_eap = ws_wpa_eap_new (priv->connection);
         if (ws_wpa_eap) {
             add_security_item (self, WIRELESS_SECURITY (ws_wpa_eap), sec_model,
                                &iter, _("WPA & WPA2 Enterprise"));
diff --git a/src/wireless-security.ui b/src/wireless-security.ui
index 5529cec..ea0b206 100644
--- a/src/wireless-security.ui
+++ b/src/wireless-security.ui
@@ -24,101 +24,6 @@
       </row>
     </data>
   </object>
-  <object class="GtkListStore" id="model3">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0">Open System</col>
-      </row>
-      <row>
-        <col id="0">Shared Key</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model4">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0">1 (Default)</col>
-      </row>
-      <row>
-        <col id="0">2</col>
-      </row>
-      <row>
-        <col id="0">3</col>
-      </row>
-      <row>
-        <col id="0">4</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model5">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0"> </col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model6">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0"> </col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model7">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0"> </col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model8">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0"> </col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkListStore" id="model9">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0">Automatic</col>
-      </row>
-      <row>
-        <col id="0">Version 0</col>
-      </row>
-      <row>
-        <col id="0">Version 1</col>
-      </row>
-    </data>
-  </object>
   <object class="GtkDialog" id="wireless_dialog">
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Other Wireless Network...</property>
@@ -335,6 +240,8 @@
                 <property name="use_stock">True</property>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
@@ -383,6 +290,8 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
@@ -400,1318 +309,4 @@
       <action-widget response="-5">ok_button</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkWindow" id="wep_key_widget">
-    <property name="title">wep_key_widget</property>
-    <child>
-      <object class="GtkNotebook" id="wep_key_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="table6">
-            <property name="visible">True</property>
-            <property name="n_rows">4</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">12</property>
-            <property name="row_spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="wep_key_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Key:</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="wep_key_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="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label31">
-                <property name="visible">True</property>
-                <property name="xalign">0</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="GtkCheckButton" id="show_checkbutton">
-                <property name="label" translatable="yes">Show key</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>
-              </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="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="auth_method_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Authentication:</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="GtkComboBox" id="auth_method_combo">
-                <property name="visible">True</property>
-                <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>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="key_index_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">WEP Index:</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="GtkComboBox" id="key_index_combo">
-                <property name="visible">True</property>
-                <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>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label23">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="leap_widget">
-    <property name="title">leap_widget</property>
-    <child>
-      <object class="GtkNotebook" id="leap_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="table5">
-            <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>
-              <object class="GtkLabel" id="leap_username_label">
-                <property name="visible">True</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="GtkLabel" id="leap_password_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Password:</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="leap_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">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
-                <property name="label" translatable="yes">Show password</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>
-              </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="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="leap_username_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>
-              <placeholder/>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="GtkLabel">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="wpa_psk_widget">
-    <property name="title">wpa_psk_widget</property>
-    <child>
-      <object class="GtkNotebook" id="wpa_psk_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="wpa_psk_table">
-            <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>
-              <object class="GtkLabel" id="wpa_psk_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Password:</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="wpa_psk_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="max_length">64</property>
-                <property name="visibility">False</property>
-                <property name="activates_default">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="wpa_psk_type_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Type:</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="GtkLabel" id="label32">
-                <property name="visible">True</property>
-                <property name="xalign">0</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="GtkCheckButton" id="show_checkbutton">
-                <property name="label" translatable="yes">Show password</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>
-              </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="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkComboBox" id="wpa_psk_type_combo">
-                <property name="visible">True</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">GTK_FILL</property>
-              </packing>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="GtkLabel">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="wpa_eap_widget">
-    <property name="title">wpa_eap_widget</property>
-    <child>
-      <object class="GtkNotebook" id="wpa_eap_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="wpa_eap_table">
-            <property name="visible">True</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">6</property>
-            <property name="row_spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="wpa_eap_auth_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Authentication:</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkComboBox" id="wpa_eap_auth_combo">
-                <property name="visible">True</property>
-                <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>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="wpa_eap_method_vbox">
-                <property name="visible">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-              </packing>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="GtkLabel">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="eap_tls_widget">
-    <property name="title">eap_tls_widget</property>
-    <child>
-      <object class="GtkNotebook" id="eap_tls_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="table8">
-            <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>
-              <object class="GtkLabel" id="eap_tls_identity_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Identity:</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="eap_tls_identity_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="eap_tls_user_cert_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">User Certificate:</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="GtkLabel" id="eap_tls_ca_cert_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">CA Certificate:</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="GtkFileChooserButton" id="eap_tls_ca_cert_button">
-                <property name="visible">True</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="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="eap_tls_private_key_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Private Key:</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="GtkFileChooserButton" id="eap_tls_private_key_button">
-                <property name="visible">True</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="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="eap_tls_private_key_password_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Private Key Password:</property>
-              </object>
-              <packing>
-                <property name="top_attach">4</property>
-                <property name="bottom_attach">5</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="eap_tls_private_key_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">4</property>
-                <property name="bottom_attach">5</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
-                <property name="label" translatable="yes">Show password</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>
-              </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="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkFileChooserButton" id="eap_tls_user_cert_button">
-                <property name="visible">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="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label34">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="eap_leap_widget">
-    <property name="title">eap_leap_widget</property>
-    <child>
-      <object class="GtkNotebook" id="eap_leap_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="table9">
-            <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>
-              <object class="GtkLabel" id="eap_leap_username_label">
-                <property name="visible">True</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="GtkLabel" id="eap_leap_password_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Password:</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="eap_leap_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">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
-                <property name="label" translatable="yes">Show password</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>
-              </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="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="eap_leap_username_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>
-              <placeholder/>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label43">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="eap_ttls_widget">
-    <property name="title">eap_ttls_widget</property>
-    <child>
-      <object class="GtkNotebook" id="eap_ttls_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="table10">
-            <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>
-              <object class="GtkLabel" id="eap_ttls_anon_identity_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Anonymous Identity:</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="eap_ttls_anon_identity_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="eap_ttls_ca_cert_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">CA Certificate:</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="GtkFileChooserButton" id="eap_ttls_ca_cert_button">
-                <property name="visible">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="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="eap_ttls_inner_auth_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Inner Authentication:</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="GtkComboBox" id="eap_ttls_inner_auth_combo">
-                <property name="visible">True</property>
-                <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>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="eap_ttls_inner_auth_vbox">
-                <property name="visible">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="right_attach">2</property>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-                <property name="x_options">GTK_FILL</property>
-              </packing>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label49">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="eap_simple_widget">
-    <property name="title">eap_simple_widget</property>
-    <child>
-      <object class="GtkNotebook" id="eap_simple_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="table11">
-            <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>
-              <object class="GtkLabel" id="eap_simple_username_label">
-                <property name="visible">True</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="GtkLabel" id="eap_simple_password_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Password:</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="eap_simple_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">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
-                <property name="label" translatable="yes">Show password</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>
-              </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="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="eap_simple_username_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>
-              <placeholder/>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label53">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkWindow" id="dynamic_wep_widget">
-    <property name="title">dynamic_wep_widget</property>
-    <child>
-      <object class="GtkNotebook" id="dynamic_wep_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="table12">
-            <property name="visible">True</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">6</property>
-            <property name="row_spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="dynamic_wep_auth_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Authentication:</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkComboBox" id="dynamic_wep_auth_combo">
-                <property name="visible">True</property>
-                <property name="model">model7</property>
-                <child>
-                  <object class="GtkCellRendererText" id="renderer7"/>
-                  <attributes>
-                    <attribute name="text">0</attribute>
-                  </attributes>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="dynamic_wep_method_vbox">
-                <property name="visible">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-              </packing>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label55">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-  <object class="GtkDialog" id="nag_user_dialog">
-    <property name="border_width">6</property>
-    <property name="modal">True</property>
-    <property name="window_position">center</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox2">
-        <property name="visible">True</property>
-        <property name="spacing">12</property>
-        <child>
-          <object class="GtkHBox" id="hbox5">
-            <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <property name="spacing">12</property>
-            <child>
-              <object class="GtkImage" id="image4">
-                <property name="visible">True</property>
-                <property name="yalign">0</property>
-                <property name="stock">gtk-dialog-warning</property>
-                <property name="icon-size">6</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="content_vbox">
-                <property name="visible">True</property>
-                <property name="spacing">12</property>
-                <child>
-                  <object class="GtkLabel" id="content_label">
-                    <property name="visible">True</property>
-                    <property name="yalign">0</property>
-                    <property name="label" translatable="yes">alert text</property>
-                    <property name="use_markup">True</property>
-                    <property name="wrap">True</property>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkCheckButton" id="ignore_checkbox">
-                    <property name="label" translatable="yes">Don't warn me again</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>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area2">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="ignore_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <child>
-                  <object class="GtkAlignment" id="alignment3">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <object class="GtkHBox" id="hbox4">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <object class="GtkImage" id="image3">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-no</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label57">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">No</property>
-                            <property name="use_underline">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="change_button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <child>
-                  <object class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="xscale">0</property>
-                    <property name="yscale">0</property>
-                    <child>
-                      <object class="GtkHBox" id="hbox3">
-                        <property name="visible">True</property>
-                        <property name="spacing">2</property>
-                        <child>
-                          <object class="GtkImage" id="image2">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-ok</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label56">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Yes</property>
-                            <property name="use_underline">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="-9">ignore_button</action-widget>
-      <action-widget response="-8">change_button</action-widget>
-    </action-widgets>
-  </object>
-  <object class="GtkWindow" id="eap_peap_widget">
-    <property name="title">eap_peap_widget</property>
-    <child>
-      <object class="GtkNotebook" id="eap_peap_notebook">
-        <property name="visible">True</property>
-        <property name="show_tabs">False</property>
-        <property name="show_border">False</property>
-        <child>
-          <object class="GtkTable" id="table13">
-            <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>
-              <object class="GtkLabel" id="eap_peap_anon_identity_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Anonymous Identity:</property>
-              </object>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="eap_peap_anon_identity_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="eap_peap_ca_cert_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">CA Certificate:</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="GtkFileChooserButton" id="eap_peap_ca_cert_button">
-                <property name="visible">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="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkVBox" id="eap_peap_inner_auth_vbox">
-                <property name="visible">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="right_attach">2</property>
-                <property name="top_attach">4</property>
-                <property name="bottom_attach">5</property>
-                <property name="x_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="eap_peap_inner_auth_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Inner Authentication:</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="GtkComboBox" id="eap_peap_inner_auth_combo">
-                <property name="visible">True</property>
-                <property name="model">model8</property>
-                <child>
-                  <object class="GtkCellRendererText" id="renderer8"/>
-                  <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>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="eap_peap_version_label">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">PEAP Version:</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="GtkComboBox" id="eap_peap_version_combo">
-                <property name="visible">True</property>
-                <property name="model">model9</property>
-                <child>
-                  <object class="GtkCellRendererText" id="renderer9"/>
-                  <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>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-          </object>
-        </child>
-        <child type="tab">
-          <object class="GtkLabel" id="label61">
-            <property name="visible">True</property>
-          </object>
-          <packing>
-            <property name="tab_fill">False</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
 </interface>
diff --git a/src/wireless-security/Makefile.am b/src/wireless-security/Makefile.am
index 129c055..cc9fdd4 100644
--- a/src/wireless-security/Makefile.am
+++ b/src/wireless-security/Makefile.am
@@ -32,9 +32,24 @@ libwireless_security_la_SOURCES = \
 
 libwireless_security_la_CPPFLAGS = \
 	$(NMN_CFLAGS) \
-	-I${top_srcdir}/src/gconf-helpers
+	-I${top_srcdir}/src/gconf-helpers \
+	-DUIDIR=\""$(uidir)"\"
 
 libwireless_security_la_LIBADD = \
 	$(NMN_LIBS) \
 	${top_builddir}/src/gconf-helpers/libgconf-helpers.la
 
+uidir = $(datadir)/network-manager-netbook
+ui_DATA = \
+	dynamic-wep.ui \
+	eap-leap.ui \
+	eap-peap.ui \
+	eap-simple.ui \
+	eap-tls.ui \
+	eap-ttls.ui \
+	leap.ui \
+	wep-key.ui \
+	wpa-eap.ui \
+	wpa-psk.ui
+
+EXTRA_DIST = $(ui_DATA)
diff --git a/src/wireless-security/ca-nag-dialog.ui b/src/wireless-security/ca-nag-dialog.ui
new file mode 100644
index 0000000..56d5fd9
--- /dev/null
+++ b/src/wireless-security/ca-nag-dialog.ui
@@ -0,0 +1,191 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="nag_user_dialog">
+    <property name="border_width">6</property>
+    <property name="modal">True</property>
+    <property name="window_position">center</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox2">
+        <property name="visible">True</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkHBox" id="hbox5">
+            <property name="visible">True</property>
+            <property name="border_width">6</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkImage" id="image4">
+                <property name="visible">True</property>
+                <property name="yalign">0</property>
+                <property name="stock">gtk-dialog-warning</property>
+                <property name="icon-size">6</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="content_vbox">
+                <property name="visible">True</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="content_label">
+                    <property name="visible">True</property>
+                    <property name="yalign">0</property>
+                    <property name="label" translatable="yes">&lt;span weight="bold" size="larger"&gt;No Certificate Authority certificate chosen&lt;/span&gt;
+
+Not using a Certificate Authority (CA) certificate can result in connections to insecure, rogue wireless networks.  Would you like to choose a Certificate Authority certificate?</property>
+                    <property name="use_markup">True</property>
+                    <property name="wrap">True</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="ignore_checkbox">
+                    <property name="label" translatable="yes">Don't warn me again</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>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ignore_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment3">
+                    <property name="visible">True</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkHBox" id="hbox4">
+                        <property name="visible">True</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <object class="GtkImage" id="image3">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-no</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label57">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Ignore</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="change_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkHBox" id="hbox3">
+                        <property name="visible">True</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <object class="GtkImage" id="image2">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-ok</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label56">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Choose CA Certificate</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-9">ignore_button</action-widget>
+      <action-widget response="-8">change_button</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/src/wireless-security/dynamic-wep.ui b/src/wireless-security/dynamic-wep.ui
new file mode 100644
index 0000000..220fcb1
--- /dev/null
+++ b/src/wireless-security/dynamic-wep.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkListStore" id="model7">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkWindow" id="dynamic_wep_widget">
+    <property name="title">dynamic_wep_widget</property>
+    <child>
+      <object class="GtkNotebook" id="dynamic_wep_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="table12">
+            <property name="visible">True</property>
+            <property name="n_rows">2</property>
+            <property name="n_columns">2</property>
+            <property name="column_spacing">6</property>
+            <property name="row_spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="dynamic_wep_auth_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Authentication:</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBox" id="dynamic_wep_auth_combo">
+                <property name="visible">True</property>
+                <property name="model">model7</property>
+                <child>
+                  <object class="GtkCellRendererText" id="renderer7"/>
+                  <attributes>
+                    <attribute name="text">0</attribute>
+                  </attributes>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="dynamic_wep_method_vbox">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_FILL</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label55">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/eap-leap.ui b/src/wireless-security/eap-leap.ui
new file mode 100644
index 0000000..b4d44e3
--- /dev/null
+++ b/src/wireless-security/eap-leap.ui
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkWindow" id="eap_leap_widget">
+    <property name="title">eap_leap_widget</property>
+    <child>
+      <object class="GtkNotebook" id="eap_leap_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="table9">
+            <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>
+              <object class="GtkLabel" id="eap_leap_username_label">
+                <property name="visible">True</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="GtkLabel" id="eap_leap_password_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Password:</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="eap_leap_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">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="eap_leap_show_checkbutton">
+                <property name="label" translatable="yes">Show password</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>
+              </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="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="eap_leap_username_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>
+              <placeholder/>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label43">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/eap-method-leap.c b/src/wireless-security/eap-method-leap.c
index 1f2b3e1..b951160 100644
--- a/src/wireless-security/eap-method-leap.c
+++ b/src/wireless-security/eap-method-leap.c
@@ -105,27 +105,22 @@ fill_connection (EAPMethod *parent, NMConnection *connection)
 }
 
 EAPMethodLEAP *
-eap_method_leap_new (GtkBuilder *builder,
-                     WirelessSecurity *parent,
+eap_method_leap_new (WirelessSecurity *parent,
                      NMConnection *connection)
 {
 	EAPMethodLEAP *method;
 	GtkWidget *widget;
+	GtkBuilder *builder;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
+	method = g_slice_new0 (EAPMethodLEAP);
+	if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+			      fill_connection, destroy, "eap-leap.ui", "eap_leap_notebook")) {
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_leap_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
+	  g_slice_free (EAPMethodLEAP, method);
+	  return NULL;
+	}
 
-	method = g_slice_new0 (EAPMethodLEAP);
-	eap_method_init (EAP_METHOD (method),
-	                 validate,
-	                 add_to_size_group,
-	                 fill_connection,
-	                 destroy,
-	                 builder,
-	                 widget);
+	builder = EAP_METHOD (method)->builder;
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_leap_username_entry"));
 	g_assert (widget);
@@ -156,7 +151,7 @@ eap_method_leap_new (GtkBuilder *builder,
 		                          NM_SETTING_802_1X_PASSWORD);
 	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_leap_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/eap-method-leap.h b/src/wireless-security/eap-method-leap.h
index 4cdf923..12f4354 100644
--- a/src/wireless-security/eap-method-leap.h
+++ b/src/wireless-security/eap-method-leap.h
@@ -29,8 +29,7 @@ typedef struct {
 
 } EAPMethodLEAP;
 
-EAPMethodLEAP * eap_method_leap_new (GtkBuilder *builder,
-                                     WirelessSecurity *parent,
+EAPMethodLEAP * eap_method_leap_new (WirelessSecurity *parent,
                                      NMConnection *connection);
 
 #endif /* EAP_METHOD_LEAP_H */
diff --git a/src/wireless-security/eap-method-peap.c b/src/wireless-security/eap-method-peap.c
index 7a3fd6a..7d3b1e9 100644
--- a/src/wireless-security/eap-method-peap.c
+++ b/src/wireless-security/eap-method-peap.c
@@ -211,7 +211,6 @@ inner_auth_combo_changed_cb (GtkWidget *combo, gpointer user_data)
 
 static GtkWidget *
 inner_auth_combo_init (EAPMethodPEAP *method,
-                       GtkBuilder *builder,
                        NMConnection *connection)
 {
 	GtkWidget *combo;
@@ -222,8 +221,7 @@ inner_auth_combo_init (EAPMethodPEAP *method,
 
 	auth_model = gtk_list_store_new (2, G_TYPE_STRING, eap_method_get_g_type ());
 
-	em_mschap_v2 = eap_method_simple_new (builder,
-	                                      method->sec_parent,
+	em_mschap_v2 = eap_method_simple_new (method->sec_parent,
 	                                      connection,
 	                                      EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2);
 	gtk_list_store_append (auth_model, &iter);
@@ -233,10 +231,9 @@ inner_auth_combo_init (EAPMethodPEAP *method,
 	                    -1);
 	eap_method_unref (EAP_METHOD (em_mschap_v2));
 
-	em_md5 = eap_method_simple_new (builder,
-	                                 method->sec_parent,
-	                                 connection,
-	                                 EAP_METHOD_SIMPLE_TYPE_MD5);
+	em_md5 = eap_method_simple_new (method->sec_parent,
+					connection,
+					EAP_METHOD_SIMPLE_TYPE_MD5);
 	gtk_list_store_append (auth_model, &iter);
 	gtk_list_store_set (auth_model, &iter,
 	                    I_NAME_COLUMN, _("MD5"),
@@ -244,7 +241,8 @@ inner_auth_combo_init (EAPMethodPEAP *method,
 	                    -1);
 	eap_method_unref (EAP_METHOD (em_md5));
 
-	combo = GTK_WIDGET (gtk_builder_get_object (builder, "eap_peap_inner_auth_combo"));
+	combo = GTK_WIDGET (gtk_builder_get_object (EAP_METHOD (method)->builder,
+						    "eap_peap_inner_auth_combo"));
 	g_assert (combo);
 
 	gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (auth_model));
@@ -258,35 +256,26 @@ inner_auth_combo_init (EAPMethodPEAP *method,
 }
 
 EAPMethodPEAP *
-eap_method_peap_new (GtkBuilder *builder,
-                     WirelessSecurity *parent,
+eap_method_peap_new (WirelessSecurity *parent,
                      NMConnection *connection)
 {
 	EAPMethodPEAP *method;
+	GtkBuilder *builder;
 	GtkWidget *widget;
 	GtkFileFilter *filter;
 	NMSetting8021x *s_8021x = NULL;
 	const char *filename;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
+	method = g_slice_new0 (EAPMethodPEAP);
+	if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+			      fill_connection, destroy, "eap-peap.ui", "eap_peap_notebook")) {
+	  g_slice_free (EAPMethodPEAP, method);
+	  return NULL;
+	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_peap_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
+	builder = EAP_METHOD (method)->builder;
 
-	method = g_slice_new0 (EAPMethodPEAP);
-	eap_method_init (EAP_METHOD (method),
-	                 validate,
-	                 add_to_size_group,
-	                 fill_connection,
-	                 destroy,
-	                 builder,
-	                 widget);
-
-	eap_method_nag_init (EAP_METHOD (method),
-	                     builder,
-	                     "eap_peap_ca_cert_button",
-	                     connection);
+	eap_method_nag_init (EAP_METHOD (method), "ca-nag-dialog.ui", "eap_peap_ca_cert_button", connection);
 
 	method->sec_parent = parent;
 
@@ -309,7 +298,7 @@ eap_method_peap_new (GtkBuilder *builder,
 			gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), filename);
 	}
 
-	widget = inner_auth_combo_init (method, builder, connection);
+	widget = inner_auth_combo_init (method, connection);
 	inner_auth_combo_changed_cb (widget, (gpointer) method);
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_peap_version_combo"));
diff --git a/src/wireless-security/eap-method-peap.h b/src/wireless-security/eap-method-peap.h
index d66354c..bb30e3a 100644
--- a/src/wireless-security/eap-method-peap.h
+++ b/src/wireless-security/eap-method-peap.h
@@ -31,8 +31,7 @@ typedef struct {
 	WirelessSecurity *sec_parent;
 } EAPMethodPEAP;
 
-EAPMethodPEAP * eap_method_peap_new (GtkBuilder *builder,
-                                     WirelessSecurity *parent,
+EAPMethodPEAP * eap_method_peap_new (WirelessSecurity *parent,
                                      NMConnection *connection);
 
 #endif /* EAP_METHOD_PEAP_H */
diff --git a/src/wireless-security/eap-method-simple.c b/src/wireless-security/eap-method-simple.c
index 022cbe8..e00e7a8 100644
--- a/src/wireless-security/eap-method-simple.c
+++ b/src/wireless-security/eap-method-simple.c
@@ -125,28 +125,22 @@ fill_connection (EAPMethod *parent, NMConnection *connection)
 }
 
 EAPMethodSimple *
-eap_method_simple_new (GtkBuilder *builder,
-                       WirelessSecurity *parent,
+eap_method_simple_new (WirelessSecurity *parent,
                        NMConnection *connection,
                        EAPMethodSimpleType type)
 {
 	EAPMethodSimple *method;
+	GtkBuilder *builder;
 	GtkWidget *widget;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
-
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_simple_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
-
 	method = g_slice_new0 (EAPMethodSimple);
-	eap_method_init (EAP_METHOD (method),
-	                 validate,
-	                 add_to_size_group,
-	                 fill_connection,
-	                 destroy,
-	                 builder,
-	                 widget);
+	if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group, 
+			      fill_connection, destroy, "eap-simple.ui", "eap_simple_notebook")) {
+	  g_slice_free (EAPMethodSimple, method);
+	  return NULL;
+	}
+
+	builder = EAP_METHOD (method)->builder;
 
 	method->type = type;
 
@@ -179,7 +173,7 @@ eap_method_simple_new (GtkBuilder *builder,
 		                          NM_SETTING_802_1X_PASSWORD);
 	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_simple_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/eap-method-simple.h b/src/wireless-security/eap-method-simple.h
index 648bb5c..a4735b3 100644
--- a/src/wireless-security/eap-method-simple.h
+++ b/src/wireless-security/eap-method-simple.h
@@ -38,8 +38,7 @@ typedef struct {
 	EAPMethodSimpleType type;
 } EAPMethodSimple;
 
-EAPMethodSimple * eap_method_simple_new (GtkBuilder *builder,
-                                         WirelessSecurity *parent,
+EAPMethodSimple * eap_method_simple_new (WirelessSecurity *parent,
                                          NMConnection *connection,
                                          EAPMethodSimpleType type);
 
diff --git a/src/wireless-security/eap-method-tls.c b/src/wireless-security/eap-method-tls.c
index c303547..62448c9 100644
--- a/src/wireless-security/eap-method-tls.c
+++ b/src/wireless-security/eap-method-tls.c
@@ -334,34 +334,25 @@ setup_filepicker (GtkBuilder *builder,
 }
 
 EAPMethodTLS *
-eap_method_tls_new (GtkBuilder *builder,
-                    WirelessSecurity *parent,
+eap_method_tls_new (WirelessSecurity *parent,
                     NMConnection *connection,
                     gboolean phase2)
 {
 	EAPMethodTLS *method;
+	GtkBuilder *builder;
 	GtkWidget *widget;
 	NMSetting8021x *s_8021x = NULL;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
+	method = g_slice_new0 (EAPMethodTLS);
+	if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+					  fill_connection, destroy, "eap-tls.ui", "eap_tls_notebook")) {
+		g_slice_free (EAPMethodTLS, method);
+		return NULL;
+	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_tls_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
+	builder = EAP_METHOD (method)->builder;
 
-	method = g_slice_new0 (EAPMethodTLS);
-	eap_method_init (EAP_METHOD (method),
-	                 validate,
-	                 add_to_size_group,
-	                 fill_connection,
-	                 destroy,
-	                 builder,
-	                 widget);
-
-	eap_method_nag_init (EAP_METHOD (method),
-	                     builder,
-	                     "eap_tls_ca_cert_button",
-	                     connection);
+	eap_method_nag_init (EAP_METHOD (method), "ca-nag-dialog.ui", "eap_tls_ca_cert_button", connection);
 
 	method->phase2 = phase2;
 
@@ -409,7 +400,7 @@ eap_method_tls_new (GtkBuilder *builder,
 	                  parent, method, connection,
 	                  phase2 ? NMA_PATH_PHASE2_PRIVATE_KEY_TAG : NMA_PATH_PRIVATE_KEY_TAG);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_tls_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/eap-method-tls.h b/src/wireless-security/eap-method-tls.h
index d8e78b2..5db7c30 100644
--- a/src/wireless-security/eap-method-tls.h
+++ b/src/wireless-security/eap-method-tls.h
@@ -30,8 +30,7 @@ typedef struct {
 	gboolean phase2;
 } EAPMethodTLS;
 
-EAPMethodTLS * eap_method_tls_new (GtkBuilder *builder,
-                                   WirelessSecurity *parent,
+EAPMethodTLS * eap_method_tls_new (WirelessSecurity *parent,
                                    NMConnection *connection,
                                    gboolean phase2);
 
diff --git a/src/wireless-security/eap-method-ttls.c b/src/wireless-security/eap-method-ttls.c
index eff3085..1852fe9 100644
--- a/src/wireless-security/eap-method-ttls.c
+++ b/src/wireless-security/eap-method-ttls.c
@@ -193,7 +193,6 @@ inner_auth_combo_changed_cb (GtkWidget *combo, gpointer user_data)
 
 static GtkWidget *
 inner_auth_combo_init (EAPMethodTTLS *method,
-                       GtkBuilder *builder,
                        NMConnection *connection,
                        NMSetting8021x *s_8021x)
 {
@@ -216,8 +215,7 @@ inner_auth_combo_init (EAPMethodTTLS *method,
 			phase2_auth = nm_setting_802_1x_get_phase2_autheap (s_8021x);
 	}
 
-	em_pap = eap_method_simple_new (builder,
-	                                method->sec_parent,
+	em_pap = eap_method_simple_new (method->sec_parent,
 	                                connection,
 	                                EAP_METHOD_SIMPLE_TYPE_PAP);
 	gtk_list_store_append (auth_model, &iter);
@@ -231,8 +229,7 @@ inner_auth_combo_init (EAPMethodTTLS *method,
 	if (phase2_auth && !strcasecmp (phase2_auth, "pap"))
 		active = 0;
 
-	em_mschap = eap_method_simple_new (builder,
-	                                   method->sec_parent,
+	em_mschap = eap_method_simple_new (method->sec_parent,
 	                                   connection,
 	                                   EAP_METHOD_SIMPLE_TYPE_MSCHAP);
 	gtk_list_store_append (auth_model, &iter);
@@ -246,8 +243,7 @@ inner_auth_combo_init (EAPMethodTTLS *method,
 	if (phase2_auth && !strcasecmp (phase2_auth, "mschap"))
 		active = 1;
 
-	em_mschap_v2 = eap_method_simple_new (builder,
-	                                      method->sec_parent,
+	em_mschap_v2 = eap_method_simple_new (method->sec_parent,
 	                                      connection,
 	                                      EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2);
 	gtk_list_store_append (auth_model, &iter);
@@ -261,8 +257,7 @@ inner_auth_combo_init (EAPMethodTTLS *method,
 	if (phase2_auth && !strcasecmp (phase2_auth, "mschapv2"))
 		active = 2;
 
-	em_chap = eap_method_simple_new (builder,
-	                                 method->sec_parent,
+	em_chap = eap_method_simple_new (method->sec_parent,
 	                                 connection,
 	                                 EAP_METHOD_SIMPLE_TYPE_CHAP);
 	gtk_list_store_append (auth_model, &iter);
@@ -276,7 +271,8 @@ inner_auth_combo_init (EAPMethodTTLS *method,
 	if (phase2_auth && !strcasecmp (phase2_auth, "chap"))
 		active = 4;
 
-	combo = GTK_WIDGET (gtk_builder_get_object (builder, "eap_ttls_inner_auth_combo"));
+	combo = GTK_WIDGET (gtk_builder_get_object (EAP_METHOD (method)->builder,
+						    "eap_ttls_inner_auth_combo"));
 	g_assert (combo);
 
 	gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (auth_model));
@@ -290,35 +286,26 @@ inner_auth_combo_init (EAPMethodTTLS *method,
 }
 
 EAPMethodTTLS *
-eap_method_ttls_new (GtkBuilder *builder,
-                     WirelessSecurity *parent,
+eap_method_ttls_new (WirelessSecurity *parent,
                      NMConnection *connection)
 {
 	EAPMethodTTLS *method;
+	GtkBuilder *builder;
 	GtkWidget *widget;
 	GtkFileFilter *filter;
 	NMSetting8021x *s_8021x = NULL;
 	const char *filename;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
+	method = g_slice_new0 (EAPMethodTTLS);
+	if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+			      fill_connection, destroy, "eap-ttls.ui", "eap_ttls_notebook")) {
+	  g_slice_free (EAPMethodTTLS, method);
+	  return NULL;
+	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_ttls_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
+	builder = EAP_METHOD (method)->builder;
 
-	method = g_slice_new0 (EAPMethodTTLS);
-	eap_method_init (EAP_METHOD (method),
-	                 validate,
-	                 add_to_size_group,
-	                 fill_connection,
-	                 destroy,
-	                 builder,
-	                 widget);
-
-	eap_method_nag_init (EAP_METHOD (method),
-	                     builder,
-	                     "eap_ttls_ca_cert_button",
-	                     connection);
+	eap_method_nag_init (EAP_METHOD (method), "ca-nag-dialog.ui", "eap_ttls_ca_cert_button", connection);
 
 	method->sec_parent = parent;
 
@@ -348,7 +335,7 @@ eap_method_ttls_new (GtkBuilder *builder,
 	                  (GCallback) wireless_security_changed_cb,
 	                  parent);
 
-	widget = inner_auth_combo_init (method, builder, connection, s_8021x);
+	widget = inner_auth_combo_init (method, connection, s_8021x);
 	inner_auth_combo_changed_cb (widget, (gpointer) method);
 
 	return method;
diff --git a/src/wireless-security/eap-method-ttls.h b/src/wireless-security/eap-method-ttls.h
index 07d52fd..950e445 100644
--- a/src/wireless-security/eap-method-ttls.h
+++ b/src/wireless-security/eap-method-ttls.h
@@ -31,8 +31,7 @@ typedef struct {
 	WirelessSecurity *sec_parent;
 } EAPMethodTTLS;
 
-EAPMethodTTLS * eap_method_ttls_new (GtkBuilder *builder,
-                                     WirelessSecurity *parent,
+EAPMethodTTLS * eap_method_ttls_new (WirelessSecurity *parent,
                                      NMConnection *connection);
 
 #endif /* EAP_METHOD_TLS_H */
diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c
index b21dadc..6339f59 100644
--- a/src/wireless-security/eap-method.c
+++ b/src/wireless-security/eap-method.c
@@ -137,17 +137,33 @@ eap_method_nag_user (EAPMethod *method)
 
 gboolean
 eap_method_nag_init (EAPMethod *method,
-                     GtkBuilder *builder,
+				 const char *ui_file,
                      const char *ca_cert_chooser,
                      NMConnection *connection)
 {
-	GtkWidget *dialog, *widget;
-	char *text;
+	GtkWidget *dialog;
+	char *path;
+	GError *error = NULL;
 
 	g_return_val_if_fail (method != NULL, FALSE);
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), FALSE);
+	g_return_val_if_fail (ui_file != NULL, FALSE);
 	g_return_val_if_fail (ca_cert_chooser != NULL, FALSE);
 
+	path = g_build_filename (UIDIR, ui_file, NULL);
+	if (!gtk_builder_add_from_file (method->builder, path, &error)) {
+		if (error) {
+			g_warning ("Couldn't load '%s': %s", path, error->message);
+			g_error_free (error);
+		} else
+			g_warning ("Couldn't load '%s'", path);
+
+		g_free (path);
+
+		return FALSE;
+	}
+
+	g_free (path);
+
 	method->ca_cert_chooser = g_strdup (ca_cert_chooser);
 	if (connection)
 		method->ignore_ca_cert = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (connection), NMA_CA_CERT_IGNORE_TAG));
@@ -156,23 +172,6 @@ eap_method_nag_init (EAPMethod *method,
 	g_assert (dialog);
 	g_signal_connect (dialog, "response", G_CALLBACK (nag_dialog_response_cb), method);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (method->builder, "content_label"));
-	g_assert (widget);
-
-	text = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
-	                        _("No Certificate Authority certificate chosen"),
-	                        _("Not using a Certificate Authority (CA) certificate can result in connections to insecure, rogue wireless networks.  Would you like to choose a Certificate Authority certificate?"));
-	gtk_label_set_markup (GTK_LABEL (widget), text);
-	g_free (text);
-
-	widget = GTK_WIDGET (gtk_builder_get_object (method->builder, "ignore_button"));
-	gtk_button_set_label (GTK_BUTTON (widget), _("Ignore"));
-	g_assert (widget);
-
-	widget = GTK_WIDGET (gtk_builder_get_object (method->builder, "change_button"));
-	gtk_button_set_label (GTK_BUTTON (widget), _("Choose CA Certificate"));
-	g_assert (widget);
-
 	method->nag_dialog = dialog;
 	return TRUE;
 }
@@ -185,24 +184,49 @@ eap_method_get_ignore_ca_cert (EAPMethod *method)
 	return method->ignore_ca_cert;
 }
 
-void
+gboolean
 eap_method_init (EAPMethod *method,
                  EMValidateFunc validate,
                  EMAddToSizeGroupFunc add_to_size_group,
                  EMFillConnectionFunc fill_connection,
                  EMDestroyFunc destroy,
-                 GtkBuilder *builder,
-                 GtkWidget *ui_widget)
-{                 
-	method->refcount = 1;
+                 const char *ui_file,
+			  const char *ui_widget)
+{
+	char *path;
+	GtkBuilder *builder;
+	GError *error = NULL;
+
+	builder = gtk_builder_new ();
+
+	path = g_build_filename (UIDIR, ui_file, NULL);
+	if (!gtk_builder_add_from_file (builder, path, &error)) {
+		if (error) {
+			g_warning ("Couldn't load '%s': %s", path, error->message);
+			g_error_free (error);
+		} else
+			g_warning ("Couldn't load '%s'", path);
+
+		g_free (path);
+		g_object_unref (builder);
 
+		return FALSE;
+	}
+
+	g_free (path);
+
+	method->builder = builder;
+	method->refcount = 1;
 	method->validate = validate;
 	method->add_to_size_group = add_to_size_group;
 	method->fill_connection = fill_connection;
 	method->destroy = destroy;
 
-	method->builder = g_object_ref (builder);
-	method->ui_widget = ui_widget;
+	method->ui_widget = GTK_WIDGET (gtk_builder_get_object (builder, ui_widget));
+	g_assert (method->ui_widget);
+	g_object_ref_sink (method->ui_widget);
+
+	return TRUE;
 }
 
 
diff --git a/src/wireless-security/eap-method.h b/src/wireless-security/eap-method.h
index 16845e5..3ebb5ac 100644
--- a/src/wireless-security/eap-method.h
+++ b/src/wireless-security/eap-method.h
@@ -78,13 +78,13 @@ GType eap_method_get_g_type (void);
 #include "eap-method-peap.h"
 #include "eap-method-simple.h"
 
-void eap_method_init (EAPMethod *method,
-                      EMValidateFunc validate,
-                      EMAddToSizeGroupFunc add_to_size_group,
-                      EMFillConnectionFunc fill_connection,
-                      EMDestroyFunc destroy,
-                      GtkBuilder *builder,
-                      GtkWidget *ui_widget);
+gboolean eap_method_init (EAPMethod *method,
+			  EMValidateFunc validate,
+			  EMAddToSizeGroupFunc add_to_size_group,
+			  EMFillConnectionFunc fill_connection,
+			  EMDestroyFunc destroy,
+			  const char *ui_file,
+			  const char *ui_widget);
 
 GtkFileFilter * eap_method_default_file_chooser_filter_new (gboolean privkey);
 
@@ -99,7 +99,7 @@ gboolean eap_method_validate_filepicker (GtkBuilder *builder,
                                          NMSetting8021xCKType *out_ck_type);
 
 gboolean eap_method_nag_init (EAPMethod *method,
-                              GtkBuilder *builder,
+			      const char *ui_file,
                               const char *ca_cert_chooser,
                               NMConnection *connection);
 
diff --git a/src/wireless-security/eap-peap.ui b/src/wireless-security/eap-peap.ui
new file mode 100644
index 0000000..ff8b703
--- /dev/null
+++ b/src/wireless-security/eap-peap.ui
@@ -0,0 +1,188 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkListStore" id="model8">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model9">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">Automatic</col>
+      </row>
+      <row>
+        <col id="0">Version 0</col>
+      </row>
+      <row>
+        <col id="0">Version 1</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkWindow" id="eap_peap_widget">
+    <property name="title">eap_peap_widget</property>
+    <child>
+      <object class="GtkNotebook" id="eap_peap_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="table13">
+            <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>
+              <object class="GtkLabel" id="eap_peap_anon_identity_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Anonymous Identity:</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="eap_peap_anon_identity_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="eap_peap_ca_cert_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">CA Certificate:</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="GtkFileChooserButton" id="eap_peap_ca_cert_button">
+                <property name="visible">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="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="eap_peap_inner_auth_vbox">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">2</property>
+                <property name="top_attach">4</property>
+                <property name="bottom_attach">5</property>
+                <property name="x_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="eap_peap_inner_auth_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Inner Authentication:</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="GtkComboBox" id="eap_peap_inner_auth_combo">
+                <property name="visible">True</property>
+                <property name="model">model8</property>
+                <child>
+                  <object class="GtkCellRendererText" id="renderer8"/>
+                  <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>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="eap_peap_version_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">PEAP Version:</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="GtkComboBox" id="eap_peap_version_combo">
+                <property name="visible">True</property>
+                <property name="model">model9</property>
+                <child>
+                  <object class="GtkCellRendererText" id="renderer9"/>
+                  <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>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label61">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/eap-simple.ui b/src/wireless-security/eap-simple.ui
new file mode 100644
index 0000000..1336380
--- /dev/null
+++ b/src/wireless-security/eap-simple.ui
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkWindow" id="eap_simple_widget">
+    <property name="title">eap_simple_widget</property>
+    <child>
+      <object class="GtkNotebook" id="eap_simple_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="table11">
+            <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>
+              <object class="GtkLabel" id="eap_simple_username_label">
+                <property name="visible">True</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="GtkLabel" id="eap_simple_password_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Password:</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="eap_simple_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">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="eap_simple_show_checkbutton">
+                <property name="label" translatable="yes">Show password</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>
+              </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="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="eap_simple_username_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>
+              <placeholder/>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label53">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/eap-tls.ui b/src/wireless-security/eap-tls.ui
new file mode 100644
index 0000000..df63483
--- /dev/null
+++ b/src/wireless-security/eap-tls.ui
@@ -0,0 +1,180 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkWindow" id="eap_tls_widget">
+    <property name="title">eap_tls_widget</property>
+    <child>
+      <object class="GtkNotebook" id="eap_tls_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="table8">
+            <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>
+              <object class="GtkLabel" id="eap_tls_identity_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Identity:</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="eap_tls_identity_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="eap_tls_user_cert_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">User Certificate:</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="GtkLabel" id="eap_tls_ca_cert_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">CA Certificate:</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="GtkFileChooserButton" id="eap_tls_ca_cert_button">
+                <property name="visible">True</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="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="eap_tls_private_key_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Private Key:</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="GtkFileChooserButton" id="eap_tls_private_key_button">
+                <property name="visible">True</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="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="eap_tls_private_key_password_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Private Key Password:</property>
+              </object>
+              <packing>
+                <property name="top_attach">4</property>
+                <property name="bottom_attach">5</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="eap_tls_private_key_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">4</property>
+                <property name="bottom_attach">5</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="eap_tls_show_checkbutton">
+                <property name="label" translatable="yes">Show password</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>
+              </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="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFileChooserButton" id="eap_tls_user_cert_button">
+                <property name="visible">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="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label34">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/eap-ttls.ui b/src/wireless-security/eap-ttls.ui
new file mode 100644
index 0000000..d2d6b10
--- /dev/null
+++ b/src/wireless-security/eap-ttls.ui
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkListStore" id="model6">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkWindow" id="eap_ttls_widget">
+    <property name="title">eap_ttls_widget</property>
+    <child>
+      <object class="GtkNotebook" id="eap_ttls_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="table10">
+            <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>
+              <object class="GtkLabel" id="eap_ttls_anon_identity_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Anonymous Identity:</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="eap_ttls_anon_identity_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="eap_ttls_ca_cert_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">CA Certificate:</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="GtkFileChooserButton" id="eap_ttls_ca_cert_button">
+                <property name="visible">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="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="eap_ttls_inner_auth_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Inner Authentication:</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="GtkComboBox" id="eap_ttls_inner_auth_combo">
+                <property name="visible">True</property>
+                <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>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="eap_ttls_inner_auth_vbox">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">2</property>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
+                <property name="x_options">GTK_FILL</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label49">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/leap.ui b/src/wireless-security/leap.ui
new file mode 100644
index 0000000..527142e
--- /dev/null
+++ b/src/wireless-security/leap.ui
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkWindow" id="leap_widget">
+    <property name="title">leap_widget</property>
+    <child>
+      <object class="GtkNotebook" id="leap_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="table5">
+            <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>
+              <object class="GtkLabel" id="leap_username_label">
+                <property name="visible">True</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="GtkLabel" id="leap_password_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Password:</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="leap_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">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="leap_show_checkbutton">
+                <property name="label" translatable="yes">Show password</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>
+              </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="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="leap_username_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>
+              <placeholder/>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="GtkLabel">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/wep-key.ui b/src/wireless-security/wep-key.ui
new file mode 100644
index 0000000..e8b40b0
--- /dev/null
+++ b/src/wireless-security/wep-key.ui
@@ -0,0 +1,185 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkListStore" id="model3">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">Open System</col>
+      </row>
+      <row>
+        <col id="0">Shared Key</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model4">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0">1 (Default)</col>
+      </row>
+      <row>
+        <col id="0">2</col>
+      </row>
+      <row>
+        <col id="0">3</col>
+      </row>
+      <row>
+        <col id="0">4</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkWindow" id="wep_key_widget">
+    <property name="title">wep_key_widget</property>
+    <child>
+      <object class="GtkNotebook" id="wep_key_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="table6">
+            <property name="visible">True</property>
+            <property name="n_rows">4</property>
+            <property name="n_columns">2</property>
+            <property name="column_spacing">12</property>
+            <property name="row_spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="wep_key_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Key:</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="wep_key_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="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label31">
+                <property name="visible">True</property>
+                <property name="xalign">0</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="GtkCheckButton" id="wep_key_show_checkbutton">
+                <property name="label" translatable="yes">Show key</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>
+              </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="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="wep_key_auth_method_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Authentication:</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="GtkComboBox" id="wep_key_auth_method_combo">
+                <property name="visible">True</property>
+                <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>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="wep_key_index_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">WEP Index:</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="GtkComboBox" id="wep_key_index_combo">
+                <property name="visible">True</property>
+                <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>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label23">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/wireless-security.c b/src/wireless-security/wireless-security.c
index 8025c33..a041eb8 100644
--- a/src/wireless-security/wireless-security.c
+++ b/src/wireless-security/wireless-security.c
@@ -132,15 +132,37 @@ wireless_security_unref (WirelessSecurity *sec)
 	}
 }
 
-void
+gboolean
 wireless_security_init (WirelessSecurity *sec,
                         WSValidateFunc validate,
                         WSAddToSizeGroupFunc add_to_size_group,
                         WSFillConnectionFunc fill_connection,
                         WSDestroyFunc destroy,
-                        GtkBuilder *builder,
-                        GtkWidget *ui_widget)
+                        const char *ui_file,
+                        const char *ui_widget)
 {
+	char *path;
+	GtkBuilder *builder;
+	GError *error = NULL;
+
+	builder = gtk_builder_new ();
+	path = g_build_filename (UIDIR, ui_file, NULL);
+	if (!gtk_builder_add_from_file (builder, path, &error)) {
+		if (error) {
+			g_warning ("Couldn't load '%s': %s", path, error->message);
+			g_error_free (error);
+		} else
+			g_warning ("Couldn't load '%s'", path);
+
+		g_free (path);
+		g_object_unref (builder);
+
+		return FALSE;
+	}
+
+	g_free (path);
+
+	sec->builder = builder;
 	sec->refcount = 1;
 
 	sec->validate = validate;
@@ -148,8 +170,11 @@ wireless_security_init (WirelessSecurity *sec,
 	sec->fill_connection = fill_connection;
 	sec->destroy = destroy;
 
-	sec->builder = g_object_ref (builder);
-	sec->ui_widget = ui_widget;
+	sec->ui_widget = GTK_WIDGET (gtk_builder_get_object (builder, ui_widget));
+	g_assert (sec->ui_widget);
+	g_object_ref_sink (sec->ui_widget);
+
+	return TRUE;
 }
 
 GtkWidget *
@@ -269,7 +294,6 @@ ws_802_1x_auth_combo_changed (GtkWidget *combo,
 
 GtkWidget *
 ws_802_1x_auth_combo_init (WirelessSecurity *sec,
-			   GtkBuilder *builder,
                            const char *combo_name,
                            GCallback auth_combo_changed_cb,
                            NMConnection *connection)
@@ -303,7 +327,7 @@ ws_802_1x_auth_combo_init (WirelessSecurity *sec,
 
 	auth_model = gtk_list_store_new (2, G_TYPE_STRING, eap_method_get_g_type ());
 
-	em_tls = eap_method_tls_new (builder, sec, connection, FALSE);
+	em_tls = eap_method_tls_new (sec, connection, FALSE);
 	gtk_list_store_append (auth_model, &iter);
 	gtk_list_store_set (auth_model, &iter,
 	                    AUTH_NAME_COLUMN, _("TLS"),
@@ -315,7 +339,7 @@ ws_802_1x_auth_combo_init (WirelessSecurity *sec,
 	item++;
 
 	if (!wired) {
-		em_leap = eap_method_leap_new (builder, sec, connection);
+		em_leap = eap_method_leap_new (sec, connection);
 		gtk_list_store_append (auth_model, &iter);
 		gtk_list_store_set (auth_model, &iter,
 		                    AUTH_NAME_COLUMN, _("LEAP"),
@@ -327,7 +351,7 @@ ws_802_1x_auth_combo_init (WirelessSecurity *sec,
 		item++;
 	}
 
-	em_ttls = eap_method_ttls_new (builder, sec, connection);
+	em_ttls = eap_method_ttls_new (sec, connection);
 	gtk_list_store_append (auth_model, &iter);
 	gtk_list_store_set (auth_model, &iter,
 	                    AUTH_NAME_COLUMN, _("Tunneled TLS"),
@@ -338,7 +362,7 @@ ws_802_1x_auth_combo_init (WirelessSecurity *sec,
 		active = item;
 	item++;
 
-	em_peap = eap_method_peap_new (builder, sec, connection);
+	em_peap = eap_method_peap_new (sec, connection);
 	gtk_list_store_append (auth_model, &iter);
 	gtk_list_store_set (auth_model, &iter,
 	                    AUTH_NAME_COLUMN, _("Protected EAP (PEAP)"),
diff --git a/src/wireless-security/wireless-security.h b/src/wireless-security/wireless-security.h
index be2de74..3d22df6 100644
--- a/src/wireless-security/wireless-security.h
+++ b/src/wireless-security/wireless-security.h
@@ -84,13 +84,13 @@ GType wireless_security_get_g_type (void);
 #include "ws-wpa-eap.h"
 #include "ws-dynamic-wep.h"
 
-void wireless_security_init (WirelessSecurity *sec,
-                             WSValidateFunc validate,
-                             WSAddToSizeGroupFunc add_to_size_group,
-                             WSFillConnectionFunc fill_connection,
-                             WSDestroyFunc destroy,
-                             GtkBuilder *builder,
-                             GtkWidget *ui_widget);
+gboolean wireless_security_init (WirelessSecurity *sec,
+				 WSValidateFunc validate,
+				 WSAddToSizeGroupFunc add_to_size_group,
+				 WSFillConnectionFunc fill_connection,
+				 WSDestroyFunc destroy,
+				 const char *ui_file,
+				 const char *ui_widget);
 
 void wireless_security_changed_cb (GtkWidget *entry, gpointer user_data);
 
@@ -100,7 +100,6 @@ void wireless_security_clear_ciphers (NMConnection *connection);
 #define AUTH_METHOD_COLUMN 1
 
 GtkWidget *ws_802_1x_auth_combo_init (WirelessSecurity *sec,
-                                      GtkBuilder *builder,
                                       const char *combo_name,
                                       GCallback auth_combo_changed_cb,
                                       NMConnection *connection);
diff --git a/src/wireless-security/wpa-eap.ui b/src/wireless-security/wpa-eap.ui
new file mode 100644
index 0000000..fc8ff34
--- /dev/null
+++ b/src/wireless-security/wpa-eap.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkListStore" id="model5">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0"> </col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkWindow" id="wpa_eap_widget">
+    <property name="title">wpa_eap_widget</property>
+    <child>
+      <object class="GtkNotebook" id="wpa_eap_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="wpa_eap_table">
+            <property name="visible">True</property>
+            <property name="n_rows">2</property>
+            <property name="n_columns">2</property>
+            <property name="column_spacing">6</property>
+            <property name="row_spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="wpa_eap_auth_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Authentication:</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBox" id="wpa_eap_auth_combo">
+                <property name="visible">True</property>
+                <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>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="wpa_eap_method_vbox">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_FILL</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="GtkLabel">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/wpa-psk.ui b/src/wireless-security/wpa-psk.ui
new file mode 100644
index 0000000..3839cc6
--- /dev/null
+++ b/src/wireless-security/wpa-psk.ui
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkWindow" id="wpa_psk_widget">
+    <property name="title">wpa_psk_widget</property>
+    <child>
+      <object class="GtkNotebook" id="wpa_psk_notebook">
+        <property name="visible">True</property>
+        <property name="show_tabs">False</property>
+        <property name="show_border">False</property>
+        <child>
+          <object class="GtkTable" id="wpa_psk_table">
+            <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>
+              <object class="GtkLabel" id="wpa_psk_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Password:</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="wpa_psk_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="max_length">64</property>
+                <property name="visibility">False</property>
+                <property name="activates_default">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="wpa_psk_type_label">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Type:</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="GtkLabel" id="label32">
+                <property name="visible">True</property>
+                <property name="xalign">0</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="GtkCheckButton" id="wpa_psk_show_checkbutton">
+                <property name="label" translatable="yes">Show password</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>
+              </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="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBox" id="wpa_psk_type_combo">
+                <property name="visible">True</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">GTK_FILL</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="GtkLabel">
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/wireless-security/ws-dynamic-wep.c b/src/wireless-security/ws-dynamic-wep.c
index 3559dbf..e5e23b9 100644
--- a/src/wireless-security/ws-dynamic-wep.c
+++ b/src/wireless-security/ws-dynamic-wep.c
@@ -96,31 +96,21 @@ nag_user (WirelessSecurity *parent)
 }
 
 WirelessSecurityDynamicWEP *
-ws_dynamic_wep_new (GtkBuilder *builder,
-                    NMConnection *connection)
+ws_dynamic_wep_new (NMConnection *connection)
 {
 	WirelessSecurityDynamicWEP *sec;
 	GtkWidget *widget;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
-
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "dynamic_wep_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
-
 	sec = g_slice_new0 (WirelessSecurityDynamicWEP);
-	wireless_security_init (WIRELESS_SECURITY (sec),
-	                        validate,
-	                        add_to_size_group,
-	                        fill_connection,
-	                        destroy,
-	                        builder,
-	                        widget);
+	if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+				     fill_connection, destroy, "dynamic-wep.ui", "dynamic_wep_notebook")) {
+	  g_slice_free (WirelessSecurityDynamicWEP, sec);
+	  return NULL;
+	}
 
 	WIRELESS_SECURITY (sec)->nag_user = nag_user;
 
 	widget = ws_802_1x_auth_combo_init (WIRELESS_SECURITY (sec),
-	                                    builder,
 	                                    "dynamic_wep_auth_combo",
 	                                    (GCallback) auth_combo_changed_cb,
 	                                    connection);
diff --git a/src/wireless-security/ws-dynamic-wep.h b/src/wireless-security/ws-dynamic-wep.h
index eddd302..c272af2 100644
--- a/src/wireless-security/ws-dynamic-wep.h
+++ b/src/wireless-security/ws-dynamic-wep.h
@@ -28,8 +28,7 @@ typedef struct {
 	GtkSizeGroup *size_group;
 } WirelessSecurityDynamicWEP;
 
-WirelessSecurityDynamicWEP * ws_dynamic_wep_new (GtkBuilder *builder,
-                                                 NMConnection *connection);
+WirelessSecurityDynamicWEP * ws_dynamic_wep_new (NMConnection *connection);
 
 #endif /* WS_DYNAMIC_WEP_H */
 
diff --git a/src/wireless-security/ws-leap.c b/src/wireless-security/ws-leap.c
index ac69424..d2d18bb 100644
--- a/src/wireless-security/ws-leap.c
+++ b/src/wireless-security/ws-leap.c
@@ -114,26 +114,21 @@ fill_connection (WirelessSecurity *parent, NMConnection *connection)
 }
 
 WirelessSecurityLEAP *
-ws_leap_new (GtkBuilder *builder, NMConnection *connection)
+ws_leap_new (NMConnection *connection)
 {
 	WirelessSecurityLEAP *sec;
+	GtkBuilder *builder;
 	GtkWidget *widget;
 	NMSettingWirelessSecurity *wsec = NULL;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
-
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "leap_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
-
 	sec = g_slice_new0 (WirelessSecurityLEAP);
-	wireless_security_init (WIRELESS_SECURITY (sec),
-	                        validate,
-	                        add_to_size_group,
-	                        fill_connection,
-	                        destroy,
-	                        builder,
-	                        widget);
+	if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+				     fill_connection, destroy, "leap.ui", "leap_notebook")) {
+	  g_slice_free (WirelessSecurityLEAP, sec);
+	  return NULL;
+	}
+
+	builder = WIRELESS_SECURITY (sec)->builder;
 
 	if (connection) {
 		wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
@@ -169,7 +164,7 @@ ws_leap_new (GtkBuilder *builder, NMConnection *connection)
 	if (wsec)
 		gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_wireless_security_get_leap_username (wsec));
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "leap_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/ws-leap.h b/src/wireless-security/ws-leap.h
index b964b89..5c5c42f 100644
--- a/src/wireless-security/ws-leap.h
+++ b/src/wireless-security/ws-leap.h
@@ -27,8 +27,7 @@ typedef struct {
 
 } WirelessSecurityLEAP;
 
-WirelessSecurityLEAP * ws_leap_new (GtkBuilder *builder,
-                                    NMConnection *connection);
+WirelessSecurityLEAP * ws_leap_new (NMConnection *connection);
 
 #endif /* WS_LEAP_H */
 
diff --git a/src/wireless-security/ws-wep-key.c b/src/wireless-security/ws-wep-key.c
index a38f3bb..15cbdf0 100644
--- a/src/wireless-security/ws-wep-key.c
+++ b/src/wireless-security/ws-wep-key.c
@@ -124,13 +124,13 @@ add_to_size_group (WirelessSecurity *parent, GtkSizeGroup *group)
 {
 	GtkWidget *widget;
 
-	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "auth_method_label"));
+	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_auth_method_label"));
 	gtk_size_group_add_widget (group, widget);
 
 	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_label"));
 	gtk_size_group_add_widget (group, widget);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "key_index_label"));
+	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_index_label"));
 	gtk_size_group_add_widget (group, widget);
 }
 
@@ -175,7 +175,7 @@ fill_connection (WirelessSecurity *parent, NMConnection *connection)
 	char *hashed = NULL;
 	int i;
 
-	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "auth_method_combo"));
+	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_auth_method_combo"));
 	auth_alg = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
 
 	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_entry"));
@@ -306,32 +306,27 @@ fill_secrets (WirelessSecurityWEPKey *sec, NMConnection *connection)
 }
 
 WirelessSecurityWEPKey *
-ws_wep_key_new (GtkBuilder *builder,
-                NMConnection *connection,
+ws_wep_key_new (NMConnection *connection,
                 WEPKeyType type,
                 gboolean adhoc_create)
 {
 	WirelessSecurityWEPKey *sec;
+	GtkBuilder *builder;
 	GtkWidget *widget;
 	NMSettingWirelessSecurity *s_wsec = NULL;
 	guint8 default_key_idx = 0;
 	gboolean is_adhoc = adhoc_create;
 	gboolean is_shared_key = FALSE;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
+	sec = g_slice_new0 (WirelessSecurityWEPKey);
+	if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+				     fill_connection, destroy, "wep-key.ui", "wep_key_notebook")) {
+	  g_slice_free (WirelessSecurityWEPKey, sec);
+	  return NULL;
+	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
+	builder = WIRELESS_SECURITY (sec)->builder;
 
-	sec = g_slice_new0 (WirelessSecurityWEPKey);
-	wireless_security_init (WIRELESS_SECURITY (sec),
-	                        validate,
-	                        add_to_size_group,
-	                        fill_connection,
-	                        destroy,
-	                        builder,
-	                        widget);
 	sec->type = type;
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_entry"));
@@ -368,7 +363,7 @@ ws_wep_key_new (GtkBuilder *builder,
 	else if (sec->type == WEP_KEY_TYPE_PASSPHRASE)
 		gtk_entry_set_max_length (GTK_ENTRY (widget), 64);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "key_index_combo"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_index_combo"));
 	if (connection && s_wsec)
 		default_key_idx = nm_setting_wireless_security_get_wep_tx_keyidx (s_wsec);
 
@@ -381,7 +376,7 @@ ws_wep_key_new (GtkBuilder *builder,
 	/* Key index is useless with adhoc networks */
 	if (is_adhoc) {
 		gtk_widget_hide (widget);
-		widget = GTK_WIDGET (gtk_builder_get_object (builder, "key_index_label"));
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_index_label"));
 		gtk_widget_hide (widget);
 	}
 
@@ -390,13 +385,13 @@ ws_wep_key_new (GtkBuilder *builder,
 	if (strlen (sec->keys[default_key_idx]))
 		gtk_entry_set_text (GTK_ENTRY (widget), sec->keys[default_key_idx]);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
 	                  sec);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "auth_method_combo"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_auth_method_combo"));
 	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), is_shared_key ? 1 : 0);
 
 	g_signal_connect (G_OBJECT (widget), "changed",
@@ -407,7 +402,7 @@ ws_wep_key_new (GtkBuilder *builder,
 	if (is_adhoc) {
 		gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
 		gtk_widget_hide (widget);
-		widget = GTK_WIDGET (gtk_builder_get_object (builder, "auth_method_label"));
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_auth_method_label"));
 		gtk_widget_hide (widget);
 	}
 
diff --git a/src/wireless-security/ws-wep-key.h b/src/wireless-security/ws-wep-key.h
index 95c3fac..c1496e4 100644
--- a/src/wireless-security/ws-wep-key.h
+++ b/src/wireless-security/ws-wep-key.h
@@ -35,8 +35,7 @@ typedef struct {
 	guint8 cur_index;
 } WirelessSecurityWEPKey;
 
-WirelessSecurityWEPKey * ws_wep_key_new (GtkBuilder *builder,
-                                         NMConnection *connection,
+WirelessSecurityWEPKey * ws_wep_key_new (NMConnection *connection,
                                          WEPKeyType type,
                                          gboolean adhoc_create);
 
diff --git a/src/wireless-security/ws-wpa-eap.c b/src/wireless-security/ws-wpa-eap.c
index 9135263..cd27298 100644
--- a/src/wireless-security/ws-wpa-eap.c
+++ b/src/wireless-security/ws-wpa-eap.c
@@ -91,31 +91,21 @@ nag_user (WirelessSecurity *parent)
 }
 
 WirelessSecurityWPAEAP *
-ws_wpa_eap_new (GtkBuilder *builder,
-                NMConnection *connection)
+ws_wpa_eap_new (NMConnection *connection)
 {
 	WirelessSecurityWPAEAP *sec;
 	GtkWidget *widget;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
-
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_eap_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
-
 	sec = g_slice_new0 (WirelessSecurityWPAEAP);
-	wireless_security_init (WIRELESS_SECURITY (sec),
-	                        validate,
-	                        add_to_size_group,
-	                        fill_connection,
-	                        destroy,
-	                        builder,
-	                        widget);
+	if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+				     fill_connection, destroy, "wpa-eap.ui", "wpa_eap_notebook")) {
+	  g_slice_free (WirelessSecurityWPAEAP, sec);
+	  return NULL;
+	}
 
 	WIRELESS_SECURITY (sec)->nag_user = nag_user;
 
 	widget = ws_802_1x_auth_combo_init (WIRELESS_SECURITY (sec),
-	                                    builder,
 	                                    "wpa_eap_auth_combo",
 	                                    (GCallback) auth_combo_changed_cb,
 	                                    connection);
diff --git a/src/wireless-security/ws-wpa-eap.h b/src/wireless-security/ws-wpa-eap.h
index d099d97..6b09d83 100644
--- a/src/wireless-security/ws-wpa-eap.h
+++ b/src/wireless-security/ws-wpa-eap.h
@@ -28,8 +28,7 @@ typedef struct {
 	GtkSizeGroup *size_group;
 } WirelessSecurityWPAEAP;
 
-WirelessSecurityWPAEAP * ws_wpa_eap_new (GtkBuilder *builder,
-                                         NMConnection *connection);
+WirelessSecurityWPAEAP * ws_wpa_eap_new (NMConnection *connection);
 
 #endif /* WS_WPA_EAP_H */
 
diff --git a/src/wireless-security/ws-wpa-psk.c b/src/wireless-security/ws-wpa-psk.c
index 184da2c..9a7edf2 100644
--- a/src/wireless-security/ws-wpa-psk.c
+++ b/src/wireless-security/ws-wpa-psk.c
@@ -159,25 +159,20 @@ fill_connection (WirelessSecurity *parent, NMConnection *connection)
 }
 
 WirelessSecurityWPAPSK *
-ws_wpa_psk_new (GtkBuilder *builder, NMConnection *connection)
+ws_wpa_psk_new (NMConnection *connection)
 {
 	WirelessSecurityWPAPSK *sec;
+	GtkBuilder *builder;
 	GtkWidget *widget;
 
-	g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
-
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_psk_notebook"));
-	g_assert (widget);
-	g_object_ref_sink (widget);
-
 	sec = g_slice_new0 (WirelessSecurityWPAPSK);
-	wireless_security_init (WIRELESS_SECURITY (sec),
-	                        validate,
-	                        add_to_size_group,
-	                        fill_connection,
-	                        destroy,
-	                        builder,
-	                        widget);
+	if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+				     fill_connection, destroy, "wpa-psk.ui", "wpa_psk_notebook")) {
+	  g_slice_free (WirelessSecurityWPAPSK, sec);
+	  return NULL;
+	}
+
+	builder = WIRELESS_SECURITY (sec)->builder;
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_psk_entry"));
 	g_assert (widget);
@@ -195,7 +190,7 @@ ws_wpa_psk_new (GtkBuilder *builder, NMConnection *connection)
 		                          NM_SETTING_WIRELESS_SECURITY_PSK);
 	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_psk_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/ws-wpa-psk.h b/src/wireless-security/ws-wpa-psk.h
index aa19e70..6504960 100644
--- a/src/wireless-security/ws-wpa-psk.h
+++ b/src/wireless-security/ws-wpa-psk.h
@@ -27,8 +27,7 @@ typedef struct {
 
 } WirelessSecurityWPAPSK;
 
-WirelessSecurityWPAPSK * ws_wpa_psk_new (GtkBuilder *builder,
-                                         NMConnection *connection);
+WirelessSecurityWPAPSK * ws_wpa_psk_new (NMConnection *connection);
 
 #endif /* WS_WEP_KEY_H */
 



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