Commit c65273bf authored by Felix Paul Kühne's avatar Felix Paul Kühne

Dropbox: improve back button title and behavior

parent 0aaa3527
......@@ -23,6 +23,7 @@
UIBarButtonItem *_progressBarButtonItem;
UIBarButtonItem *_downloadingBarLabel;
UIProgressView *_progressView;
UIBarButtonItem *_backButton;
UIActivityIndicatorView *_activityIndicator;
}
......@@ -52,8 +53,10 @@
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BUTTON_DONE", @"") style:UIBarButtonItemStyleDone target:self action:@selector(dismiss:)];
self.navigationItem.rightBarButtonItem = addButton;
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@".." style:UIBarButtonItemStyleBordered target:self action:@selector(folderUp:)];
self.navigationItem.leftBarButtonItem = backButton;
_backButton = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStyleBordered target:self action:@selector(folderUp:)];
[_backButton setBackgroundImage:[UIImage imageNamed:@"button"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[_backButton setBackgroundImage:[UIImage imageNamed:@"buttonHighlight"] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
self.navigationItem.leftBarButtonItem = _backButton;
self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"dropbox-white"]];
......@@ -180,6 +183,14 @@
_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
......
......@@ -2,7 +2,7 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1296</int>
<string key="IBDocument.SystemVersion">12E52</string>
<string key="IBDocument.SystemVersion">12E55</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.39</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
......@@ -38,7 +38,6 @@
<int key="NSvFlags">274</int>
<string key="NSFrame">{{0, 20}, {320, 504}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor" id="651013553">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
......@@ -87,7 +86,6 @@
<int key="NSvFlags">293</int>
<string key="NSFrame">{{71, 200}, {179, 60}}</string>
<reference key="NSSuperview" ref="338576143"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
......@@ -101,7 +99,6 @@
<int key="NSvFlags">293</int>
<string key="NSFrame">{{128, 303}, {65, 44}}</string>
<reference key="NSSuperview" ref="338576143"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
......@@ -134,7 +131,6 @@
</array>
<string key="NSFrameSize">{320, 568}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="320706770"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="651013553"/>
......@@ -256,43 +252,7 @@
<nil key="sourceID"/>
<int key="maxID">27</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">VLCDropboxTableViewController</string>
<string key="superclassName">UITableViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">loginToDropboxAction:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">loginToDropboxAction:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">loginToDropboxAction:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="loginToDropboxButton">UIButton</string>
<string key="loginToDropboxView">UIView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="loginToDropboxButton">
<string key="name">loginToDropboxButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="loginToDropboxView">
<string key="name">loginToDropboxView</string>
<string key="candidateClassName">UIView</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/VLCDropboxTableViewController.h</string>
</object>
</object>
</array>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
......
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