Skip to content

Commit

Permalink
more 4.3 compat, and theming for mangroves
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed May 5, 2012
1 parent 2692674 commit 946143f
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Classes/Common/AppDelegate.m
Expand Up @@ -140,7 +140,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(


NavigationController *masterNavigationController = [[[NavigationController alloc] init] autorelease]; NavigationController *masterNavigationController = [[[NavigationController alloc] init] autorelease];
masterNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; masterNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
masterNavigationController.navigationBar.tintColor = [[Settings sharedSettings] navBarTintColor]; masterNavigationController.navigationBar.tintColor = [[Settings sharedSettings] navBarTintColor];


NavigationController *detailNavigationController = [[[NavigationController alloc] init] autorelease]; NavigationController *detailNavigationController = [[[NavigationController alloc] init] autorelease];
detailNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; detailNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
Expand Down
4 changes: 3 additions & 1 deletion Classes/Controllers/BaseAddViewController.m
Expand Up @@ -52,7 +52,9 @@ - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.cancelButton.title = NSLocalizedString(@"Cancel", nil); self.cancelButton.title = NSLocalizedString(@"Cancel", nil);
self.doneButton.title = NSLocalizedString(@"Add", nil); self.doneButton.title = NSLocalizedString(@"Add", nil);
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor]; if ([self.doneButton respondsToSelector:@selector(setTintColor:)]) {
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor];
}
} }


- (void)viewDidUnload { - (void)viewDidUnload {
Expand Down
3 changes: 2 additions & 1 deletion Classes/Controllers/BaseTableViewController.m
Expand Up @@ -59,7 +59,8 @@ - (void) showSearchBarWithPlaceholder:(NSString *)placeholder {
searchBar.autocorrectionType = UITextAutocorrectionTypeNo; searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
searchBar.barStyle = UIBarStyleBlack; searchBar.barStyle = UIBarStyleBlack;
searchBar.placeholder = placeholder; searchBar.placeholder = placeholder;
searchBar.tintColor = [[Settings sharedSettings] searchBarTintColor]; searchBar.tintColor = [[Settings sharedSettings] searchBarTintColor];

[searchBar sizeToFit]; [searchBar sizeToFit];
[self.tableView setTableHeaderView:searchBar]; [self.tableView setTableHeaderView:searchBar];
[searchBar release]; [searchBar release];
Expand Down
4 changes: 3 additions & 1 deletion Classes/Controllers/CategoryTableViewController.m
Expand Up @@ -50,7 +50,9 @@ - (IBAction) done:(id)sender {
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.doneButton.title = NSLocalizedString(@"Done", nil); self.doneButton.title = NSLocalizedString(@"Done", nil);
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor]; if ([self.doneButton respondsToSelector:@selector(setTintColor:)]) {
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor];
}
[self showSearchBarWithPlaceholder:NSLocalizedString(@"Search categories...", nil)]; [self showSearchBarWithPlaceholder:NSLocalizedString(@"Search categories...", nil)];
} }


Expand Down
4 changes: 3 additions & 1 deletion Classes/Controllers/LocationSelectViewController.m
Expand Up @@ -118,7 +118,9 @@ - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.locations = [[NSMutableArray alloc] initWithCapacity:0]; self.locations = [[NSMutableArray alloc] initWithCapacity:0];
self.doneButton.title = NSLocalizedString(@"Done", nil); self.doneButton.title = NSLocalizedString(@"Done", nil);
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor]; if ([self.doneButton respondsToSelector:@selector(setTintColor:)]) {
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor];
}
UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)]; UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
tapGestureRecognizer.numberOfTapsRequired = 2; tapGestureRecognizer.numberOfTapsRequired = 2;
tapGestureRecognizer.numberOfTouchesRequired = 1; tapGestureRecognizer.numberOfTouchesRequired = 1;
Expand Down
4 changes: 3 additions & 1 deletion Classes/Controllers/SettingsViewController.m
Expand Up @@ -156,7 +156,9 @@ - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.navigationBar.topItem.title = NSLocalizedString(@"Settings", nil); self.navigationBar.topItem.title = NSLocalizedString(@"Settings", nil);
self.doneButton.title = NSLocalizedString(@"Done", nil); self.doneButton.title = NSLocalizedString(@"Done", nil);
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor]; if ([self.doneButton respondsToSelector:@selector(setTintColor:)]) {
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor];
}
self.email = [[Email alloc] initWithController:self]; self.email = [[Email alloc] initWithController:self];
self.logo = [Device isIPad] ? [UIImage imageNamed:@"Logo_iPad.png"] : [UIImage imageNamed:@"Logo_iPhone.png"]; self.logo = [Device isIPad] ? [UIImage imageNamed:@"Logo_iPad.png"] : [UIImage imageNamed:@"Logo_iPhone.png"];
[self setHeader:NSLocalizedString(@"Contact Settings", nil) atSection:TableSectionContact]; [self setHeader:NSLocalizedString(@"Contact Settings", nil) atSection:TableSectionContact];
Expand Down
5 changes: 3 additions & 2 deletions Classes/Controllers/TwitterViewController.m
Expand Up @@ -134,8 +134,9 @@ - (void)viewDidLoad {
self.twitter = [[MGTwitterEngine alloc] initWithDelegate:self]; self.twitter = [[MGTwitterEngine alloc] initWithDelegate:self];
self.navigationBar.topItem.title = NSLocalizedString(@"Twitter", nil); self.navigationBar.topItem.title = NSLocalizedString(@"Twitter", nil);
self.doneButton.title = NSLocalizedString(@"Send", nil); self.doneButton.title = NSLocalizedString(@"Send", nil);
self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor]; if ([self.doneButton respondsToSelector:@selector(setTintColor:)]) {

self.doneButton.tintColor = [[Settings sharedSettings] doneButtonColor];
}
NSString *twitterApiKey = [[Settings sharedSettings] twitterApiKey]; NSString *twitterApiKey = [[Settings sharedSettings] twitterApiKey];
NSString *twitterApiSecret = [[Settings sharedSettings] twitterApiSecret]; NSString *twitterApiSecret = [[Settings sharedSettings] twitterApiSecret];
DLog(@"Twitter key:%@ secret:%@", twitterApiKey, twitterApiSecret); DLog(@"Twitter key:%@ secret:%@", twitterApiKey, twitterApiSecret);
Expand Down
6 changes: 3 additions & 3 deletions Themes/MangrovesMap/Info.plist
Expand Up @@ -28,7 +28,7 @@
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>Ushahidi</string> <string>Mapping The Mangroves</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
Expand All @@ -44,11 +44,11 @@
<key>NSMainNibFile~ipad</key> <key>NSMainNibFile~ipad</key>
<string>MainWindow_iPad</string> <string>MainWindow_iPad</string>
<key>USHNavBarColor</key> <key>USHNavBarColor</key>
<string>#524939</string> <string>#390d07</string>
<key>USHReportNewsURL</key> <key>USHReportNewsURL</key>
<true/> <true/>
<key>USHSearchBarColor</key> <key>USHSearchBarColor</key>
<string>#756d61</string> <string>#faf0cf</string>
<key>USHSupportEmail</key> <key>USHSupportEmail</key>
<string>support@ushahidi.com</string> <string>support@ushahidi.com</string>
<key>USHSupportURL</key> <key>USHSupportURL</key>
Expand Down

0 comments on commit 946143f

Please sign in to comment.