8888 'Edit dialogs' update broken wiki help links

This commit is contained in:
Sam Manzi 2015-09-12 09:10:35 +10:00
parent 73f75f7317
commit 09e3ff2a62
6 changed files with 64 additions and 7 deletions

View File

@ -57,6 +57,16 @@ from ..widgets import (MonitoredEntry, PrivacyButton, MonitoredMenu,
MonitoredDate, MonitoredTagList)
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_Citation_dialog')
#-------------------------------------------------------------------------
#
@ -150,7 +160,8 @@ class EditCitation(EditPrimary):
"""
self.define_ok_button(self.glade.get_object('ok'), self.save)
self.define_cancel_button(self.glade.get_object('cancel'))
self.define_help_button(self.glade.get_object('help'))
self.define_help_button(self.glade.get_object('help'),
WIKI_HELP_PAGE, WIKI_HELP_SEC)
def _connect_db_signals(self):
"""

View File

@ -59,8 +59,9 @@ from gramps.gen.utils.db import get_participant_from_event
# Constants
#
#-------------------------------------------------------------------------
WIKI_HELP_PAGE = '%s_-_Entering_and_editing_data:_detailed_-_part_2' % URL_MANUAL_PAGE
WIKI_HELP_SEC = _('manual|Editing_information_about_events')
WIKI_HELP_SEC = _('manual|New_Event_dialog')
#-------------------------------------------------------------------------
#
@ -231,6 +232,7 @@ class EditEvent(EditPrimary):
def help_clicked(self, obj):
"""Display the relevant portion of GRAMPS manual"""
display_help(webpage=WIKI_HELP_PAGE, section=WIKI_HELP_SEC)
def save(self, *obj):
self.ok_button.set_sensitive(False)
if self.object_is_empty():

View File

@ -55,6 +55,16 @@ from gramps.gen.lib import Note
from gramps.gen.db import DbTxn
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 = _('Editing_information_about_notes')
#-------------------------------------------------------------------------
#
@ -227,7 +237,8 @@ class EditNote(EditPrimary):
"""
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('help'))
self.define_help_button(self.top.get_object('help'),
WIKI_HELP_PAGE, WIKI_HELP_SEC)
def _connect_db_signals(self):
"""

View File

@ -57,6 +57,16 @@ from gramps.gen.display.place import displayer as place_displayer
from gramps.gen.config import config
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 = _('Place_Editor_dialog')
#-------------------------------------------------------------------------
#
@ -93,7 +103,8 @@ class EditPlace(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('help'))
self.define_help_button(self.top.get_object('help'),
WIKI_HELP_PAGE, WIKI_HELP_SEC)
def _connect_db_signals(self):
"""

View File

@ -48,6 +48,16 @@ from .displaytabs import AddrEmbedList, WebEmbedList, NoteTab, SourceBackRefList
from .editprimary import EditPrimary
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_Repositories_dialog')
class EditRepository(EditPrimary):
@ -150,9 +160,10 @@ class EditRepository(EditPrimary):
self.glade.get_object("vbox").pack_start(notebook, True, True, 0)
def _connect_signals(self):
self.define_help_button(self.glade.get_object('help'))
self.define_cancel_button(self.glade.get_object('cancel'))
self.define_ok_button(self.glade.get_object('ok'), self.save)
self.define_cancel_button(self.glade.get_object('cancel'))
self.define_help_button(self.glade.get_object('help'),
WIKI_HELP_PAGE, WIKI_HELP_SEC)
def _connect_db_signals(self):
"""

View File

@ -52,6 +52,16 @@ from .displaytabs import (NoteTab, GalleryTab, SrcAttrEmbedList,
from ..widgets import MonitoredEntry, PrivacyButton, MonitoredTagList
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_Source_dialog')
#-------------------------------------------------------------------------
#
@ -90,7 +100,8 @@ class EditSource(EditPrimary):
def _connect_signals(self):
self.define_ok_button(self.glade.get_object('ok'),self.save)
self.define_cancel_button(self.glade.get_object('cancel'))
self.define_help_button(self.glade.get_object('help'))
self.define_help_button(self.glade.get_object('help'),
WIKI_HELP_PAGE, WIKI_HELP_SEC)
def _connect_db_signals(self):
"""