diff options
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(); |