summaryrefslogtreecommitdiff
path: root/src/components/chatinput.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-07-09 01:57:56 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2022-07-09 01:57:56 -0400
commit02ce353c6d35af004dc1b6f5ae9f68fbb8540b54 (patch)
tree49dda3f8880b76dd002dcf8c4f5f314171f12fca /src/components/chatinput.cpp
parent241d9a2140b07acb4212c1fc79b70f1f36be9c78 (diff)
downloadabaddon-portaudio-02ce353c6d35af004dc1b6f5ae9f68fbb8540b54.tar.gz
abaddon-portaudio-02ce353c6d35af004dc1b6f5ae9f68fbb8540b54.zip
check nitro size restriction + fix replying border
Diffstat (limited to 'src/components/chatinput.cpp')
-rw-r--r--src/components/chatinput.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/chatinput.cpp b/src/components/chatinput.cpp
index b71a234..fc5ef38 100644
--- a/src/components/chatinput.cpp
+++ b/src/components/chatinput.cpp
@@ -392,6 +392,23 @@ void ChatInput::AddAttachment(const Glib::RefPtr<Gio::File> &file) {
}
}
+void ChatInput::IndicateTooLarge() {
+ m_input.get_style_context()->add_class("bad-input");
+ const auto cb = [this] {
+ m_input.get_style_context()->remove_class("bad-input");
+ };
+ Glib::signal_timeout().connect_seconds_once(sigc::track_obj(cb, *this), 2);
+}
+
+void ChatInput::StartReplying() {
+ m_input.grab_focus();
+ m_input.get_style_context()->add_class("replying");
+}
+
+void ChatInput::StopReplying() {
+ m_input.get_style_context()->remove_class("replying");
+}
+
bool ChatInput::AddFileAsImageAttachment(const Glib::RefPtr<Gio::File> &file) {
try {
const auto read_stream = file->read();