diff --git a/ChangeLog b/ChangeLog index b9a2d5a40..1a897e3d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,18 @@ * doc/gramps-manual/C/custom.xml: Update. * doc/gramps-manual/C/gramps-manual-C.omf: Update. * doc/gramps.1.in: Update. + * src/revision.glade: Add Help button. + * src/gramps_main.py (on_help_dbopen_clicked): Add function. + * src/plugins/gedcomexport.glade: Add Help button. + * src/plugins/WriteGedcom.py (on_help_clicked): Add function. + * src/plugins/pkgexport.glade: Add Help button. + * src/plugins/WritePkg.py (on_help_clicked): Add function. + * src/plugins/writeftree.glade: Add Help button. + * src/plugins/WriteGedcom.py (on_help_clicked): Add function. + * src/plugins/cdexport.glade: Add Help button. + * src/plugins/WriteCD.py (on_help_clicked): Add function. + * src/Bookmarks.py (draw_window): Add Help button; + (help_clicked): Add function. 2003-12-01 Tim Waugh * doc/xmldocs.make: Fix builds for $top_srcdir == $top_builddir (oops). diff --git a/src/Bookmarks.py b/src/Bookmarks.py index 0312089d3..52ecb37d8 100644 --- a/src/Bookmarks.py +++ b/src/Bookmarks.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000 Donald N. Allingham +# Copyright (C) 2000-2003 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,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + "Handle bookmarks for the gramps interface" __author__ = "Donald N. Allingham" @@ -28,7 +30,8 @@ __version__ = "$Revision$" # GTK/Gnome modules # #------------------------------------------------------------------------- -import gtk +import gtk +import gnome #------------------------------------------------------------------------- # @@ -117,8 +120,9 @@ class Bookmarks : up.connect('clicked', self.up_clicked) down.connect('clicked',self.down_clicked) delete.connect('clicked',self.delete_clicked) - self.top.add_button(gtk.STOCK_CANCEL,1) - self.top.add_button(gtk.STOCK_OK,0) + self.top.add_button(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL) + self.top.add_button(gtk.STOCK_OK,gtk.RESPONSE_OK) + self.top.add_button(gtk.STOCK_HELP,gtk.RESPONSE_HELP) bbox.add(up) bbox.add(down) bbox.add(delete) @@ -141,10 +145,12 @@ class Bookmarks : self.namelist.set_row_data(index,person) index = index + 1 - if self.top.run() == 0 : + self.response = self.top.run() + if self.response == gtk.RESPONSE_OK: self.ok_clicked() - else: - self.cancel_clicked() + elif self.response == gtk.RESPONSE_HELP: + self.help_clicked() + self.top.destroy() def delete_clicked(self,obj): """Removes the current selection from the list""" @@ -172,8 +178,9 @@ class Bookmarks : if person: self.bookmarks.append(person) self.redraw() - self.top.destroy() - - def cancel_clicked(self): - """Closes the current window""" - self.top.destroy() + + def help_clicked(self): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','gramps-nav') + self.response = self.top.run() + diff --git a/src/gramps_main.py b/src/gramps_main.py index 87aab94e5..7efa65b70 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -302,6 +302,7 @@ class Gramps: "on_new_clicked" : self.on_new_clicked, "on_notebook1_switch_page" : self.on_views_switch_page, "on_ok_button1_clicked" : self.on_ok_button1_clicked, + "on_help_dbopen_clicked" : self.on_help_dbopen_clicked, "on_open_activate" : self.on_open_activate, "on_pedigree1_activate" : self.on_pedigree1_activate, "on_person_list1_activate" : self.on_person_list1_activate, @@ -985,6 +986,11 @@ class Gramps: else: self.auto_save_load(filename) + def on_help_dbopen_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','open-db') + self.dbopen_button = self.dbopen_fs.run() + def auto_save_load(self,filename): filename = os.path.normpath(os.path.abspath(filename)) @@ -1407,26 +1413,28 @@ class Gramps: if not Utils.wasModified(): wFs = gtk.glade.XML(const.revisionFile, "dbopen","gramps") - fileSelector = wFs.get_widget("dbopen") + self.dbopen_fs = wFs.get_widget("dbopen") - Utils.set_titles(fileSelector, wFs.get_widget('title'), + Utils.set_titles(self.dbopen_fs, wFs.get_widget('title'), _('Open a database')) dbname = wFs.get_widget("dbname") getoldrev = wFs.get_widget("getoldrev") - fileSelector.set_data("dbname",dbname) + self.dbopen_fs.set_data("dbname",dbname) dbname.set_default_path(GrampsCfg.db_dir) dbname.set_filename(GrampsCfg.db_dir) dbname.gtk_entry().set_position(len(GrampsCfg.db_dir)) - fileSelector.set_data("getoldrev",getoldrev) + self.dbopen_fs.set_data("getoldrev",getoldrev) getoldrev.set_sensitive(GrampsCfg.usevc) - fileSelector.set_transient_for(self.topWindow) - fileSelector.show() - button = fileSelector.run() - if button == gtk.RESPONSE_OK: - self.on_ok_button1_clicked(fileSelector) - fileSelector.destroy() + self.dbopen_fs.set_transient_for(self.topWindow) + self.dbopen_fs.show() + self.dbopen_button = self.dbopen_fs.run() + if self.dbopen_button == gtk.RESPONSE_OK: + self.on_ok_button1_clicked(self.dbopen_fs) + elif self.dbopen_button == gtk.RESPONSE_HELP: + self.on_help_dbopen_clicked(obj) + self.dbopen_fs.destroy() def on_revert_activate(self,obj): diff --git a/src/plugins/WriteCD.py b/src/plugins/WriteCD.py index 094dbdb6b..e64fde5ad 100644 --- a/src/plugins/WriteCD.py +++ b/src/plugins/WriteCD.py @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + "Export to CD (nautilus)" #------------------------------------------------------------------------- @@ -36,6 +38,7 @@ from cStringIO import StringIO #------------------------------------------------------------------------- import gtk import gtk.glade +import gnome import gnome.vfs #------------------------------------------------------------------------- @@ -86,7 +89,8 @@ class PackageWriter: dic = { "destroy_passed_object" : Utils.destroy_passed_object, - "on_ok_clicked" : self.on_ok_clicked + "on_ok_clicked" : self.on_ok_clicked, + "on_help_clicked" : self.on_help_clicked } self.top = gtk.glade.XML(glade_file,"packageExport","gramps") @@ -154,6 +158,10 @@ class PackageWriter: gfile.write_handle(g) g.close() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','export-data') + def on_ok_clicked(self,obj): Utils.destroy_passed_object(obj) diff --git a/src/plugins/WriteGedcom.py b/src/plugins/WriteGedcom.py index 19618fca0..e0c78367d 100644 --- a/src/plugins/WriteGedcom.py +++ b/src/plugins/WriteGedcom.py @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + "Export to GEDCOM" #------------------------------------------------------------------------- @@ -37,6 +39,7 @@ import re #------------------------------------------------------------------------- import gtk import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -371,7 +374,8 @@ class GedcomWriter: "standard_copyright" : self.standard_copyright, "no_copyright" : self.no_copyright, "on_restrict_toggled": self.on_restrict_toggled, - "on_ok_clicked" : self.on_ok_clicked + "on_ok_clicked" : self.on_ok_clicked, + "on_help_clicked" : self.on_help_clicked }) Utils.set_titles(self.topDialog.get_widget('gedcomExport'), @@ -525,6 +529,10 @@ class GedcomWriter: self.export_data(name) closebtn.set_sensitive(1) + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','export-data') + def cl_setup(self): self.restrict = 0 self.private = 0 diff --git a/src/plugins/WritePkg.py b/src/plugins/WritePkg.py index 1c872de6a..6286fd7e5 100644 --- a/src/plugins/WritePkg.py +++ b/src/plugins/WritePkg.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000 Donald N. Allingham +# Copyright (C) 2000-2003 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,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + "Export to GRAMPS package" #------------------------------------------------------------------------- @@ -36,6 +38,7 @@ from cStringIO import StringIO #------------------------------------------------------------------------- import gtk import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -78,7 +81,8 @@ class PackageWriter: dic = { "destroy_passed_object" : Utils.destroy_passed_object, - "on_ok_clicked" : self.on_ok_clicked + "on_ok_clicked" : self.on_ok_clicked, + "on_help_clicked" : self.on_help_clicked } self.top = gtk.glade.XML(glade_file,"packageExport","gramps") @@ -95,6 +99,10 @@ class PackageWriter: Utils.destroy_passed_object(obj) self.export(name) + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','export-data') + def export(self, filename): #-------------------------------------------------------------- def remove_clicked(): diff --git a/src/plugins/cdexport.glade b/src/plugins/cdexport.glade index a30c8234a..a7dc7e104 100644 --- a/src/plugins/cdexport.glade +++ b/src/plugins/cdexport.glade @@ -44,7 +44,7 @@ True True GTK_RELIEF_NORMAL - 0 + -5 @@ -104,6 +104,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 diff --git a/src/plugins/gedcomexport.glade b/src/plugins/gedcomexport.glade index b5b37a618..b93ed4ea3 100644 --- a/src/plugins/gedcomexport.glade +++ b/src/plugins/gedcomexport.glade @@ -51,6 +51,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 diff --git a/src/plugins/pkgexport.glade b/src/plugins/pkgexport.glade index 2f6c91423..358d8cfe1 100644 --- a/src/plugins/pkgexport.glade +++ b/src/plugins/pkgexport.glade @@ -52,6 +52,18 @@ + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 diff --git a/src/plugins/writeftree.glade b/src/plugins/writeftree.glade index 270e36c9b..25e341e60 100644 --- a/src/plugins/writeftree.glade +++ b/src/plugins/writeftree.glade @@ -52,6 +52,18 @@ + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 diff --git a/src/revision.glade b/src/revision.glade index 19b1fe03f..bf78160d7 100644 --- a/src/revision.glade +++ b/src/revision.glade @@ -52,6 +52,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0