From 8e081495678acb5f8cb82ac6bd49c3de5ec84cfb Mon Sep 17 00:00:00 2001 From: Gerald Britton Date: Thu, 9 Apr 2009 19:41:06 +0000 Subject: [PATCH] SoundGen.py: convert to use gtkbuilder instead of libglade svn: r12421 --- src/plugins/tool/SoundGen.py | 16 +- src/plugins/tool/soundex.glade | 408 ++++++++++++++++----------------- 2 files changed, 207 insertions(+), 217 deletions(-) diff --git a/src/plugins/tool/SoundGen.py b/src/plugins/tool/SoundGen.py index 99ed39f03..2659a2e81 100644 --- a/src/plugins/tool/SoundGen.py +++ b/src/plugins/tool/SoundGen.py @@ -35,7 +35,8 @@ import os # GNOME/GTK modules # #------------------------------------------------------------------------ -from gtk import glade +import gtk + #------------------------------------------------------------------------ # # GRAMPS modules @@ -73,17 +74,18 @@ class SoundGen(Tool.Tool, ManagedWindow.ManagedWindow): base = os.path.dirname(__file__) glade_file = base + os.sep + "soundex.glade" - self.glade = glade.XML(glade_file,"soundEx","gramps") - self.glade.signal_autoconnect({ + self.glade = gtk.Builder() + self.glade.add_from_file(glade_file) + self.glade.connect_signals({ "destroy_passed_object" : self.close, "on_help_clicked" : self.on_help_clicked, }) - window = self.glade.get_widget("soundEx") - self.set_window(window,self.glade.get_widget('title'),self.label) + window = self.glade.get_object("soundEx") + self.set_window(window,self.glade.get_object('title'),self.label) - self.value = self.glade.get_widget("value") - self.autocomp = self.glade.get_widget("name_list") + self.value = self.glade.get_object("value") + self.autocomp = self.glade.get_object("name_list") self.name = self.autocomp.child self.name.connect('changed',self.on_apply_clicked) diff --git a/src/plugins/tool/soundex.glade b/src/plugins/tool/soundex.glade index 6cf748206..ad06d7bfd 100644 --- a/src/plugins/tool/soundex.glade +++ b/src/plugins/tool/soundex.glade @@ -1,210 +1,198 @@ - - - - - - - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - False - - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - Close Window - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - 0 - - - - - - - True - True - True - gtk-help - True - GTK_RELIEF_NORMAL - True - -11 - - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - False - 0 - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 6 - - - 0 - False - False - - - - - - 12 - True - 2 - 2 - False - 6 - 12 - - - - True - Name: - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - SoundEx code: - False - False - GTK_JUSTIFY_CENTER - False - False - 1 - 0.5 - 0 - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - - - 1 - 2 - 0 - 1 - fill - fill - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - + + + + + True + + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + False + + + + True + False + 8 + + + True + GTK_BUTTONBOX_END + + + True + Close Window + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + + + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + + + + + + 0 + False + True + GTK_PACK_END + + + + + True + False + 0 + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 6 + + + 0 + False + False + + + + + 12 + True + 2 + 2 + False + 6 + 12 + + + True + Name: + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + SoundEx code: + False + False + GTK_JUSTIFY_CENTER + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + True + + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + True + + + 1 + 2 + 0 + 1 + fill + fill + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + button3 + button4 + + +