add ability to create replies

This commit is contained in:
ouwou
2021-03-14 17:59:52 -05:00
parent ba6b8b2773
commit 927acfb9fe
16 changed files with 146 additions and 33 deletions

View File

@@ -31,6 +31,11 @@ Glib::RefPtr<Gtk::TextBuffer> ChatInput::GetBuffer() {
// this isnt connected directly so that the chat window can handle stuff like the completer first
bool ChatInput::ProcessKeyPress(GdkEventKey *event) {
if (event->keyval == GDK_KEY_Escape) {
m_signal_escape.emit();
return true;
}
if (event->keyval == GDK_KEY_Return) {
if (event->state & GDK_SHIFT_MASK)
return false;
@@ -48,6 +53,14 @@ bool ChatInput::ProcessKeyPress(GdkEventKey *event) {
return false;
}
void ChatInput::on_grab_focus() {
m_textview.grab_focus();
}
ChatInput::type_signal_submit ChatInput::signal_submit() {
return m_signal_submit;
}
ChatInput::type_signal_escape ChatInput::signal_escape() {
return m_signal_escape;
}