X-Git-Url: http://cgit.babelmonkeys.de/?p=jubjub.git;a=blobdiff_plain;f=src%2Fcore%2Fmain.m;h=c01a5ccecfe3da16797eff965ab93177e74e0f93;hp=62393b23ed964dd7e22bbdd2ed1fdba787a8908a;hb=73956f28f94e6137684150bf5d311826dae7f35a;hpb=62773a7c965b220c3f83acfe2e915f08ddb3f474 diff --git a/src/core/main.m b/src/core/main.m index 62393b2..c01a5cc 100644 --- a/src/core/main.m +++ b/src/core/main.m @@ -17,9 +17,7 @@ OF_APPLICATION_DELEGATE(AppDelegate) @implementation AppDelegate - (void)applicationDidFinishLaunching { - ui = [[JubGtkUI alloc] init]; - id rosterDelegate = - [ui rosterDelegate]; + id rosterDelegate; connection = [[XMPPConnection alloc] init]; [connection addDelegate: self]; @@ -28,7 +26,8 @@ OF_APPLICATION_DELEGATE(AppDelegate) connection.username = @"alice"; connection.password = @"test"; - [connection asyncConnectAndHandle]; + ui = [[JubGtkUI alloc] initWithConnection: connection]; + rosterDelegate = [ui rosterDelegate]; [connection addDelegate: rosterDelegate]; @@ -36,6 +35,8 @@ OF_APPLICATION_DELEGATE(AppDelegate) [roster addDelegate: rosterDelegate]; [roster addDelegate: self]; + [connection asyncConnectAndHandle]; + [ui startUIThread]; }