forked from Mirrors/apostrophe
commit
cada4f6702
|
@ -4,11 +4,6 @@
|
||||||
inclusion in templates
|
inclusion in templates
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@binding-set window-bindings {
|
|
||||||
bind "<ctl>w" { "close-window" () };
|
|
||||||
bind "<ctl><shift>b" { "toggle-bibtex" () };
|
|
||||||
}
|
|
||||||
|
|
||||||
@binding-set editor-bindings {
|
@binding-set editor-bindings {
|
||||||
bind "<ctl>i" { "insert-italic" () };
|
bind "<ctl>i" { "insert-italic" () };
|
||||||
bind "<ctl>b" { "insert-bold" () };
|
bind "<ctl>b" { "insert-bold" () };
|
||||||
|
@ -25,7 +20,6 @@
|
||||||
/* Main window and text colors */
|
/* Main window and text colors */
|
||||||
|
|
||||||
.uberwriter_window {
|
.uberwriter_window {
|
||||||
-gtk-key-bindings: window-bindings;
|
|
||||||
/*border-radius: 7px 7px 3px 3px;*/
|
/*border-radius: 7px 7px 3px 3px;*/
|
||||||
background: @background_color;
|
background: @background_color;
|
||||||
caret-color: @foreground_color;
|
caret-color: @foreground_color;
|
||||||
|
|
|
@ -42,10 +42,23 @@
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut" id="s1-5">
|
<object class="GtkShortcutsShortcut" id="s1-5">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes" context="shortcut window">Quit</property>
|
<property name="title" translatable="yes" context="shortcut window">Close document</property>
|
||||||
<property name="accelerator"><Primary>w</property>
|
<property name="accelerator"><Primary>w</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s1-5b">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Quit application</property>
|
||||||
|
<property name="accelerator"><Primary>q</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup" id="modes">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Modes</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut" id="s1-6">
|
<object class="GtkShortcutsShortcut" id="s1-6">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -60,13 +73,6 @@
|
||||||
<property name="accelerator"><Primary>t</property>
|
<property name="accelerator"><Primary>t</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut" id="s1-8">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Fullscreen</property>
|
|
||||||
<property name="accelerator">F11</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut" id="s1-9">
|
<object class="GtkShortcutsShortcut" id="s1-9">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -74,6 +80,19 @@
|
||||||
<property name="accelerator"><Primary>p</property>
|
<property name="accelerator"><Primary>p</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s1-8">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Fullscreen</property>
|
||||||
|
<property name="accelerator">F11</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup" id="search">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Search</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut" id="s1-10">
|
<object class="GtkShortcutsShortcut" id="s1-10">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -84,9 +103,9 @@
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsGroup" id="s2">
|
<object class="GtkShortcutsGroup" id="markdown">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes" context="shortcut window">Editor</property>
|
<property name="title" translatable="yes" context="shortcut window">Markdown</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut" id="s2-1">
|
<object class="GtkShortcutsShortcut" id="s2-1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -115,6 +134,13 @@
|
||||||
<property name="accelerator"><Primary>b</property>
|
<property name="accelerator"><Primary>b</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s2-6">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Strikeout</property>
|
||||||
|
<property name="accelerator"><Shift><Primary>D</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut" id="s2-5">
|
<object class="GtkShortcutsShortcut" id="s2-5">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -122,27 +148,6 @@
|
||||||
<property name="accelerator"><Primary>h</property>
|
<property name="accelerator"><Primary>h</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut" id="s2-6">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Cut</property>
|
|
||||||
<property name="accelerator"><Primary>x</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut" id="s2-7">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Copy</property>
|
|
||||||
<property name="accelerator"><Primary>c</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut" id="s2-8">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Paste</property>
|
|
||||||
<property name="accelerator"><Primary>v</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut" id="s2-9">
|
<object class="GtkShortcutsShortcut" id="s2-9">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -152,6 +157,67 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup" id="copy-paste">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Copy and paste</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s3-1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Copy selected text to clipboard</property>
|
||||||
|
<property name="accelerator"><Primary>C</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s3-2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Cut selected text to clipboard</property>
|
||||||
|
<property name="accelerator"><Primary>X</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s3-3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Paste selected text from clipboard</property>
|
||||||
|
<property name="accelerator"><Primary>V</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup" id="undo-redo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Undo and redo</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s4-1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Undo previous command</property>
|
||||||
|
<property name="accelerator"><Primary>Z</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s4-2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Redo previous command</property>
|
||||||
|
<property name="accelerator"><Shift><Primary>Z</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup" id="selection">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Selection</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut" id="s5-1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Select all text</property>
|
||||||
|
<property name="accelerator"><Primary>A</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -148,6 +148,8 @@ class Application(Gtk.Application):
|
||||||
|
|
||||||
# Shortcuts
|
# Shortcuts
|
||||||
|
|
||||||
|
# TODO: be aware that a couple of shortcuts are defined in _gtk_base.css
|
||||||
|
|
||||||
self.set_accels_for_action("app.focus_mode", ["<Ctl>d"])
|
self.set_accels_for_action("app.focus_mode", ["<Ctl>d"])
|
||||||
self.set_accels_for_action("app.hemingway_mode", ["<Ctl>t"])
|
self.set_accels_for_action("app.hemingway_mode", ["<Ctl>t"])
|
||||||
self.set_accels_for_action("app.fullscreen", ["F11"])
|
self.set_accels_for_action("app.fullscreen", ["F11"])
|
||||||
|
@ -159,6 +161,7 @@ class Application(Gtk.Application):
|
||||||
self.set_accels_for_action("app.open", ["<Ctl>o"])
|
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", ["<Ctl>s"])
|
||||||
self.set_accels_for_action("app.save_as", ["<Ctl><shift>s"])
|
self.set_accels_for_action("app.save_as", ["<Ctl><shift>s"])
|
||||||
|
self.set_accels_for_action("app.quit", ["<Ctl>w", "<Ctl>q"])
|
||||||
|
|
||||||
self.apply_current_theme()
|
self.apply_current_theme()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue