}
@implementation JubGtkRosterUI
-- initWithConnection: (XMPPConnection*)connection_
+- initWithClient: (JubChatClient*)client;
{
self = [super init];
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);