11#import "AppDelegate.h"
13#import "AboutController.h"
14#import "HelpController.h"
15#import "BookmarkListController.h"
16#import "AppSettingsController.h"
17#import "MainTabBarController.h"
22@synthesize window = _window, tabBarController = _tabBarController;
24- (BOOL)application:(UIApplication *)application
25 didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
28 [[NSUserDefaults standardUserDefaults]
29 registerDefaults:[NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle]
30 pathForResource:@"Defaults"
34 SetSwapMouseButtonsFlag(
35 [[NSUserDefaults standardUserDefaults] boolForKey:
@"ui.swap_mouse_buttons"]);
36 SetInvertScrollingFlag(
37 [[NSUserDefaults standardUserDefaults] boolForKey:
@"ui.invert_scrolling"]);
42 bundle:nil] autorelease];
43 UINavigationController *bookmarkNavigationController = [[[UINavigationController alloc]
44 initWithRootViewController:bookmarkListController] autorelease];
49 UINavigationController *appSettingsNavigationController = [[[UINavigationController alloc]
50 initWithRootViewController:appSettingsController] autorelease];
54 bundle:nil] autorelease];
62 [NSArray arrayWithObjects:bookmarkNavigationController, appSettingsNavigationController,
63 helpViewController, aboutViewController, nil];
64 [_tabBarController setViewControllers:tabItems];
65 if ([_window respondsToSelector:@selector(setRootViewController:)])
66 [_window setRootViewController:_tabBarController];
68 [_window addSubview:[_tabBarController view]];
69 [_window makeKeyAndVisible];
74- (void)applicationWillResignActive:(UIApplication *)application
85- (void)applicationDidEnterBackground:(UIApplication *)application
95- (void)applicationWillEnterForeground:(UIApplication *)application
104- (void)applicationDidBecomeActive:(UIApplication *)application
112- (void)applicationWillTerminate:(UIApplication *)application