From f034a2b8c7644621016c1ad43bd5eb658fa32053 Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 30 Jan 2017 08:53:56 -0600 Subject: [PATCH 1/6] Fix dbman so RCS checkin window has correct transient parent --- gramps/gui/dbman.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/gui/dbman.py b/gramps/gui/dbman.py index 6c93bc048..283626160 100644 --- a/gramps/gui/dbman.py +++ b/gramps/gui/dbman.py @@ -646,7 +646,8 @@ class DbManager(CLIDbManager, ManagedWindow): else: base_path = self.dbstate.db.get_save_path() archive = os.path.join(base_path, ARCHIVE) - check_in(self.dbstate.db, archive, self.user, self.__start_cursor) + _check_in(self.dbstate.db, archive, self.user, + self.__start_cursor, parent=self.window) self.__end_cursor() self.__populate() @@ -1117,7 +1118,7 @@ def check_out(dbase, rev, path, user): rdr(dbase, xml_file, user) os.unlink(xml_file) -def check_in(dbase, filename, user, cursor_func=None): +def _check_in(dbase, filename, user, cursor_func=None, parent=None): """ Checks in the specified file into RCS """ @@ -1128,6 +1129,7 @@ def check_in(dbase, filename, user, cursor_func=None): glade = Glade(toplevel='comment') top = glade.toplevel text = glade.get_object('description') + top.set_transient_for(parent) top.run() comment = text.get_text() top.destroy() From ef647b068069f504f0c3af3aeda070277d99b518 Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 30 Jan 2017 08:57:21 -0600 Subject: [PATCH 2/6] Remove unused glade files --- gramps/plugins/export/exportcsv.glade | 335 ------------------- gramps/plugins/export/exportftree.glade | 218 ------------- gramps/plugins/export/exportgeneweb.glade | 339 -------------------- gramps/plugins/export/exportvcalendar.glade | 173 ---------- gramps/plugins/export/exportvcard.glade | 177 ---------- po/POTFILES.in | 5 - 6 files changed, 1247 deletions(-) delete mode 100644 gramps/plugins/export/exportcsv.glade delete mode 100644 gramps/plugins/export/exportftree.glade delete mode 100644 gramps/plugins/export/exportgeneweb.glade delete mode 100644 gramps/plugins/export/exportvcalendar.glade delete mode 100644 gramps/plugins/export/exportvcard.glade diff --git a/gramps/plugins/export/exportcsv.glade b/gramps/plugins/export/exportcsv.glade deleted file mode 100644 index 892a45d51..000000000 --- a/gramps/plugins/export/exportcsv.glade +++ /dev/null @@ -1,335 +0,0 @@ - - - - - True - False - True - 400 - dialog - - - True - False - 8 - - - True - False - end - - - gtk-cancel - False - True - True - True - False - False - True - - - - False - False - 0 - - - - - gtk-ok - False - True - True - True - False - False - True - - - - False - False - 1 - - - - - gtk-help - False - True - True - True - False - False - True - - - - False - False - 2 - - - - - False - False - end - 0 - - - - - True - False - - - True - False - - - True - False - 12 - 4 - 3 - 12 - 6 - - - - - - - - - - - - True - False - start - Options - - - - - - 3 - GTK_FILL - - - - - - True - False - start - Filt_er: - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - True - False - 5 - 2 - 12 - 6 - - - - - - - - - - - - - - - - - - _Marriages - False - True - True - False - False - True - center - True - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - Chil_dren - False - True - True - False - False - True - center - True - True - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - - I_ndividuals - False - True - True - False - False - True - center - True - True - - - 1 - 2 - GTK_FILL - - - - - - True - False - - - GTK_SHRINK | GTK_FILL - GTK_FILL - - - - - Translate _Headers - False - True - True - False - False - True - center - True - True - - - 1 - 2 - 4 - 5 - GTK_FILL - - - - - - 1 - 3 - 3 - 4 - GTK_FILL - - - - - True - False - start - Export: - True - - - 1 - 3 - 2 - 3 - GTK_FILL - - - - - - True - False - liststore1 - - - - 0 - - - - - 2 - 3 - 1 - 2 - - - - - - - False - True - 0 - - - - - False - True - 1 - - - - - - cancel - ok - button1 - - - - - - - - - diff --git a/gramps/plugins/export/exportftree.glade b/gramps/plugins/export/exportftree.glade deleted file mode 100644 index 667c229a8..000000000 --- a/gramps/plugins/export/exportftree.glade +++ /dev/null @@ -1,218 +0,0 @@ - - - - - True - False - True - 480 - dialog - - - True - False - 8 - - - True - False - end - - - gtk-cancel - False - True - True - True - False - False - True - - - - False - False - 0 - - - - - gtk-ok - False - True - True - True - False - False - True - - - - False - False - 1 - - - - - gtk-help - False - True - True - True - False - False - True - - - - False - False - 2 - - - - - False - True - end - 0 - - - - - True - False - - - True - False - 6 - 6 - center - - - False - False - 0 - - - - - True - False - 12 - 3 - 3 - 12 - 6 - - - - - - - - - True - False - start - Options - - - - - - 3 - GTK_FILL - - - - - - True - False - start - Filt_er: - True - - - 1 - 2 - 1 - 2 - GTK_SHRINK | GTK_FILL - - - - - - _Restrict data on living people - False - True - True - False - False - True - center - True - True - - - 1 - 3 - 2 - 3 - GTK_FILL - - - - - - True - False - liststore1 - - - - 0 - - - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - True - True - 1 - - - - - False - True - 1 - - - - - - cancel - ok - button1 - - - - - - - - - diff --git a/gramps/plugins/export/exportgeneweb.glade b/gramps/plugins/export/exportgeneweb.glade deleted file mode 100644 index c50fd7fbf..000000000 --- a/gramps/plugins/export/exportgeneweb.glade +++ /dev/null @@ -1,339 +0,0 @@ - - - - - True - False - True - 400 - dialog - - - True - False - 8 - - - True - False - end - - - gtk-cancel - False - True - True - True - False - False - True - - - - False - False - 0 - - - - - gtk-ok - False - True - True - True - False - False - True - - - - False - False - 1 - - - - - gtk-help - False - True - True - True - False - False - True - - - - False - False - 2 - - - - - False - True - end - 0 - - - - - True - False - - - True - False - 12 - 6 - 3 - 12 - 6 - - - - - - - - - - - - - - - - - - - - - - - - True - False - start - Options - - - - - - 3 - GTK_FILL - - - - - - True - False - start - Filt_er: - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - _Restrict data on living people - False - True - True - False - 3 - False - True - center - True - True - - - - 1 - 3 - 3 - 4 - GTK_FILL - - - - - - True - False - 3 - 2 - 12 - 6 - - - - - - - - - - - - - - - Exclude _notes - False - True - True - False - False - True - center - True - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - Use _Living as first name - False - True - True - False - False - True - center - True - True - - - 1 - 2 - GTK_FILL - - - - - - True - False - - - GTK_SHRINK | GTK_FILL - GTK_FILL - - - - - 1 - 3 - 4 - 5 - GTK_FILL - - - - - True - False - - - Reference i_mages from path: - False - True - True - False - False - True - center - True - - - False - False - 0 - - - - - True - True - media - - - True - True - 1 - - - - - 1 - 3 - 5 - 6 - GTK_FILL - - - - - True - False - liststore1 - - - - 0 - - - - - 2 - 1 - 2 - GTK_FILL - - - - - False - True - 0 - - - - - False - True - 1 - - - - - - cancel - ok - button1 - - - - diff --git a/gramps/plugins/export/exportvcalendar.glade b/gramps/plugins/export/exportvcalendar.glade deleted file mode 100644 index af9d5e144..000000000 --- a/gramps/plugins/export/exportvcalendar.glade +++ /dev/null @@ -1,173 +0,0 @@ - - - - - True - False - True - 400 - dialog - - - True - False - 8 - - - True - False - end - - - gtk-cancel - False - True - True - True - False - False - True - - - - False - False - 0 - - - - - gtk-ok - False - True - True - True - False - False - True - - - - False - False - 1 - - - - - gtk-help - False - True - True - True - False - False - True - - - - False - False - 2 - - - - - False - True - end - 0 - - - - - True - False - - - True - False - 12 - 2 - 3 - 12 - 6 - - - True - False - start - Options - - - - - - 3 - GTK_FILL - - - - - - True - False - start - Filt_er: - True - - - 1 - 2 - GTK_FILL - - - - - - True - False - liststore1 - - - - 0 - - - - - 1 - 3 - 1 - 2 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - - cancel - ok - button1 - - - - - - - - - diff --git a/gramps/plugins/export/exportvcard.glade b/gramps/plugins/export/exportvcard.glade deleted file mode 100644 index 164e4fb73..000000000 --- a/gramps/plugins/export/exportvcard.glade +++ /dev/null @@ -1,177 +0,0 @@ - - - - - True - False - True - 400 - dialog - - - True - False - 8 - - - True - False - end - - - gtk-cancel - False - True - True - True - False - False - True - - - - False - False - 0 - - - - - gtk-ok - False - True - True - True - False - False - True - - - - False - False - 1 - - - - - gtk-help - False - True - True - True - False - False - True - - - - False - False - 2 - - - - - False - True - end - 0 - - - - - True - False - - - True - False - 12 - 3 - 3 - 12 - 6 - - - - - - - - - - - - True - False - start - Options - - - - - - 3 - GTK_FILL - - - - - - True - False - start - Filt_er: - True - - - 1 - 2 - GTK_FILL - - - - - - True - False - liststore1 - - - - 0 - - - - - 1 - 3 - 1 - 2 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - - cancel - ok - button1 - - - - diff --git a/po/POTFILES.in b/po/POTFILES.in index d339b641d..1cd83f04c 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -560,16 +560,11 @@ gramps/plugins/drawreport/fanchart.py gramps/plugins/drawreport/statisticschart.py gramps/plugins/drawreport/timeline.py gramps/plugins/export/export.gpr.py -gramps/plugins/export/exportcsv.glade gramps/plugins/export/exportcsv.py -gramps/plugins/export/exportftree.glade gramps/plugins/export/exportgedcom.py -gramps/plugins/export/exportgeneweb.glade gramps/plugins/export/exportgeneweb.py gramps/plugins/export/exportpkg.py -gramps/plugins/export/exportvcalendar.glade gramps/plugins/export/exportvcalendar.py -gramps/plugins/export/exportvcard.glade gramps/plugins/export/exportvcard.py gramps/plugins/export/exportxml.py gramps/plugins/gramplet/ageondategramplet.py From 0307c10244882ffe103d1f07070242a7b4167f40 Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 30 Jan 2017 08:59:27 -0600 Subject: [PATCH 3/6] Fix reports papermenu to properly destroy glade objects --- gramps/gui/plug/report/_papermenu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/gui/plug/report/_papermenu.py b/gramps/gui/plug/report/_papermenu.py index 4f43fcfd5..90db3df25 100644 --- a/gramps/gui/plug/report/_papermenu.py +++ b/gramps/gui/plug/report/_papermenu.py @@ -138,7 +138,7 @@ class PaperFrame(Gtk.Box): glade_xml = Glade() self.paper_grid = glade_xml.get_object('paper_grid') - + self.top = glade_xml.get_object('papermenu') # get all the widgets widgets = ('pwidth', 'pheight', 'lmargin', 'rmargin', 'tmargin', @@ -174,7 +174,10 @@ class PaperFrame(Gtk.Box): self.bmargin.set_text("%.2f" % margins[3]) self.paper_grid.show_all() + # Shift the grid from glade toplevel window to this box self.paper_grid.reparent(self) + # need to get rid of glade toplevel now that we are done with it. + self.top.destroy() self.units_changed(self.metric) self.size_changed(None) From 2da74564a30ec5b3cf4baf66ee5099a4bd27d9ab Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 30 Jan 2017 09:02:36 -0600 Subject: [PATCH 4/6] fix owner editor to properly destroy glade object --- gramps/plugins/tool/ownereditor.glade | 1 - gramps/plugins/tool/ownereditor.py | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gramps/plugins/tool/ownereditor.glade b/gramps/plugins/tool/ownereditor.glade index 7a4c3ce06..ae758afa9 100644 --- a/gramps/plugins/tool/ownereditor.glade +++ b/gramps/plugins/tool/ownereditor.glade @@ -35,7 +35,6 @@ False center - True diff --git a/gramps/plugins/tool/ownereditor.py b/gramps/plugins/tool/ownereditor.py index 90fab537d..c1bdc523b 100644 --- a/gramps/plugins/tool/ownereditor.py +++ b/gramps/plugins/tool/ownereditor.py @@ -113,12 +113,12 @@ class OwnerEditor(tool.Tool, ManagedWindow): "on_cancel_button_clicked": self.close, "on_help_button_clicked": self.on_help_button_clicked, "on_eventbox_button_press_event": self.on_button_press_event, - "on_menu_activate": self.on_menu_activate, - "on_delete_event" : self.close, - }) + "on_menu_activate": self.on_menu_activate}) # fetch the popup menu self.menu = topDialog.get_object("popup_menu") + self.track_ref_for_deletion("menu") + #topDialog.connect_signals({"on_menu_activate": self.on_menu_activate}) # get current db owner and attach it to the entries of the window @@ -148,6 +148,7 @@ class OwnerEditor(tool.Tool, ManagedWindow): def on_ok_button_clicked(self, obj): """Update the current db's owner information from editor""" self.db.set_researcher(self.owner) + self.menu.destroy() self.close() def on_help_button_clicked(self, obj): @@ -173,6 +174,9 @@ class OwnerEditor(tool.Tool, ManagedWindow): for i in range(len(config_keys)): config.set(config_keys[i], self.owner.get()[i]) + def clean_up(self): + self.menu.destroy() + #------------------------------------------------------------------------- # # OwnerEditorOptions (None at the moment) From 0c9953bb1ad972cad2b77909f23b50a3f5fb4494 Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 30 Jan 2017 09:07:12 -0600 Subject: [PATCH 5/6] Fix import gedcom glade file to remove unused toplevel object --- gramps/plugins/importer/importgedcom.glade | 417 +-------------------- 1 file changed, 10 insertions(+), 407 deletions(-) diff --git a/gramps/plugins/importer/importgedcom.glade b/gramps/plugins/importer/importgedcom.glade index d20d686bf..e323203d3 100644 --- a/gramps/plugins/importer/importgedcom.glade +++ b/gramps/plugins/importer/importgedcom.glade @@ -1,6 +1,7 @@ + - + @@ -25,11 +26,11 @@ - 300 - 100 False Gramps - GEDCOM Encoding center-on-parent + 300 + 100 dialog @@ -48,7 +49,6 @@ True True False - False True @@ -66,7 +66,8 @@ - + + vertical True False @@ -103,7 +104,8 @@ - + + horizontal True False 6 @@ -112,7 +114,8 @@ - + + horizontal True False @@ -178,404 +181,4 @@ okbutton1 - - False - True - center - 600 - - - True - False - - - True - False - 6 - 6 - center - - - False - False - 5 - 0 - - - - - True - False - 12 - 3 - 5 - 12 - 6 - - - True - True - - - True - True - in - - - True - True - False - - - - - - - True - False - start - Warning messages - - - - - - - - 5 - 2 - 3 - GTK_FILL - - - - - True - True - - - True - False - 8 - 5 - 6 - 6 - - - - - - - - - - - - - - - - - - - - - - - - True - False - start - File: - center - - - 1 - 2 - GTK_FILL - - - - - - True - False - start - Created by: - center - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - True - False - start - People: - center - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - - True - True - False - - - 2 - 3 - - - - - - True - True - False - - - 2 - 3 - 1 - 2 - - - - - - True - True - False - - - 2 - 3 - 2 - 3 - - - - - - True - False - start - Encoding: - center - - - 3 - 4 - GTK_FILL - - - - - - True - False - start - Version: - center - - - 3 - 4 - 1 - 2 - GTK_FILL - - - - - - True - False - start - Families: - center - - - 3 - 4 - 2 - 3 - GTK_FILL - - - - - - True - True - False - 10 - - - 4 - 5 - - - - - - True - True - False - 10 - - - 4 - 5 - 1 - 2 - - - - - - True - True - False - - - 4 - 5 - 2 - 3 - - - - - - True - True - False - word - - - 1 - 5 - 3 - 8 - GTK_FILL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - False - Status - - - - - - - - 5 - 1 - 2 - - - - - True - False - 0.10000000149 - - - 5 - GTK_FILL - - - - - - True - True - 1 - - - - - True - False - 12 - 12 - end - - - gtk-close - False - True - True - True - False - False - True - - - False - False - 0 - - - - - False - True - 2 - - - - - From 064ec90db064f8e032edda32152b6fcacdb35167 Mon Sep 17 00:00:00 2001 From: prculley Date: Wed, 8 Feb 2017 16:19:45 -0600 Subject: [PATCH 6/6] Fix Glade file loading to avoid loading and leaving extra toplevels Also deals with problems caused by fix; sometimes do need to load some other toplevel objects. In some cases, it was easier to remove unused toplevel objects from glade files. --- gramps/gui/editors/filtereditor.py | 2 +- gramps/gui/glade.py | 35 +++++++++--- gramps/gui/glade/book.glade | 9 ++-- gramps/gui/managedwindow.py | 4 +- gramps/gui/plug/report/_bookdialog.py | 4 +- gramps/gui/plug/report/_styleeditor.py | 7 ++- gramps/plugins/tool/eventcmp.py | 4 +- gramps/plugins/tool/finddupes.glade | 69 +----------------------- gramps/plugins/tool/finddupes.py | 2 +- gramps/plugins/tool/mergecitations.glade | 69 +----------------------- gramps/plugins/tool/mergecitations.py | 2 +- gramps/plugins/tool/verify.py | 15 +++--- 12 files changed, 59 insertions(+), 163 deletions(-) diff --git a/gramps/gui/editors/filtereditor.py b/gramps/gui/editors/filtereditor.py index 29948dc07..222378cb1 100644 --- a/gramps/gui/editors/filtereditor.py +++ b/gramps/gui/editors/filtereditor.py @@ -804,7 +804,7 @@ class EditFilter(ManagedWindow): self.filterdb = filterdb self.selection_callback = selection_callback - self.define_glade('define_filter', RULE_GLADE) + self.define_glade('define_filter', RULE_GLADE, also_load=["model1"]) self.set_window( self.get_widget('define_filter'), diff --git a/gramps/gui/glade.py b/gramps/gui/glade.py index fe99f9c4e..b6985dea7 100644 --- a/gramps/gui/glade.py +++ b/gramps/gui/glade.py @@ -59,22 +59,37 @@ class Glade(Gtk.Builder): """ __slots__ = ['__toplevel', '__filename', '__dirname'] - def __init__(self, filename=None, dirname=None, toplevel=None): + def __init__(self, filename=None, dirname=None, toplevel=None, + also_load=[]): """ Class Constructor: Returns a new instance of the Glade class - :type filename: string + :type filename: string or None :param filename: The name of the glade file to be used. Defaults to None - :type dirname: string + :type dirname: string or None :param dirname: The directory to search for the glade file. Defaults to None which will cause a search for the file in the default directory followed by the directory of the calling module. - :type toplevel: toplevel + :type toplevel: string or None :param toplevel: The toplevel object to search for in the glade file. Defaults to None, which will cause a search for a toplevel - matching the file name. + matching the supplied name. + :type also_load: list of strings + :param also_load: Additional toplevel objects to load from the glade + file. These are typically liststore or other objects + needed to operate the toplevel object. + Defaults to [] (empty list), which will not load + additional objects. :rtype: object reference :returns: reference to the newly-created Glade instance + + This operates in two modes; when no toplevel parameter is supplied, + the entire Glade file is loaded. It is the responsibility of the user + to make sure ALL toplevel objects are destroyed. + + When a toplevel parameter is supplied, only that object and any + additional objects requested in the also_load parameter are loaded. + The user only has to destroy the requested toplevel objects. """ Gtk.Builder.__init__(self) self.set_translation_domain(glocale.get_localedomain()) @@ -120,14 +135,18 @@ class Glade(Gtk.Builder): # try to build Gtk objects from glade file. Let exceptions happen - self.add_from_file(path) self.__dirname, self.__filename = os.path.split(path) # try to find the toplevel widget - if toplevel: # toplevel is given + # toplevel is given + if toplevel: + loadlist = [toplevel] + also_load + self.add_objects_from_file(path, loadlist) self.__toplevel = self.get_object(toplevel) - else: # toplevel not given + # toplevel not given + else: + self.add_from_file(path) # first, use filename as possible toplevel widget name self.__toplevel = self.get_object(filename.rpartition('.')[0]) diff --git a/gramps/gui/glade/book.glade b/gramps/gui/glade/book.glade index c4a6cd766..bab136662 100644 --- a/gramps/gui/glade/book.glade +++ b/gramps/gui/glade/book.glade @@ -1,5 +1,5 @@ - + @@ -507,6 +507,7 @@ 300 False normal + True @@ -525,7 +526,7 @@ True False True - + False @@ -541,7 +542,7 @@ True False True - + False @@ -557,7 +558,7 @@ True False True - + False diff --git a/gramps/gui/managedwindow.py b/gramps/gui/managedwindow.py index 7bd190b42..8f195c5c5 100644 --- a/gramps/gui/managedwindow.py +++ b/gramps/gui/managedwindow.py @@ -518,11 +518,11 @@ class ManagedWindow: def build_window_key(self, obj): return id(obj) - def define_glade(self, top_module, glade_file=None): + def define_glade(self, top_module, glade_file=None, also_load=[]): if glade_file is None: raise TypeError("ManagedWindow.define_glade: no glade file") glade_file = GLADE_FILE - self._gladeobj = Glade(glade_file, None, top_module) + self._gladeobj = Glade(glade_file, None, top_module, also_load) return self._gladeobj def get_widget(self, name): diff --git a/gramps/gui/plug/report/_bookdialog.py b/gramps/gui/plug/report/_bookdialog.py index 03fcda839..146f43de5 100644 --- a/gramps/gui/plug/report/_bookdialog.py +++ b/gramps/gui/plug/report/_bookdialog.py @@ -158,7 +158,7 @@ class BookListDisplay: self.booklist = booklist self.dosave = dosave - self.xml = Glade('book.glade') + self.xml = Glade('book.glade', toplevel='book') self.top = self.xml.toplevel self.unsaved_changes = False @@ -233,7 +233,7 @@ class BookListDisplay: self.unsaved_changes = True self.top.run() - def on_booklist_cancel_clicked(self, obj): + def on_booklist_cancel_clicked(self, *obj): """ cancel the booklist dialog """ if self.unsaved_changes: qqq = QuestionDialog2( diff --git a/gramps/gui/plug/report/_styleeditor.py b/gramps/gui/plug/report/_styleeditor.py index a4eb7b89f..43da76edc 100644 --- a/gramps/gui/plug/report/_styleeditor.py +++ b/gramps/gui/plug/report/_styleeditor.py @@ -216,7 +216,12 @@ class StyleEditor(ManagedWindow): self.style = StyleSheet(style) self.parent = parent - self.top = Glade(toplevel='editor') + self.top = Glade( + toplevel='editor', + also_load=[ + "adjustment1", "adjustment2", "adjustment3", "adjustment4", + "adjustment5", "adjustment6", "adjustment7", "adjustment8", + "adjustment9", "adjustment10", "adjustment11"]) self.set_window(self.top.toplevel, self.top.get_object('title'), _('Style editor')) self.setup_configs('interface.styleeditor', 550, 610) diff --git a/gramps/plugins/tool/eventcmp.py b/gramps/plugins/tool/eventcmp.py index 23666941a..95f492cc2 100644 --- a/gramps/plugins/tool/eventcmp.py +++ b/gramps/plugins/tool/eventcmp.py @@ -124,7 +124,7 @@ class EventComparison(tool.Tool,ManagedWindow): ManagedWindow.__init__(self, uistate, [], self) self.qual = 0 - self.filterDialog = Glade(toplevel="filters") + self.filterDialog = Glade(toplevel="filters", also_load=["liststore1"]) self.filterDialog.connect_signals({ "on_apply_clicked" : self.on_apply_clicked, "on_editor_clicked" : self.filter_editor_clicked, @@ -230,7 +230,7 @@ class EventComparisonResults(ManagedWindow): self.row_data = [] self.save_form = None - self.topDialog = Glade() + self.topDialog = Glade(toplevel="eventcmp") self.topDialog.connect_signals({ "on_write_table" : self.on_write_table, "destroy_passed_object" : self.close, diff --git a/gramps/plugins/tool/finddupes.glade b/gramps/plugins/tool/finddupes.glade index 5aae1108e..4708de52f 100644 --- a/gramps/plugins/tool/finddupes.glade +++ b/gramps/plugins/tool/finddupes.glade @@ -146,10 +146,11 @@ True True False + center 12 True True - center + 0.5 True True @@ -334,70 +335,4 @@ button13 - - False - True - - - True - False - 12 - vertical - - - True - False - center - - - False - False - 6 - 0 - - - - - True - False - 10 - 10 - Please be patient. This may take a while. - center - True - - - False - False - 20 - 1 - - - - - True - False - - - True - False - 0.10000000149 - - - True - True - 20 - 0 - - - - - False - False - 2 - - - - - diff --git a/gramps/plugins/tool/finddupes.py b/gramps/plugins/tool/finddupes.py index c570f6332..4bc63cf25 100644 --- a/gramps/plugins/tool/finddupes.py +++ b/gramps/plugins/tool/finddupes.py @@ -103,7 +103,7 @@ class DuplicatePeopleTool(tool.Tool, ManagedWindow): self.update = callback self.use_soundex = 1 - top = Glade() + top = Glade(toplevel="finddupes", also_load=["liststore1"]) # retrieve options threshold = self.options.handler.options_dict['threshold'] diff --git a/gramps/plugins/tool/mergecitations.glade b/gramps/plugins/tool/mergecitations.glade index 170422ffb..e07e8c979 100644 --- a/gramps/plugins/tool/mergecitations.glade +++ b/gramps/plugins/tool/mergecitations.glade @@ -146,10 +146,11 @@ True True False + center 12 True True - center + 0.5 True True @@ -199,70 +200,4 @@ button14 - - False - True - - - True - False - 12 - vertical - - - True - False - center - - - False - False - 6 - 0 - - - - - True - False - 10 - 10 - Please be patient. This may take a while. - center - True - - - False - False - 20 - 1 - - - - - True - False - - - True - False - 0.10000000149 - - - True - True - 20 - 0 - - - - - False - False - 2 - - - - - diff --git a/gramps/plugins/tool/mergecitations.py b/gramps/plugins/tool/mergecitations.py index f3567a4b0..b2fb27de6 100644 --- a/gramps/plugins/tool/mergecitations.py +++ b/gramps/plugins/tool/mergecitations.py @@ -106,7 +106,7 @@ class MergeCitations(tool.BatchTool,ManagedWindow): def run(self): - top = Glade(toplevel="mergecitations") + top = Glade(toplevel="mergecitations", also_load=["liststore1"]) # retrieve options fields = self.options.handler.options_dict['fields'] diff --git a/gramps/plugins/tool/verify.py b/gramps/plugins/tool/verify.py index 1b6c58ae9..4dde32ca9 100644 --- a/gramps/plugins/tool/verify.py +++ b/gramps/plugins/tool/verify.py @@ -364,7 +364,8 @@ class Verify(tool.Tool, ManagedWindow, UpdateCallback): o_dict[option] = self.top.get_object(option).get_value_as_int() try: - self.v_r = VerifyResults(self.dbstate, self.uistate, self.track) + self.v_r = VerifyResults(self.dbstate, self.uistate, self.track, + self.top) self.add_results = self.v_r.add_results self.v_r.load_ignored(self.db.full_name) except WindowActiveError: @@ -493,7 +494,7 @@ class VerifyResults(ManagedWindow): TRUE_COL = 8 SHOW_COL = 9 - def __init__(self, dbstate, uistate, track): + def __init__(self, dbstate, uistate, track, glade): """ initialize things """ self.title = _('Data Verification Results') @@ -501,8 +502,8 @@ class VerifyResults(ManagedWindow): self.dbstate = dbstate self._set_filename() - self.top = Glade(toplevel="verify_result") - window = self.top.toplevel + self.top = glade + window = self.top.get_object("verify_result") self.set_window(window, self.top.get_object('title2'), self.title) self.setup_configs('interface.verifyresults', 500, 300) @@ -724,13 +725,13 @@ class VerifyResults(ManagedWindow): if the_type == 'Person': try: person = self.dbstate.db.get_person_from_handle(handle) - EditPerson(self.dbstate, self.uistate, [], person) + EditPerson(self.dbstate, self.uistate, self.track, person) except WindowActiveError: pass elif the_type == 'Family': try: family = self.dbstate.db.get_family_from_handle(handle) - EditFamily(self.dbstate, self.uistate, [], family) + EditFamily(self.dbstate, self.uistate, self.track, family) except WindowActiveError: pass @@ -759,7 +760,7 @@ class VerifyResults(ManagedWindow): def build_menu_names(self, obj): """ build the menu names """ - return (self.title, None) + return (self.title, self.title) #------------------------------------------------------------------------ #