| 36 |
36 |
| 37 @implementation AppDelegate |
37 @implementation AppDelegate |
| 38 |
38 |
| 39 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { |
39 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { |
| 40 NSLog(@"toolkit applicationDidFinishLaunching"); |
40 NSLog(@"toolkit applicationDidFinishLaunching"); |
| 41 uic_application_init(NULL); |
|
| 42 ui_menu_init(); |
41 ui_menu_init(); |
| 43 uic_application_startup(NULL); |
42 uic_application_startup(NULL); |
| |
43 // run ui_menu_init again, because it is possible, that the startup func |
| |
44 // added menus (which is probably true when using other language bindings) |
| |
45 // the menu init func can be called multiple times and is also called |
| |
46 // when a new window is created |
| |
47 // The only usecase for calling init here is, that an application might not |
| |
48 // open a window on startup, but wants a working menubar |
| |
49 ui_menu_init(); |
| 44 } |
50 } |
| 45 |
51 |
| 46 - (void)applicationWillTerminate:(NSNotification *)aNotification { |
52 - (void)applicationWillTerminate:(NSNotification *)aNotification { |
| 47 NSLog(@"toolkit applicationWillTerminate"); |
53 NSLog(@"toolkit applicationWillTerminate"); |
| 48 uic_application_exit(NULL); |
54 uic_application_exit(NULL); |