From 8cc8853c3c1e5dfd7681bc0c31bc0eb88a4ef959 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 3 Nov 2018 01:10:08 +0100 Subject: Add room name change event, create new room button, multiple rooms --- src/Window.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index b9e1490..e8129f0 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -5,7 +5,6 @@ #include #include #include -#include namespace dchat { @@ -48,13 +47,7 @@ namespace dchat drawBackgroundConnection.disconnect(); chatWindow.show_all(); stack.set_visible_child(chatWindow); - - Glib::signal_timeout().connect([this] - { - printf("scroll to bottom!\n"); - chatWindow.scrollToBottom(); - return false; - }, 100); + chatWindow.scrollToBottom(); } catch(std::exception &e) { @@ -130,6 +123,10 @@ namespace dchat { chatWindow.setUserNickname(request); }; + roomCallbackFuncs.changeRoomNameCallbackFunc = [this](const RoomChangeNameRequest &request) + { + chatWindow.changeRoomName(request); + }; windowNotification->show("Connecting to 83.252.53.188:27130"); Rooms::connect("83.252.53.188", 27130, roomCallbackFuncs); -- cgit v1.2.3