From fbd8c05dd8a43fcf9e89194e98f6d3ad542257c5 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 24 Mar 2005 06:22:25 +0000 Subject: [PATCH] * src/gramps_main.py (tool_callback): Typo. * src/QuestionDialog.py: Use gramps icon. * src/plugins/EventCmp.py: HIG; single instance; help. * src/plugins/eventcmp.glade: HIG; help. * src/plugins/Desbrowser.py: HIG, help, rebuild model after edit. * src/plugins/desbrowse.glade: help, info label. * src/plugins/PatchNames.py: HIG, help, single instance. * src/plugins/patchnames.glade: HIG, help. * src/plugins/Merge.py: HIG, help, single instance. * src/plugins/merge.glade: HIG, help. * src/plugins/ChangeNames.py: HIG, help, single instance. svn: r4230 --- ChangeLog | 12 ++ src/QuestionDialog.py | 34 ++++- src/gramps_main.py | 2 +- src/plugins/ChangeNames.py | 19 ++- src/plugins/Desbrowser.py | 35 +++-- src/plugins/EventCmp.py | 46 +++--- src/plugins/Merge.py | 102 ++++++------- src/plugins/PatchNames.py | 19 ++- src/plugins/desbrowse.glade | 37 ++++- src/plugins/eventcmp.glade | 35 ++++- src/plugins/merge.glade | 30 +++- src/plugins/patchnames.glade | 267 ++++++++++++++++++++++++----------- 12 files changed, 447 insertions(+), 191 deletions(-) diff --git a/ChangeLog b/ChangeLog index 945639c08..81b2e4001 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,18 @@ results; help for the settings window; single instance of the tool. * src/plugins/verify.glade: HIG compliance, break things into tabs. + * src/gramps_main.py (tool_callback): Typo. + * src/QuestionDialog.py: Use gramps icon. + * src/plugins/EventCmp.py: HIG; single instance; help. + * src/plugins/eventcmp.glade: HIG; help. + * src/plugins/Desbrowser.py: HIG, help, rebuild model after edit. + * src/plugins/desbrowse.glade: help, info label. + * src/plugins/PatchNames.py: HIG, help, single instance. + * src/plugins/patchnames.glade: HIG, help. + * src/plugins/Merge.py: HIG, help, single instance. + * src/plugins/merge.glade: HIG, help. + * src/plugins/ChangeNames.py: HIG, help, single instance. + 2005-03-22 Alex Roitman * src/RelLib.py (MediaBase): Add base class for media references; (BaseObject): Add has_handle_reference, remove_handle_references, diff --git a/src/QuestionDialog.py b/src/QuestionDialog.py index 71a955ba9..82bf29d36 100644 --- a/src/QuestionDialog.py +++ b/src/QuestionDialog.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2003 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,17 +18,39 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + +#------------------------------------------------------------------------- +# +# Standard python modules +# +#------------------------------------------------------------------------- +from gettext import gettext as _ + +#------------------------------------------------------------------------- +# +# GNOME/GTK+ modules +# +#------------------------------------------------------------------------- import gtk import gtk.glade +from gtk.gdk import pixbuf_new_from_file + +#------------------------------------------------------------------------- +# +# Gramps modules +# +#------------------------------------------------------------------------- import const import GrampsKeys -from gettext import gettext as _ +ICON = pixbuf_new_from_file(const.icon) class SaveDialog: def __init__(self,msg1,msg2,task1,task2,parent=None): self.xml = gtk.glade.XML(const.errdialogsFile,"savedialog","gramps") self.top = self.xml.get_widget('savedialog') + self.top.set_icon(ICON) self.dontask = self.xml.get_widget('dontask') self.task1 = task1 self.task2 = task2 @@ -40,7 +62,6 @@ class SaveDialog: label2 = self.xml.get_widget('label2') label2.set_text(msg2) label2.set_use_markup(True) - self.top.show() if parent: self.top.set_transient_for(parent) @@ -57,6 +78,7 @@ class QuestionDialog: def __init__(self,msg1,msg2,label,task,parent=None): self.xml = gtk.glade.XML(const.errdialogsFile,"questiondialog","gramps") self.top = self.xml.get_widget('questiondialog') + self.top.set_icon(ICON) self.top.set_title('') label1 = self.xml.get_widget('label1') @@ -81,6 +103,7 @@ class QuestionDialog2: def __init__(self,msg1,msg2,label_msg1,label_msg2,parent=None): self.xml = gtk.glade.XML(const.errdialogsFile,"questiondialog","gramps") self.top = self.xml.get_widget('questiondialog') + self.top.set_icon(ICON) self.top.set_title('') label1 = self.xml.get_widget('label1') @@ -106,6 +129,7 @@ class OptionDialog: def __init__(self,msg1,msg2,btnmsg1,task1,btnmsg2,task2,parent=None): self.xml = gtk.glade.XML(const.errdialogsFile,"optiondialog","gramps") self.top = self.xml.get_widget('optiondialog') + self.top.set_icon(ICON) self.top.set_title('') label1 = self.xml.get_widget('label1') @@ -138,6 +162,7 @@ class ErrorDialog: self.xml = gtk.glade.XML(const.errdialogsFile,"errdialog","gramps") self.top = self.xml.get_widget('errdialog') + self.top.set_icon(ICON) label1 = self.xml.get_widget('label1') label2 = self.xml.get_widget('label2') @@ -155,6 +180,7 @@ class WarningDialog: self.xml = gtk.glade.XML(const.errdialogsFile,"warndialog","gramps") self.top = self.xml.get_widget('warndialog') + self.top.set_icon(ICON) label1 = self.xml.get_widget('label1') label2 = self.xml.get_widget('label2') @@ -172,6 +198,7 @@ class OkDialog: self.xml = gtk.glade.XML(const.errdialogsFile,"okdialog","gramps") self.top = self.xml.get_widget('okdialog') + self.top.set_icon(ICON) label1 = self.xml.get_widget('label1') label2 = self.xml.get_widget('label2') @@ -188,6 +215,7 @@ class MissingMediaDialog: def __init__(self,msg1,msg2,task1,task2,task3,parent=None): self.xml = gtk.glade.XML(const.errdialogsFile,"missmediadialog","gramps") self.top = self.xml.get_widget('missmediadialog') + self.top.set_icon(ICON) self.task1 = task1 self.task2 = task2 self.task3 = task3 diff --git a/src/gramps_main.py b/src/gramps_main.py index 4bd86b10c..9f24ce65f 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -1079,7 +1079,7 @@ class Gramps: """Clear out the database if permission was granted""" return - def tool_callback(self,val): + def tool_callback(self,epo,val): if val: self.import_tool_callback() diff --git a/src/plugins/ChangeNames.py b/src/plugins/ChangeNames.py index 013f8e140..85940f6aa 100644 --- a/src/plugins/ChangeNames.py +++ b/src/plugins/ChangeNames.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ #------------------------------------------------------------------------- import os import re +from gettext import gettext as _ #------------------------------------------------------------------------- # @@ -38,6 +39,7 @@ import re import gobject import gtk import gtk.glade +from gnome import help_display #------------------------------------------------------------------------- # @@ -46,7 +48,6 @@ import gtk.glade #------------------------------------------------------------------------- import Utils from QuestionDialog import OkDialog -from gettext import gettext as _ #------------------------------------------------------------------------- # @@ -73,9 +74,11 @@ class ChangeNames: self.cb = callback self.db = db self.parent = parent + if self.parent.child_windows.has_key(self.__class__): + self.parent.child_windows[self.__class__].present(None) + return + self.win_key = self.__class__ self.trans = db.transaction_begin() - self.win_key = self - self.child_windows = {} self.name_list = [] for name in self.db.get_surname_list(): @@ -95,9 +98,11 @@ class ChangeNames: self.top = gtk.glade.XML(glade_file,"top","gramps") self.window = self.top.get_widget('top') + self.window.set_icon(self.parent.topWindow.get_icon()) self.top.signal_autoconnect({ "destroy_passed_object" : self.close, "on_ok_clicked" : self.on_ok_clicked, + "on_help_clicked" : self.on_help_clicked, "on_delete_event" : self.on_delete_event }) self.list = self.top.get_widget("list") @@ -132,6 +137,10 @@ class ChangeNames: self.add_itself_to_menu() self.window.show() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + help_display('gramps-manual','tools-db') + def on_delete_event(self,obj,b): self.remove_itself_from_menu() @@ -175,7 +184,7 @@ class ChangeNames: if anychange: self.db.transaction_commit(self.trans,_("Capitalization changes")) self.close(obj) - self.cb(1) + self.cb(None,1) #------------------------------------------------------------------------ # diff --git a/src/plugins/Desbrowser.py b/src/plugins/Desbrowser.py index 2ee7cc5ed..fe7c4783c 100644 --- a/src/plugins/Desbrowser.py +++ b/src/plugins/Desbrowser.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ # #------------------------------------------------------------------------ import os +from gettext import gettext as _ #------------------------------------------------------------------------ # @@ -35,7 +36,6 @@ import os # #------------------------------------------------------------------------ import Utils -from gettext import gettext as _ import NameDisplay #------------------------------------------------------------------------ @@ -46,6 +46,7 @@ import NameDisplay import gobject import gtk import gtk.glade +from gnome import help_display #------------------------------------------------------------------------ # @@ -73,28 +74,38 @@ class DesBrowse: self.glade = gtk.glade.XML(glade_file,"top","gramps") self.glade.signal_autoconnect({ "destroy_passed_object" : self.close, + "on_help_clicked" : self.on_help_clicked, "on_delete_event": self.on_delete_event, }) self.window = self.glade.get_widget("top") + self.window.set_icon(self.parent.topWindow.get_icon()) + self.active_name = _("Descendant Browser: %s") \ + % NameDisplay.displayer.display(self.active) Utils.set_titles(self.window,self.glade.get_widget('title'), - _("Descendant Browser")) + self.active_name) self.tree = self.glade.get_widget("tree1") col = gtk.TreeViewColumn('',gtk.CellRendererText(),text=0) self.tree.append_column(col) - self.model = gtk.TreeStore(gobject.TYPE_STRING,gobject.TYPE_PYOBJECT) - self.tree.set_model(self.model) self.tree.set_rules_hint(True) self.tree.set_headers_visible(False) - - self.add_to_tree(None,None,self.active.get_handle()) - self.tree.expand_all() self.tree.connect('event',self.button_press_event) + self.make_new_model() self.add_itself_to_menu() self.window.show() + def make_new_model(self): + self.model = gtk.TreeStore(gobject.TYPE_STRING,gobject.TYPE_PYOBJECT) + self.tree.set_model(self.model) + self.add_to_tree(None,None,self.active.get_handle()) + self.tree.expand_all() + + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + help_display('gramps-manual','tools-ae') + def on_delete_event(self,obj,b): self.remove_itself_from_menu() @@ -104,7 +115,7 @@ class DesBrowse: def add_itself_to_menu(self): self.parent.child_windows[self.win_key] = self - self.parent_menu_item = gtk.MenuItem(_("Descendant Browser tool")) + self.parent_menu_item = gtk.MenuItem(self.active_name) self.parent_menu_item.connect("activate",self.present) self.parent_menu_item.show() self.parent.winsmenu.append(self.parent_menu_item) @@ -136,7 +147,11 @@ class DesBrowse: if iter: person_handle = store.get_value(iter,1) person = self.db.get_person_from_handle(person_handle) - EditPerson.EditPerson(self.parent,person,self.db,self.callback) + EditPerson.EditPerson(self.parent,person,self.db,self.this_callback) + + def this_callback(self,epo,val): + self.callback(epo,val) + self.make_new_model() #------------------------------------------------------------------------ # diff --git a/src/plugins/EventCmp.py b/src/plugins/EventCmp.py index 965b9c4e1..eed1e2854 100644 --- a/src/plugins/EventCmp.py +++ b/src/plugins/EventCmp.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ # #------------------------------------------------------------------------ import os +from gettext import gettext as _ #------------------------------------------------------------------------ # @@ -36,6 +37,7 @@ import os #------------------------------------------------------------------------ import gtk import gtk.glade +from gnome import help_display #------------------------------------------------------------------------ # @@ -49,9 +51,7 @@ import Utils import BaseDoc import OpenSpreadSheet import const - from QuestionDialog import WarningDialog -from gettext import gettext as _ #------------------------------------------------------------------------ # @@ -127,8 +127,10 @@ class EventComparison: def __init__(self,database,parent): self.db = database self.parent = parent - self.win_key = self - self.child_windows = {} + if self.parent.child_windows.has_key(self.__class__): + self.parent.child_windows[self.__class__].present(None) + return + self.win_key = self.__class__ base = os.path.dirname(__file__) self.glade_file = base + os.sep + "eventcmp.glade" @@ -140,10 +142,12 @@ class EventComparison: "on_editor_clicked" : self.filter_editor_clicked, "on_filter_list_enter" : self.filter_list_enter, "on_filters_delete_event": self.on_delete_event, + "on_help_clicked" : self.on_help_clicked, "destroy_passed_object" : self.close }) self.window = self.filterDialog.get_widget("filters") + self.window.set_icon(self.parent.topWindow.get_icon()) self.filters = self.filterDialog.get_widget("filter_list") self.label = _('Event comparison filter selection') @@ -160,36 +164,26 @@ class EventComparison: self.add_itself_to_menu() self.window.show() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + help_display('gramps-manual','tools-util') + def on_delete_event(self,obj,b): - self.close_child_windows() self.remove_itself_from_menu() def close(self,obj): - self.close_child_windows() self.remove_itself_from_menu() self.window.destroy() - def close_child_windows(self): - for child_window in self.child_windows.values(): - child_window.close(None) - self.child_windows = {} - def add_itself_to_menu(self): self.parent.child_windows[self.win_key] = self self.parent_menu_item = gtk.MenuItem(_("Event Comparison tool")) - self.parent_menu_item.set_submenu(gtk.Menu()) + self.parent_menu_item.connect("activate",self.present) self.parent_menu_item.show() self.parent.winsmenu.append(self.parent_menu_item) - self.winsmenu = self.parent_menu_item.get_submenu() - self.menu_item = gtk.MenuItem(_('Filter Selection')) - self.menu_item.connect("activate",self.present) - self.menu_item.show() - self.winsmenu.append(self.menu_item) def remove_itself_from_menu(self): del self.parent.child_windows[self.win_key] - self.menu_item.destroy() - self.winsmenu.destroy() self.parent_menu_item.destroy() def present(self,obj): @@ -211,7 +205,7 @@ class EventComparison: if len(plist) == 0: WarningDialog(_("No matches were found")) else: - DisplayChart(self.db,plist,self) + DisplayChart(self.db,plist,self.parent) #------------------------------------------------------------------------ # @@ -259,14 +253,16 @@ class DisplayChart: self.topDialog.signal_autoconnect({ "on_write_table" : self.on_write_table, "destroy_passed_object" : self.close, + "on_help_clicked" : self.on_help_clicked, "on_view_delete_event" : self.on_delete_event, }) self.window = self.topDialog.get_widget("view") + self.window.set_icon(self.parent.topWindow.get_icon()) self.eventlist = self.topDialog.get_widget('treeview') Utils.set_titles(self.window, self.topDialog.get_widget('title'), - _('Event Comparison')) + _('Event Comparison Results')) self.sort = Sort.Sort(self.db) self.my_list.sort(self.sort.by_last_name) @@ -277,6 +273,10 @@ class DisplayChart: self.add_itself_to_menu() self.window.show() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + help_display('gramps-manual','tools-ae') + def on_delete_event(self,obj,b): self.remove_itself_from_menu() if self.save_form: @@ -290,7 +290,7 @@ class DisplayChart: def add_itself_to_menu(self): self.parent.child_windows[self.win_key] = self - self.parent_menu_item = gtk.MenuItem(_("Event Comparison")) + self.parent_menu_item = gtk.MenuItem(_("Event Comparison Results")) self.parent_menu_item.connect("activate",self.present) self.parent_menu_item.show() self.parent.winsmenu.append(self.parent_menu_item) diff --git a/src/plugins/Merge.py b/src/plugins/Merge.py index e70920e70..19f2f69c0 100644 --- a/src/plugins/Merge.py +++ b/src/plugins/Merge.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,6 +22,23 @@ "Database Processing/Merge people" +#------------------------------------------------------------------------- +# +# standard python models +# +#------------------------------------------------------------------------- +import os +from gettext import gettext as _ + +#------------------------------------------------------------------------- +# +# GNOME libraries +# +#------------------------------------------------------------------------- +import gtk +import gtk.glade +from gnome import help_display + #------------------------------------------------------------------------- # # GRAMPS modules @@ -33,23 +50,6 @@ import soundex import NameDisplay import ListModel import MergeData -from gettext import gettext as _ - -#------------------------------------------------------------------------- -# -# standard python models -# -#------------------------------------------------------------------------- -import string -import os - -#------------------------------------------------------------------------- -# -# GNOME libraries -# -#------------------------------------------------------------------------- -import gtk -import gtk.glade #------------------------------------------------------------------------- # @@ -75,7 +75,10 @@ class Merge: def __init__(self,database,callback,parent): self.db = database self.parent = parent - self.win_key = self + if self.parent.child_windows.has_key(self.__class__): + self.parent.child_windows[self.__class__].present(None) + return + self.win_key = self.__class__ self.map = {} self.list = [] self.index = 0 @@ -110,24 +113,30 @@ class Merge: self.menu = top.get_widget("menu") self.menu.set_menu(my_menu) - self.dialog_window = top.get_widget('dialog') - Utils.set_titles(self.dialog_window, top.get_widget('title'), + self.window = top.get_widget('dialog') + self.window.set_icon(self.parent.topWindow.get_icon()) + Utils.set_titles(self.window, top.get_widget('title'), _('Merge people')) top.signal_autoconnect({ - "on_merge_ok_clicked" : self.on_merge_ok_clicked, + "on_merge_ok_clicked" : self.on_merge_ok_clicked, "destroy_passed_object" : self.close, - "on_delete_merge_event" : self.on_delete_event, + "on_help_clicked" : self.on_help_clicked, + "on_delete_merge_event" : self.on_delete_event, }) self.add_itself_to_menu() - self.dialog_window.show() + self.window.show() + + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + help_display('gramps-manual','tools-db') def on_delete_event(self,obj,b): self.remove_itself_from_menu() def close(self,obj): self.remove_itself_from_menu() - self.dialog_window.destroy() + self.window.destroy() def add_itself_to_menu(self): self.parent.child_windows[self.win_key] = self @@ -141,7 +150,7 @@ class Merge: self.parent_menu_item.destroy() def present(self,obj): - self.dialog_window.present() + self.window.present() def ancestors_of(self,p1_id,id_list): if (not p1_id) or (p1_id in id_list): @@ -174,6 +183,7 @@ class Merge: def find_potentials(self,thresh): top = gtk.glade.XML(self.glade_file,"message","gramps") self.topWin = top.get_widget("message") + self.topWin.set_icon(self.parent.topWindow.get_icon()) self.progress = top.get_widget("progressbar1") Utils.set_titles(self.topWin,top.get_widget('title'), @@ -241,16 +251,17 @@ class Merge: def show(self): top = gtk.glade.XML(self.glade_file,"mergelist","gramps") self.window = top.get_widget("mergelist") - self.win_show_key = self.window + self.window.set_icon(self.parent.topWindow.get_icon()) Utils.set_titles(self.window, top.get_widget('title'), _('Potential Merges')) self.mlist = top.get_widget("mlist") top.signal_autoconnect({ - "destroy_passed_object" : self.close_show, - "on_do_merge_clicked" : self.on_do_merge_clicked, - "on_delete_show_event" : self.on_delete_show_event, + "destroy_passed_object" : self.close, + "on_do_merge_clicked" : self.on_do_merge_clicked, + "on_help_show_clicked" : self.on_help_clicked, + "on_delete_show_event" : self.on_delete_event, }) mtitles = [(_('Rating'),3,75),(_('First Person'),1,200), @@ -259,30 +270,9 @@ class Merge: event_func=self.on_do_merge_clicked) self.redraw() - self.add_show_to_menu() + self.add_itself_to_menu() self.window.show() - def on_delete_show_event(self,obj,b): - self.remove_show_from_menu() - - def close_show(self,obj): - self.remove_show_from_menu() - self.window.destroy() - - def add_show_to_menu(self): - self.parent.child_windows[self.win_show_key] = self.window - self.show_parent_menu_item = gtk.MenuItem(_('Potential Merges')) - self.show_parent_menu_item.connect("activate",self.present_show) - self.show_parent_menu_item.show() - self.parent.winsmenu.append(self.show_parent_menu_item) - - def remove_show_from_menu(self): - del self.parent.child_windows[self.win_show_key] - self.show_parent_menu_item.destroy() - - def present_show(self,obj): - self.window.present() - def redraw(self): list = [] for p1key in self.map.keys(): @@ -423,8 +413,8 @@ class Merge: if name.get_first_name() == name1.get_first_name(): return 1 else: - list1 = string.split(name.get_first_name()) - list2 = string.split(name1.get_first_name()) + list1 = name.get_first_name().split() + list2 = name1.get_first_name().split() if len(list1) < len(list2): return self.list_reduce(list1,list2) @@ -452,8 +442,8 @@ class Merge: if name1 == name2: return 1 - list1 = string.split(string.replace(name1,","," ")) - list2 = string.split(string.replace(name2,","," ")) + list1 = name1.replace(","," ").split() + list2 = name2.replace(","," ").split() value = 0 for name in list1: diff --git a/src/plugins/PatchNames.py b/src/plugins/PatchNames.py index ce0558397..829ee5984 100644 --- a/src/plugins/PatchNames.py +++ b/src/plugins/PatchNames.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ #------------------------------------------------------------------------- import os import re +from gettext import gettext as _ #------------------------------------------------------------------------- # @@ -38,6 +39,7 @@ import re import gobject import gtk import gtk.glade +from gnome import help_display #------------------------------------------------------------------------- # @@ -46,7 +48,6 @@ import gtk.glade #------------------------------------------------------------------------- import Utils from QuestionDialog import OkDialog -from gettext import gettext as _ #------------------------------------------------------------------------- # @@ -92,9 +93,11 @@ class PatchNames: self.cb = callback self.db = db self.parent = parent + if self.parent.child_windows.has_key(self.__class__): + self.parent.child_windows[self.__class__].present(None) + return + self.win_key = self.__class__ self.trans = db.transaction_begin() - self.win_key = self - self.child_windows = {} self.title_list = [] self.nick_list = [] self.prefix1_list = [] @@ -144,9 +147,11 @@ class PatchNames: self.top = gtk.glade.XML(glade_file,"top","gramps") self.window = self.top.get_widget('top') + self.window.set_icon(self.parent.topWindow.get_icon()) self.top.signal_autoconnect({ "destroy_passed_object" : self.close, "on_ok_clicked" : self.on_ok_clicked, + "on_help_clicked" : self.on_help_clicked, "on_delete_event" : self.on_delete_event }) self.list = self.top.get_widget("list") @@ -228,6 +233,10 @@ class PatchNames: self.add_itself_to_menu() self.window.show() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + help_display('gramps-manual','tools-db') + def on_delete_event(self,obj,b): self.remove_itself_from_menu() @@ -292,7 +301,7 @@ class PatchNames: self.db.transaction_commit(self.trans,_("Extract information from names")) self.close(obj) - self.cb(1) + self.cb(None,1) #------------------------------------------------------------------------ # diff --git a/src/plugins/desbrowse.glade b/src/plugins/desbrowse.glade index 7ff4df4f0..082b7eb96 100644 --- a/src/plugins/desbrowse.glade +++ b/src/plugins/desbrowse.glade @@ -18,7 +18,7 @@ False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST - True + False @@ -45,6 +45,20 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + -11 + + + 0 @@ -105,6 +119,27 @@ True + + + + True + <i>Double-click on the row to edit personal information</i> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + 0 diff --git a/src/plugins/eventcmp.glade b/src/plugins/eventcmp.glade index bfcb4b1cb..e63fa0333 100644 --- a/src/plugins/eventcmp.glade +++ b/src/plugins/eventcmp.glade @@ -110,6 +110,7 @@ False False False + GTK_FILE_CHOOSER_ACTION_OPEN @@ -121,7 +122,7 @@ 0 True - * + * False @@ -202,6 +203,20 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + -11 + + + 0 @@ -286,7 +301,7 @@ True GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER + GTK_WIN_POS_NONE False 400 True @@ -294,7 +309,7 @@ True False False - GDK_WINDOW_TYPE_HINT_NORMAL + GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST False @@ -337,6 +352,20 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + -11 + + + 0 diff --git a/src/plugins/merge.glade b/src/plugins/merge.glade index 9cf180cb2..8241cd239 100644 --- a/src/plugins/merge.glade +++ b/src/plugins/merge.glade @@ -77,7 +77,7 @@ True GTK_PROGRESS_LEFT_TO_RIGHT 0 - 0.1 + 0.10000000149 20 @@ -152,6 +152,20 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + -11 + + + 0 @@ -280,6 +294,20 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + -11 + + + 0 diff --git a/src/plugins/patchnames.glade b/src/plugins/patchnames.glade index 5ffee75a5..ea9d67e1a 100644 --- a/src/plugins/patchnames.glade +++ b/src/plugins/patchnames.glade @@ -3,7 +3,7 @@ - + True GTK_WINDOW_TOPLEVEL @@ -16,93 +16,35 @@ True False False - GDK_WINDOW_TYPE_HINT_NORMAL + GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST - + False + - - - 6 + + True False 0 - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 6 - False - False - - - - - - True - Below is a list of the nicknames, titles and family name prefixes that GRAMPS can extract from the -current database. If you accept the changes, GRAMPS will modify the entries -that have been selected. - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 10 - - - 0 - False - False - - - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - False - True - - - - - 0 - True - True - - - - - + + True GTK_BUTTONBOX_END - 6 + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + True + -11 + + + @@ -113,6 +55,7 @@ that have been selected. True GTK_RELIEF_NORMAL True + 0 @@ -122,17 +65,175 @@ that have been selected. True True True - _Accept changes and close - True GTK_RELIEF_NORMAL True + 0 + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-ok + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Accept and close + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + - 6 + 0 False + False + GTK_PACK_END + + + + + + 6 + True + False + 0 + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 6 + False + False + + + + + + True + Below is a list of the nicknames, titles and family name prefixes that GRAMPS can extract from the +current database. If you accept the changes, GRAMPS will modify the entries +that have been selected. + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 10 + + + 0 + False + False + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_END + 6 + + + 6 + False + True + + + + + 0 + True True