Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1017)
+++ ChangeLog	(working copy)
@@ -1,3 +1,13 @@
+2009-04-24  Pedro Fragoso  <ember@ubuntu.com>
+
+	* simple-editor/GMenuSimpleEditor/config.py.in:
+	* simple-editor/GMenuSimpleEditor/main.py:
+	* simple-editor/GMenuSimpleEditor/maindialog.py:
+	* simple-editor/Makefile.am:
+	* simple-editor/gmenu-simple-editor.glade:
+	* simple-editor/gmenu-simple-editor.ui: drop
+	ligblade and use GtkBuilder bug #580158
+
 2009-04-14  Vincent Untz  <vuntz@gnome.org>
 
 	* configure.in: post-release bump to 2.26.2
Index: simple-editor/gmenu-simple-editor.glade
===================================================================
--- simple-editor/gmenu-simple-editor.glade	(revision 1017)
+++ simple-editor/gmenu-simple-editor.glade	(working copy)
@@ -1,232 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="menu_editor_dialog">
-  <property name="border_width">5</property>
-  <property name="title" translatable="yes">Edit Menus</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="has_separator">False</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">2</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area1">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="help_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-help</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-11</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="defaults_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">_Defaults</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-2</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="close_button">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-close</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-3</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHPaned" id="hpaned1">
-	  <property name="border_width">5</property>
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-
-	  <child>
-	    <widget class="GtkVBox" id="menus_vbox">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">6</property>
-
-	      <child>
-		<widget class="GtkLabel" id="menus_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Menus:</property>
-		  <property name="use_underline">True</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="mnemonic_widget">menus_treeview</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="menus_scrolled">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-		  <property name="shadow_type">GTK_SHADOW_IN</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="menus_treeview">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">False</property>
-		      <property name="reorderable">False</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="shrink">True</property>
-	      <property name="resize">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkVBox" id="applications_vbox">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">6</property>
-
-	      <child>
-		<widget class="GtkLabel" id="applications_label">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Applications:</property>
-		  <property name="use_underline">True</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="mnemonic_widget">applications_treeview</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="applications_scrolled">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-		  <property name="shadow_type">GTK_SHADOW_IN</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="applications_treeview">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">False</property>
-		      <property name="reorderable">False</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="shrink">True</property>
-	      <property name="resize">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-</glade-interface>
Index: simple-editor/gmenu-simple-editor.ui
===================================================================
--- simple-editor/gmenu-simple-editor.ui	(revision 0)
+++ simple-editor/gmenu-simple-editor.ui	(revision 0)
@@ -0,0 +1,217 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<interface>
+  <object class="GtkDialog" id="menu_editor_dialog">
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Edit Menus</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="window_position">GTK_WIN_POS_NONE</property>
+    <property name="modal">False</property>
+    <property name="resizable">True</property>
+    <property name="destroy_with_parent">False</property>
+    <property name="decorated">True</property>
+    <property name="skip_taskbar_hint">False</property>
+    <property name="skip_pager_hint">False</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+    <property name="focus_on_map">True</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="homogeneous">False</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <object class="GtkButton" id="help_button">
+                <property name="visible">True</property>
+                <property name="can_default">True</property>
+                <property name="can_focus">True</property>
+                <property name="label">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="relief">GTK_RELIEF_NORMAL</property>
+                <property name="focus_on_click">True</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="defaults_button">
+                <property name="visible">True</property>
+                <property name="can_default">True</property>
+                <property name="can_focus">True</property>
+                <property name="label" translatable="yes">_Defaults</property>
+                <property name="use_underline">True</property>
+                <property name="relief">GTK_RELIEF_NORMAL</property>
+                <property name="focus_on_click">True</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="close_button">
+                <property name="visible">True</property>
+                <property name="can_default">True</property>
+                <property name="can_focus">True</property>
+                <property name="label">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="relief">GTK_RELIEF_NORMAL</property>
+                <property name="focus_on_click">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHPaned" id="hpaned1">
+            <property name="border_width">5</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <child>
+              <object class="GtkVBox" id="menus_vbox">
+                <property name="visible">True</property>
+                <property name="homogeneous">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkLabel" id="menus_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">_Menus:</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_markup">False</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">False</property>
+                    <property name="selectable">False</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="mnemonic_widget">menus_treeview</property>
+                    <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                    <property name="width_chars">-1</property>
+                    <property name="single_line_mode">False</property>
+                    <property name="angle">0</property>
+                  </object>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="menus_scrolled">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                    <property name="shadow_type">GTK_SHADOW_IN</property>
+                    <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+                    <child>
+                      <object class="GtkTreeView" id="menus_treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="headers_visible">True</property>
+                        <property name="rules_hint">False</property>
+                        <property name="reorderable">False</property>
+                        <property name="enable_search">True</property>
+                        <property name="fixed_height_mode">False</property>
+                        <property name="hover_selection">False</property>
+                        <property name="hover_expand">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="shrink">True</property>
+                <property name="resize">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="applications_vbox">
+                <property name="visible">True</property>
+                <property name="homogeneous">False</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkLabel" id="applications_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">_Applications:</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_markup">False</property>
+                    <property name="justify">GTK_JUSTIFY_LEFT</property>
+                    <property name="wrap">False</property>
+                    <property name="selectable">False</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.5</property>
+                    <property name="xpad">0</property>
+                    <property name="ypad">0</property>
+                    <property name="mnemonic_widget">applications_treeview</property>
+                    <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                    <property name="width_chars">-1</property>
+                    <property name="single_line_mode">False</property>
+                    <property name="angle">0</property>
+                  </object>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkScrolledWindow" id="applications_scrolled">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                    <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                    <property name="shadow_type">GTK_SHADOW_IN</property>
+                    <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+                    <child>
+                      <object class="GtkTreeView" id="applications_treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="headers_visible">True</property>
+                        <property name="rules_hint">False</property>
+                        <property name="reorderable">False</property>
+                        <property name="enable_search">True</property>
+                        <property name="fixed_height_mode">False</property>
+                        <property name="hover_selection">False</property>
+                        <property name="hover_expand">False</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="padding">0</property>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="shrink">True</property>
+                <property name="resize">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-11">help_button</action-widget>
+      <action-widget response="-2">defaults_button</action-widget>
+      <action-widget response="-3">close_button</action-widget>
+    </action-widgets>
+  </object>
+</interface>
Index: simple-editor/Makefile.am
===================================================================
--- simple-editor/Makefile.am	(revision 1017)
+++ simple-editor/Makefile.am	(working copy)
@@ -6,8 +6,8 @@
 	sed -e s!\@pyexecdir\@!@pyexecdir@! -e s!\@PYTHON\@!@PYTHON@! < $< > $@
 	chmod a+x $@
 
-gladedir   = $(pkgdatadir)/glade
-glade_DATA = gmenu-simple-editor.glade
+uidir   = $(pkgdatadir)/ui
+ui_DATA = gmenu-simple-editor.ui
 
 desktopdir = $(datadir)/applications
 desktop_in_files = gmenu-simple-editor.desktop.in 
@@ -18,7 +18,7 @@
 EXTRA_DIST =				\
 	gmenu-simple-editor.in		\
 	gmenu-simple-editor.desktop.in	\
-	gmenu-simple-editor.glade
+	gmenu-simple-editor.ui
 
 CLEANFILES =				\
 	gmenu-simple-editor		\
Index: simple-editor/GMenuSimpleEditor/config.py.in
===================================================================
--- simple-editor/GMenuSimpleEditor/config.py.in	(revision 1017)
+++ simple-editor/GMenuSimpleEditor/config.py.in	(working copy)
@@ -25,4 +25,4 @@
 DATADIR   = "@DATADIR@"
 LOCALEDIR = "@LOCALEDIR@"
 
-GLADEDIR = os.path.join (DATADIR, PACKAGE, "glade")
+UI_DIR = os.path.join (DATADIR, PACKAGE, "ui")
Index: simple-editor/GMenuSimpleEditor/main.py
===================================================================
--- simple-editor/GMenuSimpleEditor/main.py	(revision 1017)
+++ simple-editor/GMenuSimpleEditor/main.py	(working copy)
@@ -23,14 +23,13 @@
     import pygtk; pygtk.require('2.0');
 
     import gtk
-    import gtk.glade
 
     import maindialog
     import config
 
     locale.setlocale (locale.LC_ALL, "")
     gettext.install (config.PACKAGE, config.LOCALEDIR)
-    gtk.glade.bindtextdomain (config.PACKAGE, config.LOCALEDIR)
+    self.ui.set_translation_domain (config.PACKAGE, config.LOCALEDIR)
 
     dialog = maindialog.MenuEditorDialog (args)
 
Index: simple-editor/GMenuSimpleEditor/maindialog.py
===================================================================
--- simple-editor/GMenuSimpleEditor/maindialog.py	(revision 1017)
+++ simple-editor/GMenuSimpleEditor/maindialog.py	(working copy)
@@ -18,7 +18,6 @@
 
 import os.path
 import gtk
-import gtk.glade
 import gmenu
 
 from config import *
@@ -28,19 +27,19 @@
 
 class MenuEditorDialog:
     def __init__ (self, menu_files):
-        glade_file = os.path.join (GLADEDIR, "gmenu-simple-editor.glade")
-        self.xml = gtk.glade.XML (glade_file, "menu_editor_dialog", PACKAGE)
-
-        self.window = self.xml.get_widget ("menu_editor_dialog")
+        ui_file = os.path.join (UI_DIR, "gmenu-simple-editor.ui")
+        self.ui = gtk.Builder()
+        self.ui.add_from_file(ui_file)
+        self.window = self.ui.get_object ("menu_editor_dialog")
         self.window.connect ("destroy", gtk.main_quit)
         self.window.set_default_response (gtk.RESPONSE_ACCEPT)
         self.window.set_icon_name ("gnome-main-menu")
 
-        self.help_button = self.xml.get_widget ("help_button")
+        self.help_button = self.ui.get_object ("help_button")
         self.help_button.set_sensitive (False)
 
-        self.menus_tree   = self.xml.get_widget ("menus_treeview")
-        self.entries_list = self.xml.get_widget ("applications_treeview")
+        self.menus_tree   = self.ui.get_object ("menus_treeview")
+        self.entries_list = self.ui.get_object ("applications_treeview")
 
         self.menu_tree_model = menutreemodel.MenuTreeModel (menu_files)
         
