Add Ctrl+S keyboard shortcut for saving requests
This commit is contained in:
parent
3633117c5f
commit
00139f2588
@ -507,6 +507,12 @@ class RosterWindow(Adw.ApplicationWindow):
|
|||||||
self.add_action(action)
|
self.add_action(action)
|
||||||
self.get_application().set_accels_for_action("win.close-tab", ["<Control>w"])
|
self.get_application().set_accels_for_action("win.close-tab", ["<Control>w"])
|
||||||
|
|
||||||
|
# Save request shortcut (Ctrl+S)
|
||||||
|
action = Gio.SimpleAction.new("save-request", None)
|
||||||
|
action.connect("activate", lambda a, p: self.on_save_request_clicked(None))
|
||||||
|
self.add_action(action)
|
||||||
|
self.get_application().set_accels_for_action("win.save-request", ["<Control>s"])
|
||||||
|
|
||||||
def _close_current_tab(self):
|
def _close_current_tab(self):
|
||||||
"""Close the currently active tab."""
|
"""Close the currently active tab."""
|
||||||
if self.current_tab_id:
|
if self.current_tab_id:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user