* 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.


svn: r2418
This commit is contained in:
Alex Roitman 2003-12-02 02:35:49 +00:00
parent 088e3ccd2d
commit dcf4bb8d31
11 changed files with 141 additions and 27 deletions

View File

@ -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 <twaugh@redhat.com>
* doc/xmldocs.make: Fix builds for $top_srcdir == $top_builddir (oops).

View File

@ -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()

View File

@ -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):

View File

@ -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)

View File

@ -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

View File

@ -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():

View File

@ -44,7 +44,7 @@
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">0</property>
<property name="response_id">-5</property>
<signal name="clicked" handler="on_ok_clicked" object="packageExport"/>
<child>
@ -104,6 +104,19 @@
</child>
</widget>
</child>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-11</property>
<signal name="clicked" handler="on_help_clicked" last_modification_time="Tue, 02 Dec 2003 02:04:37 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -51,6 +51,19 @@
<signal name="clicked" handler="on_ok_clicked" object="gedcomExport"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-11</property>
<signal name="clicked" handler="on_help_clicked" last_modification_time="Tue, 02 Dec 2003 01:53:26 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -52,6 +52,18 @@
</widget>
</child>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-11</property>
<signal name="clicked" handler="on_help_clicked" last_modification_time="Tue, 02 Dec 2003 01:58:12 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -52,6 +52,18 @@
</widget>
</child>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-11</property>
<signal name="clicked" handler="on_help_clicked" last_modification_time="Tue, 02 Dec 2003 02:01:12 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -52,6 +52,19 @@
<signal name="clicked" handler="on_ok_button1_clicked" object="dbopen"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button136">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-11</property>
<signal name="clicked" handler="on_help_dbopen_clicked" last_modification_time="Tue, 02 Dec 2003 01:34:45 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>