diff options
author | fiaxh <git@mx.ax.lt> | 2017-08-17 21:24:01 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-08-22 16:04:41 +0200 |
commit | a8aceb1e395e3d0d5a570f6570a1613e2f990d87 (patch) | |
tree | be4996693059e26500d0c4fd68f0bd71e863f514 /main/src/ui/chat_input | |
parent | a24e88f48b9a16239ff91a3ce7b4a70bd2d84fee (diff) | |
download | dino-a8aceb1e395e3d0d5a570f6570a1613e2f990d87.tar.gz dino-a8aceb1e395e3d0d5a570f6570a1613e2f990d87.zip |
README: Discussion MUC, change url
Diffstat (limited to 'main/src/ui/chat_input')
-rw-r--r-- | main/src/ui/chat_input/edit_history.vala | 11 | ||||
-rw-r--r-- | main/src/ui/chat_input/view.vala | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/main/src/ui/chat_input/edit_history.vala b/main/src/ui/chat_input/edit_history.vala index 78a0f41e..22032a0b 100644 --- a/main/src/ui/chat_input/edit_history.vala +++ b/main/src/ui/chat_input/edit_history.vala @@ -30,12 +30,11 @@ class EditHistory { } public bool on_text_input_key_press(EventKey event) { - if ((event.state & ModifierType.CONTROL_MASK) > 0) { - if (event.keyval == Key.z) { - undo(); - } else if (event.keyval == Key.Z) { - redo(); - } + bool ctrl_pressed = (event.state & ModifierType.CONTROL_MASK) > 0; + if (ctrl_pressed && event.keyval == Key.z) { + undo(); + } else if (ctrl_pressed && (event.keyval in new uint[]{ Key.Z, Key.y } )) { + redo(); } else if (event.keyval in new uint[]{ Key.space, Key.Tab, Key.ISO_Left_Tab }) { if (indices[conversation] < histories[conversation].size - 1) { histories[conversation] = histories[conversation].slice(0, indices[conversation] + 1); diff --git a/main/src/ui/chat_input/view.vala b/main/src/ui/chat_input/view.vala index a7c3099c..3684e27c 100644 --- a/main/src/ui/chat_input/view.vala +++ b/main/src/ui/chat_input/view.vala @@ -7,7 +7,7 @@ using Xmpp; namespace Dino.Ui.ChatInput { -[GtkTemplate (ui = "/org/dino-im/chat_input.ui")] +[GtkTemplate (ui = "/im/dino/chat_input.ui")] public class View : Box { [GtkChild] private ScrolledWindow scrolled; |