From cccd4e8695744a02a50e449a248c7c7a46f3c321 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 27 Jan 2019 02:12:37 +0100 Subject: Update dchat core --- tests/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/main.cpp') diff --git a/tests/main.cpp b/tests/main.cpp index 1b9231c..0fd291c 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -1,5 +1,5 @@ #include "../include/DynamicImage.hpp" -#include +#include #include #include #include @@ -26,16 +26,16 @@ static void applyRichText(Gtk::TextView *textView, const Glib::ustring &text) buffer->set_text(""); Gtk::TextIter iter = buffer->get_iter_at_offset(0); - dchat::compose(text.data(), text.bytes(), [textView, &text, &iter, &buffer](dchat::MessagePart messagePart) + dchat::parseIncomingMessage(text.data(), text.bytes(), [textView, &text, &iter, &buffer](dchat::IncomingMessagePart messagePart) { switch(messagePart.type) { - case dchat::MessagePart::Type::TEXT: + case dchat::IncomingMessagePart::Type::TEXT: { iter = buffer->insert(iter, text.data() + messagePart.textRange.start, text.data() + messagePart.textRange.end); break; } - case dchat::MessagePart::Type::EMOJI: + case dchat::IncomingMessagePart::Type::EMOJI: { auto anchor = Gtk::TextChildAnchor::create(); iter = buffer->insert_child_anchor(iter, anchor); -- cgit v1.2.3