[Xfce4-commits] r30260 - xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings

Nick Schermer nick at xfce.org
Sat Jul 11 00:15:28 CEST 2009


Author: nick
Date: 2009-07-10 22:15:28 +0000 (Fri, 10 Jul 2009)
New Revision: 30260

Modified:
   xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/Makefile.am
   xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/accessibility-dialog.glade
   xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/main.c
Log:
Port accessibility dialog to gtkbuilder and 4ui.


Modified: xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/Makefile.am
===================================================================
--- xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/Makefile.am	2009-07-10 22:14:52 UTC (rev 30259)
+++ xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/Makefile.am	2009-07-10 22:15:28 UTC (rev 30260)
@@ -18,9 +18,8 @@
 xfce4_accessibility_settings_CFLAGS = \
 	$(GTK_CFLAGS) \
 	$(GLIB_CFLAGS) \
-	$(GLADE_CFLAGS) \
 	$(DBUS_GLIB_CFLAGS) \
-	$(LIBXFCEGUI4_CFLAGS) \
+	$(LIBXFCE4UI_CFLAGS) \
 	$(XFCONF_CFLAGS)
 
 xfce4_accessibility_settings_LDFLAGS = \
@@ -30,9 +29,8 @@
 xfce4_accessibility_settings_LDADD = \
 	$(GTK_LIBS) \
 	$(GLIB_LIBS) \
-	$(GLADE_LIBS) \
 	$(DBUS_GLIB_LIBS) \
-	$(LIBXFCEGUI4_LIBS) \
+	$(LIBXFCE4UI_LIBS) \
 	$(XFCONF_LIBS)
 
 if MAINTAINER_MODE

Modified: xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/accessibility-dialog.glade
===================================================================
--- xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/accessibility-dialog.glade	2009-07-10 22:14:52 UTC (rev 30259)
+++ xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/accessibility-dialog.glade	2009-07-10 22:15:28 UTC (rev 30260)
@@ -1,215 +1,275 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sun Nov 16 15:45:51 2008 -->
-<glade-interface>
-  <requires lib="xfce4"/>
-  <widget class="XfceTitledDialog" id="accessibility-settings-dialog">
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.14"/>
+  <!-- interface-requires libxfce4ui 4.5 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkAdjustment" id="slow-keys-delay">
+    <property name="value">500.00000000022351</property>
+    <property name="lower">50</property>
+    <property name="upper">1000</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">100</property>
+    <property name="page_size">10</property>
+  </object>
+  <object class="GtkAdjustment" id="bounce-keys-delay">
+    <property name="value">500.00000000022351</property>
+    <property name="lower">50</property>
+    <property name="upper">1000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+    <property name="page_size">10</property>
+  </object>
+  <object class="GtkAdjustment" id="mouse-emulation-delay">
+    <property name="value">150.00000000022351</property>
+    <property name="lower">1</property>
+    <property name="upper">1000</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">100</property>
+  </object>
+  <object class="GtkAdjustment" id="mouse-emulation-interval">
+    <property name="value">20</property>
+    <property name="lower">10</property>
+    <property name="upper">1000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="mouse-emulation-curve">
+    <property name="value">2.2351741811588166e-10</property>
+    <property name="lower">-1000</property>
+    <property name="upper">1000</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">100</property>
+  </object>
+  <object class="GtkAdjustment" id="mouse-emulation-max-speed">
+    <property name="value">999.99999999977649</property>
+    <property name="lower">1</property>
+    <property name="upper">2000</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">100</property>
+  </object>
+  <object class="GtkAdjustment" id="mouse-emulation-time-to-max">
+    <property name="value">3000</property>
+    <property name="lower">100</property>
+    <property name="upper">10000</property>
+    <property name="step_increment">10</property>
+    <property name="page_increment">100</property>
+  </object>
+  <object class="XfceTitledDialog" id="dialog">
     <property name="title" translatable="yes">Accessibility</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="window_position">center-on-parent</property>
     <property name="icon_name">preferences-desktop-accessibility</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="type_hint">dialog</property>
     <property name="has_separator">False</property>
     <property name="subtitle" translatable="yes">Configure keyboard and mouse accessibility</property>
     <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child>
-          <widget class="GtkVBox" id="plug-child">
+          <object class="GtkVBox" id="plug-child">
             <property name="visible">True</property>
             <child>
-              <widget class="GtkNotebook" id="notebook1">
+              <object class="GtkNotebook" id="notebook1">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="border_width">6</property>
                 <child>
-                  <widget class="GtkVBox" id="vbox2">
+                  <object class="GtkVBox" id="vbox2">
                     <property name="visible">True</property>
                     <property name="border_width">12</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkFrame" id="frame1">
+                      <object class="GtkFrame" id="frame1">
                         <property name="visible">True</property>
                         <property name="label_xalign">0</property>
-                        <property name="shadow_type">GTK_SHADOW_NONE</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <widget class="GtkAlignment" id="alignment1">
+                          <object class="GtkAlignment" id="alignment1">
                             <property name="visible">True</property>
                             <property name="bottom_padding">6</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <widget class="GtkVBox" id="vbox3">
+                              <object class="GtkVBox" id="vbox3">
                                 <property name="visible">True</property>
                                 <property name="border_width">6</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <widget class="GtkCheckButton" id="sticky-keys-enabled">
+                                  <object class="GtkCheckButton" id="sticky-keys-enabled">
+                                    <property name="label" translatable="yes">Use _sticky keys</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="tooltip" translatable="yes">When selected, modifier keys (such as Control, Alt, and Shift) do not need to be held down (they can be pressed and then released) when multiple keys would normally need to be pressed at the same time</property>
-                                    <property name="label" translatable="yes">Use _sticky keys</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="tooltip_text" translatable="yes">When selected, modifier keys (such as Control, Alt, and Shift) do not need to be held down (they can be pressed and then released) when multiple keys would normally need to be pressed at the same time</property>
                                     <property name="use_underline">True</property>
-                                    <property name="response_id">0</property>
                                     <property name="draw_indicator">True</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkAlignment" id="sticky-keys-box">
+                                  <object class="GtkAlignment" id="sticky-keys-box">
                                     <property name="visible">True</property>
                                     <property name="sensitive">False</property>
-                                    <property name="left_padding">12</property>
+                                    <property name="left_padding">18</property>
                                     <child>
-                                      <widget class="GtkVBox" id="vbox7">
+                                      <object class="GtkVBox" id="vbox7">
                                         <property name="visible">True</property>
+                                        <property name="orientation">vertical</property>
                                         <property name="spacing">6</property>
                                         <child>
-                                          <widget class="GtkCheckButton" id="sticky-keys-latch-to-lock">
+                                          <object class="GtkCheckButton" id="sticky-keys-latch-to-lock">
+                                            <property name="label" translatable="yes">_Lock sticky keys</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">When selected, modifier keys (such as Control, Alt, and Shift) will remain locked in the pressed state until pressed again</property>
-                                            <property name="label" translatable="yes">_Lock sticky keys</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="tooltip_text" translatable="yes">When selected, modifier keys (such as Control, Alt, and Shift) will remain locked in the pressed state until pressed again</property>
                                             <property name="use_underline">True</property>
-                                            <property name="response_id">0</property>
                                             <property name="draw_indicator">True</property>
-                                          </widget>
+                                          </object>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkCheckButton" id="sticky-keys-two-keys-disable">
+                                          <object class="GtkCheckButton" id="sticky-keys-two-keys-disable">
+                                            <property name="label" translatable="yes">Disable sticky keys if _two keys are pressed</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">When selected, the "sticky keys" feature will be disabled if two keys are pressed simultaneously</property>
-                                            <property name="label" translatable="yes">Disable sticky keys if _two keys are pressed</property>
+                                            <property name="receives_default">False</property>
+                                            <property name="tooltip_text" translatable="yes">When selected, the "sticky keys" feature will be disabled if two keys are pressed simultaneously</property>
                                             <property name="use_underline">True</property>
                                             <property name="xalign">0</property>
                                             <property name="yalign">0</property>
-                                            <property name="response_id">0</property>
                                             <property name="draw_indicator">True</property>
-                                          </widget>
+                                          </object>
                                           <packing>
                                             <property name="expand">False</property>
                                             <property name="fill">False</property>
                                             <property name="position">1</property>
                                           </packing>
                                         </child>
-                                      </widget>
+                                      </object>
                                     </child>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
-                              </widget>
+                              </object>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label3">
+                        <child type="label">
+                          <object class="GtkLabel" id="label3">
                             <property name="visible">True</property>
-                            <property name="label" translatable="yes"><b>Sticky Keys</b></property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
+                            <property name="label" translatable="yes">Sticky Keys</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkFrame" id="frame2">
+                      <object class="GtkFrame" id="frame2">
                         <property name="visible">True</property>
                         <property name="label_xalign">0</property>
-                        <property name="shadow_type">GTK_SHADOW_NONE</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <widget class="GtkAlignment" id="alignment2">
+                          <object class="GtkAlignment" id="alignment2">
                             <property name="visible">True</property>
                             <property name="bottom_padding">6</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <widget class="GtkVBox" id="vbox4">
+                              <object class="GtkVBox" id="vbox4">
                                 <property name="visible">True</property>
                                 <property name="border_width">6</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <widget class="GtkCheckButton" id="slow-keys-enabled">
+                                  <object class="GtkCheckButton" id="slow-keys-enabled">
+                                    <property name="label" translatable="yes">Use slow _keys</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="tooltip" translatable="yes">To help prevent accidental keystrokes, slow keys requires that a key is held for a certain minimum amount of time before the keystroke will be accepted</property>
-                                    <property name="label" translatable="yes">Use slow _keys</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="tooltip_text" translatable="yes">To help prevent accidental keystrokes, slow keys requires that a key is held for a certain minimum amount of time before the keystroke will be accepted</property>
                                     <property name="use_underline">True</property>
-                                    <property name="response_id">0</property>
                                     <property name="draw_indicator">True</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkAlignment" id="slow-keys-box">
+                                  <object class="GtkAlignment" id="slow-keys-box">
                                     <property name="visible">True</property>
                                     <property name="sensitive">False</property>
-                                    <property name="left_padding">12</property>
+                                    <property name="left_padding">18</property>
                                     <child>
-                                      <widget class="GtkHBox" id="hbox1">
+                                      <object class="GtkHBox" id="hbox1">
                                         <property name="visible">True</property>
-                                        <property name="border_width">6</property>
                                         <property name="spacing">12</property>
                                         <child>
-                                          <widget class="GtkLabel" id="label6">
+                                          <object class="GtkLabel" id="label6">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">Acceptance _delay:</property>
                                             <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">slow-keys-delay</property>
-                                          </widget>
+                                            <property name="mnemonic_widget">slow-keys-scale</property>
+                                          </object>
                                           <packing>
                                             <property name="expand">False</property>
                                             <property name="fill">False</property>
+                                            <property name="position">0</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkHScale" id="slow-keys-delay">
+                                          <object class="GtkHScale" id="slow-keys-scale">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">The amount of time, in milliseconds, that must elapse before a keystroke will be accepted</property>
-                                            <property name="adjustment">500 50 1000 10 100 10</property>
+                                            <property name="tooltip_text" translatable="yes">The amount of time, in milliseconds, that must elapse before a keystroke will be accepted</property>
+                                            <property name="adjustment">slow-keys-delay</property>
                                             <property name="digits">0</property>
-                                            <property name="value_pos">GTK_POS_RIGHT</property>
-                                          </widget>
+                                            <property name="value_pos">right</property>
+                                          </object>
                                           <packing>
                                             <property name="position">1</property>
                                           </packing>
                                         </child>
-                                      </widget>
+                                      </object>
                                     </child>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
-                              </widget>
+                              </object>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label4">
+                        <child type="label">
+                          <object class="GtkLabel" id="label4">
                             <property name="visible">True</property>
-                            <property name="label" translatable="yes"><b>Slow Keys</b></property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
+                            <property name="label" translatable="yes">Slow Keys</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -217,164 +277,166 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkFrame" id="frame3">
+                      <object class="GtkFrame" id="frame3">
                         <property name="visible">True</property>
                         <property name="label_xalign">0</property>
-                        <property name="shadow_type">GTK_SHADOW_NONE</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <widget class="GtkAlignment" id="alignment3">
+                          <object class="GtkAlignment" id="alignment3">
                             <property name="visible">True</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <widget class="GtkVBox" id="vbox6">
+                              <object class="GtkVBox" id="vbox6">
                                 <property name="visible">True</property>
                                 <property name="border_width">6</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <widget class="GtkCheckButton" id="bounce-keys-enabled">
+                                  <object class="GtkCheckButton" id="bounce-keys-enabled">
+                                    <property name="label" translatable="yes">Use _bounce keys</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="tooltip" translatable="yes">To help prevent accidental multiple keystrokes, bounce keys imposes a minimum delay between keystrokes</property>
-                                    <property name="label" translatable="yes">Use _bounce keys</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="tooltip_text" translatable="yes">To help prevent accidental multiple keystrokes, bounce keys imposes a minimum delay between keystrokes</property>
                                     <property name="use_underline">True</property>
-                                    <property name="response_id">0</property>
                                     <property name="draw_indicator">True</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkAlignment" id="bounce-keys-box">
+                                  <object class="GtkAlignment" id="bounce-keys-box">
                                     <property name="visible">True</property>
                                     <property name="sensitive">False</property>
-                                    <property name="left_padding">12</property>
+                                    <property name="left_padding">18</property>
                                     <child>
-                                      <widget class="GtkHBox" id="hbox2">
+                                      <object class="GtkHBox" id="hbox2">
                                         <property name="visible">True</property>
-                                        <property name="border_width">6</property>
                                         <property name="spacing">12</property>
                                         <child>
-                                          <widget class="GtkLabel" id="label9">
+                                          <object class="GtkLabel" id="label9">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">K_eystroke delay:</property>
                                             <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">bounce-keys-delay</property>
-                                          </widget>
+                                            <property name="mnemonic_widget">bounce-keys-scale</property>
+                                          </object>
                                           <packing>
                                             <property name="expand">False</property>
                                             <property name="fill">False</property>
+                                            <property name="position">0</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkHScale" id="bounce-keys-delay">
+                                          <object class="GtkHScale" id="bounce-keys-scale">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">The amount of time, in milliseconds, required between keystrokes</property>
-                                            <property name="adjustment">500 50 1000 1 10 10</property>
+                                            <property name="tooltip_text" translatable="yes">The amount of time, in milliseconds, required between keystrokes</property>
+                                            <property name="adjustment">bounce-keys-delay</property>
                                             <property name="digits">0</property>
-                                            <property name="value_pos">GTK_POS_RIGHT</property>
-                                          </widget>
+                                            <property name="value_pos">right</property>
+                                          </object>
                                           <packing>
                                             <property name="position">1</property>
                                           </packing>
                                         </child>
-                                      </widget>
+                                      </object>
                                     </child>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
-                              </widget>
+                              </object>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label5">
+                        <child type="label">
+                          <object class="GtkLabel" id="label5">
                             <property name="visible">True</property>
-                            <property name="label" translatable="yes"><b>Bounce Keys</b></property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
+                            <property name="label" translatable="yes">Bounce Keys</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                 </child>
-                <child>
-                  <widget class="GtkLabel" id="label1">
+                <child type="tab">
+                  <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
                     <property name="label" translatable="yes">Keyboa_rd</property>
                     <property name="use_underline">True</property>
-                  </widget>
+                  </object>
                   <packing>
-                    <property name="type">tab</property>
                     <property name="tab_fill">False</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkVBox" id="vbox5">
+                  <object class="GtkVBox" id="vbox5">
                     <property name="visible">True</property>
                     <property name="border_width">12</property>
+                    <property name="orientation">vertical</property>
                     <child>
-                      <widget class="GtkFrame" id="frame4">
+                      <object class="GtkFrame" id="frame4">
                         <property name="visible">True</property>
                         <property name="label_xalign">0</property>
-                        <property name="shadow_type">GTK_SHADOW_NONE</property>
+                        <property name="shadow_type">none</property>
                         <child>
-                          <widget class="GtkAlignment" id="alignment4">
+                          <object class="GtkAlignment" id="alignment4">
                             <property name="visible">True</property>
                             <property name="border_width">6</property>
                             <property name="left_padding">12</property>
                             <child>
-                              <widget class="GtkVBox" id="vbox8">
+                              <object class="GtkVBox" id="vbox8">
                                 <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <widget class="GtkCheckButton" id="mouse-emulation-enabled">
+                                  <object class="GtkCheckButton" id="mouse-emulation-enabled">
+                                    <property name="label" translatable="yes">_Use mouse emulation</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="tooltip" translatable="yes">When selected, the mouse pointer can be controlled using the keyboard number pad</property>
-                                    <property name="label" translatable="yes">_Use mouse emulation</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="tooltip_text" translatable="yes">When selected, the mouse pointer can be controlled using the keyboard number pad</property>
                                     <property name="use_underline">True</property>
-                                    <property name="response_id">0</property>
                                     <property name="draw_indicator">True</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkAlignment" id="mouse-emulation-box">
+                                  <object class="GtkAlignment" id="mouse-emulation-box">
                                     <property name="visible">True</property>
                                     <property name="sensitive">False</property>
-                                    <property name="left_padding">12</property>
+                                    <property name="left_padding">18</property>
                                     <child>
-                                      <widget class="GtkTable" id="table1">
+                                      <object class="GtkTable" id="table1">
                                         <property name="visible">True</property>
-                                        <property name="border_width">6</property>
                                         <property name="n_rows">5</property>
                                         <property name="n_columns">3</property>
                                         <property name="column_spacing">12</property>
                                         <property name="row_spacing">6</property>
                                         <child>
-                                          <widget class="GtkLabel" id="label16">
+                                          <object class="GtkLabel" id="label16">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">R_epeat interval:</property>
                                             <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">mouse-emulation-interval</property>
-                                          </widget>
+                                            <property name="mnemonic_widget">interval-widget</property>
+                                          </object>
                                           <packing>
                                             <property name="top_attach">1</property>
                                             <property name="bottom_attach">2</property>
@@ -382,25 +444,25 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label7">
+                                          <object class="GtkLabel" id="label7">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">_Acceleration delay:</property>
                                             <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">mouse-emulation-delay</property>
-                                          </widget>
+                                            <property name="mnemonic_widget">delay-widget</property>
+                                          </object>
                                           <packing>
                                             <property name="x_options">GTK_FILL</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label19">
+                                          <object class="GtkLabel" id="label19">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">Acceleration _time:</property>
                                             <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">mouse-emulation-time-to-max</property>
-                                          </widget>
+                                            <property name="mnemonic_widget">ttm-widget</property>
+                                          </object>
                                           <packing>
                                             <property name="top_attach">2</property>
                                             <property name="bottom_attach">3</property>
@@ -408,13 +470,13 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label22">
+                                          <object class="GtkLabel" id="label22">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">Maximum _speed:</property>
                                             <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">mouse-emulation-max-speed</property>
-                                          </widget>
+                                            <property name="mnemonic_widget">max-speed-widget</property>
+                                          </object>
                                           <packing>
                                             <property name="top_attach">3</property>
                                             <property name="bottom_attach">4</property>
@@ -422,13 +484,13 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label8">
+                                          <object class="GtkLabel" id="label8">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">Acceleration _profile:</property>
                                             <property name="use_underline">True</property>
-                                            <property name="mnemonic_widget">mouse-emulation-curve</property>
-                                          </widget>
+                                            <property name="mnemonic_widget">curve-widget</property>
+                                          </object>
                                           <packing>
                                             <property name="top_attach">4</property>
                                             <property name="bottom_attach">5</property>
@@ -436,22 +498,22 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label10">
+                                          <object class="GtkLabel" id="label10">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">msec</property>
-                                          </widget>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">2</property>
                                             <property name="right_attach">3</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label11">
+                                          <object class="GtkLabel" id="label11">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">msec</property>
-                                          </widget>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">2</property>
                                             <property name="right_attach">3</property>
@@ -460,11 +522,11 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label13">
+                                          <object class="GtkLabel" id="label13">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">msec</property>
-                                          </widget>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">2</property>
                                             <property name="right_attach">3</property>
@@ -473,10 +535,10 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label14">
+                                          <object class="GtkLabel" id="label14">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
-                                          </widget>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">2</property>
                                             <property name="right_attach">3</property>
@@ -485,11 +547,11 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkLabel" id="label15">
+                                          <object class="GtkLabel" id="label15">
                                             <property name="visible">True</property>
                                             <property name="xalign">0</property>
                                             <property name="label" translatable="yes">pixels/sec</property>
-                                          </widget>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">2</property>
                                             <property name="right_attach">3</property>
@@ -498,14 +560,14 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkSpinButton" id="mouse-emulation-delay">
+                                          <object class="GtkSpinButton" id="delay-widget">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">The time, in milliseconds, between the initial key press and first repeated motion event</property>
-                                            <property name="adjustment">150 1 1000 10 100 0</property>
+                                            <property name="tooltip_text" translatable="yes">The time, in milliseconds, between the initial key press and first repeated motion event</property>
+                                            <property name="adjustment">mouse-emulation-delay</property>
                                             <property name="numeric">True</property>
-                                            <property name="update_policy">GTK_UPDATE_IF_VALID</property>
-                                          </widget>
+                                            <property name="update_policy">if-valid</property>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">1</property>
                                             <property name="right_attach">2</property>
@@ -513,14 +575,14 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkSpinButton" id="mouse-emulation-interval">
+                                          <object class="GtkSpinButton" id="interval-widget">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">The time, in milliseconds, between repeated motion events</property>
-                                            <property name="adjustment">20 10 1000 1 10 0</property>
+                                            <property name="tooltip_text" translatable="yes">The time, in milliseconds, between repeated motion events</property>
+                                            <property name="adjustment">mouse-emulation-interval</property>
                                             <property name="numeric">True</property>
-                                            <property name="update_policy">GTK_UPDATE_IF_VALID</property>
-                                          </widget>
+                                            <property name="update_policy">if-valid</property>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">1</property>
                                             <property name="right_attach">2</property>
@@ -530,14 +592,14 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkSpinButton" id="mouse-emulation-curve">
+                                          <object class="GtkSpinButton" id="curve-widget">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">The ramp used to reach maximum pointer speed</property>
-                                            <property name="adjustment">0 -1000 1000 10 100 0</property>
+                                            <property name="tooltip_text" translatable="yes">The ramp used to reach maximum pointer speed</property>
+                                            <property name="adjustment">mouse-emulation-curve</property>
                                             <property name="numeric">True</property>
-                                            <property name="update_policy">GTK_UPDATE_IF_VALID</property>
-                                          </widget>
+                                            <property name="update_policy">if-valid</property>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">1</property>
                                             <property name="right_attach">2</property>
@@ -547,14 +609,14 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkSpinButton" id="mouse-emulation-max-speed">
+                                          <object class="GtkSpinButton" id="max-speed-widget">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">The maximum pointer speed after acceleration</property>
-                                            <property name="adjustment">1000 1 2000 10 100 0</property>
+                                            <property name="tooltip_text" translatable="yes">The maximum pointer speed after acceleration</property>
+                                            <property name="adjustment">mouse-emulation-max-speed</property>
                                             <property name="numeric">True</property>
-                                            <property name="update_policy">GTK_UPDATE_IF_VALID</property>
-                                          </widget>
+                                            <property name="update_policy">if-valid</property>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">1</property>
                                             <property name="right_attach">2</property>
@@ -564,14 +626,14 @@
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkSpinButton" id="mouse-emulation-time-to-max">
+                                          <object class="GtkSpinButton" id="ttm-widget">
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
-                                            <property name="tooltip" translatable="yes">The time, in milliseconds, to get to maximum speed</property>
-                                            <property name="adjustment">3000 100 10000 10 100 0</property>
+                                            <property name="tooltip_text" translatable="yes">The time, in milliseconds, to get to maximum speed</property>
+                                            <property name="adjustment">mouse-emulation-time-to-max</property>
                                             <property name="numeric">True</property>
-                                            <property name="update_policy">GTK_UPDATE_IF_VALID</property>
-                                          </widget>
+                                            <property name="update_policy">if-valid</property>
+                                          </object>
                                           <packing>
                                             <property name="left_attach">1</property>
                                             <property name="right_attach">2</property>
@@ -580,80 +642,87 @@
                                             <property name="x_options">GTK_FILL</property>
                                           </packing>
                                         </child>
-                                      </widget>
+                                      </object>
                                     </child>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
-                              </widget>
+                              </object>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label12">
+                        <child type="label">
+                          <object class="GtkLabel" id="label12">
                             <property name="visible">True</property>
-                            <property name="label" translatable="yes"><b>Mouse Emulation</b></property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
+                            <property name="label" translatable="yes">Mouse Emulation</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="position">1</property>
                   </packing>
                 </child>
-                <child>
-                  <widget class="GtkLabel" id="label2">
+                <child type="tab">
+                  <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
                     <property name="label" translatable="yes">_Mouse</property>
                     <property name="use_underline">True</property>
-                  </widget>
+                  </object>
                   <packing>
-                    <property name="type">tab</property>
                     <property name="position">1</property>
                     <property name="tab_fill">False</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
               <packing>
                 <property name="position">1</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="position">1</property>
           </packing>
         </child>
         <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <property name="layout_style">end</property>
             <child>
-              <widget class="GtkButton" id="button2">
+              <object class="GtkButton" id="button2">
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="label">gtk-close</property>
                 <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
           </packing>
         </child>
-      </widget>
+      </object>
     </child>
-  </widget>
-</glade-interface>
+    <action-widgets>
+      <action-widget response="0">button2</action-widget>
+    </action-widgets>
+  </object>
+</interface>

Modified: xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/main.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/main.c	2009-07-10 22:14:52 UTC (rev 30259)
+++ xfce4-settings/branches/migration-to-4ui/dialogs/accessibility-settings/main.c	2009-07-10 22:15:28 UTC (rev 30260)
@@ -28,9 +28,8 @@
 
 #include <glib.h>
 #include <gtk/gtk.h>
-#include <glade/glade.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 #include <libxfce4util/libxfce4util.h>
 #include <xfconf/xfconf.h>
 
@@ -49,8 +48,8 @@
 
 
 
-/* gloval xfconf channel */
-static XfconfChannel *accessibility_channel;
+/* global xfconf channel */
+static XfconfChannel *accessibility_channel = NULL;
 
 
 
@@ -58,67 +57,67 @@
 accessibility_settings_sensitivity (GtkToggleButton *button,
                                     GtkWidget       *box)
 {
-    gtk_widget_set_sensitive (GTK_WIDGET (box), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)));
+    gtk_widget_set_sensitive (GTK_WIDGET (box),
+        gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)));
 }
 
 
 
 static void
-accessibility_settings_dialog_configure_widgets (GladeXML *gxml)
+accessibility_settings_dialog_configure_widgets (GtkBuilder *builder)
 {
-    GtkWidget     *widget, *box;
-    GtkAdjustment *adjustment;
+    GObject *box, *object;
 
     /* Sticky keys */
-    widget = glade_xml_get_widget (gxml, "sticky-keys-enabled");
-    box = glade_xml_get_widget (gxml, "sticky-keys-box");
-    g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
-    xfconf_g_property_bind (accessibility_channel, "/StickyKeys", G_TYPE_BOOLEAN, G_OBJECT (widget), "active");
+    object = gtk_builder_get_object (builder, "sticky-keys-enabled");
+    box = gtk_builder_get_object (builder, "sticky-keys-box");
+    g_signal_connect (object, "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
+    xfconf_g_property_bind (accessibility_channel, "/StickyKeys", G_TYPE_BOOLEAN, object, "active");
 
-    widget = glade_xml_get_widget (gxml, "sticky-keys-latch-to-lock");
-    xfconf_g_property_bind (accessibility_channel, "/StickyKeys/LatchToLock", G_TYPE_BOOLEAN, G_OBJECT (widget), "active");
+    object = gtk_builder_get_object (builder, "sticky-keys-latch-to-lock");
+    xfconf_g_property_bind (accessibility_channel, "/StickyKeys/LatchToLock", G_TYPE_BOOLEAN, object, "active");
 
-    widget = glade_xml_get_widget (gxml, "sticky-keys-two-keys-disable");
-    xfconf_g_property_bind (accessibility_channel, "/StickyKeys/TwoKeysDisable", G_TYPE_BOOLEAN, G_OBJECT (widget), "active");
+    object = gtk_builder_get_object (builder, "sticky-keys-two-keys-disable");
+    xfconf_g_property_bind (accessibility_channel, "/StickyKeys/TwoKeysDisable", G_TYPE_BOOLEAN, object, "active");
 
     /* Slow keys */
-    widget = glade_xml_get_widget (gxml, "slow-keys-enabled");
-    box = glade_xml_get_widget (gxml, "slow-keys-box");
-    g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
-    xfconf_g_property_bind (accessibility_channel, "/SlowKeys", G_TYPE_BOOLEAN, G_OBJECT (widget), "active");
+    object = gtk_builder_get_object (builder, "slow-keys-enabled");
+    box = gtk_builder_get_object (builder, "slow-keys-box");
+    g_signal_connect (object, "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
+    xfconf_g_property_bind (accessibility_channel, "/SlowKeys", G_TYPE_BOOLEAN, object, "active");
 
-    adjustment = gtk_range_get_adjustment (GTK_RANGE (glade_xml_get_widget (gxml, "slow-keys-delay")));
-    xfconf_g_property_bind (accessibility_channel, "/SlowKeys/Delay", G_TYPE_INT, G_OBJECT (adjustment), "value");
-    
+    object = gtk_builder_get_object (builder, "slow-keys-delay");
+    xfconf_g_property_bind (accessibility_channel, "/SlowKeys/Delay", G_TYPE_INT, object, "value");
+
     /* Bounce keys */
-    widget = glade_xml_get_widget (gxml, "bounce-keys-enabled");
-    box = glade_xml_get_widget (gxml, "bounce-keys-box");
-    g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
-    xfconf_g_property_bind (accessibility_channel, "/BounceKeys", G_TYPE_BOOLEAN, G_OBJECT (widget), "active");
+    object = gtk_builder_get_object (builder, "bounce-keys-enabled");
+    box = gtk_builder_get_object (builder, "bounce-keys-box");
+    g_signal_connect (object, "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
+    xfconf_g_property_bind (accessibility_channel, "/BounceKeys", G_TYPE_BOOLEAN, object, "active");
 
-    adjustment = gtk_range_get_adjustment (GTK_RANGE (glade_xml_get_widget (gxml, "bounce-keys-delay")));
-    xfconf_g_property_bind (accessibility_channel, "/BounceKeys/Delay", G_TYPE_INT, G_OBJECT (adjustment), "value");
+    object = gtk_builder_get_object (builder, "bounce-keys-delay");
+    xfconf_g_property_bind (accessibility_channel, "/BounceKeys/Delay", G_TYPE_INT, object, "value");
 
     /* Mouse keys */
-    widget = glade_xml_get_widget (gxml, "mouse-emulation-enabled");
-    box = glade_xml_get_widget (gxml, "mouse-emulation-box");
-    g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
-    xfconf_g_property_bind (accessibility_channel, "/MouseKeys", G_TYPE_BOOLEAN, G_OBJECT (widget), "active");
-    
-    widget = glade_xml_get_widget (gxml, "mouse-emulation-delay");
-    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/Delay", G_TYPE_INT, G_OBJECT (widget), "value");
+    object = gtk_builder_get_object (builder, "mouse-emulation-enabled");
+    box = gtk_builder_get_object (builder, "mouse-emulation-box");
+    g_signal_connect (object, "toggled", G_CALLBACK (accessibility_settings_sensitivity), box);
+    xfconf_g_property_bind (accessibility_channel, "/MouseKeys", G_TYPE_BOOLEAN, object, "active");
 
-    widget = glade_xml_get_widget (gxml, "mouse-emulation-interval");
-    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/Interval", G_TYPE_INT, G_OBJECT (widget), "value");
+    object = gtk_builder_get_object (builder, "mouse-emulation-delay");
+    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/Delay", G_TYPE_INT, object, "value");
 
-    widget = glade_xml_get_widget (gxml, "mouse-emulation-time-to-max");
-    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/TimeToMax", G_TYPE_INT, G_OBJECT (widget), "value");
-    
-    widget = glade_xml_get_widget (gxml, "mouse-emulation-max-speed");
-    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/MaxSpeed", G_TYPE_INT, G_OBJECT (widget), "value");
-    
-    widget = glade_xml_get_widget (gxml, "mouse-emulation-curve");
-    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/Curve", G_TYPE_INT, G_OBJECT (widget), "value");
+    object = gtk_builder_get_object (builder, "mouse-emulation-interval");
+    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/Interval", G_TYPE_INT, object, "value");
+
+    object = gtk_builder_get_object (builder, "mouse-emulation-time-to-max");
+    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/TimeToMax", G_TYPE_INT, object, "value");
+
+    object = gtk_builder_get_object (builder, "mouse-emulation-max-speed");
+    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/MaxSpeed", G_TYPE_INT, object, "value");
+
+    object = gtk_builder_get_object (builder, "mouse-emulation-curve");
+    xfconf_g_property_bind (accessibility_channel, "/MouseKeys/Curve", G_TYPE_INT, object, "value");
 }
 
 
@@ -126,11 +125,10 @@
 gint
 main (gint argc, gchar **argv)
 {
-    GtkWidget *dialog;
-    GtkWidget *plug;
-    GtkWidget *plug_child;
-    GladeXML  *gxml;
-    GError    *error = NULL;
+    GObject    *dialog, *plug_child;
+    GtkWidget  *plug;
+    GtkBuilder *builder;
+    GError     *error = NULL;
 
     /* setup translation domain */
     xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
@@ -180,27 +178,29 @@
 
     /* open the channel */
     accessibility_channel = xfconf_channel_new ("accessibility");
+    
+    /* hook to make sure the libxfce4ui library is linked */
+    if (xfce_titled_dialog_get_type () == 0)
+        return EXIT_FAILURE;
 
     /* load the glade interface */
-    gxml = glade_xml_new_from_buffer (accessibility_dialog_glade,
-                                      accessibility_dialog_glade_length,
-                                      NULL, NULL);
-
-    if (G_LIKELY (gxml != NULL))
+    builder = gtk_builder_new ();
+    if (gtk_builder_add_from_string (builder, accessibility_dialog_glade,
+                                     accessibility_dialog_glade_length, &error) != 0)
     {
         /* Configure widgets */
-        accessibility_settings_dialog_configure_widgets (gxml);
+        accessibility_settings_dialog_configure_widgets (builder);
 
         if (G_UNLIKELY (opt_socket_id == 0))
         {
             /* Get the dialog widget */
-            dialog = glade_xml_get_widget (gxml, "accessibility-settings-dialog");
+            dialog = gtk_builder_get_object (builder, "dialog");
 
             /* run the dialog */
             gtk_dialog_run (GTK_DIALOG (dialog));
 
             /* destroy the dialog */
-            gtk_widget_destroy (dialog);
+            gtk_widget_destroy (GTK_WIDGET (dialog));
         }
         else
         {
@@ -213,17 +213,22 @@
             gdk_notify_startup_complete ();
 
             /* Get plug child widget */
-            plug_child = glade_xml_get_widget (gxml, "plug-child");
-            gtk_widget_reparent (plug_child, plug);
-            gtk_widget_show (plug_child);
+            plug_child = gtk_builder_get_object (builder, "plug-child");
+            gtk_widget_reparent (GTK_WIDGET (plug_child), plug);
+            gtk_widget_show (GTK_WIDGET (plug_child));
 
             /* Enter main loop */
             gtk_main ();
         }
     }
+    else
+    {
+        g_error ("Failed to load the glade file: %s.", error->message);
+        g_error_free (error);
+    }
 
-    /* Free Glade XML */
-    g_object_unref (G_OBJECT (gxml));
+    /* Free Builder */
+    g_object_unref (G_OBJECT (builder));
 
     /* release the channel */
     g_object_unref (G_OBJECT (accessibility_channel));




More information about the Xfce4-commits mailing list