aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index b5a9f26..22e5501 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -1,6 +1,5 @@
#include "../include/Window.hpp"
#include <dchat/RoomDataType.hpp>
-#include "../include/WindowNotification.hpp"
#include <dchat/Cache.hpp>
#include <sibs/SafeDeserializer.hpp>
#include <math.h>
@@ -11,10 +10,11 @@ namespace dchat
const int nodesPerColumn = 10;
const int nodesPerRow = 10;
- Window::Window()
+ Window::Window() :
+ chatWindow(this)
{
set_border_width(0);
- WindowNotification *windowNotification = Gtk::manage(new WindowNotification());
+ windowNotification = Gtk::manage(new WindowNotification());
overlay.add_overlay(*windowNotification);
overlay.set_overlay_pass_through(*windowNotification);
overlay.add(stack);
@@ -31,7 +31,7 @@ namespace dchat
//chatWindow.show_all();
//loginWindow.show();
- loginWindow.setLoginHandler([this, windowNotification](const Glib::ustring &username, const Glib::ustring &password)
+ loginWindow.setLoginHandler([this](const Glib::ustring &username, const Glib::ustring &password)
{
if(!rooms || !rooms->database)
{
@@ -57,7 +57,7 @@ namespace dchat
}
});
- loginWindow.setRegisterHandler([this, windowNotification](const Glib::ustring &username, const Glib::ustring &password)
+ loginWindow.setRegisterHandler([this](const Glib::ustring &username, const Glib::ustring &password)
{
if(!rooms || !rooms->database)
{
@@ -84,13 +84,13 @@ namespace dchat
}
});
- loginWindow.setRegisterPasswordMismatch([windowNotification]
+ loginWindow.setRegisterPasswordMismatch([this]
{
windowNotification->show("Passwords do not match");
});
RoomCallbackFuncs roomCallbackFuncs;
- roomCallbackFuncs.connectCallbackFunc = [this, windowNotification](std::shared_ptr<Rooms> rooms, const char *errMsg)
+ roomCallbackFuncs.connectCallbackFunc = [this](std::shared_ptr<Rooms> rooms, const char *errMsg)
{
this->rooms = rooms;
if(rooms)