Commit 4a0f9ccc authored by Romain Goyet's avatar Romain Goyet Committed by Felix Paul Kühne

Proper navigation in the Dropbox section

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 3dcfce2e
......@@ -25,7 +25,6 @@
UIBarButtonItem *_progressBarButtonItem;
UIBarButtonItem *_downloadingBarLabel;
UIProgressView *_progressView;
UIBarButtonItem *_backButton;
UIActivityIndicatorView *_activityIndicator;
}
......@@ -52,17 +51,6 @@
[DBSession setSharedSession:dbSession];
[DBRequest setNetworkRequestDelegate:_dropboxController];
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BUTTON_DONE", @"") style:UIBarButtonItemStyleBordered target:self action:@selector(dismiss:)];
[addButton setBackgroundImage:[UIImage imageNamed:@"doneButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[addButton setBackgroundImage:[UIImage imageNamed:@"doneButtonHighlight"] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
[addButton setTitleTextAttributes:@{UITextAttributeTextShadowColor : [UIColor whiteColor], UITextAttributeTextColor : [UIColor blackColor]} forState:UIControlStateNormal];
self.navigationItem.rightBarButtonItem = addButton;
_backButton = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStyleBordered target:self action:@selector(folderUp:)];
[_backButton setBackgroundImage:[UIImage imageNamed:@"backButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[_backButton setBackgroundImage:[UIImage imageNamed:@"backButtonHighlight"] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
self.navigationItem.leftBarButtonItem = _backButton;
self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"dropbox-white"]];
self.navigationItem.titleView.contentMode = UIViewContentModeScaleAspectFit;
......@@ -207,14 +195,6 @@
_numberOfFilesBarButtonItem.title = [NSString stringWithFormat:NSLocalizedString(@"NUM_OF_FILES", @""), count];
else
_numberOfFilesBarButtonItem.title = NSLocalizedString(@"ONE_FILE", @"");
NSString *backButtonTitle = _currentPath.lastPathComponent;
if ([backButtonTitle isEqualToString:@"/"]) {
backButtonTitle = @"";
_backButton.enabled = NO;
} else
_backButton.enabled = YES;
_backButton.title = backButtonTitle;
}
- (void)operationWithProgressInformationStarted
......
......@@ -194,9 +194,7 @@
appDelegate.dropboxTableViewController.modalPresentationStyle = UIModalPresentationFormSheet;
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:appDelegate.dropboxTableViewController];
[navController loadTheme];
[self presentModalViewController:navController animated:YES];
[self _presentViewController:appDelegate.dropboxTableViewController];
}
#pragma mark - Private methods
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment