header: Add a keyboard accelerator for toggling the sidebar
The user can press <Control>] to open and close the sidebar. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
a08273535c
commit
3f153e1423
|
@ -134,7 +134,9 @@ class Header(Gtk.HeaderBar):
|
|||
ActionEntry("increase-volume", self._volume.increment,
|
||||
"<Shift><Control>Up"),
|
||||
ActionEntry("toggle-bg-mode", self._background.activate,
|
||||
"<Shift><Control>b")]
|
||||
"<Shift><Control>b"),
|
||||
ActionEntry("toggle-sidebar", self._show_sidebar.activate,
|
||||
"<Control>bracketright")]
|
||||
if __debug__:
|
||||
res.append(ActionEntry("edit-settings", self._settings.activate,
|
||||
"<Shift><Control>s"))
|
||||
|
|
|
@ -205,6 +205,8 @@ class TestHeader(tests.util.TestCase):
|
|||
"<Shift><Control>Up"),
|
||||
("toggle-bg-mode", self.header._background.activate,
|
||||
"<Shift><Control>b"),
|
||||
("toggle-sidebar", self.header._show_sidebar.activate,
|
||||
"<Control>bracketright"),
|
||||
("edit-settings", self.header._settings.activate,
|
||||
"<Shift><Control>s")]
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ class TestEmmental(unittest.TestCase):
|
|||
("app.decrease-volume", "<Shift><Control>Down"),
|
||||
("app.increase-volume", "<Shift><Control>Up"),
|
||||
("app.toggle-bg-mode", "<Shift><Control>b"),
|
||||
("app.toggle-sidebar", "<Control>bracketright"),
|
||||
("app.edit-settings", "<Shift><Control>s")]:
|
||||
self.assertEqual(self.application.get_accels_for_action(action),
|
||||
[accel])
|
||||
|
|
Loading…
Reference in New Issue