]> cgit.babelmonkeys.de Git - jubjub.git/blobdiff - src/gui/gtk/JubGtkRosterUI.m
Add a minimal JubChatClient class and refactor other code to use it
[jubjub.git] / src / gui / gtk / JubGtkRosterUI.m
index b3899e34a1d750edf1e57d0d6961d4a8f4baf326..c27142f2f68fa0bf4b697ae8c121fae2cbd3e704 100644 (file)
@@ -80,7 +80,7 @@ static gboolean filter_roster_by_presence(GtkTreeModel *model,
 }
 
 @implementation JubGtkRosterUI
-- initWithConnection: (XMPPConnection*)connection_
+- initWithClient: (JubChatClient*)client;
 {
        self = [super init];
 
@@ -95,7 +95,10 @@ static gboolean filter_roster_by_presence(GtkTreeModel *model,
                contactMap = [[OFMutableDictionary alloc] init];
                chatMap = [[OFMutableDictionary alloc] init];
                presences = [[OFCountedSet alloc] init];
-               connection = [connection_ retain];
+               connection = [client.connection retain];
+
+               [connection addDelegate: self];
+               [client.roster addDelegate: self];
 
                builder = gtk_builder_new();
                gtk_builder_add_from_file(builder, "data/gtk/roster.ui", NULL);