Merge lp:~threeve/ubuntuone-ios-files/polish-and-shine-2 into lp:ubuntuone-ios-files

Proposed by Jason Foreman
Status: Merged
Merged at revision: 45
Proposed branch: lp:~threeve/ubuntuone-ios-files/polish-and-shine-2
Merge into: lp:ubuntuone-ios-files
Diff against target: 1384 lines (+362/-346)
9 files modified
Files.xcodeproj/project.pbxproj (+6/-6)
Files/U1FolderViewController.m (+17/-96)
Files/U1FolderViewController.xib (+122/-8)
Files/U1FuzzyDateTransformer.h (+1/-1)
Files/U1FuzzyDateTransformer.m (+59/-5)
Files/U1SettingsViewController.h (+0/-1)
Files/U1SettingsViewController.m (+72/-37)
Files/U1SettingsViewController.xib (+7/-137)
Files/UOSSOCredentialsViewController.xib (+78/-55)
To merge this branch: bzr merge lp:~threeve/ubuntuone-ios-files/polish-and-shine-2
Reviewer Review Type Date Requested Status
Zachery Bir Approve
Review via email: mp+85550@code.launchpad.net

Description of the change

Just a few more tweaks to make the app a little bit happier.

To post a comment you must log in.
Revision history for this message
Zachery Bir (urbanape) wrote :

woot!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Files.xcodeproj/project.pbxproj'
--- Files.xcodeproj/project.pbxproj 2011-12-13 16:43:36 +0000
+++ Files.xcodeproj/project.pbxproj 2011-12-13 20:52:29 +0000
@@ -47,7 +47,7 @@
47 960D46211409ECC500B73177 /* ic_folder.png in Resources */ = {isa = PBXBuildFile; fileRef = 960D461F1409ECC500B73177 /* ic_folder.png */; };47 960D46211409ECC500B73177 /* ic_folder.png in Resources */ = {isa = PBXBuildFile; fileRef = 960D461F1409ECC500B73177 /* ic_folder.png */; };
48 960D46221409ECC500B73177 /* ic_folder@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 960D46201409ECC500B73177 /* ic_folder@2x.png */; };48 960D46221409ECC500B73177 /* ic_folder@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 960D46201409ECC500B73177 /* ic_folder@2x.png */; };
49 960D4625140D8AF300B73177 /* U1ByteSizeValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4624140D8AF200B73177 /* U1ByteSizeValueTransformer.m */; };49 960D4625140D8AF300B73177 /* U1ByteSizeValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4624140D8AF200B73177 /* U1ByteSizeValueTransformer.m */; };
50 960D4628140D8B4400B73177 /* U1FriendlyDateValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4627140D8B4400B73177 /* U1FriendlyDateValueTransformer.m */; };50 960D4628140D8B4400B73177 /* U1FuzzyDateTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4627140D8B4400B73177 /* U1FuzzyDateTransformer.m */; };
51 960D462B140D99DD00B73177 /* U1Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D462A140D99DC00B73177 /* U1Node.m */; };51 960D462B140D99DD00B73177 /* U1Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D462A140D99DC00B73177 /* U1Node.m */; };
52 960D462E140DD22800B73177 /* U1FileNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D462D140DD22600B73177 /* U1FileNode.m */; };52 960D462E140DD22800B73177 /* U1FileNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D462D140DD22600B73177 /* U1FileNode.m */; };
53 960D4631140DD23600B73177 /* U1FolderNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4630140DD23400B73177 /* U1FolderNode.m */; };53 960D4631140DD23600B73177 /* U1FolderNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4630140DD23400B73177 /* U1FolderNode.m */; };
@@ -227,8 +227,8 @@
227 960D46201409ECC500B73177 /* ic_folder@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ic_folder@2x.png"; path = "Assets/ic_folder@2x.png"; sourceTree = "<group>"; };227 960D46201409ECC500B73177 /* ic_folder@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ic_folder@2x.png"; path = "Assets/ic_folder@2x.png"; sourceTree = "<group>"; };
228 960D4623140D8AF200B73177 /* U1ByteSizeValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1ByteSizeValueTransformer.h; sourceTree = "<group>"; };228 960D4623140D8AF200B73177 /* U1ByteSizeValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1ByteSizeValueTransformer.h; sourceTree = "<group>"; };
229 960D4624140D8AF200B73177 /* U1ByteSizeValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1ByteSizeValueTransformer.m; sourceTree = "<group>"; };229 960D4624140D8AF200B73177 /* U1ByteSizeValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1ByteSizeValueTransformer.m; sourceTree = "<group>"; };
230 960D4626140D8B4400B73177 /* U1FriendlyDateValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1FriendlyDateValueTransformer.h; sourceTree = "<group>"; };230 960D4626140D8B4400B73177 /* U1FuzzyDateTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; path = U1FuzzyDateTransformer.h; sourceTree = "<group>"; };
231 960D4627140D8B4400B73177 /* U1FriendlyDateValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1FriendlyDateValueTransformer.m; sourceTree = "<group>"; };231 960D4627140D8B4400B73177 /* U1FuzzyDateTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1FuzzyDateTransformer.m; sourceTree = "<group>"; };
232 960D4629140D99DB00B73177 /* U1Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1Node.h; sourceTree = "<group>"; };232 960D4629140D99DB00B73177 /* U1Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1Node.h; sourceTree = "<group>"; };
233 960D462A140D99DC00B73177 /* U1Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1Node.m; sourceTree = "<group>"; };233 960D462A140D99DC00B73177 /* U1Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1Node.m; sourceTree = "<group>"; };
234 960D462C140DD22400B73177 /* U1FileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1FileNode.h; sourceTree = "<group>"; };234 960D462C140DD22400B73177 /* U1FileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1FileNode.h; sourceTree = "<group>"; };
@@ -666,8 +666,8 @@
666 960D461B1409E78E00B73177 /* U1ViewNibLoader.m */,666 960D461B1409E78E00B73177 /* U1ViewNibLoader.m */,
667 960D4623140D8AF200B73177 /* U1ByteSizeValueTransformer.h */,667 960D4623140D8AF200B73177 /* U1ByteSizeValueTransformer.h */,
668 960D4624140D8AF200B73177 /* U1ByteSizeValueTransformer.m */,668 960D4624140D8AF200B73177 /* U1ByteSizeValueTransformer.m */,
669 960D4626140D8B4400B73177 /* U1FriendlyDateValueTransformer.h */,669 960D4626140D8B4400B73177 /* U1FuzzyDateTransformer.h */,
670 960D4627140D8B4400B73177 /* U1FriendlyDateValueTransformer.m */,670 960D4627140D8B4400B73177 /* U1FuzzyDateTransformer.m */,
671 91A5E2DD142B727500EAAC2B /* U1UploadOperation.h */,671 91A5E2DD142B727500EAAC2B /* U1UploadOperation.h */,
672 91A5E2DE142B727500EAAC2B /* U1UploadOperation.m */,672 91A5E2DE142B727500EAAC2B /* U1UploadOperation.m */,
673 965D7EB71429690C00E4754F /* U1NavigationBar.h */,673 965D7EB71429690C00E4754F /* U1NavigationBar.h */,
@@ -1028,7 +1028,7 @@
1028 960D46191409E41E00B73177 /* U1FolderItemCell.m in Sources */,1028 960D46191409E41E00B73177 /* U1FolderItemCell.m in Sources */,
1029 960D461C1409E78E00B73177 /* U1ViewNibLoader.m in Sources */,1029 960D461C1409E78E00B73177 /* U1ViewNibLoader.m in Sources */,
1030 960D4625140D8AF300B73177 /* U1ByteSizeValueTransformer.m in Sources */,1030 960D4625140D8AF300B73177 /* U1ByteSizeValueTransformer.m in Sources */,
1031 960D4628140D8B4400B73177 /* U1FriendlyDateValueTransformer.m in Sources */,1031 960D4628140D8B4400B73177 /* U1FuzzyDateTransformer.m in Sources */,
1032 960D462B140D99DD00B73177 /* U1Node.m in Sources */,1032 960D462B140D99DD00B73177 /* U1Node.m in Sources */,
1033 960D462E140DD22800B73177 /* U1FileNode.m in Sources */,1033 960D462E140DD22800B73177 /* U1FileNode.m in Sources */,
1034 960D4631140DD23600B73177 /* U1FolderNode.m in Sources */,1034 960D4631140DD23600B73177 /* U1FolderNode.m in Sources */,
10351035
=== modified file 'Files/U1FolderViewController.m'
--- Files/U1FolderViewController.m 2011-12-12 15:24:46 +0000
+++ Files/U1FolderViewController.m 2011-12-13 20:52:29 +0000
@@ -31,11 +31,14 @@
31#import "U1AutoUploadsManager.h"31#import "U1AutoUploadsManager.h"
32#import "U1Node.h"32#import "U1Node.h"
33#import "UIActionSheet+U1Additions.h"33#import "UIActionSheet+U1Additions.h"
34#import "U1FuzzyDateTransformer.h"
3435
3536
36@interface U1FolderViewController () <UINavigationControllerDelegate, UIImagePickerControllerDelegate, NSFetchedResultsControllerDelegate>37@interface U1FolderViewController () <UINavigationControllerDelegate, UIImagePickerControllerDelegate, NSFetchedResultsControllerDelegate>
38@property (retain) IBOutlet UILabel *footerLabel;
37@property (copy) NSString *resourcePath;39@property (copy) NSString *resourcePath;
38@property (retain) U1ByteSizeValueTransformer *byteSizeTransformer;40@property (retain) U1ByteSizeValueTransformer *byteSizeTransformer;
41@property (retain) U1FuzzyDateTransformer *fuzzyDateTransformer;
39@property (retain) NSIndexPath *pendingIndexPath;42@property (retain) NSIndexPath *pendingIndexPath;
40@property (retain) U1FolderNode *node;43@property (retain) U1FolderNode *node;
41@property (retain) NSMutableArray *nodes;44@property (retain) NSMutableArray *nodes;
@@ -50,7 +53,7 @@
5053
51@synthesize loadingCell;54@synthesize loadingCell;
52@synthesize delegate, filesClient, node, resourcePath;55@synthesize delegate, filesClient, node, resourcePath;
53@synthesize byteSizeTransformer, pendingIndexPath, nodes, resultsController;56@synthesize footerLabel, byteSizeTransformer, fuzzyDateTransformer, pendingIndexPath, nodes, resultsController;
5457
55- (id)initWithNodeResourcePath:(NSString*)theResourcePath;58- (id)initWithNodeResourcePath:(NSString*)theResourcePath;
56{59{
@@ -59,7 +62,8 @@
59 return nil;62 return nil;
60 self.title = [theResourcePath lastPathComponent];63 self.title = [theResourcePath lastPathComponent];
61 self.resourcePath = theResourcePath;64 self.resourcePath = theResourcePath;
62 self.byteSizeTransformer = [[U1ByteSizeValueTransformer new] autorelease];65 byteSizeTransformer = [U1ByteSizeValueTransformer new];
66 fuzzyDateTransformer = [U1FuzzyDateTransformer new];
63 filesClient = [U1FilesClient sharedFilesClient];67 filesClient = [U1FilesClient sharedFilesClient];
64 68
65 UIBarButtonItem *uploadItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(uploadImage:)];69 UIBarButtonItem *uploadItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(uploadImage:)];
@@ -77,9 +81,11 @@
77 [resourcePath release];81 [resourcePath release];
78 [node release];82 [node release];
79 [byteSizeTransformer release];83 [byteSizeTransformer release];
84 [fuzzyDateTransformer release];
80 [pendingIndexPath release];85 [pendingIndexPath release];
81 [nodes release];86 [nodes release];
82 [resultsController release];87 [resultsController release];
88 [footerLabel release];
83 [super dealloc];89 [super dealloc];
84}90}
8591
@@ -87,11 +93,6 @@
87{93{
88 [super viewDidLoad];94 [super viewDidLoad];
89 [self refresh];95 [self refresh];
90
91 UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
92 [longPress setMinimumPressDuration:1.f];
93 [self.tableView addGestureRecognizer:longPress];
94 [longPress release];
95}96}
9697
97- (void)viewDidUnload;98- (void)viewDidUnload;
@@ -130,71 +131,6 @@
130 }131 }
131}132}
132133
133- (void)longPress:(UILongPressGestureRecognizer*)longPress;
134{
135 if (longPress.state == UIGestureRecognizerStateBegan)
136 {
137 CGPoint p = [longPress locationInView:self.tableView];
138 NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:p];
139 U1Node *childNode = [self.nodes objectAtIndex:indexPath.row];
140
141 UIActionSheet *actionSheet = [UIActionSheet new];
142
143 [actionSheet setTitle:[[childNode path] lastPathComponent]];
144 [actionSheet setDestructiveButtonIndex:[actionSheet addButtonWithTitle:@"Delete"]];
145 NSInteger renameButtonIndex = [actionSheet addButtonWithTitle:@"Rename"];
146 NSInteger publishButtonIndex = -1;
147 NSInteger copyURLButtonIndex = -1;
148 if ([childNode isFile])
149 {
150 U1FileNode *fileNode = (id)childNode;
151 if ([[fileNode isPublic] boolValue])
152 {
153 publishButtonIndex = [actionSheet addButtonWithTitle:@"Unpublish"];
154 copyURLButtonIndex = [actionSheet addButtonWithTitle:@"Copy Public URL"];
155 }
156 else
157 {
158 publishButtonIndex = [actionSheet addButtonWithTitle:@"Publish"];
159 }
160 }
161 [actionSheet setCancelButtonIndex:[actionSheet addButtonWithTitle:@"Cancel"]];
162
163 self.pendingIndexPath = indexPath;
164 [actionSheet showInView:self.view withCompletionBlock:^(NSInteger buttonIndex) {
165 if (buttonIndex == [actionSheet destructiveButtonIndex])
166 {
167 [self deleteNodeAtIndexPath:self.pendingIndexPath];
168 }
169 else if (buttonIndex == renameButtonIndex)
170 {
171 NSLog(@"rename!"); // TODO:
172 }
173 else if (buttonIndex == publishButtonIndex)
174 {
175 U1FileNode *fileNode = (id)childNode;
176 if ([[fileNode isPublic] boolValue])
177 [self.filesClient unpublishNode:fileNode completionBlock:^(U1FileNode *updatedNode, NSError *error) {
178 }];
179 else
180 [self.filesClient publishNode:fileNode completionBlock:^(U1FileNode *updatedNode, NSError *error) {
181 }];
182 }
183 else if (buttonIndex == copyURLButtonIndex)
184 {
185 U1FileNode *fileNode = (id)childNode;
186 NSArray *types = UIPasteboardTypeListString;
187 [[UIPasteboard generalPasteboard] setValue:[fileNode publicURLString] forPasteboardType:[types lastObject]];
188 }
189 else if (buttonIndex == [actionSheet cancelButtonIndex])
190 {
191// NSLog(@"cancel");
192 }
193 self.pendingIndexPath = nil;
194 }];
195 }
196}
197
198- (void)uploadImage:(id)sender;134- (void)uploadImage:(id)sender;
199{135{
200 UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];136 UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
@@ -303,7 +239,8 @@
303 if ([aNode isFolder])239 if ([aNode isFolder])
304 {240 {
305 [cell.imageView setImage:[UIImage imageNamed:@"ic_folder"]];241 [cell.imageView setImage:[UIImage imageNamed:@"ic_folder"]];
306 [cell.detailLabel setText:[aNode.modificationDate description]];242 NSString *fuzzyDate = [self.fuzzyDateTransformer transformedValue:aNode.modificationDate];
243 [cell.detailLabel setText:[NSString stringWithFormat:@"modified %@", fuzzyDate]];
307 }244 }
308 else245 else
309 {246 {
@@ -318,8 +255,9 @@
318 NSNumber *size = [aNode valueForKey:@"size"];255 NSNumber *size = [aNode valueForKey:@"size"];
319 NSString *sizeString = [self.byteSizeTransformer transformedValue:size];256 NSString *sizeString = [self.byteSizeTransformer transformedValue:size];
320 NSString *detailString = sizeString;257 NSString *detailString = sizeString;
258 NSString *fuzzyDate = [self.fuzzyDateTransformer transformedValue:aNode.modificationDate];
321 if (aNode.modificationDate)259 if (aNode.modificationDate)
322 detailString = [sizeString stringByAppendingFormat:@", modified %@", aNode.modificationDate];260 detailString = [sizeString stringByAppendingFormat:@", modified %@", fuzzyDate];
323 [cell.detailLabel setText:detailString];261 [cell.detailLabel setText:detailString];
324 }262 }
325}263}
@@ -375,28 +313,6 @@
375 [self loadInfoForNode];313 [self loadInfoForNode];
376}314}
377315
378- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section;
379{
380 UILabel *footerLabel = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 22)] autorelease];
381 footerLabel.backgroundColor = [[UIColor lightGrayColor] colorWithAlphaComponent:0.85f];
382 [footerLabel setFont:[UIFont systemFontOfSize:14.f]];
383 [footerLabel setShadowColor:[UIColor whiteColor]];
384 [footerLabel setShadowOffset:CGSizeMake(0, 1)];
385 [footerLabel setTextAlignment:UITextAlignmentCenter];
386
387 int numItems = [[[self.resultsController sections] objectAtIndex:0] numberOfObjects];
388 NSNumber *folderRawSize = [[self.resultsController fetchedObjects] valueForKeyPath:@"@sum.size"];
389 NSString *folderSize = [self.byteSizeTransformer transformedValue:folderRawSize];
390
391 [footerLabel setText:[NSString stringWithFormat:@"%d items, %@", numItems, folderSize]];
392
393 return footerLabel;
394}
395
396- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section;
397{
398 return 22.0f;
399}
400316
401#pragma mark Private Methods317#pragma mark Private Methods
402318
@@ -502,6 +418,11 @@
502- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller;418- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller;
503{419{
504 [self.tableView endUpdates];420 [self.tableView endUpdates];
421
422 int numItems = [[[self.resultsController sections] objectAtIndex:0] numberOfObjects];
423 NSNumber *folderRawSize = [[self.resultsController fetchedObjects] valueForKeyPath:@"@sum.size"];
424 NSString *folderSize = [self.byteSizeTransformer transformedValue:folderRawSize];
425 [self.footerLabel setText:[NSString stringWithFormat:@"%d items, %@", numItems, folderSize]];
505}426}
506427
507@end428@end
508429
=== modified file 'Files/U1FolderViewController.xib'
--- Files/U1FolderViewController.xib 2011-12-07 18:23:32 +0000
+++ Files/U1FolderViewController.xib 2011-12-13 20:52:29 +0000
@@ -12,6 +12,7 @@
12 </object>12 </object>
13 <object class="NSArray" key="IBDocument.IntegratedClassDependencies">13 <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
14 <bool key="EncodedWithXMLCoder">YES</bool>14 <bool key="EncodedWithXMLCoder">YES</bool>
15 <string>IBUIView</string>
15 <string>IBUITableViewCell</string>16 <string>IBUITableViewCell</string>
16 <string>IBUITableView</string>17 <string>IBUITableView</string>
17 <string>IBUIActivityIndicatorView</string>18 <string>IBUIActivityIndicatorView</string>
@@ -39,9 +40,64 @@
39 <object class="IBUITableView" id="174006671">40 <object class="IBUITableView" id="174006671">
40 <reference key="NSNextResponder"/>41 <reference key="NSNextResponder"/>
41 <int key="NSvFlags">274</int>42 <int key="NSvFlags">274</int>
43 <object class="NSMutableArray" key="NSSubviews">
44 <bool key="EncodedWithXMLCoder">YES</bool>
45 <object class="IBUIView" id="1014635344">
46 <reference key="NSNextResponder" ref="174006671"/>
47 <int key="NSvFlags">292</int>
48 <object class="NSMutableArray" key="NSSubviews">
49 <bool key="EncodedWithXMLCoder">YES</bool>
50 <object class="IBUILabel" id="1067115130">
51 <reference key="NSNextResponder" ref="1014635344"/>
52 <int key="NSvFlags">292</int>
53 <string key="NSFrame">{{20, 6}, {280, 18}}</string>
54 <reference key="NSSuperview" ref="1014635344"/>
55 <reference key="NSWindow"/>
56 <reference key="NSNextKeyView"/>
57 <bool key="IBUIOpaque">NO</bool>
58 <bool key="IBUIClipsSubviews">YES</bool>
59 <int key="IBUIContentMode">7</int>
60 <bool key="IBUIUserInteractionEnabled">NO</bool>
61 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
62 <string key="IBUIText"/>
63 <object class="NSColor" key="IBUITextColor">
64 <int key="NSColorSpace">3</int>
65 <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
66 </object>
67 <nil key="IBUIHighlightedColor"/>
68 <int key="IBUIBaselineAdjustment">1</int>
69 <bool key="IBUIAdjustsFontSizeToFit">NO</bool>
70 <float key="IBUIMinimumFontSize">10</float>
71 <int key="IBUITextAlignment">1</int>
72 <object class="IBUIFontDescription" key="IBUIFontDescription">
73 <int key="type">1</int>
74 <double key="pointSize">14</double>
75 </object>
76 <object class="NSFont" key="IBUIFont">
77 <string key="NSName">Helvetica</string>
78 <double key="NSSize">14</double>
79 <int key="NSfFlags">16</int>
80 </object>
81 </object>
82 </object>
83 <string key="NSFrame">{{0, 430}, {320, 30}}</string>
84 <reference key="NSSuperview" ref="174006671"/>
85 <reference key="NSWindow"/>
86 <reference key="NSNextKeyView" ref="1067115130"/>
87 <object class="NSColor" key="IBUIBackgroundColor">
88 <int key="NSColorSpace">3</int>
89 <bytes key="NSWhite">MQA</bytes>
90 <object class="NSColorSpace" key="NSCustomColorSpace">
91 <int key="NSID">2</int>
92 </object>
93 </object>
94 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
95 </object>
96 </object>
42 <string key="NSFrameSize">{320, 460}</string>97 <string key="NSFrameSize">{320, 460}</string>
43 <reference key="NSSuperview"/>98 <reference key="NSSuperview"/>
44 <reference key="NSWindow"/>99 <reference key="NSWindow"/>
100 <reference key="NSNextKeyView" ref="1014635344"/>
45 <object class="NSColor" key="IBUIBackgroundColor">101 <object class="NSColor" key="IBUIBackgroundColor">
46 <int key="NSColorSpace">3</int>102 <int key="NSColorSpace">3</int>
47 <bytes key="NSWhite">MQA</bytes>103 <bytes key="NSWhite">MQA</bytes>
@@ -55,9 +111,10 @@
55 <float key="IBUIRowHeight">54</float>111 <float key="IBUIRowHeight">54</float>
56 <float key="IBUISectionHeaderHeight">22</float>112 <float key="IBUISectionHeaderHeight">22</float>
57 <float key="IBUISectionFooterHeight">22</float>113 <float key="IBUISectionFooterHeight">22</float>
114 <reference key="IBUITableFooterView" ref="1014635344"/>
58 </object>115 </object>
59 <object class="IBUITableViewCell" id="864788526">116 <object class="IBUITableViewCell" id="864788526">
60 <nil key="NSNextResponder"/>117 <reference key="NSNextResponder"/>
61 <int key="NSvFlags">292</int>118 <int key="NSvFlags">292</int>
62 <object class="NSMutableArray" key="NSSubviews">119 <object class="NSMutableArray" key="NSSubviews">
63 <bool key="EncodedWithXMLCoder">YES</bool>120 <bool key="EncodedWithXMLCoder">YES</bool>
@@ -71,6 +128,8 @@
71 <int key="NSvFlags">292</int>128 <int key="NSvFlags">292</int>
72 <string key="NSFrame">{{136, 17}, {75, 21}}</string>129 <string key="NSFrame">{{136, 17}, {75, 21}}</string>
73 <reference key="NSSuperview" ref="834389907"/>130 <reference key="NSSuperview" ref="834389907"/>
131 <reference key="NSWindow"/>
132 <reference key="NSNextKeyView"/>
74 <bool key="IBUIOpaque">NO</bool>133 <bool key="IBUIOpaque">NO</bool>
75 <bool key="IBUIClipsSubviews">YES</bool>134 <bool key="IBUIClipsSubviews">YES</bool>
76 <int key="IBUIContentMode">7</int>135 <int key="IBUIContentMode">7</int>
@@ -101,6 +160,7 @@
101 <int key="NSvFlags">292</int>160 <int key="NSvFlags">292</int>
102 <string key="NSFrame">{{108, 18}, {20, 20}}</string>161 <string key="NSFrame">{{108, 18}, {20, 20}}</string>
103 <reference key="NSSuperview" ref="834389907"/>162 <reference key="NSSuperview" ref="834389907"/>
163 <reference key="NSWindow"/>
104 <reference key="NSNextKeyView" ref="317026358"/>164 <reference key="NSNextKeyView" ref="317026358"/>
105 <bool key="IBUIOpaque">NO</bool>165 <bool key="IBUIOpaque">NO</bool>
106 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>166 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -111,6 +171,7 @@
111 </object>171 </object>
112 <string key="NSFrameSize">{320, 53}</string>172 <string key="NSFrameSize">{320, 53}</string>
113 <reference key="NSSuperview" ref="864788526"/>173 <reference key="NSSuperview" ref="864788526"/>
174 <reference key="NSWindow"/>
114 <reference key="NSNextKeyView" ref="42067442"/>175 <reference key="NSNextKeyView" ref="42067442"/>
115 <object class="NSColor" key="IBUIBackgroundColor">176 <object class="NSColor" key="IBUIBackgroundColor">
116 <int key="NSColorSpace">3</int>177 <int key="NSColorSpace">3</int>
@@ -124,6 +185,8 @@
124 </object>185 </object>
125 </object>186 </object>
126 <string key="NSFrameSize">{320, 54}</string>187 <string key="NSFrameSize">{320, 54}</string>
188 <reference key="NSSuperview"/>
189 <reference key="NSWindow"/>
127 <reference key="NSNextKeyView" ref="834389907"/>190 <reference key="NSNextKeyView" ref="834389907"/>
128 <object class="NSColor" key="IBUIBackgroundColor">191 <object class="NSColor" key="IBUIBackgroundColor">
129 <int key="NSColorSpace">1</int>192 <int key="NSColorSpace">1</int>
@@ -152,6 +215,14 @@
152 </object>215 </object>
153 <int key="connectionID">13</int>216 <int key="connectionID">13</int>
154 </object>217 </object>
218 <object class="IBConnectionRecord">
219 <object class="IBCocoaTouchOutletConnection" key="connection">
220 <string key="label">footerLabel</string>
221 <reference key="source" ref="372490531"/>
222 <reference key="destination" ref="1067115130"/>
223 </object>
224 <int key="connectionID">20</int>
225 </object>
155 </object>226 </object>
156 <object class="IBMutableOrderedSet" key="objectRecords">227 <object class="IBMutableOrderedSet" key="objectRecords">
157 <object class="NSArray" key="orderedObjects">228 <object class="NSArray" key="orderedObjects">
@@ -178,6 +249,10 @@
178 <object class="IBObjectRecord">249 <object class="IBObjectRecord">
179 <int key="objectID">8</int>250 <int key="objectID">8</int>
180 <reference key="object" ref="174006671"/>251 <reference key="object" ref="174006671"/>
252 <object class="NSMutableArray" key="children">
253 <bool key="EncodedWithXMLCoder">YES</bool>
254 <reference ref="1014635344"/>
255 </object>
181 <reference key="parent" ref="0"/>256 <reference key="parent" ref="0"/>
182 <string key="objectName">Table View</string>257 <string key="objectName">Table View</string>
183 </object>258 </object>
@@ -201,6 +276,20 @@
201 <reference key="object" ref="317026358"/>276 <reference key="object" ref="317026358"/>
202 <reference key="parent" ref="864788526"/>277 <reference key="parent" ref="864788526"/>
203 </object>278 </object>
279 <object class="IBObjectRecord">
280 <int key="objectID">18</int>
281 <reference key="object" ref="1014635344"/>
282 <object class="NSMutableArray" key="children">
283 <bool key="EncodedWithXMLCoder">YES</bool>
284 <reference ref="1067115130"/>
285 </object>
286 <reference key="parent" ref="174006671"/>
287 </object>
288 <object class="IBObjectRecord">
289 <int key="objectID">19</int>
290 <reference key="object" ref="1067115130"/>
291 <reference key="parent" ref="1014635344"/>
292 </object>
204 </object>293 </object>
205 </object>294 </object>
206 <object class="NSMutableDictionary" key="flattenedProperties">295 <object class="NSMutableDictionary" key="flattenedProperties">
@@ -214,6 +303,8 @@
214 <string>10.IBPluginDependency</string>303 <string>10.IBPluginDependency</string>
215 <string>11.IBPluginDependency</string>304 <string>11.IBPluginDependency</string>
216 <string>12.IBPluginDependency</string>305 <string>12.IBPluginDependency</string>
306 <string>18.IBPluginDependency</string>
307 <string>19.IBPluginDependency</string>
217 <string>8.IBPluginDependency</string>308 <string>8.IBPluginDependency</string>
218 </object>309 </object>
219 <object class="NSMutableArray" key="dict.values">310 <object class="NSMutableArray" key="dict.values">
@@ -226,6 +317,8 @@
226 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>317 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
227 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>318 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
228 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>319 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
320 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
321 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
229 </object>322 </object>
230 </object>323 </object>
231 <object class="NSMutableDictionary" key="unlocalizedProperties">324 <object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -240,7 +333,7 @@
240 <reference key="dict.values" ref="0"/>333 <reference key="dict.values" ref="0"/>
241 </object>334 </object>
242 <nil key="sourceID"/>335 <nil key="sourceID"/>
243 <int key="maxID">17</int>336 <int key="maxID">20</int>
244 </object>337 </object>
245 <object class="IBClassDescriber" key="IBDocument.Classes">338 <object class="IBClassDescriber" key="IBDocument.Classes">
246 <object class="NSMutableArray" key="referencedPartialClassDescriptions">339 <object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -257,14 +350,35 @@
257 <string key="className">U1FolderViewController</string>350 <string key="className">U1FolderViewController</string>
258 <string key="superclassName">PullRefreshTableViewController</string>351 <string key="superclassName">PullRefreshTableViewController</string>
259 <object class="NSMutableDictionary" key="outlets">352 <object class="NSMutableDictionary" key="outlets">
260 <string key="NS.key.0">loadingCell</string>353 <bool key="EncodedWithXMLCoder">YES</bool>
261 <string key="NS.object.0">UITableViewCell</string>354 <object class="NSArray" key="dict.sortedKeys">
355 <bool key="EncodedWithXMLCoder">YES</bool>
356 <string>footerLabel</string>
357 <string>loadingCell</string>
358 </object>
359 <object class="NSMutableArray" key="dict.values">
360 <bool key="EncodedWithXMLCoder">YES</bool>
361 <string>UILabel</string>
362 <string>UITableViewCell</string>
363 </object>
262 </object>364 </object>
263 <object class="NSMutableDictionary" key="toOneOutletInfosByName">365 <object class="NSMutableDictionary" key="toOneOutletInfosByName">
264 <string key="NS.key.0">loadingCell</string>366 <bool key="EncodedWithXMLCoder">YES</bool>
265 <object class="IBToOneOutletInfo" key="NS.object.0">367 <object class="NSArray" key="dict.sortedKeys">
266 <string key="name">loadingCell</string>368 <bool key="EncodedWithXMLCoder">YES</bool>
267 <string key="candidateClassName">UITableViewCell</string>369 <string>footerLabel</string>
370 <string>loadingCell</string>
371 </object>
372 <object class="NSMutableArray" key="dict.values">
373 <bool key="EncodedWithXMLCoder">YES</bool>
374 <object class="IBToOneOutletInfo">
375 <string key="name">footerLabel</string>
376 <string key="candidateClassName">UILabel</string>
377 </object>
378 <object class="IBToOneOutletInfo">
379 <string key="name">loadingCell</string>
380 <string key="candidateClassName">UITableViewCell</string>
381 </object>
268 </object>382 </object>
269 </object>383 </object>
270 <object class="IBClassDescriptionSource" key="sourceIdentifier">384 <object class="IBClassDescriptionSource" key="sourceIdentifier">
271385
=== renamed file 'Files/U1FriendlyDateValueTransformer.h' => 'Files/U1FuzzyDateTransformer.h'
--- Files/U1FriendlyDateValueTransformer.h 2011-08-31 14:56:30 +0000
+++ Files/U1FuzzyDateTransformer.h 2011-12-13 20:52:29 +0000
@@ -16,6 +16,6 @@
16#import <Foundation/Foundation.h>16#import <Foundation/Foundation.h>
1717
1818
19@interface U1FriendlyDateValueTransformer : NSValueTransformer19@interface U1FuzzyDateTransformer : NSValueTransformer
2020
21@end21@end
2222
=== renamed file 'Files/U1FriendlyDateValueTransformer.m' => 'Files/U1FuzzyDateTransformer.m'
--- Files/U1FriendlyDateValueTransformer.m 2011-08-31 14:56:30 +0000
+++ Files/U1FuzzyDateTransformer.m 2011-12-13 20:52:29 +0000
@@ -13,18 +13,72 @@
13// You should have received a copy of the GNU Affero General Public License13// You should have received a copy of the GNU Affero General Public License
14// along with this program. If not, see <http://www.gnu.org/licenses/>.14// along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
16#import "U1FriendlyDateValueTransformer.h"16#import "U1FuzzyDateTransformer.h"
1717
1818
19@implementation U1FriendlyDateValueTransformer19static const NSUInteger kSECONDS_PER_MINUTE = 60;
20static const NSUInteger kSECONDS_PER_HOUR = 60 * kSECONDS_PER_MINUTE;
21static const NSUInteger kSECONDS_PER_DAY = 24 * kSECONDS_PER_HOUR;
22static const NSUInteger kSECONDS_PER_WEEK = 7 * kSECONDS_PER_DAY;
23static const NSUInteger kABOUT_A_WEEK = kSECONDS_PER_WEEK + kSECONDS_PER_DAY;
24
25
26@implementation U1FuzzyDateTransformer
2027
21+ (Class)transformedValueClass { return [NSString class]; }28+ (Class)transformedValueClass { return [NSString class]; }
2229
23+ (BOOL)allowsReverseTransformation { return NO; }30+ (BOOL)allowsReverseTransformation { return NO; }
2431
32+ (NSDateFormatter*)dateFormatter;
33{
34 static NSDateFormatter *dateFormatter = nil;
35 static dispatch_once_t onceToken;
36 dispatch_once(&onceToken, ^{
37 dateFormatter = [[NSDateFormatter alloc] init];
38 [dateFormatter setDateStyle:NSDateFormatterShortStyle];
39 });
40 return dateFormatter;
41}
42
25- (id)transformedValue:(id)value;43- (id)transformedValue:(id)value;
26{44{
27 return (value == nil) ? nil : NSStringFromClass([value class]);45 NSDate *date = value;
46 NSTimeInterval interval = -[date timeIntervalSinceNow];
47
48
49 NSString *fuzzyDate = nil;
50 if (interval < kSECONDS_PER_MINUTE)
51 {
52 return NSLocalizedString(@"just now", nil);
53 }
54 else if (interval < kSECONDS_PER_HOUR)
55 {
56 NSUInteger minutes = interval / kSECONDS_PER_MINUTE;
57 NSString *format = (minutes > 1) ? NSLocalizedString(@"%u minutes ago", nil) : NSLocalizedString(@"%u minute ago", nil);
58 fuzzyDate = [NSString stringWithFormat:format, minutes];
59 }
60 else if (interval < kSECONDS_PER_DAY)
61 {
62 NSUInteger hours = interval / kSECONDS_PER_HOUR;
63 NSString *format = (hours > 1) ? NSLocalizedString(@"%u hours ago", nil) : NSLocalizedString(@"%u hour ago", nil);
64 fuzzyDate = [NSString stringWithFormat:format, hours];
65 }
66 else if (interval < kSECONDS_PER_WEEK)
67 {
68 NSUInteger days = interval / kSECONDS_PER_DAY;
69 NSString *format = (days > 1) ? NSLocalizedString(@"%u days ago", nil) : NSLocalizedString(@"%u day ago", nil);
70 fuzzyDate = [NSString stringWithFormat:format, days];
71 }
72 else if (interval < kABOUT_A_WEEK)
73 {
74 return NSLocalizedString(@"1 week ago", nil);
75 }
76 else
77 {
78 fuzzyDate = [[U1FuzzyDateTransformer dateFormatter] stringFromDate:date];
79 }
80
81 return fuzzyDate;
28}82}
2983
30@end84@end
3185
=== modified file 'Files/U1SettingsViewController.h'
--- Files/U1SettingsViewController.h 2011-12-06 02:55:27 +0000
+++ Files/U1SettingsViewController.h 2011-12-13 20:52:29 +0000
@@ -33,7 +33,6 @@
33@property (retain) IBOutlet UILabel *disableSleepToggleLabel;33@property (retain) IBOutlet UILabel *disableSleepToggleLabel;
34@property (retain) IBOutlet UISwitch *disableSleepToggle;34@property (retain) IBOutlet UISwitch *disableSleepToggle;
35@property (retain) IBOutlet UITableView *tableView;35@property (retain) IBOutlet UITableView *tableView;
36@property (retain) IBOutlet UIView *signOutView;
3736
38- (IBAction)toggleAutoUpload:(id)sender;37- (IBAction)toggleAutoUpload:(id)sender;
39- (IBAction)toggleWifiOnly:(id)sender;38- (IBAction)toggleWifiOnly:(id)sender;
4039
=== modified file 'Files/U1SettingsViewController.m'
--- Files/U1SettingsViewController.m 2011-12-12 15:24:46 +0000
+++ Files/U1SettingsViewController.m 2011-12-13 20:52:29 +0000
@@ -27,7 +27,7 @@
27static const NSUInteger U1SettingsViewSectionCount = 2;27static const NSUInteger U1SettingsViewSectionCount = 2;
2828
2929
30@interface U1SettingsViewController ()30@interface U1SettingsViewController () <UIActionSheetDelegate>
31@property (readonly, nonatomic, retain) UITableViewCell *accountLoadingCell;31@property (readonly, nonatomic, retain) UITableViewCell *accountLoadingCell;
32@property (retain) U1FilesClient *filesClient;32@property (retain) U1FilesClient *filesClient;
33@property (retain) NSDictionary *accountInfo;33@property (retain) NSDictionary *accountInfo;
@@ -45,7 +45,7 @@
45@synthesize wifiOnlyToggleCell, wifiOnlyToggleLabel, wifiOnlyToggle;45@synthesize wifiOnlyToggleCell, wifiOnlyToggleLabel, wifiOnlyToggle;
46@synthesize includeVideoToggleCell, includeVideoToggleLabel, includeVideoToggle;46@synthesize includeVideoToggleCell, includeVideoToggleLabel, includeVideoToggle;
47@synthesize disableSleepToggleCell, disableSleepToggleLabel, disableSleepToggle;47@synthesize disableSleepToggleCell, disableSleepToggleLabel, disableSleepToggle;
48@synthesize accountLoadingCell, filesClient, accountInfo, signOutView;48@synthesize accountLoadingCell, filesClient, accountInfo;
4949
50- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil50- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
51{51{
@@ -74,7 +74,6 @@
74 [disableSleepToggle release];74 [disableSleepToggle release];
75 [filesClient release];75 [filesClient release];
76 [accountInfo release];76 [accountInfo release];
77 [signOutView release];
78 [super dealloc];77 [super dealloc];
79}78}
8079
@@ -94,13 +93,24 @@
94 [self.filesClient accountInfoWithCompletionBlock:^(NSDictionary *fetchedAccountInfo, NSError *error) {93 [self.filesClient accountInfoWithCompletionBlock:^(NSDictionary *fetchedAccountInfo, NSError *error) {
95 self.accountInfo = fetchedAccountInfo;94 self.accountInfo = fetchedAccountInfo;
96 if (self.accountInfo)95 if (self.accountInfo)
97 [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:U1SettingsViewSectionAccount] withRowAnimation:UITableViewRowAnimationFade];96 [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:U1SettingsViewSectionAccount] withRowAnimation:UITableViewRowAnimationNone];
98 }];97 }];
99}98}
10099
101- (IBAction)signOut:(id)sender;100- (IBAction)signOut:(id)sender;
102{101{
103 [[U1AccountManager sharedAccountManager] removeCredentials];102 // TODO: get actual copy for this from design team
103 UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Logging out from this device will not affect other devices connected to Ubuntu One." delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Log Out" otherButtonTitles:nil];
104 [actionSheet showFromTabBar:self.tabBarController.tabBar];
105 [actionSheet release];
106}
107
108- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex;
109{
110 if ([actionSheet destructiveButtonIndex] == buttonIndex)
111 {
112 [[U1AccountManager sharedAccountManager] removeCredentials];
113 }
104}114}
105115
106- (void)toggleAutoUpload:(id)sender;116- (void)toggleAutoUpload:(id)sender;
@@ -167,20 +177,13 @@
167 switch (section)177 switch (section)
168 {178 {
169 case U1SettingsViewSectionAccount:179 case U1SettingsViewSectionAccount:
170 return self.accountInfo == nil ? 1 : 2;180 return 3;
171 case U1SettingsViewSectionCameraRoll:181 case U1SettingsViewSectionCameraRoll:
172 return 3; // TODO const182 return 3; // TODO const
173 }183 }
174 return 0;184 return 0;
175}185}
176186
177- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section;
178{
179 if (section == U1SettingsViewSectionAccount)
180 return 44.0;
181 return [self.tableView sectionFooterHeight];
182}
183
184- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;187- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
185{188{
186 if (indexPath.section == U1SettingsViewSectionCameraRoll &&189 if (indexPath.section == U1SettingsViewSectionCameraRoll &&
@@ -193,58 +196,90 @@
193196
194- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;197- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
195{198{
199 UITableViewCell *cell = nil;
196 switch (indexPath.section)200 switch (indexPath.section)
197 {201 {
198 case U1SettingsViewSectionAccount:202 case U1SettingsViewSectionAccount:
199 {203 {
200 if (self.accountInfo == nil)
201 return [self accountLoadingCell];
202
203 UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"AccountCell"];
204 if (!cell)
205 {
206 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:@"AccountCell"] autorelease];
207 }
208 switch (indexPath.row)204 switch (indexPath.row)
209 {205 {
210 case 0:206 case 0:
207 cell = [self.tableView dequeueReusableCellWithIdentifier:@"AccountCell"];
208 if (!cell)
209 {
210 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:@"AccountCell"] autorelease];
211 [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
212 }
211 [cell.textLabel setText:NSLocalizedString(@"Name", nil)];213 [cell.textLabel setText:NSLocalizedString(@"Name", nil)];
212 [cell.detailTextLabel setText:[self.accountInfo objectForKey:@"visible_name"]];214 [cell.detailTextLabel setText:@"Loading..."];
215 if (self.accountInfo)
216 [cell.detailTextLabel setText:[self.accountInfo objectForKey:@"visible_name"]];
213 break;217 break;
214 case 1:218 case 1:
215 {219 {
220 cell = [self.tableView dequeueReusableCellWithIdentifier:@"AccountCell"];
221 if (!cell)
222 {
223 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:@"AccountCell"] autorelease];
224 [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
225 }
216 [cell.textLabel setText:NSLocalizedString(@"Storage", nil)];226 [cell.textLabel setText:NSLocalizedString(@"Storage", nil)];
217 U1ByteSizeValueTransformer *byteSizeTransformer = [[U1ByteSizeValueTransformer alloc] init];227 U1ByteSizeValueTransformer *byteSizeTransformer = [[U1ByteSizeValueTransformer alloc] init];
218 NSString *storageFormat = NSLocalizedString(@"%@ of %@ used", nil);228 NSString *storageFormat = NSLocalizedString(@"%@ of %@ used", nil);
219 NSString *usedString = [byteSizeTransformer transformedValue:[self.accountInfo objectForKey:@"used_bytes"]];229 NSString *usedString = [byteSizeTransformer transformedValue:[self.accountInfo objectForKey:@"used_bytes"]];
220 NSString *totalString = [byteSizeTransformer transformedValue:[self.accountInfo objectForKey:@"max_bytes"]];230 NSString *totalString = [byteSizeTransformer transformedValue:[self.accountInfo objectForKey:@"max_bytes"]];
221 [cell.detailTextLabel setText:[NSString stringWithFormat:storageFormat, usedString, totalString]];231 [cell.detailTextLabel setText:@"Loading..."];
232 if (self.accountInfo)
233 [cell.detailTextLabel setText:[NSString stringWithFormat:storageFormat, usedString, totalString]];
222 [byteSizeTransformer release];234 [byteSizeTransformer release];
223 break;235 break;
224 }236 }
237 case 2:
238 {
239 cell = [self.tableView dequeueReusableCellWithIdentifier:@"LogOutCell"];
240 if (!cell)
241 {
242 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"LogOutCell"] autorelease];
243 [cell.textLabel setTextAlignment:UITextAlignmentCenter];
244 [cell.textLabel setFont:[UIFont boldSystemFontOfSize:17.f]];
245 [cell.textLabel setText:@"Log Out of Ubuntu One"];
246 }
247 break;
248 }
225 }249 }
226 return cell;250 break;
251// return cell;
227 }252 }
228 case U1SettingsViewSectionCameraRoll:253 case U1SettingsViewSectionCameraRoll:
229 {254 {
230 switch (indexPath.row)255 switch (indexPath.row)
231 {256 {
232 case 0: return [self preparedAutoUploadCell];257 case 0: cell = [self preparedAutoUploadCell]; break;
233 case 1: return [self preparedWifiOnlyCell];258 case 1: cell = [self preparedWifiOnlyCell]; break;
234// case 2: return [self preparedIncludeVideoCell];259// case 2: cell = [self preparedIncludeVideoCell]; break;
235 case 2: return [self preparedDisableSleepCell];260 case 2: cell = [self preparedDisableSleepCell]; break;
236 default: return nil;261 default: break;
237 }262 }
263 [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
238 }264 }
239 }265 }
240 return nil;266 return cell;
241}267}
242268
243- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section;269- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath;
244{270{
245 if (section == U1SettingsViewSectionAccount)271 if (indexPath.section == U1SettingsViewSectionAccount && indexPath.row == 2)
246 return self.signOutView;272 return indexPath;
247 return nil;273 return nil;
274}
275
276- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
277{
278 if (indexPath.section == U1SettingsViewSectionAccount && indexPath.row == 2)
279 {
280 [self signOut:nil];
281 [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
282 }
248}283}
249284
250- (UITableViewCell *)preparedAutoUploadCell;285- (UITableViewCell *)preparedAutoUploadCell;
251286
=== modified file 'Files/U1SettingsViewController.xib'
--- Files/U1SettingsViewController.xib 2011-12-09 20:31:25 +0000
+++ Files/U1SettingsViewController.xib 2011-12-13 20:52:29 +0000
@@ -11,14 +11,12 @@
11 <string key="NS.object.0">933</string>11 <string key="NS.object.0">933</string>
12 </object>12 </object>
13 <array key="IBDocument.IntegratedClassDependencies">13 <array key="IBDocument.IntegratedClassDependencies">
14 <string>IBProxyObject</string>
15 <string>IBUIBarButtonItem</string>
16 <string>IBUILabel</string>
17 <string>IBUISwitch</string>14 <string>IBUISwitch</string>
18 <string>IBUIToolbar</string>
19 <string>IBUITableView</string>15 <string>IBUITableView</string>
20 <string>IBUITableViewCell</string>16 <string>IBUITableViewCell</string>
21 <string>IBUIView</string>17 <string>IBUIView</string>
18 <string>IBUILabel</string>
19 <string>IBProxyObject</string>
22 </array>20 </array>
23 <array key="IBDocument.PluginDependencies">21 <array key="IBDocument.PluginDependencies">
24 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>22 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -112,7 +110,6 @@
112 <int key="IBUIStyle">1</int>110 <int key="IBUIStyle">1</int>
113 <int key="IBUISeparatorStyle">2</int>111 <int key="IBUISeparatorStyle">2</int>
114 <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>112 <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
115 <bool key="IBUIAllowsSelection">NO</bool>
116 <float key="IBUIRowHeight">44</float>113 <float key="IBUIRowHeight">44</float>
117 <float key="IBUISectionHeaderHeight">10</float>114 <float key="IBUISectionHeaderHeight">10</float>
118 <float key="IBUISectionFooterHeight">10</float>115 <float key="IBUISectionFooterHeight">10</float>
@@ -126,7 +123,7 @@
126 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>123 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
127 </object>124 </object>
128 <object class="IBUITableViewCell" id="126074602">125 <object class="IBUITableViewCell" id="126074602">
129 <reference key="NSNextResponder"/>126 <nil key="NSNextResponder"/>
130 <int key="NSvFlags">292</int>127 <int key="NSvFlags">292</int>
131 <array class="NSMutableArray" key="NSSubviews">128 <array class="NSMutableArray" key="NSSubviews">
132 <object class="IBUIView" id="289125020">129 <object class="IBUIView" id="289125020">
@@ -138,8 +135,6 @@
138 <int key="NSvFlags">289</int>135 <int key="NSvFlags">289</int>
139 <string key="NSFrame">{{206, 8}, {94, 27}}</string>136 <string key="NSFrame">{{206, 8}, {94, 27}}</string>
140 <reference key="NSSuperview" ref="289125020"/>137 <reference key="NSSuperview" ref="289125020"/>
141 <reference key="NSWindow"/>
142 <reference key="NSNextKeyView"/>
143 <bool key="IBUIOpaque">NO</bool>138 <bool key="IBUIOpaque">NO</bool>
144 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>139 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
145 <int key="IBUIContentHorizontalAlignment">0</int>140 <int key="IBUIContentHorizontalAlignment">0</int>
@@ -150,7 +145,6 @@
150 <int key="NSvFlags">292</int>145 <int key="NSvFlags">292</int>
151 <string key="NSFrame">{{20, 11}, {193, 21}}</string>146 <string key="NSFrame">{{20, 11}, {193, 21}}</string>
152 <reference key="NSSuperview" ref="289125020"/>147 <reference key="NSSuperview" ref="289125020"/>
153 <reference key="NSWindow"/>
154 <reference key="NSNextKeyView" ref="513262918"/>148 <reference key="NSNextKeyView" ref="513262918"/>
155 <bool key="IBUIOpaque">NO</bool>149 <bool key="IBUIOpaque">NO</bool>
156 <bool key="IBUIClipsSubviews">YES</bool>150 <bool key="IBUIClipsSubviews">YES</bool>
@@ -178,7 +172,6 @@
178 </array>172 </array>
179 <string key="NSFrameSize">{320, 43}</string>173 <string key="NSFrameSize">{320, 43}</string>
180 <reference key="NSSuperview" ref="126074602"/>174 <reference key="NSSuperview" ref="126074602"/>
181 <reference key="NSWindow"/>
182 <reference key="NSNextKeyView" ref="866302443"/>175 <reference key="NSNextKeyView" ref="866302443"/>
183 <reference key="IBUIBackgroundColor" ref="509795101"/>176 <reference key="IBUIBackgroundColor" ref="509795101"/>
184 <bool key="IBUIOpaque">NO</bool>177 <bool key="IBUIOpaque">NO</bool>
@@ -189,14 +182,12 @@
189 </object>182 </object>
190 </array>183 </array>
191 <string key="NSFrameSize">{320, 44}</string>184 <string key="NSFrameSize">{320, 44}</string>
192 <reference key="NSSuperview"/>
193 <reference key="NSWindow"/>
194 <reference key="NSNextKeyView" ref="289125020"/>185 <reference key="NSNextKeyView" ref="289125020"/>
195 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>186 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
196 <reference key="IBUIContentView" ref="289125020"/>187 <reference key="IBUIContentView" ref="289125020"/>
197 </object>188 </object>
198 <object class="IBUITableViewCell" id="2020695">189 <object class="IBUITableViewCell" id="2020695">
199 <reference key="NSNextResponder"/>190 <nil key="NSNextResponder"/>
200 <int key="NSvFlags">292</int>191 <int key="NSvFlags">292</int>
201 <array class="NSMutableArray" key="NSSubviews">192 <array class="NSMutableArray" key="NSSubviews">
202 <object class="IBUIView" id="609546111">193 <object class="IBUIView" id="609546111">
@@ -227,7 +218,6 @@
227 <int key="NSvFlags">289</int>218 <int key="NSvFlags">289</int>
228 <string key="NSFrame">{{206, 8}, {94, 27}}</string>219 <string key="NSFrame">{{206, 8}, {94, 27}}</string>
229 <reference key="NSSuperview" ref="609546111"/>220 <reference key="NSSuperview" ref="609546111"/>
230 <reference key="NSNextKeyView"/>
231 <bool key="IBUIOpaque">NO</bool>221 <bool key="IBUIOpaque">NO</bool>
232 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>222 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
233 <int key="IBUIContentHorizontalAlignment">0</int>223 <int key="IBUIContentHorizontalAlignment">0</int>
@@ -247,13 +237,12 @@
247 </object>237 </object>
248 </array>238 </array>
249 <string key="NSFrameSize">{320, 44}</string>239 <string key="NSFrameSize">{320, 44}</string>
250 <reference key="NSSuperview"/>
251 <reference key="NSNextKeyView" ref="609546111"/>240 <reference key="NSNextKeyView" ref="609546111"/>
252 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>241 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
253 <reference key="IBUIContentView" ref="609546111"/>242 <reference key="IBUIContentView" ref="609546111"/>
254 </object>243 </object>
255 <object class="IBUITableViewCell" id="703802727">244 <object class="IBUITableViewCell" id="703802727">
256 <reference key="NSNextResponder"/>245 <nil key="NSNextResponder"/>
257 <int key="NSvFlags">292</int>246 <int key="NSvFlags">292</int>
258 <array class="NSMutableArray" key="NSSubviews">247 <array class="NSMutableArray" key="NSSubviews">
259 <object class="IBUIView" id="849901570">248 <object class="IBUIView" id="849901570">
@@ -284,7 +273,6 @@
284 <int key="NSvFlags">289</int>273 <int key="NSvFlags">289</int>
285 <string key="NSFrame">{{206, 8}, {94, 27}}</string>274 <string key="NSFrame">{{206, 8}, {94, 27}}</string>
286 <reference key="NSSuperview" ref="849901570"/>275 <reference key="NSSuperview" ref="849901570"/>
287 <reference key="NSNextKeyView"/>
288 <bool key="IBUIOpaque">NO</bool>276 <bool key="IBUIOpaque">NO</bool>
289 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>277 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
290 <int key="IBUIContentHorizontalAlignment">0</int>278 <int key="IBUIContentHorizontalAlignment">0</int>
@@ -304,13 +292,12 @@
304 </object>292 </object>
305 </array>293 </array>
306 <string key="NSFrameSize">{320, 44}</string>294 <string key="NSFrameSize">{320, 44}</string>
307 <reference key="NSSuperview"/>
308 <reference key="NSNextKeyView" ref="849901570"/>295 <reference key="NSNextKeyView" ref="849901570"/>
309 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>296 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
310 <reference key="IBUIContentView" ref="849901570"/>297 <reference key="IBUIContentView" ref="849901570"/>
311 </object>298 </object>
312 <object class="IBUITableViewCell" id="328240698">299 <object class="IBUITableViewCell" id="328240698">
313 <reference key="NSNextResponder"/>300 <nil key="NSNextResponder"/>
314 <int key="NSvFlags">292</int>301 <int key="NSvFlags">292</int>
315 <array class="NSMutableArray" key="NSSubviews">302 <array class="NSMutableArray" key="NSSubviews">
316 <object class="IBUIView" id="61456725">303 <object class="IBUIView" id="61456725">
@@ -388,59 +375,11 @@
388 </object>375 </object>
389 </array>376 </array>
390 <string key="NSFrameSize">{320, 70}</string>377 <string key="NSFrameSize">{320, 70}</string>
391 <reference key="NSSuperview"/>
392 <reference key="NSNextKeyView" ref="61456725"/>378 <reference key="NSNextKeyView" ref="61456725"/>
393 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>379 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
394 <reference key="IBUIContentView" ref="61456725"/>380 <reference key="IBUIContentView" ref="61456725"/>
395 <real value="70" key="IBUIRowHeight"/>381 <real value="70" key="IBUIRowHeight"/>
396 </object>382 </object>
397 <object class="IBUIView" id="393432936">
398 <reference key="NSNextResponder"/>
399 <int key="NSvFlags">292</int>
400 <array class="NSMutableArray" key="NSSubviews">
401 <object class="IBUIToolbar" id="398717734">
402 <reference key="NSNextResponder" ref="393432936"/>
403 <int key="NSvFlags">266</int>
404 <string key="NSFrameSize">{320, 44}</string>
405 <reference key="NSSuperview" ref="393432936"/>
406 <reference key="NSWindow"/>
407 <reference key="NSNextKeyView"/>
408 <bool key="IBUIOpaque">NO</bool>
409 <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
410 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
411 <int key="IBUIBarStyle">2</int>
412 <array class="NSMutableArray" key="IBUIItems">
413 <object class="IBUIBarButtonItem" id="390888023">
414 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
415 <reference key="IBUIToolbar" ref="398717734"/>
416 <int key="IBUISystemItemIdentifier">5</int>
417 </object>
418 <object class="IBUIBarButtonItem" id="172971356">
419 <string key="IBUITitle">Sign Out of Ubuntu One</string>
420 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
421 <float key="IBUIWidth">300</float>
422 <int key="IBUIStyle">1</int>
423 <reference key="IBUIToolbar" ref="398717734"/>
424 </object>
425 <object class="IBUIBarButtonItem" id="1054082570">
426 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
427 <reference key="IBUIToolbar" ref="398717734"/>
428 <int key="IBUISystemItemIdentifier">5</int>
429 </object>
430 </array>
431 <object class="NSColor" key="IBUITintColor">
432 <int key="NSColorSpace">1</int>
433 <bytes key="NSRGB">MC44IDAgMAA</bytes>
434 </object>
435 </object>
436 </array>
437 <string key="NSFrameSize">{320, 44}</string>
438 <reference key="NSSuperview"/>
439 <reference key="NSWindow"/>
440 <reference key="NSNextKeyView" ref="398717734"/>
441 <reference key="IBUIBackgroundColor" ref="509795101"/>
442 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
443 </object>
444 </array>383 </array>
445 <object class="IBObjectContainer" key="IBDocument.Objects">384 <object class="IBObjectContainer" key="IBDocument.Objects">
446 <array class="NSMutableArray" key="connectionRecords">385 <array class="NSMutableArray" key="connectionRecords">
@@ -550,14 +489,6 @@
550 </object>489 </object>
551 <object class="IBConnectionRecord">490 <object class="IBConnectionRecord">
552 <object class="IBCocoaTouchOutletConnection" key="connection">491 <object class="IBCocoaTouchOutletConnection" key="connection">
553 <string key="label">signOutView</string>
554 <reference key="source" ref="372490531"/>
555 <reference key="destination" ref="393432936"/>
556 </object>
557 <int key="connectionID">56</int>
558 </object>
559 <object class="IBConnectionRecord">
560 <object class="IBCocoaTouchOutletConnection" key="connection">
561 <string key="label">dataSource</string>492 <string key="label">dataSource</string>
562 <reference key="source" ref="703168831"/>493 <reference key="source" ref="703168831"/>
563 <reference key="destination" ref="372490531"/>494 <reference key="destination" ref="372490531"/>
@@ -608,14 +539,6 @@
608 </object>539 </object>
609 <int key="connectionID">51</int>540 <int key="connectionID">51</int>
610 </object>541 </object>
611 <object class="IBConnectionRecord">
612 <object class="IBCocoaTouchEventConnection" key="connection">
613 <string key="label">signOut:</string>
614 <reference key="source" ref="172971356"/>
615 <reference key="destination" ref="372490531"/>
616 </object>
617 <int key="connectionID">59</int>
618 </object>
619 </array>542 </array>
620 <object class="IBMutableOrderedSet" key="objectRecords">543 <object class="IBMutableOrderedSet" key="objectRecords">
621 <array key="orderedObjects">544 <array key="orderedObjects">
@@ -731,40 +654,6 @@
731 <reference key="object" ref="792393428"/>654 <reference key="object" ref="792393428"/>
732 <reference key="parent" ref="328240698"/>655 <reference key="parent" ref="328240698"/>
733 </object>656 </object>
734 <object class="IBObjectRecord">
735 <int key="objectID">53</int>
736 <reference key="object" ref="393432936"/>
737 <array class="NSMutableArray" key="children">
738 <reference ref="398717734"/>
739 </array>
740 <reference key="parent" ref="0"/>
741 <string key="objectName">Sign Out View</string>
742 </object>
743 <object class="IBObjectRecord">
744 <int key="objectID">54</int>
745 <reference key="object" ref="398717734"/>
746 <array class="NSMutableArray" key="children">
747 <reference ref="172971356"/>
748 <reference ref="1054082570"/>
749 <reference ref="390888023"/>
750 </array>
751 <reference key="parent" ref="393432936"/>
752 </object>
753 <object class="IBObjectRecord">
754 <int key="objectID">55</int>
755 <reference key="object" ref="172971356"/>
756 <reference key="parent" ref="398717734"/>
757 </object>
758 <object class="IBObjectRecord">
759 <int key="objectID">57</int>
760 <reference key="object" ref="1054082570"/>
761 <reference key="parent" ref="398717734"/>
762 </object>
763 <object class="IBObjectRecord">
764 <int key="objectID">58</int>
765 <reference key="object" ref="390888023"/>
766 <reference key="parent" ref="398717734"/>
767 </object>
768 </array>657 </array>
769 </object>658 </object>
770 <dictionary class="NSMutableDictionary" key="flattenedProperties">659 <dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -787,18 +676,12 @@
787 <string key="45.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>676 <string key="45.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
788 <string key="46.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>677 <string key="46.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
789 <string key="50.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>678 <string key="50.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
790 <string key="53.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
791 <string key="54.CustomClassName">U1TransparentToolbar</string>
792 <string key="54.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
793 <string key="55.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
794 <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
795 <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
796 </dictionary>679 </dictionary>
797 <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>680 <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
798 <nil key="activeLocalization"/>681 <nil key="activeLocalization"/>
799 <dictionary class="NSMutableDictionary" key="localizations"/>682 <dictionary class="NSMutableDictionary" key="localizations"/>
800 <nil key="sourceID"/>683 <nil key="sourceID"/>
801 <int key="maxID">59</int>684 <int key="maxID">61</int>
802 </object>685 </object>
803 <object class="IBClassDescriber" key="IBDocument.Classes">686 <object class="IBClassDescriber" key="IBDocument.Classes">
804 <array class="NSMutableArray" key="referencedPartialClassDescriptions">687 <array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -847,7 +730,6 @@
847 <string key="includeVideoToggleCell">UITableViewCell</string>730 <string key="includeVideoToggleCell">UITableViewCell</string>
848 <string key="includeVideoToggleLabel">UILabel</string>731 <string key="includeVideoToggleLabel">UILabel</string>
849 <string key="navBar">U1NavigationBar</string>732 <string key="navBar">U1NavigationBar</string>
850 <string key="signOutView">UIView</string>
851 <string key="tableView">UITableView</string>733 <string key="tableView">UITableView</string>
852 <string key="wifiOnlyToggle">UISwitch</string>734 <string key="wifiOnlyToggle">UISwitch</string>
853 <string key="wifiOnlyToggleCell">UITableViewCell</string>735 <string key="wifiOnlyToggleCell">UITableViewCell</string>
@@ -890,10 +772,6 @@
890 <string key="name">navBar</string>772 <string key="name">navBar</string>
891 <string key="candidateClassName">U1NavigationBar</string>773 <string key="candidateClassName">U1NavigationBar</string>
892 </object>774 </object>
893 <object class="IBToOneOutletInfo" key="signOutView">
894 <string key="name">signOutView</string>
895 <string key="candidateClassName">UIView</string>
896 </object>
897 <object class="IBToOneOutletInfo" key="tableView">775 <object class="IBToOneOutletInfo" key="tableView">
898 <string key="name">tableView</string>776 <string key="name">tableView</string>
899 <string key="candidateClassName">UITableView</string>777 <string key="candidateClassName">UITableView</string>
@@ -916,14 +794,6 @@
916 <string key="minorKey">./Classes/U1SettingsViewController.h</string>794 <string key="minorKey">./Classes/U1SettingsViewController.h</string>
917 </object>795 </object>
918 </object>796 </object>
919 <object class="IBPartialClassDescription">
920 <string key="className">U1TransparentToolbar</string>
921 <string key="superclassName">UIToolbar</string>
922 <object class="IBClassDescriptionSource" key="sourceIdentifier">
923 <string key="majorKey">IBProjectSource</string>
924 <string key="minorKey">./Classes/U1TransparentToolbar.h</string>
925 </object>
926 </object>
927 </array>797 </array>
928 </object>798 </object>
929 <int key="IBDocument.localizationMode">0</int>799 <int key="IBDocument.localizationMode">0</int>
930800
=== modified file 'Files/UOSSOCredentialsViewController.xib'
--- Files/UOSSOCredentialsViewController.xib 2011-08-31 14:56:30 +0000
+++ Files/UOSSOCredentialsViewController.xib 2011-12-13 20:52:29 +0000
@@ -1,14 +1,14 @@
1<?xml version="1.0" encoding="UTF-8"?>1<?xml version="1.0" encoding="UTF-8"?>
2<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">2<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
3 <data>3 <data>
4 <int key="IBDocument.SystemTarget">1056</int>4 <int key="IBDocument.SystemTarget">1280</int>
5 <string key="IBDocument.SystemVersion">10K549</string>5 <string key="IBDocument.SystemVersion">10K549</string>
6 <string key="IBDocument.InterfaceBuilderVersion">1306</string>6 <string key="IBDocument.InterfaceBuilderVersion">1938</string>
7 <string key="IBDocument.AppKitVersion">1038.36</string>7 <string key="IBDocument.AppKitVersion">1038.36</string>
8 <string key="IBDocument.HIToolboxVersion">461.00</string>8 <string key="IBDocument.HIToolboxVersion">461.00</string>
9 <object class="NSMutableDictionary" key="IBDocument.PluginVersions">9 <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
10 <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>10 <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
11 <string key="NS.object.0">301</string>11 <string key="NS.object.0">933</string>
12 </object>12 </object>
13 <object class="NSArray" key="IBDocument.IntegratedClassDependencies">13 <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
14 <bool key="EncodedWithXMLCoder">YES</bool>14 <bool key="EncodedWithXMLCoder">YES</bool>
@@ -24,11 +24,8 @@
24 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>24 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
25 </object>25 </object>
26 <object class="NSMutableDictionary" key="IBDocument.Metadata">26 <object class="NSMutableDictionary" key="IBDocument.Metadata">
27 <bool key="EncodedWithXMLCoder">YES</bool>27 <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
28 <object class="NSArray" key="dict.sortedKeys" id="0">28 <integer value="1" key="NS.object.0"/>
29 <bool key="EncodedWithXMLCoder">YES</bool>
30 </object>
31 <reference key="dict.values" ref="0"/>
32 </object>29 </object>
33 <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">30 <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
34 <bool key="EncodedWithXMLCoder">YES</bool>31 <bool key="EncodedWithXMLCoder">YES</bool>
@@ -48,7 +45,7 @@
48 <object class="IBUITextField" id="327454090">45 <object class="IBUITextField" id="327454090">
49 <reference key="NSNextResponder" ref="191373211"/>46 <reference key="NSNextResponder" ref="191373211"/>
50 <int key="NSvFlags">292</int>47 <int key="NSvFlags">292</int>
51 <string key="NSFrame">{{120, 24}, {180, 31}}</string>48 <string key="NSFrame">{{104, 24}, {196, 31}}</string>
52 <reference key="NSSuperview" ref="191373211"/>49 <reference key="NSSuperview" ref="191373211"/>
53 <reference key="NSWindow"/>50 <reference key="NSWindow"/>
54 <reference key="NSNextKeyView" ref="1028176743"/>51 <reference key="NSNextKeyView" ref="1028176743"/>
@@ -58,7 +55,6 @@
58 <int key="IBUIContentVerticalAlignment">0</int>55 <int key="IBUIContentVerticalAlignment">0</int>
59 <string key="IBUIText"/>56 <string key="IBUIText"/>
60 <int key="IBUIBorderStyle">3</int>57 <int key="IBUIBorderStyle">3</int>
61 <string key="IBUIPlaceholder">user@domain.com</string>
62 <object class="NSColor" key="IBUITextColor">58 <object class="NSColor" key="IBUITextColor">
63 <int key="NSColorSpace">3</int>59 <int key="NSColorSpace">3</int>
64 <bytes key="NSWhite">MAA</bytes>60 <bytes key="NSWhite">MAA</bytes>
@@ -66,23 +62,29 @@
66 <int key="NSID">2</int>62 <int key="NSID">2</int>
67 </object>63 </object>
68 </object>64 </object>
69 <object class="NSFont" key="IBUIFont">65 <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
66 <float key="IBUIMinimumFontSize">17</float>
67 <object class="IBUITextInputTraits" key="IBUITextInputTraits">
68 <int key="IBUIAutocorrectionType">1</int>
69 <int key="IBUIKeyboardType">7</int>
70 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
71 </object>
72 <object class="IBUIFontDescription" key="IBUIFontDescription">
73 <string key="name">Helvetica</string>
74 <string key="family">Helvetica</string>
75 <int key="traits">0</int>
76 <double key="pointSize">12</double>
77 </object>
78 <object class="NSFont" key="IBUIFont" id="9578050">
70 <string key="NSName">Helvetica</string>79 <string key="NSName">Helvetica</string>
71 <double key="NSSize">12</double>80 <double key="NSSize">12</double>
72 <int key="NSfFlags">16</int>81 <int key="NSfFlags">16</int>
73 </object>82 </object>
74 <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
75 <float key="IBUIMinimumFontSize">17</float>
76 <object class="IBUITextInputTraits" key="IBUITextInputTraits">
77 <int key="IBUIAutocorrectionType">1</int>
78 <int key="IBUIKeyboardType">7</int>
79 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
80 </object>
81 </object>83 </object>
82 <object class="IBUITextField" id="965235407">84 <object class="IBUITextField" id="965235407">
83 <reference key="NSNextResponder" ref="191373211"/>85 <reference key="NSNextResponder" ref="191373211"/>
84 <int key="NSvFlags">292</int>86 <int key="NSvFlags">292</int>
85 <string key="NSFrame">{{120, 63}, {180, 31}}</string>87 <string key="NSFrame">{{104, 63}, {196, 31}}</string>
86 <reference key="NSSuperview" ref="191373211"/>88 <reference key="NSSuperview" ref="191373211"/>
87 <reference key="NSWindow"/>89 <reference key="NSWindow"/>
88 <reference key="NSNextKeyView" ref="391813410"/>90 <reference key="NSNextKeyView" ref="391813410"/>
@@ -92,7 +94,6 @@
92 <int key="IBUIContentVerticalAlignment">0</int>94 <int key="IBUIContentVerticalAlignment">0</int>
93 <string key="IBUIText"/>95 <string key="IBUIText"/>
94 <int key="IBUIBorderStyle">3</int>96 <int key="IBUIBorderStyle">3</int>
95 <string key="IBUIPlaceholder">secret</string>
96 <object class="NSColor" key="IBUITextColor">97 <object class="NSColor" key="IBUITextColor">
97 <int key="NSColorSpace">3</int>98 <int key="NSColorSpace">3</int>
98 <bytes key="NSWhite">MAA</bytes>99 <bytes key="NSWhite">MAA</bytes>
@@ -104,11 +105,16 @@
104 <bool key="IBUISecureTextEntry">YES</bool>105 <bool key="IBUISecureTextEntry">YES</bool>
105 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>106 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
106 </object>107 </object>
108 <object class="IBUIFontDescription" key="IBUIFontDescription">
109 <int key="type">1</int>
110 <double key="pointSize">12</double>
111 </object>
112 <reference key="IBUIFont" ref="9578050"/>
107 </object>113 </object>
108 <object class="IBUILabel" id="522019067">114 <object class="IBUILabel" id="522019067">
109 <reference key="NSNextResponder" ref="191373211"/>115 <reference key="NSNextResponder" ref="191373211"/>
110 <int key="NSvFlags">292</int>116 <int key="NSvFlags">292</int>
111 <string key="NSFrame">{{13, 28}, {101, 21}}</string>117 <string key="NSFrame">{{13, 28}, {83, 21}}</string>
112 <reference key="NSSuperview" ref="191373211"/>118 <reference key="NSSuperview" ref="191373211"/>
113 <reference key="NSWindow"/>119 <reference key="NSWindow"/>
114 <reference key="NSNextKeyView" ref="327454090"/>120 <reference key="NSNextKeyView" ref="327454090"/>
@@ -117,12 +123,7 @@
117 <int key="IBUIContentMode">7</int>123 <int key="IBUIContentMode">7</int>
118 <bool key="IBUIUserInteractionEnabled">NO</bool>124 <bool key="IBUIUserInteractionEnabled">NO</bool>
119 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>125 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
120 <string key="IBUIText">Email address:</string>126 <string key="IBUIText">Username:</string>
121 <object class="NSFont" key="IBUIFont" id="638683467">
122 <string key="NSName">HelveticaNeue</string>
123 <double key="NSSize">13</double>
124 <int key="NSfFlags">16</int>
125 </object>
126 <object class="NSColor" key="IBUITextColor" id="377051206">127 <object class="NSColor" key="IBUITextColor" id="377051206">
127 <int key="NSColorSpace">1</int>128 <int key="NSColorSpace">1</int>
128 <bytes key="NSRGB">MCAwIDAAA</bytes>129 <bytes key="NSRGB">MCAwIDAAA</bytes>
@@ -131,11 +132,22 @@
131 <int key="IBUIBaselineAdjustment">1</int>132 <int key="IBUIBaselineAdjustment">1</int>
132 <float key="IBUIMinimumFontSize">10</float>133 <float key="IBUIMinimumFontSize">10</float>
133 <int key="IBUITextAlignment">2</int>134 <int key="IBUITextAlignment">2</int>
135 <object class="IBUIFontDescription" key="IBUIFontDescription" id="893899974">
136 <string key="name">HelveticaNeue</string>
137 <string key="family">Helvetica Neue</string>
138 <int key="traits">0</int>
139 <double key="pointSize">13</double>
140 </object>
141 <object class="NSFont" key="IBUIFont" id="16180291">
142 <string key="NSName">HelveticaNeue-Medium</string>
143 <double key="NSSize">13</double>
144 <int key="NSfFlags">16</int>
145 </object>
134 </object>146 </object>
135 <object class="IBUILabel" id="1028176743">147 <object class="IBUILabel" id="1028176743">
136 <reference key="NSNextResponder" ref="191373211"/>148 <reference key="NSNextResponder" ref="191373211"/>
137 <int key="NSvFlags">292</int>149 <int key="NSvFlags">292</int>
138 <string key="NSFrame">{{13, 67}, {101, 21}}</string>150 <string key="NSFrame">{{13, 67}, {83, 21}}</string>
139 <reference key="NSSuperview" ref="191373211"/>151 <reference key="NSSuperview" ref="191373211"/>
140 <reference key="NSWindow"/>152 <reference key="NSWindow"/>
141 <reference key="NSNextKeyView" ref="965235407"/>153 <reference key="NSNextKeyView" ref="965235407"/>
@@ -145,12 +157,13 @@
145 <bool key="IBUIUserInteractionEnabled">NO</bool>157 <bool key="IBUIUserInteractionEnabled">NO</bool>
146 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>158 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
147 <string key="IBUIText">Password:</string>159 <string key="IBUIText">Password:</string>
148 <reference key="IBUIFont" ref="638683467"/>
149 <reference key="IBUITextColor" ref="377051206"/>160 <reference key="IBUITextColor" ref="377051206"/>
150 <nil key="IBUIHighlightedColor"/>161 <nil key="IBUIHighlightedColor"/>
151 <int key="IBUIBaselineAdjustment">1</int>162 <int key="IBUIBaselineAdjustment">1</int>
152 <float key="IBUIMinimumFontSize">10</float>163 <float key="IBUIMinimumFontSize">10</float>
153 <int key="IBUITextAlignment">2</int>164 <int key="IBUITextAlignment">2</int>
165 <reference key="IBUIFontDescription" ref="893899974"/>
166 <reference key="IBUIFont" ref="16180291"/>
154 </object>167 </object>
155 <object class="IBUIButton" id="1065737352">168 <object class="IBUIButton" id="1065737352">
156 <reference key="NSNextResponder" ref="191373211"/>169 <reference key="NSNextResponder" ref="191373211"/>
@@ -167,11 +180,6 @@
167 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>180 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
168 <int key="IBUIContentHorizontalAlignment">0</int>181 <int key="IBUIContentHorizontalAlignment">0</int>
169 <int key="IBUIContentVerticalAlignment">0</int>182 <int key="IBUIContentVerticalAlignment">0</int>
170 <object class="NSFont" key="IBUIFont">
171 <string key="NSName">HelveticaNeue-Bold</string>
172 <double key="NSSize">14</double>
173 <int key="NSfFlags">16</int>
174 </object>
175 <bool key="IBUIReversesTitleShadowWhenHighlighted">YES</bool>183 <bool key="IBUIReversesTitleShadowWhenHighlighted">YES</bool>
176 <bool key="IBUIShowsTouchWhenHighlighted">YES</bool>184 <bool key="IBUIShowsTouchWhenHighlighted">YES</bool>
177 <string key="IBUINormalTitle">Continue</string>185 <string key="IBUINormalTitle">Continue</string>
@@ -184,6 +192,17 @@
184 <int key="NSColorSpace">3</int>192 <int key="NSColorSpace">3</int>
185 <bytes key="NSWhite">MC41AA</bytes>193 <bytes key="NSWhite">MC41AA</bytes>
186 </object>194 </object>
195 <object class="IBUIFontDescription" key="IBUIFontDescription">
196 <string key="name">HelveticaNeue-Bold</string>
197 <string key="family">Helvetica Neue</string>
198 <int key="traits">2</int>
199 <double key="pointSize">14</double>
200 </object>
201 <object class="NSFont" key="IBUIFont">
202 <string key="NSName">HelveticaNeue-Bold</string>
203 <double key="NSSize">14</double>
204 <int key="NSfFlags">16</int>
205 </object>
187 </object>206 </object>
188 <object class="IBUIActivityIndicatorView" id="391813410">207 <object class="IBUIActivityIndicatorView" id="391813410">
189 <reference key="NSNextResponder" ref="191373211"/>208 <reference key="NSNextResponder" ref="191373211"/>
@@ -200,7 +219,7 @@
200 <string key="NSFrame">{{0, 64}, {320, 416}}</string>219 <string key="NSFrame">{{0, 64}, {320, 416}}</string>
201 <reference key="NSSuperview"/>220 <reference key="NSSuperview"/>
202 <reference key="NSWindow"/>221 <reference key="NSWindow"/>
203 <reference key="NSNextKeyView"/>222 <reference key="NSNextKeyView" ref="522019067"/>
204 <object class="NSColor" key="IBUIBackgroundColor">223 <object class="NSColor" key="IBUIBackgroundColor">
205 <int key="NSColorSpace">3</int>224 <int key="NSColorSpace">3</int>
206 <bytes key="NSWhite">MQA</bytes>225 <bytes key="NSWhite">MQA</bytes>
@@ -241,6 +260,22 @@
241 <int key="connectionID">13</int>260 <int key="connectionID">13</int>
242 </object>261 </object>
243 <object class="IBConnectionRecord">262 <object class="IBConnectionRecord">
263 <object class="IBCocoaTouchOutletConnection" key="connection">
264 <string key="label">loginButton</string>
265 <reference key="source" ref="372490531"/>
266 <reference key="destination" ref="1065737352"/>
267 </object>
268 <int key="connectionID">20</int>
269 </object>
270 <object class="IBConnectionRecord">
271 <object class="IBCocoaTouchOutletConnection" key="connection">
272 <string key="label">spinner</string>
273 <reference key="source" ref="372490531"/>
274 <reference key="destination" ref="391813410"/>
275 </object>
276 <int key="connectionID">23</int>
277 </object>
278 <object class="IBConnectionRecord">
244 <object class="IBCocoaTouchEventConnection" key="connection">279 <object class="IBCocoaTouchEventConnection" key="connection">
245 <string key="label">logIn:</string>280 <string key="label">logIn:</string>
246 <reference key="source" ref="1065737352"/>281 <reference key="source" ref="1065737352"/>
@@ -249,29 +284,15 @@
249 </object>284 </object>
250 <int key="connectionID">14</int>285 <int key="connectionID">14</int>
251 </object>286 </object>
252 <object class="IBConnectionRecord">
253 <object class="IBCocoaTouchOutletConnection" key="connection">
254 <string key="label">loginButton</string>
255 <reference key="source" ref="372490531"/>
256 <reference key="destination" ref="1065737352"/>
257 </object>
258 <int key="connectionID">20</int>
259 </object>
260 <object class="IBConnectionRecord">
261 <object class="IBCocoaTouchOutletConnection" key="connection">
262 <string key="label">spinner</string>
263 <reference key="source" ref="372490531"/>
264 <reference key="destination" ref="391813410"/>
265 </object>
266 <int key="connectionID">23</int>
267 </object>
268 </object>287 </object>
269 <object class="IBMutableOrderedSet" key="objectRecords">288 <object class="IBMutableOrderedSet" key="objectRecords">
270 <object class="NSArray" key="orderedObjects">289 <object class="NSArray" key="orderedObjects">
271 <bool key="EncodedWithXMLCoder">YES</bool>290 <bool key="EncodedWithXMLCoder">YES</bool>
272 <object class="IBObjectRecord">291 <object class="IBObjectRecord">
273 <int key="objectID">0</int>292 <int key="objectID">0</int>
274 <reference key="object" ref="0"/>293 <object class="NSArray" key="object" id="0">
294 <bool key="EncodedWithXMLCoder">YES</bool>
295 </object>
275 <reference key="children" ref="1000"/>296 <reference key="children" ref="1000"/>
276 <nil key="parent"/>297 <nil key="parent"/>
277 </object>298 </object>
@@ -337,8 +358,9 @@
337 <object class="NSArray" key="dict.sortedKeys">358 <object class="NSArray" key="dict.sortedKeys">
338 <bool key="EncodedWithXMLCoder">YES</bool>359 <bool key="EncodedWithXMLCoder">YES</bool>
339 <string>-1.CustomClassName</string>360 <string>-1.CustomClassName</string>
361 <string>-1.IBPluginDependency</string>
340 <string>-2.CustomClassName</string>362 <string>-2.CustomClassName</string>
341 <string>1.IBEditorWindowLastContentRect</string>363 <string>-2.IBPluginDependency</string>
342 <string>1.IBPluginDependency</string>364 <string>1.IBPluginDependency</string>
343 <string>11.IBPluginDependency</string>365 <string>11.IBPluginDependency</string>
344 <string>22.IBPluginDependency</string>366 <string>22.IBPluginDependency</string>
@@ -350,8 +372,9 @@
350 <object class="NSMutableArray" key="dict.values">372 <object class="NSMutableArray" key="dict.values">
351 <bool key="EncodedWithXMLCoder">YES</bool>373 <bool key="EncodedWithXMLCoder">YES</bool>
352 <string>UOSSOCredentialsViewController</string>374 <string>UOSSOCredentialsViewController</string>
375 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
353 <string>UIResponder</string>376 <string>UIResponder</string>
354 <string>{{556, 412}, {320, 480}}</string>377 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
355 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>378 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
356 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>379 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
357 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>380 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -460,6 +483,6 @@
460 </object>483 </object>
461 <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>484 <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
462 <int key="IBDocument.defaultPropertyAccessControl">3</int>485 <int key="IBDocument.defaultPropertyAccessControl">3</int>
463 <string key="IBCocoaTouchPluginVersion">301</string>486 <string key="IBCocoaTouchPluginVersion">933</string>
464 </data>487 </data>
465</archive>488</archive>

Subscribers

People subscribed via source and target branches