diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-15 01:02:35 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-15 01:02:35 -0400 |
commit | 00524cefa29e80f0a9a80fd77bb6e1f4da024f65 (patch) | |
tree | 60096a087d1a858cdfaf242a9523b52be4d37de8 /src/components/chatinput.cpp | |
parent | 52a340e3666e4081b5f284c320404d06ac37b2f3 (diff) | |
download | abaddon-portaudio-00524cefa29e80f0a9a80fd77bb6e1f4da024f65.tar.gz abaddon-portaudio-00524cefa29e80f0a9a80fd77bb6e1f4da024f65.zip |
make editing inline, add up arrow shortcut
Diffstat (limited to 'src/components/chatinput.cpp')
-rw-r--r-- | src/components/chatinput.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/components/chatinput.cpp b/src/components/chatinput.cpp index 28ed1ea..8ad0c3f 100644 --- a/src/components/chatinput.cpp +++ b/src/components/chatinput.cpp @@ -565,6 +565,16 @@ void ChatInput::StopReplying() { m_input.Get().get_style_context()->remove_class("replying"); } +void ChatInput::StartEditing(const Message &message) { + m_input.Get().grab_focus(); + m_input.Get().get_style_context()->add_class("editing"); + GetBuffer()->set_text(message.Content); +} + +void ChatInput::StopEditing() { + m_input.Get().get_style_context()->remove_class("editing"); +} + bool ChatInput::AddFileAsImageAttachment(const Glib::RefPtr<Gio::File> &file) { try { const auto read_stream = file->read(); |