add window shortcuts

webkit2png
somas95 2018-06-28 02:16:17 +02:00
parent 3ae75a4b73
commit 84f1cf28de
2 changed files with 5 additions and 4 deletions

View File

@ -8,10 +8,6 @@
@define-color light_bg #EDEDED;
@binding-set window-bindings {
bind "<ctl>n" { "new-file" () };
bind "<ctl>o" { "open-file" () };
bind "<ctl>s" { "save-file" () };
bind "<ctl><shift>s" { "save-file-as" () };
bind "<ctl>w" { "close-window" () };
bind "<ctl><shift>b" { "toggle-bibtex" () };
}

View File

@ -224,6 +224,11 @@ class Application(Gtk.Application):
self.set_accels_for_action("app.search",["<Ctl>f"])
self.set_accels_for_action("app.spellcheck",["F7"])
self.set_accels_for_action("app.new",["<Ctl>n"])
self.set_accels_for_action("app.open",["<Ctl>o"])
self.set_accels_for_action("app.save",["<Ctl>s"])
self.set_accels_for_action("app.save_as",["<Ctl><shift>s"])
def do_activate(self):
# We only allow a single window and raise any existing ones