Save glade files in GtkBuilder format directly with glade >= 3.6 and remove gtk-build...
authorHong Jen Yee (PCMan) <pcman.tw@gmail.com>
Sun, 7 Jun 2009 01:59:58 +0000 (01:59 +0000)
committerHong Jen Yee (PCMan) <pcman.tw@gmail.com>
Sun, 7 Jun 2009 01:59:58 +0000 (01:59 +0000)
configure.ac
data/Makefile.am
data/ui/panel-pref.glade
gtk-builder-convert [deleted file]
src/gtk-run.c

index dfda43e..3311474 100644 (file)
@@ -37,12 +37,6 @@ AM_CONDITIONAL(ENABLE_MENU_CACHE, test x"$enable_menu_cache" = x"yes")
 PACKAGE_CFLAGS="$PACKAGE_CFLAGS $MENU_CACHE_CFLAGS"
 PACKAGE_LIBS="$PACKAGE_LIBS $MENU_CACHE_LIBS"
 
-# Gtk Builder
-#AC_PATH_PROG([GTK_BUILDER_CONVERT],[gtk-builder-convert],[false])
-#if test "$GTK_BUILDER_CONVERT" = "false"; then
-#  AC_MSG_ERROR([gtk-builder-convert not found])
-#fi
-
 AC_ARG_ENABLE([cast-checks],
     AS_HELP_STRING([--enable-cast-checks],
                [enable Glib casting checks (default: disable)]),
index 6c2f9ec..8e5844d 100644 (file)
@@ -13,8 +13,6 @@ ui_DATA = $(ui_in_files:.glade=.ui)
 
 # Generate GtkBuilder UI files from Glade files
 %.ui: %.glade
-       $(top_srcdir)/gtk-builder-convert $< $@
-#      $(GTK_BUILDER_CONVERT) $< $@
        $(top_builddir)/src/xml-purge $@
 
 CLEANFILES = \
index a2b6ac6..16f6645 100644 (file)
 <?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.12 -->
+<interface>
+  <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="panel_pref">
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">32767</property>
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="value">2</property>
+    <property name="lower">2</property>
+    <property name="upper">10</property>
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Left</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Center</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Right</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model2">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Left</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Right</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Top</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Bottom</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model3">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Pixels</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model4">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Dynamic</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Pixels</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">% Percent</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkDialog" id="panel_pref">
     <property name="visible">True</property>
     <property name="title" translatable="yes">Panel Preferences</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <child>
-          <widget class="GtkNotebook" id="notebook">
+          <object class="GtkNotebook" id="notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <child>
-              <widget class="GtkVBox" id="vbox1">
+              <object class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="border_width">6</property>
                 <property name="spacing">4</property>
                 <child>
-                  <widget class="GtkHBox" id="hbox6">
+                  <object class="GtkHBox" id="hbox6">
                     <property name="visible">True</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">none</property>
                         <child>
-                          <widget class="GtkAlignment" id="alignment1">
+                          <object class="GtkAlignment" id="alignment1">
                             <property name="visible">True</property>
                             <property name="left_padding">8</property>
                             <child>
-                              <widget class="GtkTable" id="table1">
+                              <object class="GtkTable" id="table1">
                                 <property name="visible">True</property>
                                 <property name="n_rows">3</property>
                                 <property name="n_columns">2</property>
                                 <property name="row_spacing">2</property>
                                 <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">Edge:</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="x_options"></property>
                                     <property name="y_options"></property>
                                   </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">Alignment:</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="top_attach">1</property>
                                     <property name="bottom_attach">2</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label9">
+                                  <object class="GtkLabel" id="label9">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
                                     <property name="label" translatable="yes">Margin:</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="top_attach">2</property>
                                     <property name="bottom_attach">3</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkComboBox" id="align">
+                                  <object class="GtkComboBox" id="align">
                                     <property name="visible">True</property>
-                                    <property name="items" translatable="yes">Left
-Center
-Right</property>
-                                  </widget>
+                                    <property name="model">model1</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer1"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
@@ -90,13 +177,16 @@ Right</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkComboBox" id="edge">
+                                  <object class="GtkComboBox" id="edge">
                                     <property name="visible">True</property>
-                                    <property name="items" translatable="yes">Left
-Right
-Top
-Bottom</property>
-                                  </widget>
+                                    <property name="model">model2</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer2"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
@@ -105,12 +195,12 @@ Bottom</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkSpinButton" id="margin">
+                                  <object class="GtkSpinButton" id="margin">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="adjustment">0 0 32767 1 0 0</property>
+                                    <property name="adjustment">adjustment1</property>
                                     <property name="climb_rate">1</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
@@ -120,57 +210,54 @@ Bottom</property>
                                     <property name="y_options"></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">&lt;b&gt;Position&lt;/b&gt;</property>
                             <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <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">none</property>
                         <child>
-                          <widget class="GtkAlignment" id="alignment2">
+                          <object class="GtkAlignment" id="alignment2">
                             <property name="visible">True</property>
                             <property name="left_padding">8</property>
                             <child>
-                              <widget class="GtkTable" id="table2">
+                              <object class="GtkTable" id="table2">
                                 <property name="visible">True</property>
                                 <property name="n_rows">2</property>
                                 <property name="n_columns">3</property>
                                 <property name="row_spacing">2</property>
                                 <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">Width:</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="x_options"></property>
                                     <property name="y_options"></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">Height:</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="top_attach">1</property>
                                     <property name="bottom_attach">2</property>
@@ -179,10 +266,16 @@ Bottom</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkComboBox" id="height_unit">
+                                  <object class="GtkComboBox" id="height_unit">
                                     <property name="visible">True</property>
-                                    <property name="items" translatable="yes">Pixels</property>
-                                  </widget>
+                                    <property name="model">model3</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer3"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
                                   <packing>
                                     <property name="left_attach">2</property>
                                     <property name="right_attach">3</property>
@@ -193,12 +286,12 @@ Bottom</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkSpinButton" id="width">
+                                  <object class="GtkSpinButton" id="width">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="adjustment">0 0 100 1 0 0</property>
+                                    <property name="adjustment">adjustment2</property>
                                     <property name="climb_rate">1</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
@@ -207,12 +300,12 @@ Bottom</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkSpinButton" id="height">
+                                  <object class="GtkSpinButton" id="height">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
-                                    <property name="adjustment">0 0 100 1 0 0</property>
+                                    <property name="adjustment">adjustment3</property>
                                     <property name="climb_rate">1</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
@@ -223,12 +316,16 @@ Bottom</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkComboBox" id="width_unit">
+                                  <object class="GtkComboBox" id="width_unit">
                                     <property name="visible">True</property>
-                                    <property name="items" translatable="yes">Dynamic
-Pixels
-% Percent</property>
-                                  </widget>
+                                    <property name="model">model4</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="renderer4"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
                                   <packing>
                                     <property name="left_attach">2</property>
                                     <property name="right_attach">3</property>
@@ -236,53 +333,50 @@ Pixels
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
-                              </widget>
+                              </object>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                        <child>
-                          <widget class="GtkLabel" id="label6">
+                        <child type="label">
+                          <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
                             <property name="label" translatable="yes">&lt;b&gt;Size&lt;/b&gt;</property>
                             <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkFrame" id="frame4">
+                  <object class="GtkFrame" id="frame4">
                     <property name="visible">True</property>
                     <property name="label_xalign">0</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="left_padding">8</property>
                         <child>
-                          <widget class="GtkVBox" id="vbox4">
+                          <object class="GtkVBox" id="vbox4">
                             <property name="visible">True</property>
                             <property name="spacing">2</property>
                             <child>
-                              <widget class="GtkRadioButton" id="bg_none">
+                              <object class="GtkRadioButton" id="bg_none">
                                 <property name="label" translatable="yes">None (Use system theme)</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
@@ -290,11 +384,11 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkHBox" id="hbox2">
+                              <object class="GtkHBox" id="hbox2">
                                 <property name="visible">True</property>
                                 <property name="spacing">12</property>
                                 <child>
-                                  <widget class="GtkRadioButton" id="bg_transparency">
+                                  <object class="GtkRadioButton" id="bg_transparency">
                                     <property name="label" translatable="yes">Enable Transparency</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
@@ -302,7 +396,7 @@ Pixels
                                     <property name="use_underline">True</property>
                                     <property name="draw_indicator">True</property>
                                     <property name="group">bg_none</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
@@ -310,14 +404,14 @@ Pixels
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox3">
+                                  <object class="GtkHBox" id="hbox3">
                                     <property name="visible">True</property>
                                     <property name="spacing">2</property>
                                     <child>
-                                      <widget class="GtkLabel" id="label20">
+                                      <object class="GtkLabel" id="label20">
                                         <property name="visible">True</property>
                                         <property name="label" translatable="yes">Tint color:</property>
-                                      </widget>
+                                      </object>
                                       <packing>
                                         <property name="expand">False</property>
                                         <property name="fill">False</property>
@@ -325,25 +419,25 @@ Pixels
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkColorButton" id="tint_clr">
+                                      <object class="GtkColorButton" id="tint_clr">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="receives_default">False</property>
                                         <property name="use_alpha">True</property>
-                                      </widget>
+                                      </object>
                                       <packing>
                                         <property name="expand">False</property>
                                         <property name="fill">False</property>
                                         <property name="position">1</property>
                                       </packing>
                                     </child>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
@@ -351,10 +445,10 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkHBox" id="hbox4">
+                              <object class="GtkHBox" id="hbox4">
                                 <property name="visible">True</property>
                                 <child>
-                                  <widget class="GtkRadioButton" id="bg_image">
+                                  <object class="GtkRadioButton" id="bg_image">
                                     <property name="label" translatable="yes">Enable Image:</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
@@ -362,7 +456,7 @@ Pixels
                                     <property name="use_underline">True</property>
                                     <property name="draw_indicator">True</property>
                                     <property name="group">bg_none</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
@@ -370,63 +464,60 @@ Pixels
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkFileChooserButton" id="img_file">
+                                  <object class="GtkFileChooserButton" id="img_file">
                                     <property name="visible">True</property>
                                     <property name="title" translatable="yes">Select an image file</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
                                 <property name="position">2</property>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                     </child>
-                    <child>
-                      <widget class="GtkLabel" id="label18">
+                    <child type="label">
+                      <object class="GtkLabel" id="label18">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">&lt;b&gt;Background&lt;/b&gt;</property>
                         <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
+                      </object>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkFrame" id="frame5">
+                  <object class="GtkFrame" id="frame5">
                     <property name="visible">True</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <widget class="GtkAlignment" id="alignment5">
+                      <object class="GtkAlignment" id="alignment5">
                         <property name="visible">True</property>
                         <property name="left_padding">8</property>
                         <child>
-                          <widget class="GtkHBox" id="hbox1">
+                          <object class="GtkHBox" id="hbox1">
                             <property name="visible">True</property>
                             <property name="spacing">2</property>
                             <child>
-                              <widget class="GtkCheckButton" id="use_font_clr">
+                              <object class="GtkCheckButton" id="use_font_clr">
                                 <property name="label" translatable="yes">Custom Color</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
@@ -434,108 +525,104 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkColorButton" id="font_clr">
+                              <object class="GtkColorButton" id="font_clr">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                     </child>
-                    <child>
-                      <widget class="GtkLabel" id="label19">
+                    <child type="label">
+                      <object class="GtkLabel" id="label19">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">&lt;b&gt;Font&lt;/b&gt;</property>
                         <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
+                      </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">General</property>
-              </widget>
+              </object>
               <packing>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkHBox" id="hbox5">
+              <object class="GtkHBox" id="hbox5">
                 <property name="visible">True</property>
                 <property name="spacing">2</property>
                 <child>
-                  <widget class="GtkVBox" id="vbox5">
+                  <object class="GtkVBox" id="vbox5">
                     <property name="visible">True</property>
                     <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hscrollbar_policy">automatic</property>
                         <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">in</property>
                         <child>
-                          <widget class="GtkTreeView" id="plugin_list">
+                          <object class="GtkTreeView" id="plugin_list">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="rules_hint">True</property>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkLabel" id="plugin_desc">
+                      <object class="GtkLabel" id="plugin_desc">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="xalign">0</property>
                         <property name="wrap">True</property>
                         <property name="selectable">True</property>
                         <property name="ellipsize">end</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkVBox" id="vbox6">
+                  <object class="GtkVBox" id="vbox6">
                     <property name="visible">True</property>
                     <property name="border_width">2</property>
                     <property name="spacing">2</property>
                     <child>
-                      <widget class="GtkButton" id="add_btn">
+                      <object class="GtkButton" id="add_btn">
                         <property name="label">gtk-add</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_stock">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -543,13 +630,13 @@ Pixels
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="remove_btn">
+                      <object class="GtkButton" id="remove_btn">
                         <property name="label">gtk-remove</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_stock">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -557,13 +644,13 @@ Pixels
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="edit_btn">
+                      <object class="GtkButton" id="edit_btn">
                         <property name="label">gtk-edit</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_stock">True</property>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -571,17 +658,17 @@ Pixels
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="moveup_btn">
+                      <object class="GtkButton" id="moveup_btn">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <child>
-                          <widget class="GtkImage" id="image1">
+                          <object class="GtkImage" id="image1">
                             <property name="visible">True</property>
                             <property name="stock">gtk-go-up</property>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
@@ -589,72 +676,71 @@ Pixels
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="movedown_btn">
+                      <object class="GtkButton" id="movedown_btn">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <child>
-                          <widget class="GtkImage" id="image2">
+                          <object class="GtkImage" id="image2">
                             <property name="visible">True</property>
                             <property name="stock">gtk-go-down</property>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
                         <property name="position">4</property>
                       </packing>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
               <packing>
                 <property name="position">1</property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label3">
+            <child type="tab">
+              <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">Panel Applets</property>
-              </widget>
+              </object>
               <packing>
                 <property name="position">1</property>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkVBox" id="vbox3">
+              <object class="GtkVBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="border_width">6</property>
                 <property name="spacing">4</property>
                 <child>
-                  <widget class="GtkFrame" id="frame6">
+                  <object class="GtkFrame" id="frame6">
                     <property name="visible">True</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <widget class="GtkAlignment" id="alignment6">
+                      <object class="GtkAlignment" id="alignment6">
                         <property name="visible">True</property>
                         <property name="left_padding">8</property>
                         <child>
-                          <widget class="GtkTable" id="table3">
+                          <object class="GtkTable" id="table3">
                             <property name="visible">True</property>
                             <property name="border_width">2</property>
                             <property name="n_rows">3</property>
                             <property name="n_columns">2</property>
                             <property name="row_spacing">2</property>
                             <child>
-                              <widget class="GtkEntry" id="logout">
+                              <object class="GtkEntry" id="logout">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">&#x25CF;</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
@@ -664,11 +750,11 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkEntry" id="term">
+                              <object class="GtkEntry" id="term">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">&#x25CF;</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
@@ -678,11 +764,11 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkEntry" id="file_manager">
+                              <object class="GtkEntry" id="file_manager">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="invisible_char">&#x25CF;</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
@@ -690,11 +776,11 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="logout_label">
+                              <object class="GtkLabel" id="logout_label">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Logout Command:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">2</property>
                                 <property name="bottom_attach">3</property>
@@ -703,11 +789,11 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label24">
+                              <object class="GtkLabel" id="label24">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">Terminal Emulator:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
@@ -716,57 +802,54 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkLabel" id="label23">
+                              <object class="GtkLabel" id="label23">
                                 <property name="visible">True</property>
                                 <property name="xalign">0</property>
                                 <property name="label" translatable="yes">File Manager:</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="x_options"></property>
                                 <property name="y_options"></property>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                     </child>
-                    <child>
-                      <widget class="GtkLabel" id="label22">
+                    <child type="label">
+                      <object class="GtkLabel" id="label22">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">&lt;b&gt;Set Preferred Applications&lt;/b&gt;</property>
                         <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
+                      </object>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">0</property>
                   </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">none</property>
                     <child>
-                      <widget class="GtkAlignment" id="alignment3">
+                      <object class="GtkAlignment" id="alignment3">
                         <property name="visible">True</property>
                         <property name="left_padding">8</property>
                         <child>
-                          <widget class="GtkVBox" id="vbox2">
+                          <object class="GtkVBox" id="vbox2">
                             <property name="visible">True</property>
                             <child>
-                              <widget class="GtkCheckButton" id="as_dock">
+                              <object class="GtkCheckButton" id="as_dock">
                                 <property name="label" translatable="yes">Make window managers treat the panel as dock</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
@@ -774,65 +857,62 @@ Pixels
                               </packing>
                             </child>
                             <child>
-                              <widget class="GtkCheckButton" id="reserve_space">
+                              <object class="GtkCheckButton" id="reserve_space">
                                 <property name="label" translatable="yes">Reserve space, and not covered by maximized windows</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
                                 <property name="draw_indicator">True</property>
-                              </widget>
+                              </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                     </child>
-                    <child>
-                      <widget class="GtkLabel" id="label15">
+                    <child type="label">
+                      <object class="GtkLabel" id="label15">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">&lt;b&gt;Properties&lt;/b&gt;</property>
                         <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
+                      </object>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkFrame" id="frame7">
+                  <object class="GtkFrame" id="frame7">
                     <property name="visible">True</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <widget class="GtkAlignment" id="alignment7">
+                      <object class="GtkAlignment" id="alignment7">
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <widget class="GtkAlignment" id="alignment8">
+                          <object class="GtkAlignment" id="alignment8">
                             <property name="visible">True</property>
                             <child>
-                              <widget class="GtkVBox" id="vbox8">
+                              <object class="GtkVBox" id="vbox8">
                                 <property name="visible">True</property>
                                 <property name="orientation">vertical</property>
                                 <property name="homogeneous">True</property>
                                 <child>
-                                  <widget class="GtkCheckButton" id="autohide">
+                                  <object class="GtkCheckButton" id="autohide">
                                     <property name="label" translatable="yes">Minimize panel when not in use</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="draw_indicator">True</property>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
@@ -840,118 +920,116 @@ Pixels
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkHBox" id="hbox8">
+                                  <object class="GtkHBox" id="hbox8">
                                     <property name="visible">True</property>
                                     <child>
-                                      <widget class="GtkLabel" id="label12">
+                                      <object class="GtkLabel" id="label12">
                                         <property name="visible">True</property>
                                         <property name="xalign">0</property>
                                         <property name="label" translatable="yes">Size when minimized</property>
-                                      </widget>
+                                      </object>
                                       <packing>
                                         <property name="position">0</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkSpinButton" id="height_when_minimized">
+                                      <object class="GtkSpinButton" id="height_when_minimized">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="max_length">2</property>
                                         <property name="invisible_char">&#x2022;</property>
-                                        <property name="adjustment">2 2 10 1 0 0</property>
-                                      </widget>
+                                        <property name="adjustment">adjustment4</property>
+                                      </object>
                                       <packing>
                                         <property name="position">1</property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label2">
+                                      <object class="GtkLabel" id="label2">
                                         <property name="visible">True</property>
                                         <property name="xalign">0.10000000149011612</property>
                                         <property name="label" translatable="yes">pixels</property>
-                                      </widget>
+                                      </object>
                                       <packing>
                                         <property name="position">2</property>
                                       </packing>
                                     </child>
-                                  </widget>
+                                  </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
                                     <property name="position">1</property>
                                   </packing>
                                 </child>
-                              </widget>
+                              </object>
                             </child>
-                          </widget>
+                          </object>
                         </child>
-                      </widget>
+                      </object>
                     </child>
-                    <child>
-                      <widget class="GtkLabel" id="label13">
+                    <child type="label">
+                      <object class="GtkLabel" id="label13">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">&lt;b&gt;Automatic hiding&lt;/b&gt;</property>
                         <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
+                      </object>
                     </child>
-                  </widget>
+                  </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
-              </widget>
+              </object>
               <packing>
                 <property name="position">2</property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkLabel" id="label4">
+            <child type="tab">
+              <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">Advanced</property>
-              </widget>
+              </object>
               <packing>
                 <property name="position">2</property>
                 <property name="tab_fill">False</property>
-                <property name="type">tab</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="position">2</property>
           </packing>
         </child>
         <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="layout_style">end</property>
             <child>
-              <widget class="GtkButton" id="close_btn">
+              <object class="GtkButton" id="close_btn">
                 <property name="label">gtk-close</property>
-                <property name="response_id">-7</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
-              </widget>
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
-          </widget>
+          </object>
           <packing>
             <property name="expand">False</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
-      </widget>
+      </object>
     </child>
-  </widget>
-</glade-interface>
+    <action-widgets>
+      <action-widget response="-7">close_btn</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/gtk-builder-convert b/gtk-builder-convert
deleted file mode 100755 (executable)
index e09d055..0000000
+++ /dev/null
@@ -1,754 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2006-2008 Async Open Source
-#                         Henrique Romano <henrique@async.com.br>
-#                         Johan Dahlin <jdahlin@async.com.br>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# TODO:
-#  Toolbars
-
-"""Usage: gtk-builder-convert [OPTION] [INPUT] [OUTPUT]
-Converts Glade files into XML files which can be loaded with GtkBuilder.
-The [INPUT] file is
-
-  -w, --skip-windows     Convert everything but GtkWindow subclasses.
-  -r, --root             Convert only widget named root and its children
-  -h, --help             display this help and exit
-
-When OUTPUT is -, write to standard input.
-
-Examples:
-  gtk-builder-convert preference.glade preferences.ui
-
-Report bugs to http://bugzilla.gnome.org/."""
-
-import getopt
-import os
-import sys
-
-from xml.dom import minidom, Node
-
-WINDOWS = ['GtkWindow',
-           'GtkDialog',
-           'GtkFileChooserDialog',
-           'GtkMessageDialog']
-
-# The subprocess is only available in Python 2.4+
-try:
-    import subprocess
-    subprocess # pyflakes
-except ImportError:
-    subprocess = None
-
-def get_child_nodes(node):
-    assert node.tagName == 'object'
-    nodes = []
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName != 'child':
-            continue
-        nodes.append(child)
-    return nodes
-
-def get_properties(node):
-    assert node.tagName == 'object'
-    properties = {}
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName != 'property':
-            continue
-        value = child.childNodes[0].data
-        properties[child.getAttribute('name')] = value
-    return properties
-
-def get_property(node, property_name):
-    assert node.tagName == 'object'
-    properties = get_properties(node)
-    return properties.get(property_name)
-
-def get_property_node(node, property_name):
-    assert node.tagName == 'object'
-    properties = {}
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName != 'property':
-            continue
-        if child.getAttribute('name') == property_name:
-            return child
-
-def get_signal_nodes(node):
-    assert node.tagName == 'object'
-    signals = []
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName == 'signal':
-            signals.append(child)
-    return signals
-
-def get_property_nodes(node):
-    assert node.tagName == 'object'
-    properties = []
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        # FIXME: handle comments
-        if child.tagName == 'property':
-            properties.append(child)
-    return properties
-
-def get_accelerator_nodes(node):
-    assert node.tagName == 'object'
-    accelerators = []
-    for child in node.childNodes:
-        if child.nodeType != Node.ELEMENT_NODE:
-            continue
-        if child.tagName == 'accelerator':
-            accelerators.append(child)
-    return accelerators
-
-def get_object_node(child_node):
-    assert child_node.tagName == 'child', child_node
-    nodes = []
-    for node in child_node.childNodes:
-        if node.nodeType != Node.ELEMENT_NODE:
-            continue
-        if node.tagName == 'object':
-            nodes.append(node)
-    assert len(nodes) == 1, nodes
-    return nodes[0]
-
-def copy_properties(node, props, prop_dict):
-    assert node.tagName == 'object'
-    for prop_name in props:
-        child = get_property_node(node, prop_name)
-        if child is not None:
-            prop_dict[prop_name] = child
-
-    return node
-
-class GtkBuilderConverter(object):
-
-    def __init__(self, skip_windows, root):
-        self.skip_windows = skip_windows
-        self.root = root
-        self.root_objects = []
-        self.objects = {}
-
-    #
-    # Public API
-    #
-
-    def parse_file(self, file):
-        self._dom = minidom.parse(file)
-        self._parse()
-
-    def parse_buffer(self, buffer):
-        self._dom = minidom.parseString(buffer)
-        self._parse()
-
-    def to_xml(self):
-        xml = self._dom.toprettyxml("", "")
-        return xml.encode('utf-8')
-
-    #
-    # Private
-    #
-
-    def _get_object(self, name):
-        return self.objects.get(name)
-
-    def _get_objects_by_attr(self, attribute, value):
-        return [w for w in self._dom.getElementsByTagName("object")
-                      if w.getAttribute(attribute) == value]
-
-    def _create_object(self, obj_class, obj_id, template=None, properties=None):
-        """
-        Creates a new <object> tag.
-        Optionally a name template can be provided which will be used
-        to avoid naming collisions.
-        The properties dictionary can either contain string values or Node
-        values. If a node is provided the name of the node will be overridden
-        by the dictionary key.
-
-        @param obj_class: class of the object (class tag)
-        @param obj_id: identifier of the object (id tag)
-        @param template: name template to use, for example 'button'
-        @param properties: dictionary of properties
-        @type properties: string or Node.
-        @returns: Newly created node of the object
-        """
-        if template is not None:
-            count = 1
-            while True:
-                obj_id = template + str(count)
-                widget = self._get_object(obj_id)
-                if widget is None:
-                    break
-
-                count += 1
-
-        obj = self._dom.createElement('object')
-        obj.setAttribute('class', obj_class)
-        obj.setAttribute('id', obj_id)
-        if properties:
-            for name, value in properties.items():
-                if isinstance(value, Node):
-                    # Reuse the node, so translatable and context still will be
-                    # set when converting nodes. See also #509153
-                    prop = value
-                else:
-                    prop = self._dom.createElement('property')
-                    prop.appendChild(self._dom.createTextNode(value))
-
-                prop.setAttribute('name', str(name))
-                obj.appendChild(prop)
-        self.objects[obj_id] = obj
-        return obj
-
-    def _create_root_object(self, obj_class, template, properties=None):
-        obj = self._create_object(obj_class, None, template, properties)
-        self.root_objects.append(obj)
-        return obj
-
-    def _parse(self):
-        glade_iface = self._dom.getElementsByTagName("glade-interface")
-        assert glade_iface, ("Badly formed XML, there is "
-                             "no <glade-interface> tag.")
-        # Rename glade-interface to interface
-        glade_iface[0].tagName = 'interface'
-        self._interface = glade_iface[0]
-
-        # Remove glade-interface doc type
-        for node in self._dom.childNodes:
-            if node.nodeType == Node.DOCUMENT_TYPE_NODE:
-                if node.name == 'glade-interface':
-                    self._dom.removeChild(node)
-
-        # Strip unsupported tags
-        for tag in ['requires', 'requires-version']:
-            for child in self._dom.getElementsByTagName(tag):
-                child.parentNode.removeChild(child)
-
-        if self.root:
-            self._strip_root(self.root)
-
-        # Rename widget to object
-        objects = self._dom.getElementsByTagName("widget")
-        for node in objects:
-            node.tagName = "object"
-
-        for node in objects:
-            self._convert(node.getAttribute("class"), node)
-            self.objects[node.getAttribute('id')] = node
-
-        # Convert Gazpachos UI tag
-        for node in self._dom.getElementsByTagName("ui"):
-            self._convert_ui(node)
-
-        # Convert accessibility tag
-        for node in self._dom.getElementsByTagName("accessibility"):
-            self._convert_accessibility(node)
-
-        # Output the newly created root objects and sort them
-        # by attribute id
-        for obj in sorted(self.root_objects,
-                          key=lambda n: n.getAttribute('id'),
-                          reverse=True):
-            self._interface.childNodes.insert(0, obj)
-
-    def _convert(self, klass, node):
-        if klass == 'GtkNotebook':
-            self._packing_prop_to_child_attr(node, "type", "tab")
-        elif klass in ['GtkExpander', 'GtkFrame']:
-            self._packing_prop_to_child_attr(
-                node, "type", "label_item", "label")
-        elif klass == "GtkMenuBar":
-            self._convert_menu(node)
-        elif klass == "GtkMenu":
-            # Only convert toplevel popups
-            if node.parentNode == self._interface:
-                self._convert_menu(node, popup=True)
-        elif klass in WINDOWS and self.skip_windows:
-            self._remove_window(node)
-        self._default_widget_converter(node)
-
-    def _default_widget_converter(self, node):
-        klass = node.getAttribute("class")
-        for prop in get_property_nodes(node):
-            prop_name = prop.getAttribute("name")
-            if prop_name == "sizegroup":
-                self._convert_sizegroup(node, prop)
-            elif prop_name == "tooltip" and klass != "GtkAction":
-                prop.setAttribute("name", "tooltip-text")
-            elif prop_name in ["response_id", 'response-id']:
-                # It does not make sense to convert responses when
-                # we're not going to output dialogs
-                if self.skip_windows:
-                    continue
-                object_id = node.getAttribute('id')
-                response = prop.childNodes[0].data
-                self._convert_dialog_response(node, object_id, response)
-                prop.parentNode.removeChild(prop)
-            elif prop_name == "adjustment":
-                self._convert_adjustment(prop)
-            elif prop_name == "items" and klass in ['GtkComboBox',
-                                                    'GtkComboBoxEntry']:
-                self._convert_combobox_items(node, prop)
-            elif prop_name == "text" and klass == 'GtkTextView':
-                self._convert_textview_text(prop)
-
-    def _remove_window(self, node):
-        object_node = get_object_node(get_child_nodes(node)[0])
-        parent = node.parentNode
-        parent.removeChild(node)
-        parent.appendChild(object_node)
-
-    def _convert_menu(self, node, popup=False):
-        if node.hasAttribute('constructor'):
-            return
-
-        uimgr = self._create_root_object('GtkUIManager',
-                                         template='uimanager')
-
-        if popup:
-            name = 'popup'
-        else:
-            name = 'menubar'
-
-        menu = self._dom.createElement(name)
-        menu.setAttribute('name', node.getAttribute('id'))
-        node.setAttribute('constructor', uimgr.getAttribute('id'))
-
-        for child in get_child_nodes(node):
-            obj_node = get_object_node(child)
-            item = self._convert_menuitem(uimgr, obj_node)
-            menu.appendChild(item)
-            child.removeChild(obj_node)
-            child.parentNode.removeChild(child)
-
-        ui = self._dom.createElement('ui')
-        uimgr.appendChild(ui)
-
-        ui.appendChild(menu)
-
-    def _convert_menuitem(self, uimgr, obj_node):
-        children = get_child_nodes(obj_node)
-        name = 'menuitem'
-        if children:
-            child_node = children[0]
-            menu_node = get_object_node(child_node)
-            # Can be GtkImage, which will take care of later.
-            if menu_node.getAttribute('class') == 'GtkMenu':
-                name = 'menu'
-
-        object_class = obj_node.getAttribute('class')
-        if object_class in ['GtkMenuItem',
-                            'GtkImageMenuItem',
-                            'GtkCheckMenuItem',
-                            'GtkRadioMenuItem']:
-            menu = self._dom.createElement(name)
-        elif object_class == 'GtkSeparatorMenuItem':
-            return self._dom.createElement('separator')
-        else:
-            raise NotImplementedError(object_class)
-
-        menu.setAttribute('action', obj_node.getAttribute('id'))
-        self._add_action_from_menuitem(uimgr, obj_node)
-        if children:
-            for child in get_child_nodes(menu_node):
-                obj_node = get_object_node(child)
-                item = self._convert_menuitem(uimgr, obj_node)
-                menu.appendChild(item)
-                child.removeChild(obj_node)
-                child.parentNode.removeChild(child)
-        return menu
-
-    def _menuitem_to_action(self, node, properties):
-        copy_properties(node, ['label', 'tooltip'], properties)
-
-    def _togglemenuitem_to_action(self, node, properties):
-        self._menuitem_to_action(node, properties)
-        copy_properties(node, ['active'], properties)
-
-    def _radiomenuitem_to_action(self, node, properties):
-        self._togglemenuitem_to_action(node, properties)
-        copy_properties(node, ['group'], properties)
-
-    def _add_action_from_menuitem(self, uimgr, node):
-        properties = {}
-        object_class = node.getAttribute('class')
-        object_id = node.getAttribute('id')
-        if object_class == 'GtkMenuItem':
-            name = 'GtkAction'
-            self._menuitem_to_action(node, properties)
-        elif object_class == 'GtkCheckMenuItem':
-            name = 'GtkToggleAction'
-            self._togglemenuitem_to_action(node, properties)
-        elif object_class == 'GtkRadioMenuItem':
-            name = 'GtkRadioAction'
-            self._radiomenuitem_to_action(node, properties)
-        elif object_class == 'GtkImageMenuItem':
-            name = 'GtkAction'
-            children = get_child_nodes(node)
-            if (children and
-                children[0].getAttribute('internal-child') == 'image'):
-                image = get_object_node(children[0])
-                child = get_property_node(image, 'stock')
-                if child is not None:
-                    properties['stock_id'] = child
-            self._menuitem_to_action(node, properties)
-        elif object_class == 'GtkSeparatorMenuItem':
-            return
-        else:
-            raise NotImplementedError(object_class)
-
-        if get_property(node, 'use_stock') == 'True':
-            if 'label' in properties:
-                properties['stock_id'] = properties['label']
-                del properties['label']
-
-        properties['name'] = object_id
-        action = self._create_object(name,
-                                     object_id,
-                                     properties=properties)
-        for signal in get_signal_nodes(node):
-            signal_name = signal.getAttribute('name')
-            if signal_name in ['activate', 'toggled']:
-                action.appendChild(signal)
-            else:
-                print 'Unhandled signal %s::%s' % (node.getAttribute('class'),
-                                                   signal_name)
-
-        if not uimgr.childNodes:
-            child = self._dom.createElement('child')
-            uimgr.appendChild(child)
-
-            group = self._create_object('GtkActionGroup', None,
-                                        template='actiongroup')
-            child.appendChild(group)
-        else:
-            group = uimgr.childNodes[0].childNodes[0]
-
-        child = self._dom.createElement('child')
-        group.appendChild(child)
-        child.appendChild(action)
-
-        for accelerator in get_accelerator_nodes(node):
-            signal_name = accelerator.getAttribute('signal')
-            if signal_name != 'activate':
-                print 'Unhandled accelerator signal for %s::%s' % (
-                    node.getAttribute('class'), signal_name)
-                continue
-            accelerator.removeAttribute('signal')
-            child.appendChild(accelerator)
-
-    def _convert_sizegroup(self, node, prop):
-        # This is Gazpacho only
-        node.removeChild(prop)
-        obj = self._get_object(prop.childNodes[0].data)
-        if obj is None:
-            widgets = self._get_objects_by_attr("class", "GtkSizeGroup")
-            if widgets:
-                obj = widgets[-1]
-            else:
-                obj = self._create_root_object('GtkSizeGroup',
-                                               template='sizegroup')
-
-        widgets = obj.getElementsByTagName("widgets")
-        if widgets:
-            assert len(widgets) == 1
-            widgets = widgets[0]
-        else:
-            widgets = self._dom.createElement("widgets")
-            obj.appendChild(widgets)
-
-        member = self._dom.createElement("widget")
-        member.setAttribute("name", node.getAttribute("id"))
-        widgets.appendChild(member)
-
-    def _convert_dialog_response(self, node, object_name, response):
-        # 1) Get parent dialog node
-        while True:
-            # If we can't find the parent dialog, give up
-            if node == self._dom:
-                return
-
-            if (node.tagName == 'object' and
-                node.getAttribute('class') == 'GtkDialog'):
-                dialog = node
-                break
-            node = node.parentNode
-            assert node
-
-        # 2) Get dialogs action-widgets tag, create if not found
-        for child in dialog.childNodes:
-            if child.nodeType != Node.ELEMENT_NODE:
-                continue
-            if child.tagName == 'action-widgets':
-                actions = child
-                break
-        else:
-            actions = self._dom.createElement("action-widgets")
-            dialog.appendChild(actions)
-
-        # 3) Add action-widget tag for the response
-        action = self._dom.createElement("action-widget")
-        action.setAttribute("response", response)
-        action.appendChild(self._dom.createTextNode(object_name))
-        actions.appendChild(action)
-
-    def _convert_adjustment(self, prop):
-        properties = {}
-        if prop.childNodes:
-            data = prop.childNodes[0].data
-            value, lower, upper, step, page, page_size = data.split(' ')
-            properties.update(value=value,
-                              lower=lower,
-                              upper=upper,
-                              step_increment=step,
-                              page_increment=page,
-                              page_size=page_size)
-        else:
-            prop.appendChild(self._dom.createTextNode(""))
-
-        adj = self._create_root_object("GtkAdjustment",
-                                       template='adjustment',
-                                       properties=properties)
-        prop.childNodes[0].data = adj.getAttribute('id')
-
-    def _convert_combobox_items(self, node, prop):
-        parent = prop.parentNode
-
-        translatable = False;
-        if prop.hasAttribute('translatable'):
-            if prop.attributes['translatable'].value == 'yes':
-                translatable = True
-
-        if not prop.childNodes:
-            parent.removeChild(prop)
-            return
-        value = prop.childNodes[0].data
-        model = self._create_root_object("GtkListStore",
-                                         template="model")
-
-        columns = self._dom.createElement('columns')
-        model.appendChild(columns)
-
-        column = self._dom.createElement('column')
-        column.setAttribute('type', 'gchararray')
-        columns.appendChild(column)
-
-        data = self._dom.createElement('data')
-        model.appendChild(data)
-
-        for item in value.split('\n'):
-            row = self._dom.createElement('row')
-            data.appendChild(row)
-
-            col = self._dom.createElement('col')
-            col.setAttribute('id', '0')
-            if translatable:
-                col.setAttribute('translatable', 'yes')
-            col.appendChild(self._dom.createTextNode(item))
-            row.appendChild(col)
-
-        model_prop = self._dom.createElement('property')
-        model_prop.setAttribute('name', 'model')
-        model_prop.appendChild(
-            self._dom.createTextNode(model.getAttribute('id')))
-        parent.appendChild(model_prop)
-
-        parent.removeChild(prop)
-
-        child = self._dom.createElement('child')
-        node.appendChild(child)
-        cell_renderer = self._create_object('GtkCellRendererText', None,
-                                            template='renderer')
-        child.appendChild(cell_renderer)
-
-        attributes = self._dom.createElement('attributes')
-        child.appendChild(attributes)
-
-        attribute = self._dom.createElement('attribute')
-        attributes.appendChild(attribute)
-        attribute.setAttribute('name', 'text')
-        attribute.appendChild(self._dom.createTextNode('0'))
-
-    def _convert_textview_text(self, prop):
-        if not prop.childNodes:
-            prop.parentNode.removeChild(prop)
-            return
-
-        data = prop.childNodes[0].data
-        if prop.hasAttribute('translatable'):
-            prop.removeAttribute('translatable')
-        tbuffer = self._create_root_object("GtkTextBuffer",
-                                           template='textbuffer',
-                                           properties=dict(text=data))
-        prop.childNodes[0].data = tbuffer.getAttribute('id')
-        prop.setAttribute('name', 'buffer')
-
-    def _packing_prop_to_child_attr(self, node, prop_name, prop_val,
-                                   attr_val=None):
-        for child in get_child_nodes(node):
-            packing_props = [p for p in child.childNodes if p.nodeName == "packing"]
-            if not packing_props:
-                continue
-            assert len(packing_props) == 1
-            packing_prop = packing_props[0]
-            properties = packing_prop.getElementsByTagName("property")
-            for prop in properties:
-                if (prop.getAttribute("name") != prop_name or
-                    prop.childNodes[0].data != prop_val):
-                    continue
-                packing_prop.removeChild(prop)
-                child.setAttribute(prop_name, attr_val or prop_val)
-            if len(properties) == 1:
-                child.removeChild(packing_prop)
-
-    def _convert_ui(self, node):
-        cdata = node.childNodes[0]
-        data = cdata.toxml().strip()
-        if not data.startswith("<![CDATA[") or not data.endswith("]]>"):
-            return
-        data = data[9:-3]
-        child = minidom.parseString(data).childNodes[0]
-        nodes = child.childNodes[:]
-        for child_node in nodes:
-            node.appendChild(child_node)
-        node.removeChild(cdata)
-        if not node.hasAttribute("id"):
-            return
-
-        # Updating references made by widgets
-        parent_id = node.parentNode.getAttribute("id")
-        for widget in self._get_objects_by_attr("constructor",
-                                                node.getAttribute("id")):
-            widget.getAttributeNode("constructor").value = parent_id
-        node.removeAttribute("id")
-
-    def _convert_accessibility(self, node):
-        objectNode = node.parentNode
-        parent_id = objectNode.getAttribute("id")
-
-        properties = {}
-        for node in node.childNodes:
-            if node.nodeName == 'atkproperty':
-                node.tagName = 'property'
-                properties[node.getAttribute('name')] = node
-                node.parentNode.removeChild(node)
-            elif node.nodeName == 'atkrelation':
-                node.tagName = 'relation'
-                relation_type = node.getAttribute('type')
-                relation_type = relation_type.replace('_', '-')
-                node.setAttribute('type', relation_type)
-            elif node.nodeName == 'atkaction':
-                node.tagName = 'action'
-
-        if properties:
-            child = self._dom.createElement('child')
-            child.setAttribute("internal-child", "accessible")
-
-            atkobject = self._create_object(
-                "AtkObject", None,
-                template='a11y-%s' % (parent_id,),
-                properties=properties)
-            child.appendChild(atkobject)
-            objectNode.appendChild(child)
-
-    def _strip_root(self, root_name):
-        for widget in self._dom.getElementsByTagName("widget"):
-            if widget.getAttribute('id') == root_name:
-                break
-        else:
-            raise SystemExit("Could not find an object called `%s'" % (
-                root_name))
-
-        for child in self._interface.childNodes[:]:
-            if child.nodeType != Node.ELEMENT_NODE:
-                continue
-            child.parentNode.removeChild(child)
-
-        self._interface.appendChild(widget)
-
-
-def _indent(output):
-    if not subprocess:
-        return output
-
-    for directory in os.environ['PATH'].split(os.pathsep):
-        filename = os.path.join(directory, 'xmllint')
-        if os.path.exists(filename):
-            break
-    else:
-        return output
-
-    s = subprocess.Popen([filename, '--format', '-'],
-                         stdin=subprocess.PIPE,
-                         stdout=subprocess.PIPE)
-    s.stdin.write(output)
-    s.stdin.close()
-    return s.stdout.read()
-
-def usage():
-    print __doc__
-
-def main(args):
-    try:
-        opts, args = getopt.getopt(args[1:], "hwr:",
-                                   ["help", "skip-windows", "root="])
-    except getopt.GetoptError:
-        usage()
-        return 2
-
-    if len(args) != 2:
-        usage()
-        return 2
-
-    input_filename, output_filename = args
-
-    skip_windows = False
-    split = False
-    root = None
-    for o, a in opts:
-        if o in ("-h", "--help"):
-            usage()
-            sys.exit()
-        elif o in ("-r", "--root"):
-            root = a
-        elif o in ("-w", "--skip-windows"):
-            skip_windows = True
-
-    conv = GtkBuilderConverter(skip_windows=skip_windows,
-                               root=root)
-    conv.parse_file(input_filename)
-
-    xml = _indent(conv.to_xml())
-    if output_filename == "-":
-        print xml
-    else:
-        open(output_filename, 'w').write(xml)
-        print "Wrote", output_filename
-
-    return 0
-
-if __name__ == "__main__":
-    sys.exit(main(sys.argv))
index 364d0b8..9de9289 100644 (file)
@@ -121,7 +121,7 @@ static MenuCacheApp* match_app_by_exec(const char* exec)
             }
         }
     }
-    
+
     g_free(exec_path);
     return ret;
 }
@@ -139,7 +139,7 @@ static gboolean setup_auto_complete( gpointer entry )
     gtk_entry_completion_set_popup_set_width( comp, TRUE );
     gtk_entry_completion_set_popup_single_match( comp, FALSE );
 #endif
-     store = gtk_list_store_new( 1, G_TYPE_STRING );
+    store = gtk_list_store_new( 1, G_TYPE_STRING );
 
     for( dirname = dirnames; *dirname; ++dirname )
     {