From a0ae11f2681d855ceda04bfca02932b0cd44ca37 Mon Sep 17 00:00:00 2001 From: Sam Manzi Date: Sat, 19 Sep 2015 07:19:26 +1000 Subject: [PATCH] 8888 'Undo History' add help button & url --- gramps/gui/undohistory.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gramps/gui/undohistory.py b/gramps/gui/undohistory.py index 598f8de14..c23a72e73 100644 --- a/gramps/gui/undohistory.py +++ b/gramps/gui/undohistory.py @@ -45,6 +45,16 @@ from gi.repository import GObject #------------------------------------------------------------------------- from .dialog import QuestionDialog from .managedwindow import ManagedWindow +from .display import display_help +from gramps.gen.const import URL_MANUAL_PAGE + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- +WIKI_HELP_PAGE = '%s_-_Keybindings' % URL_MANUAL_PAGE +WIKI_HELP_SEC = _('11') #------------------------------------------------------------------------- # @@ -69,6 +79,8 @@ class UndoHistory(ManagedWindow): window = Gtk.Dialog("", uistate.window, Gtk.DialogFlags.DESTROY_WITH_PARENT, None) + self.help_button = window.add_button(_('_Help'), + Gtk.ResponseType.HELP) self.undo_button = window.add_button(_('_Undo'), Gtk.ResponseType.REJECT) self.redo_button = window.add_button(_('_Redo'), @@ -174,6 +186,10 @@ class UndoHistory(ManagedWindow): elif response_id == Gtk.ResponseType.DELETE_EVENT: self.close(obj) + elif response_id == Gtk.ResponseType.HELP: + display_help(webpage=WIKI_HELP_PAGE, + section=WIKI_HELP_SEC) + def build_menu_names(self, obj): return (self.title, None)