From 84f1cf28de0f9c990672be00b7963eac92e8565b Mon Sep 17 00:00:00 2001 From: somas95 Date: Thu, 28 Jun 2018 02:16:17 +0200 Subject: [PATCH] add window shortcuts --- data/media/style.css | 4 ---- uberwriter_lib/AppWindow.py | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/data/media/style.css b/data/media/style.css index 26b485f..1b568d2 100644 --- a/data/media/style.css +++ b/data/media/style.css @@ -8,10 +8,6 @@ @define-color light_bg #EDEDED; @binding-set window-bindings { - bind "n" { "new-file" () }; - bind "o" { "open-file" () }; - bind "s" { "save-file" () }; - bind "s" { "save-file-as" () }; bind "w" { "close-window" () }; bind "b" { "toggle-bibtex" () }; } diff --git a/uberwriter_lib/AppWindow.py b/uberwriter_lib/AppWindow.py index 7e8e132..a566a0a 100644 --- a/uberwriter_lib/AppWindow.py +++ b/uberwriter_lib/AppWindow.py @@ -224,6 +224,11 @@ class Application(Gtk.Application): self.set_accels_for_action("app.search",["f"]) self.set_accels_for_action("app.spellcheck",["F7"]) + self.set_accels_for_action("app.new",["n"]) + self.set_accels_for_action("app.open",["o"]) + self.set_accels_for_action("app.save",["s"]) + self.set_accels_for_action("app.save_as",["s"]) + def do_activate(self): # We only allow a single window and raise any existing ones