mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
clear input when exiting editing
This commit is contained in:
@@ -497,6 +497,10 @@ void ChatInput::InsertText(const Glib::ustring &text) {
|
||||
m_input.Get().InsertText(text);
|
||||
}
|
||||
|
||||
void ChatInput::Clear() {
|
||||
GetBuffer()->set_text("");
|
||||
}
|
||||
|
||||
Glib::RefPtr<Gtk::TextBuffer> ChatInput::GetBuffer() {
|
||||
return m_input.Get().GetBuffer();
|
||||
}
|
||||
|
||||
@@ -129,6 +129,7 @@ public:
|
||||
ChatInput();
|
||||
|
||||
void InsertText(const Glib::ustring &text);
|
||||
void Clear();
|
||||
Glib::RefPtr<Gtk::TextBuffer> GetBuffer();
|
||||
bool ProcessKeyPress(GdkEventKey *event);
|
||||
void AddAttachment(const Glib::RefPtr<Gio::File> &file);
|
||||
|
||||
@@ -349,6 +349,7 @@ void ChatWindow::StopEditing() {
|
||||
m_is_editing = false;
|
||||
m_editing_id = Snowflake::Invalid;
|
||||
m_input->StopEditing();
|
||||
m_input->Clear();
|
||||
m_input_indicator->ClearCustom();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user