From 1ff177ad5a11f084acca616084021664f8201514 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 11 Oct 2020 01:56:30 -0400 Subject: shift click on message author to insert mention --- components/chatwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'components/chatwindow.cpp') diff --git a/components/chatwindow.cpp b/components/chatwindow.cpp index 43f61bb..3943bd5 100644 --- a/components/chatwindow.cpp +++ b/components/chatwindow.cpp @@ -182,6 +182,9 @@ void ChatWindow::ProcessNewMessage(Snowflake id, bool prepend) { if (user == nullptr) return; header = Gtk::manage(new ChatMessageHeader(data)); + header->signal_action_insert_mention().connect([this](const Snowflake &id) { + m_signal_action_insert_mention.emit(id); + }); m_num_rows++; Abaddon::Get().GetImageManager().LoadFromURL(user->GetAvatarURL("png", "32"), [this, user_id](Glib::RefPtr buf) { Glib::signal_idle().connect([this, buf, user_id]() -> bool { @@ -334,3 +337,7 @@ ChatWindow::type_signal_action_chat_load_history ChatWindow::signal_action_chat_ ChatWindow::type_signal_action_channel_click ChatWindow::signal_action_channel_click() { return m_signal_action_channel_click; } + +ChatWindow::type_signal_action_insert_mention ChatWindow::signal_action_insert_mention() { + return m_signal_action_insert_mention; +} -- cgit v1.2.3