From c848744e28bc5ee90760e479400e0a88e1c7954e Mon Sep 17 00:00:00 2001 From: Sam Manzi Date: Sun, 13 Sep 2015 09:04:52 +1000 Subject: [PATCH] 8888 'Editors' continue updating broken wiki help links --- gramps/gui/editors/editchildref.py | 7 ++++++- gramps/gui/editors/editeventref.py | 14 +++++++++++++- gramps/gui/editors/editmedia.py | 14 +++++++++++++- gramps/gui/editors/editmediaref.py | 14 +++++++++++++- gramps/gui/editors/editpersonref.py | 13 ++++++++++++- 5 files changed, 57 insertions(+), 5 deletions(-) diff --git a/gramps/gui/editors/editchildref.py b/gramps/gui/editors/editchildref.py index 5c9139f24..03a264b84 100644 --- a/gramps/gui/editors/editchildref.py +++ b/gramps/gui/editors/editchildref.py @@ -56,6 +56,7 @@ from gi.repository import Gdk from .displaytabs import CitationEmbedList, NoteTab from ..widgets import MonitoredDataType, PrivacyButton from gramps.gen.display.name import displayer as name_displayer +from gramps.gen.const import URL_MANUAL_PAGE #------------------------------------------------------------------------- # @@ -63,6 +64,9 @@ from gramps.gen.display.name import displayer as name_displayer # #------------------------------------------------------------------------- +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_1') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('Child_Reference_Editor') + _RETURN = Gdk.keyval_from_name("Return") _KP_ENTER = Gdk.keyval_from_name("KP_Enter") _LEFT_BUTTON = 1 @@ -139,11 +143,12 @@ class EditChildRef(EditSecondary): 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.ok_button, self.save) self.edit_button.connect('button-press-event', self.edit_child) self.edit_button.connect('key-press-event', self.edit_child) + self.define_help_button(self.top.get_object('help'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _connect_db_signals(self): """ diff --git a/gramps/gui/editors/editeventref.py b/gramps/gui/editors/editeventref.py index f0f72a9d6..e20bf1ed4 100644 --- a/gramps/gui/editors/editeventref.py +++ b/gramps/gui/editors/editeventref.py @@ -45,6 +45,17 @@ from .editreference import RefTab, EditReference from .objectentries import PlaceEntry +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('Event_Reference_Editor_dialog') + #------------------------------------------------------------------------- # # EditEventRef class @@ -99,7 +110,8 @@ class EditEventRef(EditReference): def _connect_signals(self): self.define_ok_button(self.top.get_object('ok'),self.ok_clicked) 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'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _connect_db_signals(self): """ diff --git a/gramps/gui/editors/editmedia.py b/gramps/gui/editors/editmedia.py index bb83c2aa7..3c7346d59 100644 --- a/gramps/gui/editors/editmedia.py +++ b/gramps/gui/editors/editmedia.py @@ -57,6 +57,16 @@ from .displaytabs import (CitationEmbedList, MediaAttrEmbedList, NoteTab, from .addmedia import AddMediaObject from ..dialog import ErrorDialog from ..glade import Glade +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('New_Media_dialog') #------------------------------------------------------------------------- # @@ -104,7 +114,9 @@ class EditMedia(EditPrimary): def _connect_signals(self): self.define_cancel_button(self.glade.get_object('button91')) self.define_ok_button(self.glade.get_object('ok'), self.save) - self.define_help_button(self.glade.get_object('button102')) + # TODO help button (rename glade button name) + self.define_help_button(self.glade.get_object('button102'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _connect_db_signals(self): """ diff --git a/gramps/gui/editors/editmediaref.py b/gramps/gui/editors/editmediaref.py index 0a01552b9..8561b4203 100644 --- a/gramps/gui/editors/editmediaref.py +++ b/gramps/gui/editors/editmediaref.py @@ -60,6 +60,16 @@ from ..widgets import (MonitoredSpinButton, MonitoredEntry, PrivacyButton, MonitoredDate, MonitoredTagList, SelectionWidget, Region) from .editreference import RefTab, EditReference from .addmedia import AddMediaObject +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('Media_Reference_Editor_dialog') #------------------------------------------------------------------------- # @@ -432,7 +442,9 @@ class EditMediaRef(EditReference): def _connect_signals(self): self.define_cancel_button(self.top.get_object('button84')) self.define_ok_button(self.top.get_object('button82'),self.save) - self.define_help_button(self.top.get_object('button104')) + # TODO help button (rename glade button name) + self.define_help_button(self.glade.get_object('button104'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _connect_db_signals(self): """ diff --git a/gramps/gui/editors/editpersonref.py b/gramps/gui/editors/editpersonref.py index a86697515..a004caf41 100644 --- a/gramps/gui/editors/editpersonref.py +++ b/gramps/gui/editors/editpersonref.py @@ -56,6 +56,16 @@ from .displaytabs import CitationEmbedList, NoteTab from ..glade import Glade from ..ddtargets import DdTargets from gi.repository import Gdk +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- + +WIKI_HELP_PAGE = _('%s_-_Entering_and_editing_data:_detailed_-_part_2') % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('xxx_someone_forgot_to_add_a_link_xxx') #------------------------------------------------------------------------- # @@ -134,10 +144,11 @@ class EditPersonRef(EditSecondary): 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.top.get_object('select').connect('clicked',self._select_person) + self.define_help_button(self.top.get_object('help'), + WIKI_HELP_PAGE, WIKI_HELP_SEC) def _connect_db_signals(self): """