From a8aceb1e395e3d0d5a570f6570a1613e2f990d87 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 17 Aug 2017 21:24:01 +0200 Subject: README: Discussion MUC, change url --- main/src/ui/chat_input/edit_history.vala | 11 +++++------ main/src/ui/chat_input/view.vala | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'main/src/ui/chat_input') 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; -- cgit v1.2.3-54-g00ecf