aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/chat_input
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/chat_input')
-rw-r--r--main/src/ui/chat_input/edit_history.vala11
-rw-r--r--main/src/ui/chat_input/view.vala2
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;