diff --git a/src/plugins/tool/ChangeNames.py b/src/plugins/tool/ChangeNames.py
index f972be107..331b9cc72 100644
--- a/src/plugins/tool/ChangeNames.py
+++ b/src/plugins/tool/ChangeNames.py
@@ -37,7 +37,6 @@ import os
#-------------------------------------------------------------------------
import gobject
import gtk
-from gtk import glade
#-------------------------------------------------------------------------
#
@@ -180,17 +179,17 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
base = os.path.dirname(__file__)
glade_file = os.path.join(base,"changenames.glade")
-
- self.top = glade.XML(glade_file,"top","gramps")
- window = self.top.get_widget('top')
- self.top.signal_autoconnect({
+ self.top = gtk.Builder()
+ self.top.add_from_file(glade_file)
+ window = self.top.get_object('top')
+ self.top.connect_signals({
"destroy_passed_object" : self.close,
"on_ok_clicked" : self.on_ok_clicked,
"on_help_clicked" : self.on_help_clicked,
})
- self.list = self.top.get_widget("list")
- self.set_window(window,self.top.get_widget('title'),self.label)
+ self.list = self.top.get_object("list")
+ self.set_window(window,self.top.get_object('title'),self.label)
self.model = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING,
gobject.TYPE_STRING)
diff --git a/src/plugins/tool/ExtractCity.py b/src/plugins/tool/ExtractCity.py
index 47dece14a..8edd6113f 100644
--- a/src/plugins/tool/ExtractCity.py
+++ b/src/plugins/tool/ExtractCity.py
@@ -39,7 +39,6 @@ from gettext import gettext as _
#
#-------------------------------------------------------------------------
import gtk
-from gtk import glade
import gobject
#-------------------------------------------------------------------------
@@ -441,9 +440,8 @@ class ExtractCity(Tool.BatchTool, ManagedWindow.ManagedWindow):
loc = place.get_main_location()
self.progress.step()
- if loc.get_street() == "" and loc.get_city() == "" \
- and loc.get_state() == "" and \
- loc.get_postal_code() == "":
+ if loc.get_street() == loc.get_city() == \
+ loc.get_state() == loc.get_postal_code() == "":
match = CITY_STATE_ZIP.match(descr.strip())
if match:
@@ -516,18 +514,18 @@ class ExtractCity(Tool.BatchTool, ManagedWindow.ManagedWindow):
base = os.path.dirname(__file__)
glade_file = os.path.join(base, "changenames.glade")
-
- self.top = glade.XML(glade_file, "top", "gramps")
- window = self.top.get_widget('top')
- self.top.signal_autoconnect({
+ self.top = gtk.Builder()
+ self.top.add_from_file(glade_file)
+ window = self.top.get_object('top')
+ self.top.connect_signals({
"destroy_passed_object" : self.close,
"on_ok_clicked" : self.on_ok_clicked,
"on_help_clicked" : self.on_help_clicked,
})
- self.list = self.top.get_widget("list")
- self.set_window(window, self.top.get_widget('title'), self.label)
- lbl = self.top.get_widget('info')
+ self.list = self.top.get_object("list")
+ self.set_window(window, self.top.get_object('title'), self.label)
+ lbl = self.top.get_object('info')
lbl.set_line_wrap(True)
lbl.set_text(
_('Below is a list of Places with the possible data that can '
diff --git a/src/plugins/tool/changenames.glade b/src/plugins/tool/changenames.glade
index d0851de55..a7fc513d0 100644
--- a/src/plugins/tool/changenames.glade
+++ b/src/plugins/tool/changenames.glade
@@ -1,156 +1,145 @@
-
-
-
-
-
-
- True
-
- GTK_WINDOW_TOPLEVEL
- GTK_WIN_POS_NONE
- False
- 500
- 450
- True
- False
- True
- False
- False
- GDK_WINDOW_TYPE_HINT_NORMAL
- GDK_GRAVITY_NORTH_WEST
- True
- False
-
-
-
-
- 6
- True
- False
- 0
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 6
- False
- False
-
-
-
-
-
- True
- Below is a list of the family names that
+
+
+
+
-
- 0
- False
- False
-
-
-
-
-
- True
- True
- GTK_POLICY_AUTOMATIC
- GTK_POLICY_AUTOMATIC
- GTK_SHADOW_IN
- GTK_CORNER_TOP_LEFT
-
-
-
- True
- True
- True
- False
- False
- True
- False
- False
- False
-
-
-
-
- 0
- True
- True
-
-
-
-
-
- True
- GTK_BUTTONBOX_END
- 6
-
-
-
- True
- True
- True
- gtk-cancel
- True
- GTK_RELIEF_NORMAL
- True
-
-
-
-
-
-
- True
- True
- True
- _Accept changes and close
- True
- GTK_RELIEF_NORMAL
- True
-
-
-
-
-
- 6
- False
- True
-
-
-
-
-
-
-
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 10
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+ True
+ True
+ GTK_POLICY_AUTOMATIC
+ GTK_POLICY_AUTOMATIC
+ GTK_SHADOW_IN
+ GTK_CORNER_TOP_LEFT
+
+
+ True
+ True
+ True
+ False
+ False
+ True
+ False
+ False
+ False
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+ True
+ GTK_BUTTONBOX_END
+ 6
+
+
+ True
+ True
+ True
+ gtk-cancel
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+
+
+
+ True
+ True
+ True
+ _Accept changes and close
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+
+
+
+ 6
+ False
+ True
+
+
+
+
+
+