From f548570af1391ee75a2a1640110ebd86b6b8b445 Mon Sep 17 00:00:00 2001 From: Sam Manzi Date: Sat, 12 Sep 2015 17:48:50 +1000 Subject: [PATCH] 8888 more 'Editors' update broken wiki help links --- gramps/gui/editors/editaddress.py | 13 ++++++++++++- gramps/gui/editors/editattribute.py | 13 ++++++++++++- gramps/gui/editors/editfamily.py | 14 +++++++++++++- gramps/gui/editors/editldsord.py | 13 ++++++++++++- gramps/gui/editors/editurl.py | 15 +++++++++++++-- 5 files changed, 62 insertions(+), 6 deletions(-) diff --git a/gramps/gui/editors/editaddress.py b/gramps/gui/editors/editaddress.py index 1c5240517..479c5ee5b 100644 --- a/gramps/gui/editors/editaddress.py +++ b/gramps/gui/editors/editaddress.py @@ -51,6 +51,16 @@ from gramps.gen.lib import NoteType from ..glade import Glade from .displaytabs import CitationEmbedList, NoteTab from ..widgets import MonitoredDate, MonitoredEntry, PrivacyButton +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_3') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('Address_Editor_dialog') #------------------------------------------------------------------------- # @@ -122,9 +132,10 @@ class EditAddress(EditSecondary): self.obj, self.db.readonly) def _connect_signals(self): - self.define_help_button(self.top.get_object('help')) self.define_cancel_button(self.top.get_object('cancel')) self.define_ok_button(self.top.get_object('ok'),self.save) + self.define_help_button(self.top.get_object('help'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _create_tabbed_pages(self): """ diff --git a/gramps/gui/editors/editattribute.py b/gramps/gui/editors/editattribute.py index b382f0bbd..e703d7395 100644 --- a/gramps/gui/editors/editattribute.py +++ b/gramps/gui/editors/editattribute.py @@ -50,6 +50,16 @@ from gramps.gen.lib import NoteType from ..glade import Glade from .displaytabs import CitationEmbedList, NoteTab from ..widgets import MonitoredEntry, PrivacyButton, MonitoredDataType +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_3') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('Attribute_Editor_dialog') #------------------------------------------------------------------------- # @@ -87,8 +97,9 @@ class EditAttributeRoot(EditSecondary): def _connect_signals(self): self.define_cancel_button(self.top.get_object('cancel')) - self.define_help_button(self.top.get_object('help')) self.define_ok_button(self.top.get_object('ok'),self.save) + self.define_help_button(self.top.get_object('help'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _setup_fields(self): self.value_field = MonitoredEntry( diff --git a/gramps/gui/editors/editfamily.py b/gramps/gui/editors/editfamily.py index e75366a65..286690eeb 100644 --- a/gramps/gui/editors/editfamily.py +++ b/gramps/gui/editors/editfamily.py @@ -80,6 +80,16 @@ from gramps.gen.utils.db import (get_birth_or_fallback, get_death_or_fallback, get_marriage_or_fallback, preset_name, family_name) from ..selectors import SelectorFactory from gramps.gen.utils.id import create_id +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('Family_Editor_dialog') SelectPerson = SelectorFactory('Person') @@ -620,7 +630,9 @@ class EditFamily(EditPrimary): def _connect_signals(self): self.define_ok_button(self.top.get_object('ok'), self.save) self.define_cancel_button(self.top.get_object('cancel')) - self.define_help_button(self.top.get_object('button119')) + # TODO help button (rename glade button name) + self.define_help_button(self.top.get_object('button119'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _can_be_replaced(self): pass diff --git a/gramps/gui/editors/editldsord.py b/gramps/gui/editors/editldsord.py index 4f4d8c6dc..98feac06d 100644 --- a/gramps/gui/editors/editldsord.py +++ b/gramps/gui/editors/editldsord.py @@ -55,6 +55,16 @@ from .displaytabs import CitationEmbedList,NoteTab from ..widgets import (PrivacyButton, MonitoredDate, MonitoredMenu, MonitoredStrMenu) from ..selectors import SelectorFactory +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('LDS_Ordinance_Editor') _DATA_MAP = { LdsOrd.BAPTISM : [ @@ -154,8 +164,9 @@ class EditLdsOrd(EditSecondary): def _connect_signals(self): self.parents_select.connect('clicked',self.select_parents_clicked) self.define_cancel_button(self.top.get_object('cancel')) - self.define_help_button(self.top.get_object('help')) self.define_ok_button(self.top.get_object('ok'),self.save) + self.define_help_button(self.top.get_object('help'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _get_types(self): return (LdsOrd.BAPTISM, diff --git a/gramps/gui/editors/editurl.py b/gramps/gui/editors/editurl.py index 39a087ebb..bff0ea5ac 100644 --- a/gramps/gui/editors/editurl.py +++ b/gramps/gui/editors/editurl.py @@ -35,6 +35,16 @@ _ = glocale.translation.gettext from .editsecondary import EditSecondary from ..widgets import MonitoredEntry, PrivacyButton, MonitoredDataType from ..glade import Glade +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('Internet_Address_Editor') #------------------------------------------------------------------------- # @@ -63,8 +73,9 @@ class EditUrl(EditSecondary): self.jump.connect('clicked', self.jump_to) self.define_cancel_button(self.top.get_object('button125')) self.define_ok_button(self.top.get_object('button124'), self.save) - self.define_help_button(self.top.get_object('button130')) - + self.define_help_button(self.top.get_object('button130'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) + def jump_to(self, obj): if self.obj.get_path(): from ..display import display_url