Merge pull request #686 from vssdeo/680-open-up-keybindings-page-on-keypress

[bug 680] Open up keybindings page on keypress #680
This commit is contained in:
Matt Rose 2022-11-29 21:12:15 -05:00 committed by GitHub
commit 403bf540d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -202,6 +202,7 @@ DEFAULTS = {
'next_profile' : '',
'previous_profile' : '',
'preferences' : '',
'preferences_keybindings' : '<Control><Shift>k',
'help' : 'F1'
},
'profiles': {

View File

@ -181,11 +181,12 @@ class PrefsEditor:
'layout_launcher' : _('Open layout launcher window'),
'next_profile' : _('Switch to next profile'),
'previous_profile' : _('Switch to previous profile'),
'preferences' : _('Open the Preferences window'),
'preferences' : _('Open the Preferences window'),
'preferences_keybindings' : _('Open the Preferences-Keybindings window'),
'help' : _('Open the manual')
}
def __init__ (self, term):
def __init__ (self, term, cur_page=0):
self.config = config.Config()
self.config.base.reload()
self.term = term
@ -228,6 +229,10 @@ class PrefsEditor:
err('Unable to set values: %s' % e)
self.config.uninhibit_save()
guiget = self.builder.get_object
nb = guiget('notebook1')
nb.set_current_page(cur_page)
def on_closebutton_clicked(self, _button):
"""Close the window"""
terminator = Terminator()

View File

@ -2080,6 +2080,11 @@ class Terminal(Gtk.VBox):
def key_preferences(self):
PrefsEditor(self)
def key_preferences_keybindings(self):
#need to have this as a config may be preferences_default
#have a mapping rather than hardcoded page
PrefsEditor(self, cur_page = 3)
def key_help(self):
manual_index_page = manual_lookup()
if manual_index_page: