8888 more 'Editors' update broken wiki help links

This commit is contained in:
Sam Manzi 2015-09-12 17:48:50 +10:00
parent 09e3ff2a62
commit f548570af1
5 changed files with 62 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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

View File

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