From 2d4ec91a5ccf4abd23db00b113a59b8529a1cc48 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 | 14 +++++++++++++- 5 files changed, 62 insertions(+), 5 deletions(-) diff --git a/gramps/gui/editors/editaddress.py b/gramps/gui/editors/editaddress.py index 55ce2619f..3627a2ebc 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 ab0b62557..e5789da49 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 7d64e7b26..875d1dd05 100644 --- a/gramps/gui/editors/editfamily.py +++ b/gramps/gui/editors/editfamily.py @@ -79,6 +79,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') @@ -618,7 +628,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 26b37ab00..45bcd995a 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 e5f41f428..4af546b5e 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,7 +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')) + # TODO help button (rename glade button name) + 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():