help connection to wiki page

svn: r14741
This commit is contained in:
Erik De Richter 2010-03-10 18:38:38 +00:00
parent 9ac9ba27a3
commit 148314b219

View File

@ -33,6 +33,7 @@ from gen.ggettext import gettext as _
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const
import gen.lib import gen.lib
from glade import Glade from glade import Glade
from displaytabs import (SourceEmbedList, NoteTab, GalleryTab, from displaytabs import (SourceEmbedList, NoteTab, GalleryTab,
@ -43,6 +44,15 @@ from editreference import RefTab, EditReference
from objectentries import PlaceEntry from objectentries import PlaceEntry
#-------------------------------------------------------------------------
#
# Constants
#
#-------------------------------------------------------------------------
WIKI_HELP_PAGE = '%s_-_Entering_and_Editing_Data:_Detailed_-_part_2' % const.URL_MANUAL_PAGE
WIKI_HELP_SEC = _('manual|Editing_Event_References')
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# EditEventRef class # EditEventRef class
@ -91,7 +101,7 @@ class EditEventRef(EditReference):
def _connect_signals(self): def _connect_signals(self):
self.define_ok_button(self.top.get_object('ok'),self.ok_clicked) self.define_ok_button(self.top.get_object('ok'),self.ok_clicked)
self.define_cancel_button(self.top.get_object('cancel')) self.define_cancel_button(self.top.get_object('cancel'))
self.define_help_button(self.top.get_object('help')) self.define_help_button(self.top.get_object('help'),self.on_help_button_clicked)
def _connect_db_signals(self): def _connect_db_signals(self):
""" """
@ -249,6 +259,10 @@ class EditEventRef(EditReference):
self.close() self.close()
def on_help_button_clicked(self, obj):
"""Display the relevant portion of GRAMPS manual"""
GrampsDisplay.help(webpage=WIKI_HELP_PAGE, section=WIKI_HELP_SEC)
class EditFamilyEventRef(EditEventRef): class EditFamilyEventRef(EditEventRef):
def __init__(self, state, uistate, track, event, event_ref, update): def __init__(self, state, uistate, track, event, event_ref, update):