diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 38c0ac985..8c60c049c 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,16 @@ +2003-11-17 Alex Roitman + * src/gramps.glade: Add Help buttons to dialogs. + * src/AddSpouse.py (on_spouse_help_clicked): Add function. + * src/SelectChild.py (on_child_help_clicked): Add function. + * src/Marriage.py (on_help_clicked): Add function. + * src/EditPerson.py (on_help_clicked): Add function. + * src/marriage.glade: Add Help button to a dialog. + * src/edit_person.glade: Add Help button to a dialog. + * src/dialog.glade: Add Help buttons to dialogs. + * src/AddrEdit.py (on_help_clicked): Add function. + * src/AttrEdit.py (on_help_clicked): Add function. + * src/EventEdit.py (on_help_clicked): Add function. + 2003-11-16 Don Allingham * src/EditPerson.py: handle LDS status setting properly * src/RelLib.py: use LDS status for equality comparison diff --git a/gramps2/src/AddSpouse.py b/gramps2/src/AddSpouse.py index b7e6907fd..be0d3ca8f 100644 --- a/gramps2/src/AddSpouse.py +++ b/gramps2/src/AddSpouse.py @@ -17,6 +17,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # + +# $Id$ + """ The AddSpouse module provides the AddSpouse class that allows the user to add a new spouse to the active person. @@ -38,6 +41,7 @@ from gettext import gettext as _ # #------------------------------------------------------------------------- import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -102,6 +106,7 @@ class AddSpouse: self.glade.signal_autoconnect({ "on_select_spouse_clicked" : self.select_spouse_clicked, + "on_spouse_help_clicked" : self.on_spouse_help_clicked, "on_show_toggled" : self.on_show_toggled, "on_new_spouse_clicked" : self.new_spouse_clicked, "on_rel_type_changed" : self.relation_type_changed, @@ -111,6 +116,10 @@ class AddSpouse: self.relation_type.set_text(_("Married")) self.relation_type_changed(None) + def on_spouse_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','gramps-spec-rel') + def select_row(self,obj): """ Called with a row has be unselected. Used to enable the OK button diff --git a/gramps2/src/AddrEdit.py b/gramps2/src/AddrEdit.py index 6c8c2d834..43a10920f 100644 --- a/gramps2/src/AddrEdit.py +++ b/gramps2/src/AddrEdit.py @@ -31,6 +31,7 @@ mechanism for the user to edit address information. # #------------------------------------------------------------------------- import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -117,16 +118,22 @@ class AddressEditor: self.date_check = DateEdit(self.addr_start,date_stat) self.top.signal_autoconnect({ - "on_switch_page" : self.on_switch_page + "on_switch_page" : self.on_switch_page, + "on_help_addr_clicked" : self.on_help_clicked }) if parent_window: self.window.set_transient_for(parent_window) - val = self.window.run() - if val == gtk.RESPONSE_OK: + self.val = self.window.run() + if self.val == gtk.RESPONSE_OK: self.ok_clicked() self.window.destroy() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-ad') + self.val = self.window.run() + def ok_clicked(self): """ Called when the OK button is pressed. Gets data from the diff --git a/gramps2/src/AttrEdit.py b/gramps2/src/AttrEdit.py index 773fa312e..4b1de02b4 100644 --- a/gramps2/src/AttrEdit.py +++ b/gramps2/src/AttrEdit.py @@ -34,6 +34,7 @@ __version__ = "$Revision$" # #------------------------------------------------------------------------- import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -116,16 +117,22 @@ class AttributeEditor: self.top.signal_autoconnect({ "on_add_src_clicked" : self.add_source, "on_del_src_clicked" : self.del_source, + "on_help_attr_clicked" : self.on_help_clicked, "on_switch_page" : self.on_switch_page }) if parent_window: self.window.set_transient_for(parent_window) - val = self.window.run() - if val == gtk.RESPONSE_OK: + self.val = self.window.run() + if self.val == gtk.RESPONSE_OK: self.on_ok_clicked() self.window.destroy() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-at') + self.val = self.window.run() + def add_source(self,obj): pass diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py index 8f4bbdae2..8ce64c9a6 100644 --- a/gramps2/src/EditPerson.py +++ b/gramps2/src/EditPerson.py @@ -371,6 +371,7 @@ class EditPerson: "on_web_go_clicked" : self.on_web_go_clicked, "on_gender_activate" : self.on_gender_activate, "on_givenName_focus_out_event": self.on_givenName_focus_out_event, + "on_help_person_clicked" : self.on_help_clicked, }) self.update_birth_death() @@ -390,6 +391,10 @@ class EditPerson: self.given.grab_focus() self.window.show() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-pers') + def build_columns(self,tree,list): cnum = 0 for name in list: diff --git a/gramps2/src/EventEdit.py b/gramps2/src/EventEdit.py index c044feca6..8b176b305 100644 --- a/gramps2/src/EventEdit.py +++ b/gramps2/src/EventEdit.py @@ -29,6 +29,7 @@ from string import strip #------------------------------------------------------------------------- import gtk import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -162,6 +163,7 @@ class EventEditor: "on_add_src_clicked" : self.add_source, "on_del_src_clicked" : self.del_source, "on_switch_page" : self.on_switch_page, + "on_help_event_clicked" : self.on_help_clicked }) menu = gtk.Menu() @@ -179,11 +181,16 @@ class EventEditor: self.calendar.set_menu(menu) self.window.set_transient_for(self.parent.window) - val = self.window.run() - if val == gtk.RESPONSE_OK: + self.val = self.window.run() + if self.val == gtk.RESPONSE_OK: self.on_event_edit_ok_clicked() self.window.destroy() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-ev') + self.val = self.window.run() + def add_source(self,obj): pass diff --git a/gramps2/src/Marriage.py b/gramps2/src/Marriage.py index 618440b4a..87b51624f 100644 --- a/gramps2/src/Marriage.py +++ b/gramps2/src/Marriage.py @@ -30,6 +30,7 @@ import string #------------------------------------------------------------------------- import gtk import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -98,6 +99,7 @@ class Marriage: self.top.signal_autoconnect({ "destroy_passed_object" : self.on_cancel_edit, + "on_help_marriage_editor" : self.on_help_clicked, "on_up_clicked" : self.on_up_clicked, "on_down_clicked" : self.on_down_clicked, "on_attr_up_clicked" : self.on_attr_up_clicked, @@ -233,6 +235,10 @@ class Marriage: self.redraw_attr_list() self.window.show() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-rel') + def ev_drag_begin(self, context, a): return diff --git a/gramps2/src/SelectChild.py b/gramps2/src/SelectChild.py index 7b4c2af4f..1d7511636 100644 --- a/gramps2/src/SelectChild.py +++ b/gramps2/src/SelectChild.py @@ -19,6 +19,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + #------------------------------------------------------------------------- # # internationalization @@ -32,6 +34,7 @@ from gettext import gettext as _ # #------------------------------------------------------------------------- import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -67,6 +70,7 @@ class SelectChild: self.xml.signal_autoconnect({ "on_save_child_clicked" : self.on_save_child_clicked, + "on_child_help_clicked" : self.on_child_help_clicked, "on_show_toggled" : self.on_show_toggled, "destroy_passed_object" : self.close }) @@ -119,6 +123,10 @@ class SelectChild: self.refmodel = ListModel.ListModel(self.add_child,titles) self.redraw_child_list(2) + def on_child_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','gramps-spec-ch') + def close(self,obj): self.top.destroy() diff --git a/gramps2/src/dialog.glade b/gramps2/src/dialog.glade index af4e0a03d..a61850682 100644 --- a/gramps2/src/dialog.glade +++ b/gramps2/src/dialog.glade @@ -54,6 +54,19 @@ -5 + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -932,6 +945,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -1440,6 +1466,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -1801,6 +1840,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -2537,6 +2589,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -2785,6 +2850,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -3572,6 +3650,19 @@ -5 + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 diff --git a/gramps2/src/edit_person.glade b/gramps2/src/edit_person.glade index b6298e05d..cfe438140 100644 --- a/gramps2/src/edit_person.glade +++ b/gramps2/src/edit_person.glade @@ -56,6 +56,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 2 diff --git a/gramps2/src/gramps.glade b/gramps2/src/gramps.glade index b5d0cde12..265a76f85 100644 --- a/gramps2/src/gramps.glade +++ b/gramps2/src/gramps.glade @@ -3663,6 +3663,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -4001,6 +4014,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -4891,6 +4917,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -5513,6 +5552,19 @@ -5 + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -6536,6 +6588,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -7464,6 +7529,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 diff --git a/gramps2/src/marriage.glade b/gramps2/src/marriage.glade index c4755c3ba..ff9851b87 100644 --- a/gramps2/src/marriage.glade +++ b/gramps2/src/marriage.glade @@ -57,6 +57,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0