Merge lp:~urbanape/ubuntuone-ios-files/uploads-view-drains-out into lp:ubuntuone-ios-files
- uploads-view-drains-out
- Merge into trunk
Proposed by
Zachery Bir
Status: | Merged |
---|---|
Approved by: | Jason Foreman |
Approved revision: | 26 |
Merged at revision: | 15 |
Proposed branch: | lp:~urbanape/ubuntuone-ios-files/uploads-view-drains-out |
Merge into: | lp:ubuntuone-ios-files |
Diff against target: |
1234 lines (+304/-332) 14 files modified
Files.xcodeproj/project.pbxproj (+24/-16) Files/Files-Info.plist (+1/-1) Files/FilesAppDelegate.m (+2/-2) Files/U1FilesClient.m (+5/-5) Files/U1FolderViewController.m (+1/-1) Files/U1LocalAssetsManager.h (+1/-1) Files/U1LocalAssetsManager.m (+4/-7) Files/U1UTIMapper.h (+1/-0) Files/U1UTIMapper.m (+5/-0) Files/U1UploadsPoolViewController.h (+5/-15) Files/U1UploadsPoolViewController.m (+102/-179) Files/U1UploadsPoolViewController.xib (+127/-87) Files/iPhone/en.lproj/MainWindow_iPhone.xib (+18/-18) Files/uti-mappings.plist (+8/-0) |
To merge this branch: | bzr merge lp:~urbanape/ubuntuone-ios-files/uploads-view-drains-out |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jason Foreman (community) | Approve | ||
Review via email: mp+81173@code.launchpad.net |
Commit message
Description of the change
This branch turns the "Camera Roll" view into an "Uploads" view, which shows the current queue of images to be uploaded, and drains down to empty.
Also fixes a bug with the way filenames were generated for uploads in the folder view.
To post a comment you must log in.
- 26. By Zachery Bir
-
Updated the human-readableness to actually be human-readable, and upped the build number
Revision history for this message
Jason Foreman (threeve) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'Assets/upload.png' |
2 | Binary files Assets/upload.png 1970-01-01 00:00:00 +0000 and Assets/upload.png 2011-11-03 18:34:27 +0000 differ |
3 | === added file 'Assets/upload@2x.png' |
4 | Binary files Assets/upload@2x.png 1970-01-01 00:00:00 +0000 and Assets/upload@2x.png 2011-11-03 18:34:27 +0000 differ |
5 | === modified file 'Files.xcodeproj/project.pbxproj' |
6 | --- Files.xcodeproj/project.pbxproj 2011-11-01 17:13:15 +0000 |
7 | +++ Files.xcodeproj/project.pbxproj 2011-11-03 18:34:27 +0000 |
8 | @@ -18,15 +18,17 @@ |
9 | 916BF76B145A464E00D4FE06 /* settings.png in Resources */ = {isa = PBXBuildFile; fileRef = 916BF769145A464E00D4FE06 /* settings.png */; }; |
10 | 916BF76C145A464E00D4FE06 /* settings@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 916BF76A145A464E00D4FE06 /* settings@2x.png */; }; |
11 | 916BF77A145AF6B900D4FE06 /* Entitlements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 916BF779145AF6B900D4FE06 /* Entitlements.plist */; }; |
12 | - 916E0082143C9A3A0037F6D3 /* U1LocalAssetsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 916E0081143C9A390037F6D3 /* U1LocalAssetsViewController.m */; }; |
13 | + 916E0082143C9A3A0037F6D3 /* U1UploadsPoolViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 916E0081143C9A390037F6D3 /* U1UploadsPoolViewController.m */; }; |
14 | 917ADEC71458954E00980FD4 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 917ADEC51458954E00980FD4 /* Icon.png */; }; |
15 | 917ADEC81458954E00980FD4 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 917ADEC61458954E00980FD4 /* Icon@2x.png */; }; |
16 | - 9190AAF41444CA0A0063614A /* U1LocalAssetsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9190AAF31444CA0A0063614A /* U1LocalAssetsViewController.xib */; }; |
17 | + 9190AAF41444CA0A0063614A /* U1UploadsPoolViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9190AAF31444CA0A0063614A /* U1UploadsPoolViewController.xib */; }; |
18 | 91A5E2DC142A70DF00EAAC2B /* U1LocalAssetsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 91A5E2DB142A70DF00EAAC2B /* U1LocalAssetsManager.m */; }; |
19 | 91A5E2DF142B727600EAAC2B /* U1AssetUploadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 91A5E2DE142B727500EAAC2B /* U1AssetUploadOperation.m */; }; |
20 | 91B3F2D5141E87F900939B3C /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91B3F2D4141E87F900939B3C /* AssetsLibrary.framework */; }; |
21 | 91B3F2DC141FDFAB00939B3C /* _U1Asset.m in Sources */ = {isa = PBXBuildFile; fileRef = 91B3F2DB141FDFAB00939B3C /* _U1Asset.m */; }; |
22 | 91B3F2DF141FDFBE00939B3C /* U1Asset.m in Sources */ = {isa = PBXBuildFile; fileRef = 91B3F2DE141FDFBE00939B3C /* U1Asset.m */; }; |
23 | + 91D403621461ADE7005C66A8 /* upload.png in Resources */ = {isa = PBXBuildFile; fileRef = 91D403601461ADE7005C66A8 /* upload.png */; }; |
24 | + 91D403631461ADE7005C66A8 /* upload@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 91D403611461ADE7005C66A8 /* upload@2x.png */; }; |
25 | 91EC184E145B8E3B00DF31F4 /* U1SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91EC184C145B8E3A00DF31F4 /* U1SettingsViewController.m */; }; |
26 | 91EC184F145B8E3B00DF31F4 /* U1SettingsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 91EC184D145B8E3B00DF31F4 /* U1SettingsViewController.xib */; }; |
27 | 91EC1851145F0A8F00DF31F4 /* default-settings.plist in Resources */ = {isa = PBXBuildFile; fileRef = 91EC1850145F0A8F00DF31F4 /* default-settings.plist */; }; |
28 | @@ -160,12 +162,12 @@ |
29 | 916BF769145A464E00D4FE06 /* settings.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = settings.png; path = Assets/settings.png; sourceTree = "<group>"; }; |
30 | 916BF76A145A464E00D4FE06 /* settings@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settings@2x.png"; path = "Assets/settings@2x.png"; sourceTree = "<group>"; }; |
31 | 916BF779145AF6B900D4FE06 /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = "<group>"; }; |
32 | - 916E0080143C9A390037F6D3 /* U1LocalAssetsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1LocalAssetsViewController.h; sourceTree = "<group>"; }; |
33 | - 916E0081143C9A390037F6D3 /* U1LocalAssetsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1LocalAssetsViewController.m; sourceTree = "<group>"; }; |
34 | + 916E0080143C9A390037F6D3 /* U1UploadsPoolViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1UploadsPoolViewController.h; sourceTree = "<group>"; }; |
35 | + 916E0081143C9A390037F6D3 /* U1UploadsPoolViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1UploadsPoolViewController.m; sourceTree = "<group>"; }; |
36 | 917ADEC014585DC800980FD4 /* U1Files 1.0-9.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "U1Files 1.0-9.xcdatamodel"; sourceTree = "<group>"; }; |
37 | 917ADEC51458954E00980FD4 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; }; |
38 | 917ADEC61458954E00980FD4 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; }; |
39 | - 9190AAF31444CA0A0063614A /* U1LocalAssetsViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = U1LocalAssetsViewController.xib; sourceTree = "<group>"; }; |
40 | + 9190AAF31444CA0A0063614A /* U1UploadsPoolViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = U1UploadsPoolViewController.xib; sourceTree = "<group>"; }; |
41 | 91A5E2DB142A70DF00EAAC2B /* U1LocalAssetsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1LocalAssetsManager.m; sourceTree = "<group>"; }; |
42 | 91A5E2DD142B727500EAAC2B /* U1AssetUploadOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1AssetUploadOperation.h; sourceTree = "<group>"; }; |
43 | 91A5E2DE142B727500EAAC2B /* U1AssetUploadOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1AssetUploadOperation.m; sourceTree = "<group>"; }; |
44 | @@ -175,6 +177,8 @@ |
45 | 91B3F2DB141FDFAB00939B3C /* _U1Asset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _U1Asset.m; sourceTree = "<group>"; }; |
46 | 91B3F2DD141FDFBE00939B3C /* U1Asset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1Asset.h; sourceTree = "<group>"; }; |
47 | 91B3F2DE141FDFBE00939B3C /* U1Asset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1Asset.m; sourceTree = "<group>"; }; |
48 | + 91D403601461ADE7005C66A8 /* upload.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = upload.png; path = Assets/upload.png; sourceTree = "<group>"; }; |
49 | + 91D403611461ADE7005C66A8 /* upload@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "upload@2x.png"; path = "Assets/upload@2x.png"; sourceTree = "<group>"; }; |
50 | 91EC184B145B8E3A00DF31F4 /* U1SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1SettingsViewController.h; sourceTree = "<group>"; }; |
51 | 91EC184C145B8E3A00DF31F4 /* U1SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1SettingsViewController.m; sourceTree = "<group>"; }; |
52 | 91EC184D145B8E3B00DF31F4 /* U1SettingsViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = U1SettingsViewController.xib; sourceTree = "<group>"; }; |
53 | @@ -480,6 +484,8 @@ |
54 | 96783E6513F8ABC70092C6A1 /* Assets */ = { |
55 | isa = PBXGroup; |
56 | children = ( |
57 | + 91D403601461ADE7005C66A8 /* upload.png */, |
58 | + 91D403611461ADE7005C66A8 /* upload@2x.png */, |
59 | 9147FF98146052E10023028C /* camera.png */, |
60 | 9147FF99146052E10023028C /* camera@2x.png */, |
61 | 9147FF9A146052E10023028C /* folder.png */, |
62 | @@ -628,9 +634,9 @@ |
63 | 965D7EB81429690C00E4754F /* U1NavigationBar.m */, |
64 | 96A169A21430D53600E4C990 /* U1LocalFileInfo.h */, |
65 | 96A169A31430D53600E4C990 /* U1LocalFileInfo.m */, |
66 | - 916E0080143C9A390037F6D3 /* U1LocalAssetsViewController.h */, |
67 | - 916E0081143C9A390037F6D3 /* U1LocalAssetsViewController.m */, |
68 | - 9190AAF31444CA0A0063614A /* U1LocalAssetsViewController.xib */, |
69 | + 916E0080143C9A390037F6D3 /* U1UploadsPoolViewController.h */, |
70 | + 916E0081143C9A390037F6D3 /* U1UploadsPoolViewController.m */, |
71 | + 9190AAF31444CA0A0063614A /* U1UploadsPoolViewController.xib */, |
72 | 916BF75F1459EF9C00D4FE06 /* U1UTIMapper.h */, |
73 | 916BF7601459EF9C00D4FE06 /* U1UTIMapper.m */, |
74 | 91EC184B145B8E3A00DF31F4 /* U1SettingsViewController.h */, |
75 | @@ -876,7 +882,7 @@ |
76 | 96A1699D1430C95E00E4C990 /* 04-eye@2x.png in Resources */, |
77 | 96A169A01430C9C900E4C990 /* 265-download.png in Resources */, |
78 | 96A169A11430C9C900E4C990 /* 265-download@2x.png in Resources */, |
79 | - 9190AAF41444CA0A0063614A /* U1LocalAssetsViewController.xib in Resources */, |
80 | + 9190AAF41444CA0A0063614A /* U1UploadsPoolViewController.xib in Resources */, |
81 | 913A54AF1451EFE70081FD67 /* progress_view_background.png in Resources */, |
82 | 913A54B01451EFE70081FD67 /* progress_view_background@2x.png in Resources */, |
83 | 917ADEC71458954E00980FD4 /* Icon.png in Resources */, |
84 | @@ -893,6 +899,8 @@ |
85 | 9147FF9D146052E10023028C /* camera@2x.png in Resources */, |
86 | 9147FF9E146052E10023028C /* folder.png in Resources */, |
87 | 9147FF9F146052E10023028C /* folder@2x.png in Resources */, |
88 | + 91D403621461ADE7005C66A8 /* upload.png in Resources */, |
89 | + 91D403631461ADE7005C66A8 /* upload@2x.png in Resources */, |
90 | ); |
91 | runOnlyForDeploymentPostprocessing = 0; |
92 | }; |
93 | @@ -1003,7 +1011,7 @@ |
94 | 91A5E2DF142B727600EAAC2B /* U1AssetUploadOperation.m in Sources */, |
95 | 965D7EB91429690C00E4754F /* U1NavigationBar.m in Sources */, |
96 | 96A169A41430D53700E4C990 /* U1LocalFileInfo.m in Sources */, |
97 | - 916E0082143C9A3A0037F6D3 /* U1LocalAssetsViewController.m in Sources */, |
98 | + 916E0082143C9A3A0037F6D3 /* U1UploadsPoolViewController.m in Sources */, |
99 | 96CAD3C71457823B007A496C /* NSDictionary+U1Additions.m in Sources */, |
100 | 916BF7611459EF9C00D4FE06 /* U1UTIMapper.m in Sources */, |
101 | 91EC184E145B8E3B00DF31F4 /* U1SettingsViewController.m in Sources */, |
102 | @@ -1120,8 +1128,8 @@ |
103 | armv6, |
104 | armv7, |
105 | ); |
106 | - CODE_SIGN_IDENTITY = "iPhone Developer: Zachery Bir (P7WDPDEFHU)"; |
107 | - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Zachery Bir (P7WDPDEFHU)"; |
108 | + CODE_SIGN_IDENTITY = "iPhone Developer"; |
109 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
110 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
111 | GCC_PREFIX_HEADER = "Files/Files-Prefix.pch"; |
112 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; |
113 | @@ -1132,8 +1140,8 @@ |
114 | "\"$(SRCROOT)/Dependencies/TestFlightSDK\"", |
115 | ); |
116 | PRODUCT_NAME = "$(TARGET_NAME)"; |
117 | - PROVISIONING_PROFILE = "9D31E6D0-194D-4310-9E89-CB404D06C116"; |
118 | - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "3D867106-3B81-4625-A9C8-1E9BD85B7E75"; |
119 | + PROVISIONING_PROFILE = ""; |
120 | + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; |
121 | TARGETED_DEVICE_FAMILY = 1; |
122 | VALID_ARCHS = "arm6 armv7"; |
123 | WRAPPER_EXTENSION = app; |
124 | @@ -1159,8 +1167,8 @@ |
125 | "\"$(SRCROOT)/Dependencies/TestFlightSDK\"", |
126 | ); |
127 | PRODUCT_NAME = "$(TARGET_NAME)"; |
128 | - PROVISIONING_PROFILE = "B93E008E-7980-4B68-961E-44E81643E70F"; |
129 | - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "B93E008E-7980-4B68-961E-44E81643E70F"; |
130 | + PROVISIONING_PROFILE = "3C4AD499-6439-4E5B-97FB-56DA71DC1754"; |
131 | + "PROVISIONING_PROFILE[sdk=iphoneos*]" = "3C4AD499-6439-4E5B-97FB-56DA71DC1754"; |
132 | TARGETED_DEVICE_FAMILY = 1; |
133 | VALID_ARCHS = "arm6 armv7"; |
134 | WRAPPER_EXTENSION = app; |
135 | |
136 | === modified file 'Files/Files-Info.plist' |
137 | --- Files/Files-Info.plist 2011-11-01 17:20:25 +0000 |
138 | +++ Files/Files-Info.plist 2011-11-03 18:34:27 +0000 |
139 | @@ -41,7 +41,7 @@ |
140 | <key>CFBundleSignature</key> |
141 | <string>????</string> |
142 | <key>CFBundleVersion</key> |
143 | - <string>17</string> |
144 | + <string>18</string> |
145 | <key>LSRequiresIPhoneOS</key> |
146 | <true/> |
147 | <key>NSMainNibFile</key> |
148 | |
149 | === modified file 'Files/FilesAppDelegate.m' |
150 | --- Files/FilesAppDelegate.m 2011-11-01 17:11:35 +0000 |
151 | +++ Files/FilesAppDelegate.m 2011-11-03 18:34:27 +0000 |
152 | @@ -25,7 +25,7 @@ |
153 | #import "U1FilePreviewViewController.h" |
154 | #import "U1FilesClient.h" |
155 | #import "U1LocalAssetsManager.h" |
156 | -#import "U1LocalAssetsViewController.h" |
157 | +#import "U1UploadsPoolViewController.h" |
158 | #import "U1FolderNode.h" |
159 | #import "U1FolderViewController.h" |
160 | #import "U1LoginController.h" |
161 | @@ -193,7 +193,7 @@ |
162 | { |
163 | U1VolumesViewController *volumesViewController = [[[U1VolumesViewController alloc] init] autorelease]; |
164 | [self.volumesNavController setViewControllers:[NSArray arrayWithObject:volumesViewController]]; |
165 | - U1LocalAssetsViewController *assetsViewController = [[[U1LocalAssetsViewController alloc] initWithNodeResourcePath:[self remoteUploadFolderPath]] autorelease]; |
166 | + U1UploadsPoolViewController *assetsViewController = [[[U1UploadsPoolViewController alloc] init] autorelease]; |
167 | [self.cameraNavController setViewControllers:[NSArray arrayWithObject:assetsViewController]]; |
168 | U1SettingsViewController *settingsViewController = [[U1SettingsViewController alloc] initWithNibName:@"U1SettingsViewController" bundle:nil]; |
169 | [self.settingsNavController setViewControllers:[NSArray arrayWithObject:settingsViewController]]; |
170 | |
171 | === modified file 'Files/U1FilesClient.m' |
172 | --- Files/U1FilesClient.m 2011-11-01 16:40:04 +0000 |
173 | +++ Files/U1FilesClient.m 2011-11-03 18:34:27 +0000 |
174 | @@ -202,13 +202,13 @@ |
175 | { |
176 | [node updatePropertiesFromJSONDictionary:nodeInfo]; |
177 | } |
178 | + dispatch_async(dispatch_get_main_queue(), ^(void) { |
179 | + NSError *error = nil; |
180 | + completionBlock(node, error); |
181 | + [node release]; |
182 | + }); |
183 | }]; |
184 | |
185 | - dispatch_async(dispatch_get_main_queue(), ^(void) { |
186 | - NSError *error = nil; |
187 | - completionBlock(node, error); |
188 | - [node release]; |
189 | - }); |
190 | |
191 | return nil; |
192 | } |
193 | |
194 | === modified file 'Files/U1FolderViewController.m' |
195 | --- Files/U1FolderViewController.m 2011-11-01 01:17:53 +0000 |
196 | +++ Files/U1FolderViewController.m 2011-11-03 18:34:27 +0000 |
197 | @@ -196,7 +196,7 @@ |
198 | resultBlock:^(ALAsset *asset) { |
199 | ALAssetRepresentation *representation = [asset defaultRepresentation]; |
200 | NSString *mimetype = [utiMapper MIMETypeForUTI:[representation UTI]]; |
201 | - NSString *assetType = [asset valueForProperty:ALAssetPropertyType]; |
202 | + NSString *assetType = [utiMapper humanReadableTypeForUTI:[representation UTI]]; |
203 | NSDate *assetDate = [asset valueForProperty:ALAssetPropertyDate]; |
204 | |
205 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; |
206 | |
207 | === modified file 'Files/U1LocalAssetsManager.h' |
208 | --- Files/U1LocalAssetsManager.h 2011-11-01 17:12:25 +0000 |
209 | +++ Files/U1LocalAssetsManager.h 2011-11-03 18:34:27 +0000 |
210 | @@ -28,7 +28,7 @@ |
211 | - (int)numberOfAssets; |
212 | - (int)numberOfAssetsUploaded; |
213 | - (void)checkForNewAssets; |
214 | -- (BOOL)isResourceUploading:(NSString *)resourcePath; |
215 | +- (BOOL)isFilenameUploading:(NSString *)filename; |
216 | - (void)thumbnailForNode:(U1FileNode *)fileNode completionBlock:(void(^)(CGImageRef thumbnail))completionBlock; |
217 | - (BOOL)isOperating; |
218 | @end |
219 | |
220 | === modified file 'Files/U1LocalAssetsManager.m' |
221 | --- Files/U1LocalAssetsManager.m 2011-11-01 17:12:25 +0000 |
222 | +++ Files/U1LocalAssetsManager.m 2011-11-03 18:34:27 +0000 |
223 | @@ -66,7 +66,7 @@ |
224 | [defaultCenter addObserver:self selector:@selector(autoUploadSettingsChanged:) name:NSUserDefaultsDidChangeNotification object:[NSUserDefaults standardUserDefaults]]; |
225 | dataRepository = [U1DataRepository sharedDataRepository]; |
226 | uploadQueue = [[NSOperationQueue alloc] init]; |
227 | - [uploadQueue setMaxConcurrentOperationCount:4]; |
228 | + [uploadQueue setMaxConcurrentOperationCount:1]; |
229 | self.localAssetsToUpload = [NSMutableSet set]; |
230 | [defaultCenter addObserver:self selector:@selector(reachabilityChanged:) name:kReachabilityChangedNotification object:nil]; |
231 | return self; |
232 | @@ -261,9 +261,7 @@ |
233 | |
234 | - (void)uploadRepresentation:(ALAssetRepresentation *)rep forAsset:(U1Asset *)asset withPriority:(NSOperationQueuePriority)priority; |
235 | { |
236 | - NSString *resourcePath = [self.remoteUploadFolder.resourcePath stringByAppendingPathComponent:asset.filename]; |
237 | - |
238 | - if (![self isResourceUploading:resourcePath]) |
239 | + if (![self isFilenameUploading:asset.filename]) |
240 | { |
241 | [self.localAssetsToUpload addObject:asset]; |
242 | |
243 | @@ -281,7 +279,6 @@ |
244 | [self.dataRepository save:NULL]; |
245 | [self.localAssetsToUpload removeObject:asset]; |
246 | [[NSNotificationCenter defaultCenter] postNotificationName:@"imageUploaded" object:nil]; |
247 | - // Fire a notification that our U1LocalAssetsViewController can subscribe to |
248 | } |
249 | else |
250 | { |
251 | @@ -326,12 +323,12 @@ |
252 | return [self numberOfAssets] - [self.localAssetsToUpload count]; |
253 | } |
254 | |
255 | -- (BOOL)isResourceUploading:(NSString *)resourcePath; |
256 | +- (BOOL)isFilenameUploading:(NSString *)filename; |
257 | { |
258 | __block BOOL isUploading = NO; |
259 | |
260 | [[self.uploadQueue operations] enumerateObjectsUsingBlock:^(U1AssetUploadOperation *operation, NSUInteger idx, BOOL *stop) { |
261 | - if ([operation.filename isEqualToString:[resourcePath lastPathComponent]] && [operation isExecuting]) |
262 | + if ([operation.filename isEqualToString:filename] && [operation isExecuting]) |
263 | { |
264 | isUploading = YES; |
265 | *stop = YES; |
266 | |
267 | === modified file 'Files/U1UTIMapper.h' |
268 | --- Files/U1UTIMapper.h 2011-11-01 14:22:20 +0000 |
269 | +++ Files/U1UTIMapper.h 2011-11-03 18:34:27 +0000 |
270 | @@ -17,6 +17,7 @@ |
271 | |
272 | @interface U1UTIMapper : NSObject |
273 | + (U1UTIMapper *)sharedU1UTIMapper; |
274 | +- (NSString *)humanReadableTypeForUTI:(NSString *)uti; |
275 | - (NSString *)extensionForUTI:(NSString *)uti; |
276 | - (NSString *)MIMETypeForUTI:(NSString *)uti; |
277 | @end |
278 | |
279 | === modified file 'Files/U1UTIMapper.m' |
280 | --- Files/U1UTIMapper.m 2011-11-01 14:22:20 +0000 |
281 | +++ Files/U1UTIMapper.m 2011-11-03 18:34:27 +0000 |
282 | @@ -50,6 +50,11 @@ |
283 | [super dealloc]; |
284 | } |
285 | |
286 | +- (NSString *)humanReadableTypeForUTI:(NSString *)uti; |
287 | +{ |
288 | + return [[self.mappings objectForKey:uti] objectForKey:@"type"]; |
289 | +} |
290 | + |
291 | - (NSString *)extensionForUTI:(NSString *)uti; |
292 | { |
293 | return [[self.mappings objectForKey:uti] objectForKey:@"extension"]; |
294 | |
295 | === renamed file 'Files/U1LocalAssetsViewController.h' => 'Files/U1UploadsPoolViewController.h' |
296 | --- Files/U1LocalAssetsViewController.h 2011-11-01 14:22:20 +0000 |
297 | +++ Files/U1UploadsPoolViewController.h 2011-11-03 18:34:27 +0000 |
298 | @@ -19,25 +19,15 @@ |
299 | |
300 | @class U1FilesClient, U1Node; |
301 | |
302 | -@protocol U1LocalAssetsViewControllerDelegate; |
303 | - |
304 | - |
305 | -@interface U1LocalAssetsViewController : PullRefreshTableViewController |
306 | +@interface U1UploadsPoolViewController : PullRefreshTableViewController |
307 | |
308 | @property (nonatomic, retain, readonly) IBOutlet UITableViewCell *loadingCell; |
309 | @property (nonatomic, retain) IBOutlet UIView *progressView; |
310 | -@property (nonatomic, retain) IBOutlet UIProgressView *progressBar; |
311 | @property (nonatomic, retain) IBOutlet UILabel *progressLabel; |
312 | - |
313 | -@property (assign) id<U1LocalAssetsViewControllerDelegate> delegate; |
314 | +@property (nonatomic, retain) IBOutlet UIView *autoUploadToggleView; |
315 | +@property (nonatomic, retain) IBOutlet UISwitch *autoUploadToggle; |
316 | @property (retain) U1FilesClient *filesClient; |
317 | |
318 | -- (id)initWithNodeResourcePath:(NSString*)resourcePath; |
319 | - |
320 | -@end |
321 | - |
322 | - |
323 | -@protocol U1LocalAssetsViewControllerDelegate <NSObject> |
324 | -@required |
325 | -- (void)localAssetsController:(U1LocalAssetsViewController*)localAssetsController didSelectNode:(U1Node*)node; |
326 | +- (IBAction)enableAutoUpload:(id)sender; |
327 | + |
328 | @end |
329 | |
330 | === renamed file 'Files/U1LocalAssetsViewController.m' => 'Files/U1UploadsPoolViewController.m' |
331 | --- Files/U1LocalAssetsViewController.m 2011-11-01 17:12:52 +0000 |
332 | +++ Files/U1UploadsPoolViewController.m 2011-11-03 18:34:27 +0000 |
333 | @@ -13,55 +13,48 @@ |
334 | // You should have received a copy of the GNU Affero General Public License |
335 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
336 | |
337 | -#import "U1LocalAssetsViewController.h" |
338 | +#import "U1UploadsPoolViewController.h" |
339 | |
340 | -#import "U1ByteSizeValueTransformer.h" |
341 | #import "U1FileNode.h" |
342 | #import "U1FilePreviewViewController.h" |
343 | #import "U1FilesClient.h" |
344 | #import "U1FolderItemCell.h" |
345 | #import "U1FolderNode.h" |
346 | +#import "U1Asset.h" |
347 | #import "U1Node.h" |
348 | #import "UIActionSheet+U1Additions.h" |
349 | #import "U1LocalAssetsManager.h" |
350 | #import "U1DataRepository.h" |
351 | |
352 | -@interface U1LocalAssetsViewController () <U1LocalAssetsViewControllerDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate, NSFetchedResultsControllerDelegate> |
353 | -@property (copy) NSString *resourcePath; |
354 | -@property (retain) U1ByteSizeValueTransformer *byteSizeTransformer; |
355 | -@property (retain) NSIndexPath *pendingIndexPath; |
356 | -@property (retain) U1FolderNode *node; |
357 | -@property (retain) NSMutableArray *nodes; |
358 | +@interface U1UploadsPoolViewController () <UINavigationControllerDelegate, UIImagePickerControllerDelegate, NSFetchedResultsControllerDelegate> |
359 | @property (retain) NSFetchedResultsController *resultsController; |
360 | @property (retain) U1LocalAssetsManager *localAssetsManager; |
361 | - (void)updateFeedback:(id)sender; |
362 | -- (void)loadInfoForNode; |
363 | +- (void)loadCurrentUploads; |
364 | +- (void)reloadTableData:(id)sender; |
365 | +- (UIView *)preparedAutoUploadToggleView; |
366 | +- (void)takePicture:(id)sender; |
367 | @end |
368 | |
369 | - |
370 | -@implementation U1LocalAssetsViewController |
371 | - |
372 | -@synthesize loadingCell, progressView, progressBar, progressLabel; |
373 | -@synthesize delegate, filesClient, node, resourcePath; |
374 | -@synthesize byteSizeTransformer, pendingIndexPath, nodes, resultsController, localAssetsManager; |
375 | - |
376 | -- (id)initWithNodeResourcePath:(NSString*)theResourcePath; |
377 | +@implementation U1UploadsPoolViewController |
378 | + |
379 | +@synthesize loadingCell; |
380 | +@synthesize progressView, progressLabel; |
381 | +@synthesize autoUploadToggleView, autoUploadToggle; |
382 | +@synthesize filesClient; |
383 | +@synthesize resultsController, localAssetsManager; |
384 | + |
385 | +- (id)init; |
386 | { |
387 | - self = [super initWithNibName:@"U1LocalAssetsViewController" bundle:nil]; |
388 | + self = [super initWithNibName:@"U1UploadsPoolViewController" bundle:nil]; |
389 | if (!self) |
390 | return nil; |
391 | - self.title = NSLocalizedString(@"Camera Roll", @""); |
392 | - self.resourcePath = theResourcePath; |
393 | - self.byteSizeTransformer = [[U1ByteSizeValueTransformer new] autorelease]; |
394 | - self.delegate = self; // ??? |
395 | + self.title = NSLocalizedString(@"Uploads", @""); |
396 | filesClient = [U1FilesClient sharedFilesClient]; |
397 | localAssetsManager = [U1LocalAssetsManager sharedLocalAssetsManager]; |
398 | + [[NSNotificationCenter defaultCenter] addObserver:self |
399 | + selector:@selector(reloadTableData:) name:NSUserDefaultsDidChangeNotification object:nil]; |
400 | |
401 | - // This button should use a camera icon and go to the image picker to take a new photo. |
402 | - UIBarButtonItem *cameraButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:self action:@selector(takePicture:)]; |
403 | - [self.navigationItem setRightBarButtonItem:cameraButton]; |
404 | - [cameraButton release]; |
405 | - |
406 | UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 20)]; |
407 | // TODO: Ubuntu font |
408 | [titleLabel setFont:[UIFont boldSystemFontOfSize:18.f]]; |
409 | @@ -81,13 +74,13 @@ |
410 | |
411 | - (void)dealloc; |
412 | { |
413 | + [[NSNotificationCenter defaultCenter] removeObserver:self name:NSUserDefaultsDidChangeNotification object:nil]; |
414 | [loadingCell release]; |
415 | - [resourcePath release]; |
416 | - [node release]; |
417 | - [byteSizeTransformer release]; |
418 | - [pendingIndexPath release]; |
419 | - [nodes release]; |
420 | [resultsController release]; |
421 | + [autoUploadToggleView release]; |
422 | + [autoUploadToggle release]; |
423 | + [progressView release]; |
424 | + [progressLabel release]; |
425 | [super dealloc]; |
426 | } |
427 | |
428 | @@ -97,10 +90,6 @@ |
429 | [self updateFeedback:nil]; |
430 | [self refresh]; |
431 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateFeedback:) name:@"imageUploaded" object:nil]; |
432 | - UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)]; |
433 | - [longPress setMinimumPressDuration:1.f]; |
434 | - [self.tableView addGestureRecognizer:longPress]; |
435 | - [longPress release]; |
436 | } |
437 | |
438 | - (void)viewDidUnload; |
439 | @@ -116,60 +105,16 @@ |
440 | [self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:YES]; |
441 | } |
442 | |
443 | -- (void)longPress:(UILongPressGestureRecognizer*)longPress; |
444 | +- (void)updateFeedback:(id)sender; |
445 | { |
446 | - if (longPress.state == UIGestureRecognizerStateBegan) |
447 | - { |
448 | - CGPoint p = [longPress locationInView:self.tableView]; |
449 | - NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:p]; |
450 | - U1Node *childNode = [self.nodes objectAtIndex:indexPath.row]; |
451 | - |
452 | - UIActionSheet *actionSheet = [UIActionSheet new]; |
453 | - |
454 | - [actionSheet setTitle:[[childNode path] lastPathComponent]]; |
455 | - // TODO: rename |
456 | - NSInteger publishButtonIndex = -1; |
457 | - NSInteger copyURLButtonIndex = -1; |
458 | - if ([childNode isFile]) |
459 | - { |
460 | - U1FileNode *fileNode = (id)childNode; |
461 | - if ([[fileNode isPublic] boolValue]) |
462 | - { |
463 | - publishButtonIndex = [actionSheet addButtonWithTitle:@"Unpublish"]; |
464 | - copyURLButtonIndex = [actionSheet addButtonWithTitle:@"Copy Public URL"]; |
465 | - } |
466 | - else |
467 | - { |
468 | - publishButtonIndex = [actionSheet addButtonWithTitle:@"Publish"]; |
469 | - } |
470 | - } |
471 | - [actionSheet setCancelButtonIndex:[actionSheet addButtonWithTitle:@"Cancel"]]; |
472 | - |
473 | - self.pendingIndexPath = indexPath; |
474 | - [actionSheet showInView:self.view withCompletionBlock:^(NSInteger buttonIndex) { |
475 | - if (buttonIndex == publishButtonIndex) |
476 | - { |
477 | - U1FileNode *fileNode = (id)childNode; |
478 | - if ([[fileNode isPublic] boolValue]) |
479 | - [self.filesClient unpublishNode:fileNode completionBlock:^(U1FileNode *updatedNode, NSError *error) { |
480 | - }]; |
481 | - else |
482 | - [self.filesClient publishNode:fileNode completionBlock:^(U1FileNode *updatedNode, NSError *error) { |
483 | - }]; |
484 | - } |
485 | - else if (buttonIndex == copyURLButtonIndex) |
486 | - { |
487 | - U1FileNode *fileNode = (id)childNode; |
488 | - NSArray *types = UIPasteboardTypeListString; |
489 | - [[UIPasteboard generalPasteboard] setValue:[fileNode publicURLString] forPasteboardType:[types lastObject]]; |
490 | - } |
491 | - else if (buttonIndex == [actionSheet cancelButtonIndex]) |
492 | - { |
493 | - // NSLog(@"cancel"); |
494 | - } |
495 | - self.pendingIndexPath = nil; |
496 | - }]; |
497 | - } |
498 | + // Update the label and the progress bar |
499 | + // progressLabel = (numberOfAssets - assetsPendingUpload) / numberOfAssets |
500 | + dispatch_async(dispatch_get_main_queue(), ^{ |
501 | + U1LocalAssetsManager *localAssets = [U1LocalAssetsManager sharedLocalAssetsManager]; |
502 | + int assetsToUpload = [localAssets.localAssetsToUpload count]; |
503 | + self.progressLabel.text = [NSString stringWithFormat:@"%d remaining", assetsToUpload]; |
504 | + [self.tableView reloadData]; |
505 | + }); |
506 | } |
507 | |
508 | - (void)takePicture:(id)sender; |
509 | @@ -182,32 +127,13 @@ |
510 | |
511 | - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info; |
512 | { |
513 | - // TODO: check for jpg/png |
514 | - // TODO: handle videos (stream) |
515 | - |
516 | [picker dismissModalViewControllerAnimated:YES]; |
517 | |
518 | - // NSURL *imageURL = [info objectForKey:UIImagePickerControllerReferenceURL]; |
519 | UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; |
520 | |
521 | UIImageWriteToSavedPhotosAlbum(image, self, nil, nil); |
522 | } |
523 | |
524 | -- (void)updateFeedback:(id)sender; |
525 | -{ |
526 | - // Update the label and the progress bar |
527 | - // progressLabel = (numberOfAssets - assetsPendingUpload) / numberOfAssets |
528 | - dispatch_async(dispatch_get_main_queue(), ^{ |
529 | - U1LocalAssetsManager *localAssets = [U1LocalAssetsManager sharedLocalAssetsManager]; |
530 | - int totalAssets = [localAssets numberOfAssets]; |
531 | - int assetsUploaded = [localAssets numberOfAssetsUploaded]; |
532 | - float percentDone = (float)assetsUploaded / (float)totalAssets; |
533 | - self.progressLabel.text = [NSString stringWithFormat:@"%d of %d uploaded", assetsUploaded, totalAssets]; |
534 | - self.progressBar.progress = percentDone; |
535 | - [self.tableView reloadData]; |
536 | - }); |
537 | -} |
538 | - |
539 | #pragma mark UITableViewDataSource Methods |
540 | |
541 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; |
542 | @@ -220,9 +146,13 @@ |
543 | |
544 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section; |
545 | { |
546 | - if (section == 0 && [self.localAssetsManager isOperating]) |
547 | + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; |
548 | + |
549 | + if (section == 0 && |
550 | + ([self.localAssetsManager isOperating] || |
551 | + ![defaults boolForKey:@"auto_upload"])) |
552 | { |
553 | - return 66.0f; |
554 | + return 54.0f; |
555 | } |
556 | |
557 | return 0.0f; |
558 | @@ -230,9 +160,18 @@ |
559 | |
560 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section; |
561 | { |
562 | - if (section == 0 && [self.localAssetsManager isOperating]) |
563 | + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; |
564 | + |
565 | + if (section == 0) |
566 | { |
567 | - return self.progressView; |
568 | + if ([self.localAssetsManager isOperating]) |
569 | + { |
570 | + return self.progressView; |
571 | + } |
572 | + else if (![defaults boolForKey:@"auto_upload"]) |
573 | + { |
574 | + return [self preparedAutoUploadToggleView]; |
575 | + } |
576 | } |
577 | |
578 | return nil; |
579 | @@ -247,94 +186,77 @@ |
580 | |
581 | U1FolderItemCell *cell = [U1FolderItemCell cellForTableView:tableView]; |
582 | |
583 | - U1Node *childNode = [self.resultsController objectAtIndexPath:indexPath]; |
584 | - cell.nameLabel.text = [childNode.resourcePath lastPathComponent]; |
585 | - NSString *detailString = @"Pending"; |
586 | -// TODO: get this thumbnail loading happening inside an operation queue, tied to visible rows |
587 | + U1Asset *asset = [self.resultsController objectAtIndexPath:indexPath]; |
588 | + [cell setAccessoryType:UITableViewCellAccessoryNone]; |
589 | + cell.nameLabel.text = asset.filename; |
590 | + cell.nameLabel.textColor = [UIColor blackColor]; |
591 | + NSString *detailString = NSLocalizedString(@"Pending", @""); |
592 | + |
593 | + // TODO: get this thumbnail loading happening inside an operation queue, tied to visible rows |
594 | // [self.localAssetsManager thumbnailForNode:childNode completionBlock:^(CGImageRef thumbnail) { |
595 | // cell.iconImageView.image = [UIImage imageWithCGImage:thumbnail]; |
596 | // }]; |
597 | |
598 | - BOOL hasChildren = [[childNode hasChildren] boolValue]; |
599 | - [cell setAccessoryType:(hasChildren ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone)]; |
600 | + |
601 | |
602 | - if (childNode.generation == nil) |
603 | + // query the local assets manager to see if this childNode's corresponding asset is actually in the upload operation queue |
604 | + BOOL isUploading = [self.localAssetsManager isFilenameUploading:asset.filename]; |
605 | + if (isUploading) |
606 | { |
607 | - cell.nameLabel.textColor = [UIColor grayColor]; |
608 | - // query the local assets manager to see if this childNode's corresponding asset is actually in the upload operation queue |
609 | - BOOL isUploading = [self.localAssetsManager isResourceUploading:childNode.resourcePath]; |
610 | - if (isUploading) |
611 | - { |
612 | - [cell.uploadIndicator setHidden:NO]; |
613 | - [cell.uploadIndicator startAnimating]; |
614 | - detailString = @"Uploading"; |
615 | - } |
616 | - else { |
617 | - [cell.uploadIndicator setHidden:YES]; |
618 | - [cell.uploadIndicator stopAnimating]; |
619 | - } |
620 | + [cell.uploadIndicator setHidden:NO]; |
621 | + [cell.uploadIndicator startAnimating]; |
622 | + detailString = NSLocalizedString(@"Uploading", @""); |
623 | } |
624 | - else |
625 | - { |
626 | - cell.nameLabel.textColor = [UIColor blackColor]; |
627 | - [cell.detailLabel setHidden:NO]; |
628 | + else { |
629 | [cell.uploadIndicator setHidden:YES]; |
630 | [cell.uploadIndicator stopAnimating]; |
631 | } |
632 | - |
633 | - [cell.imageView setImage:nil]; |
634 | - if ([childNode isFolder]) |
635 | - { |
636 | - [cell.imageView setImage:[UIImage imageNamed:@"ic_folder"]]; |
637 | - detailString = [childNode.modificationDate description]; |
638 | - } |
639 | - else |
640 | - { |
641 | - NSString *contentPath = childNode.contentPath; |
642 | - NSURL *contentURL = [NSURL fileURLWithPath:contentPath]; |
643 | - UIDocumentInteractionController *docController = [UIDocumentInteractionController interactionControllerWithURL:contentURL]; |
644 | - [cell.imageView setImage:[docController.icons objectAtIndex:0]]; |
645 | - NSNumber *size = [childNode valueForKey:@"size"]; |
646 | - NSString *sizeString = [self.byteSizeTransformer transformedValue:size]; |
647 | - if (childNode.generation != nil) |
648 | - { |
649 | - detailString = [sizeString stringByAppendingFormat:@", modified %@", childNode.modificationDate]; |
650 | - } |
651 | - } |
652 | - |
653 | + |
654 | + UIDocumentInteractionController *docController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:asset.filename]]; |
655 | + [cell.imageView setImage:[docController.icons objectAtIndex:0]]; |
656 | [cell.detailLabel setText:detailString]; |
657 | + |
658 | return cell; |
659 | } |
660 | |
661 | |
662 | #pragma mark UITableViewDelegate Methods |
663 | |
664 | -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath; |
665 | -{ |
666 | - U1Node *childNode = [self.resultsController objectAtIndexPath:indexPath]; |
667 | - [self.delegate localAssetsController:self didSelectNode:childNode]; |
668 | -} |
669 | - |
670 | - (void)refresh; |
671 | { |
672 | - [self loadInfoForNode]; |
673 | + [self loadCurrentUploads]; |
674 | } |
675 | |
676 | +- (void)reloadTableData:(id)sender; |
677 | +{ |
678 | + [self.tableView reloadData]; |
679 | +} |
680 | |
681 | #pragma mark Private Methods |
682 | |
683 | -- (void)loadInfoForNode; |
684 | +- (void)loadCurrentUploads; |
685 | { |
686 | - NSParameterAssert(self.resourcePath != nil); |
687 | + [[U1DataRepository sharedDataRepository] dispatchBlockWithManagedObjectContext:^(NSManagedObjectContext *context) { |
688 | + |
689 | + NSFetchRequest *request = [[NSFetchRequest alloc] init]; |
690 | + [request setEntity:[U1Asset entityInManagedObjectContext:context]]; |
691 | + NSPredicate *p = [NSPredicate predicateWithFormat:@"generation = %@", nil]; |
692 | + [request setPredicate:p]; |
693 | + NSArray *sortDescriptors = [NSArray arrayWithObjects: |
694 | + [NSSortDescriptor sortDescriptorWithKey:@"filename" ascending:YES selector:@selector(localizedStandardCompare:)], |
695 | + nil]; |
696 | + [request setSortDescriptors:sortDescriptors]; |
697 | + self.resultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request managedObjectContext:context sectionNameKeyPath:nil cacheName:nil]; |
698 | + [request release]; |
699 | + }]; |
700 | |
701 | - [self.filesClient fetchFolderWithResourcePath:self.resourcePath completionBlock:^(U1Node *theNode, NSFetchedResultsController *childrenResultsController, NSError *error) { |
702 | - |
703 | - self.node = (id)theNode; |
704 | - self.resultsController = childrenResultsController; |
705 | + dispatch_async(dispatch_get_main_queue(), ^(void) { |
706 | + NSError *error = nil; |
707 | + [self.resultsController performFetch:&error]; |
708 | [self.resultsController setDelegate:self]; |
709 | [self stopLoading]; |
710 | [self.tableView reloadData]; |
711 | - }]; |
712 | + }); |
713 | } |
714 | |
715 | #pragma mark NSFetchedResultsControllerDelegate Methods |
716 | @@ -405,16 +327,17 @@ |
717 | [self.tableView endUpdates]; |
718 | } |
719 | |
720 | -#pragma mark U1LocalAssetsViewControllerDelegate Methods |
721 | +- (UIView *)preparedAutoUploadToggleView; |
722 | +{ |
723 | + self.autoUploadToggle.on = [[NSUserDefaults standardUserDefaults] boolForKey:@"auto_upload"]; |
724 | + return self.autoUploadToggleView; |
725 | +} |
726 | |
727 | -- (void)localAssetsController:(U1LocalAssetsViewController *)localAssetsController didSelectNode:(U1Node *)aNode |
728 | +- (void)enableAutoUpload:(id)sender; |
729 | { |
730 | - if ([aNode isFile]) |
731 | - { |
732 | - U1FilePreviewViewController *fileController = [[U1FilePreviewViewController alloc] initWithNode:(id)node]; |
733 | - [self.navigationController pushViewController:fileController animated:YES]; |
734 | - [fileController release]; |
735 | - } |
736 | + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; |
737 | + [defaults setBool:((UISwitch *)sender).on forKey:@"auto_upload"]; |
738 | + [self.tableView reloadData]; |
739 | } |
740 | |
741 | @end |
742 | |
743 | === renamed file 'Files/U1LocalAssetsViewController.xib' => 'Files/U1UploadsPoolViewController.xib' |
744 | --- Files/U1LocalAssetsViewController.xib 2011-10-26 20:25:30 +0000 |
745 | +++ Files/U1UploadsPoolViewController.xib 2011-11-03 18:34:27 +0000 |
746 | @@ -12,9 +12,9 @@ |
747 | </object> |
748 | <array key="IBDocument.IntegratedClassDependencies"> |
749 | <string>IBProxyObject</string> |
750 | - <string>IBUIProgressView</string> |
751 | + <string>IBUIImageView</string> |
752 | <string>IBUILabel</string> |
753 | - <string>IBUIImageView</string> |
754 | + <string>IBUISwitch</string> |
755 | <string>IBUIActivityIndicatorView</string> |
756 | <string>IBUITableView</string> |
757 | <string>IBUITableViewCell</string> |
758 | @@ -43,34 +43,22 @@ |
759 | <object class="IBUIImageView" id="135648369"> |
760 | <reference key="NSNextResponder" ref="824354941"/> |
761 | <int key="NSvFlags">292</int> |
762 | - <string key="NSFrameSize">{320, 66}</string> |
763 | + <string key="NSFrameSize">{320, 54}</string> |
764 | <reference key="NSSuperview" ref="824354941"/> |
765 | - <reference key="NSWindow"/> |
766 | - <reference key="NSNextKeyView" ref="129966493"/> |
767 | + <reference key="NSNextKeyView" ref="54616486"/> |
768 | <bool key="IBUIUserInteractionEnabled">NO</bool> |
769 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
770 | - <object class="NSCustomResource" key="IBUIImage"> |
771 | + <object class="NSCustomResource" key="IBUIImage" id="525630367"> |
772 | <string key="NSClassName">NSImage</string> |
773 | <string key="NSResourceName">progress_view_background.png</string> |
774 | </object> |
775 | </object> |
776 | - <object class="IBUIProgressView" id="129966493"> |
777 | - <reference key="NSNextResponder" ref="824354941"/> |
778 | - <int key="NSvFlags">292</int> |
779 | - <string key="NSFrame">{{60, 20}, {200, 9}}</string> |
780 | - <reference key="NSSuperview" ref="824354941"/> |
781 | - <reference key="NSWindow"/> |
782 | - <reference key="NSNextKeyView" ref="54616486"/> |
783 | - <bool key="IBUIOpaque">NO</bool> |
784 | - <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
785 | - <float key="IBUIProgress">0.5</float> |
786 | - </object> |
787 | <object class="IBUILabel" id="54616486"> |
788 | <reference key="NSNextResponder" ref="824354941"/> |
789 | <int key="NSvFlags">292</int> |
790 | - <string key="NSFrame">{{60, 37}, {200, 16}}</string> |
791 | + <string key="NSFrame">{{60, 19}, {200, 16}}</string> |
792 | <reference key="NSSuperview" ref="824354941"/> |
793 | - <reference key="NSWindow"/> |
794 | + <reference key="NSNextKeyView"/> |
795 | <bool key="IBUIOpaque">NO</bool> |
796 | <bool key="IBUIClipsSubviews">YES</bool> |
797 | <int key="IBUIContentMode">7</int> |
798 | @@ -96,9 +84,8 @@ |
799 | </object> |
800 | </object> |
801 | </array> |
802 | - <string key="NSFrameSize">{320, 66}</string> |
803 | + <string key="NSFrameSize">{320, 54}</string> |
804 | <reference key="NSSuperview"/> |
805 | - <reference key="NSWindow"/> |
806 | <reference key="NSNextKeyView" ref="135648369"/> |
807 | <object class="NSColor" key="IBUIBackgroundColor" id="590472223"> |
808 | <int key="NSColorSpace">3</int> |
809 | @@ -111,7 +98,7 @@ |
810 | <int key="NSvFlags">274</int> |
811 | <string key="NSFrameSize">{320, 480}</string> |
812 | <reference key="NSSuperview"/> |
813 | - <reference key="NSWindow"/> |
814 | + <reference key="NSNextKeyView"/> |
815 | <object class="NSColor" key="IBUIBackgroundColor"> |
816 | <int key="NSColorSpace">3</int> |
817 | <bytes key="NSWhite">MQA</bytes> |
818 | @@ -139,7 +126,7 @@ |
819 | <int key="NSvFlags">292</int> |
820 | <string key="NSFrame">{{136, 17}, {75, 21}}</string> |
821 | <reference key="NSSuperview" ref="783165177"/> |
822 | - <reference key="NSWindow"/> |
823 | + <reference key="NSNextKeyView"/> |
824 | <bool key="IBUIOpaque">NO</bool> |
825 | <bool key="IBUIClipsSubviews">YES</bool> |
826 | <int key="IBUIContentMode">7</int> |
827 | @@ -156,7 +143,7 @@ |
828 | <int key="traits">0</int> |
829 | <double key="pointSize">17</double> |
830 | </object> |
831 | - <object class="NSFont" key="IBUIFont"> |
832 | + <object class="NSFont" key="IBUIFont" id="862430175"> |
833 | <string key="NSName">Helvetica</string> |
834 | <double key="NSSize">17</double> |
835 | <int key="NSfFlags">16</int> |
836 | @@ -167,7 +154,6 @@ |
837 | <int key="NSvFlags">292</int> |
838 | <string key="NSFrame">{{108, 18}, {20, 20}}</string> |
839 | <reference key="NSSuperview" ref="783165177"/> |
840 | - <reference key="NSWindow"/> |
841 | <reference key="NSNextKeyView" ref="131881887"/> |
842 | <bool key="IBUIOpaque">NO</bool> |
843 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
844 | @@ -178,7 +164,6 @@ |
845 | </array> |
846 | <string key="NSFrameSize">{320, 53}</string> |
847 | <reference key="NSSuperview" ref="1003077660"/> |
848 | - <reference key="NSWindow"/> |
849 | <reference key="NSNextKeyView" ref="1037320153"/> |
850 | <reference key="IBUIBackgroundColor" ref="590472223"/> |
851 | <bool key="IBUIOpaque">NO</bool> |
852 | @@ -190,7 +175,6 @@ |
853 | </array> |
854 | <string key="NSFrameSize">{320, 54}</string> |
855 | <reference key="NSSuperview"/> |
856 | - <reference key="NSWindow"/> |
857 | <reference key="NSNextKeyView" ref="783165177"/> |
858 | <object class="NSColor" key="IBUIBackgroundColor"> |
859 | <int key="NSColorSpace">1</int> |
860 | @@ -199,6 +183,66 @@ |
861 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
862 | <reference key="IBUIContentView" ref="783165177"/> |
863 | </object> |
864 | + <object class="IBUIView" id="534137793"> |
865 | + <reference key="NSNextResponder"/> |
866 | + <int key="NSvFlags">292</int> |
867 | + <array class="NSMutableArray" key="NSSubviews"> |
868 | + <object class="IBUIImageView" id="204698816"> |
869 | + <reference key="NSNextResponder" ref="534137793"/> |
870 | + <int key="NSvFlags">292</int> |
871 | + <string key="NSFrameSize">{320, 54}</string> |
872 | + <reference key="NSSuperview" ref="534137793"/> |
873 | + <reference key="NSNextKeyView" ref="592945301"/> |
874 | + <bool key="IBUIUserInteractionEnabled">NO</bool> |
875 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
876 | + <reference key="IBUIImage" ref="525630367"/> |
877 | + </object> |
878 | + <object class="IBUISwitch" id="830315920"> |
879 | + <reference key="NSNextResponder" ref="534137793"/> |
880 | + <int key="NSvFlags">292</int> |
881 | + <string key="NSFrame">{{209, 13}, {94, 27}}</string> |
882 | + <reference key="NSSuperview" ref="534137793"/> |
883 | + <reference key="NSNextKeyView"/> |
884 | + <bool key="IBUIOpaque">NO</bool> |
885 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
886 | + <int key="IBUIContentHorizontalAlignment">0</int> |
887 | + <int key="IBUIContentVerticalAlignment">0</int> |
888 | + </object> |
889 | + <object class="IBUILabel" id="592945301"> |
890 | + <reference key="NSNextResponder" ref="534137793"/> |
891 | + <int key="NSvFlags">292</int> |
892 | + <string key="NSFrame">{{20, 16}, {196, 21}}</string> |
893 | + <reference key="NSSuperview" ref="534137793"/> |
894 | + <reference key="NSNextKeyView" ref="830315920"/> |
895 | + <bool key="IBUIOpaque">NO</bool> |
896 | + <bool key="IBUIClipsSubviews">YES</bool> |
897 | + <int key="IBUIContentMode">7</int> |
898 | + <bool key="IBUIUserInteractionEnabled">NO</bool> |
899 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
900 | + <string key="IBUIText">Auto-Upload Camera Roll</string> |
901 | + <reference key="IBUITextColor" ref="943202549"/> |
902 | + <nil key="IBUIHighlightedColor"/> |
903 | + <int key="IBUIBaselineAdjustment">1</int> |
904 | + <float key="IBUIMinimumFontSize">10</float> |
905 | + <object class="IBUIFontDescription" key="IBUIFontDescription"> |
906 | + <int key="type">1</int> |
907 | + <double key="pointSize">17</double> |
908 | + </object> |
909 | + <reference key="IBUIFont" ref="862430175"/> |
910 | + </object> |
911 | + </array> |
912 | + <string key="NSFrameSize">{320, 54}</string> |
913 | + <reference key="NSSuperview"/> |
914 | + <reference key="NSNextKeyView" ref="204698816"/> |
915 | + <object class="NSColor" key="IBUIBackgroundColor"> |
916 | + <int key="NSColorSpace">3</int> |
917 | + <bytes key="NSWhite">MQA</bytes> |
918 | + <object class="NSColorSpace" key="NSCustomColorSpace"> |
919 | + <int key="NSID">2</int> |
920 | + </object> |
921 | + </object> |
922 | + <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
923 | + </object> |
924 | </array> |
925 | <object class="IBObjectContainer" key="IBDocument.Objects"> |
926 | <array class="NSMutableArray" key="connectionRecords"> |
927 | @@ -236,11 +280,28 @@ |
928 | </object> |
929 | <object class="IBConnectionRecord"> |
930 | <object class="IBCocoaTouchOutletConnection" key="connection"> |
931 | - <string key="label">progressBar</string> |
932 | - <reference key="source" ref="372490531"/> |
933 | - <reference key="destination" ref="129966493"/> |
934 | - </object> |
935 | - <int key="connectionID">18</int> |
936 | + <string key="label">autoUploadToggleView</string> |
937 | + <reference key="source" ref="372490531"/> |
938 | + <reference key="destination" ref="534137793"/> |
939 | + </object> |
940 | + <int key="connectionID">23</int> |
941 | + </object> |
942 | + <object class="IBConnectionRecord"> |
943 | + <object class="IBCocoaTouchOutletConnection" key="connection"> |
944 | + <string key="label">autoUploadToggle</string> |
945 | + <reference key="source" ref="372490531"/> |
946 | + <reference key="destination" ref="830315920"/> |
947 | + </object> |
948 | + <int key="connectionID">24</int> |
949 | + </object> |
950 | + <object class="IBConnectionRecord"> |
951 | + <object class="IBCocoaTouchEventConnection" key="connection"> |
952 | + <string key="label">enableAutoUpload:</string> |
953 | + <reference key="source" ref="830315920"/> |
954 | + <reference key="destination" ref="372490531"/> |
955 | + <int key="IBEventType">13</int> |
956 | + </object> |
957 | + <int key="connectionID">27</int> |
958 | </object> |
959 | </array> |
960 | <object class="IBMutableOrderedSet" key="objectRecords"> |
961 | @@ -291,9 +352,8 @@ |
962 | <int key="objectID">5</int> |
963 | <reference key="object" ref="824354941"/> |
964 | <array class="NSMutableArray" key="children"> |
965 | + <reference ref="135648369"/> |
966 | <reference ref="54616486"/> |
967 | - <reference ref="129966493"/> |
968 | - <reference ref="135648369"/> |
969 | </array> |
970 | <reference key="parent" ref="0"/> |
971 | </object> |
972 | @@ -303,28 +363,51 @@ |
973 | <reference key="parent" ref="824354941"/> |
974 | </object> |
975 | <object class="IBObjectRecord"> |
976 | - <int key="objectID">6</int> |
977 | - <reference key="object" ref="129966493"/> |
978 | - <reference key="parent" ref="824354941"/> |
979 | - </object> |
980 | - <object class="IBObjectRecord"> |
981 | <int key="objectID">19</int> |
982 | <reference key="object" ref="135648369"/> |
983 | <reference key="parent" ref="824354941"/> |
984 | </object> |
985 | + <object class="IBObjectRecord"> |
986 | + <int key="objectID">20</int> |
987 | + <reference key="object" ref="534137793"/> |
988 | + <array class="NSMutableArray" key="children"> |
989 | + <reference ref="204698816"/> |
990 | + <reference ref="830315920"/> |
991 | + <reference ref="592945301"/> |
992 | + </array> |
993 | + <reference key="parent" ref="0"/> |
994 | + </object> |
995 | + <object class="IBObjectRecord"> |
996 | + <int key="objectID">21</int> |
997 | + <reference key="object" ref="830315920"/> |
998 | + <reference key="parent" ref="534137793"/> |
999 | + </object> |
1000 | + <object class="IBObjectRecord"> |
1001 | + <int key="objectID">22</int> |
1002 | + <reference key="object" ref="592945301"/> |
1003 | + <reference key="parent" ref="534137793"/> |
1004 | + </object> |
1005 | + <object class="IBObjectRecord"> |
1006 | + <int key="objectID">26</int> |
1007 | + <reference key="object" ref="204698816"/> |
1008 | + <reference key="parent" ref="534137793"/> |
1009 | + </object> |
1010 | </array> |
1011 | </object> |
1012 | <dictionary class="NSMutableDictionary" key="flattenedProperties"> |
1013 | - <string key="-1.CustomClassName">U1LocalAssetsViewController</string> |
1014 | + <string key="-1.CustomClassName">U1UploadsPoolViewController</string> |
1015 | <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1016 | <string key="-2.CustomClassName">UIResponder</string> |
1017 | <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1018 | <string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1019 | <string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1020 | <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1021 | + <string key="20.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1022 | + <string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1023 | + <string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1024 | + <string key="26.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1025 | <string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1026 | <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1027 | - <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1028 | <string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1029 | <string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> |
1030 | </dictionary> |
1031 | @@ -332,52 +415,9 @@ |
1032 | <nil key="activeLocalization"/> |
1033 | <dictionary class="NSMutableDictionary" key="localizations"/> |
1034 | <nil key="sourceID"/> |
1035 | - <int key="maxID">19</int> |
1036 | - </object> |
1037 | - <object class="IBClassDescriber" key="IBDocument.Classes"> |
1038 | - <array class="NSMutableArray" key="referencedPartialClassDescriptions"> |
1039 | - <object class="IBPartialClassDescription"> |
1040 | - <string key="className">PullRefreshTableViewController</string> |
1041 | - <string key="superclassName">UITableViewController</string> |
1042 | - <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
1043 | - <string key="majorKey">IBProjectSource</string> |
1044 | - <string key="minorKey">./Classes/PullRefreshTableViewController.h</string> |
1045 | - </object> |
1046 | - </object> |
1047 | - <object class="IBPartialClassDescription"> |
1048 | - <string key="className">U1LocalAssetsViewController</string> |
1049 | - <string key="superclassName">PullRefreshTableViewController</string> |
1050 | - <dictionary class="NSMutableDictionary" key="outlets"> |
1051 | - <string key="loadingCell">UITableViewCell</string> |
1052 | - <string key="progressBar">UIProgressView</string> |
1053 | - <string key="progressLabel">UILabel</string> |
1054 | - <string key="progressView">UIView</string> |
1055 | - </dictionary> |
1056 | - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> |
1057 | - <object class="IBToOneOutletInfo" key="loadingCell"> |
1058 | - <string key="name">loadingCell</string> |
1059 | - <string key="candidateClassName">UITableViewCell</string> |
1060 | - </object> |
1061 | - <object class="IBToOneOutletInfo" key="progressBar"> |
1062 | - <string key="name">progressBar</string> |
1063 | - <string key="candidateClassName">UIProgressView</string> |
1064 | - </object> |
1065 | - <object class="IBToOneOutletInfo" key="progressLabel"> |
1066 | - <string key="name">progressLabel</string> |
1067 | - <string key="candidateClassName">UILabel</string> |
1068 | - </object> |
1069 | - <object class="IBToOneOutletInfo" key="progressView"> |
1070 | - <string key="name">progressView</string> |
1071 | - <string key="candidateClassName">UIView</string> |
1072 | - </object> |
1073 | - </dictionary> |
1074 | - <object class="IBClassDescriptionSource" key="sourceIdentifier"> |
1075 | - <string key="majorKey">IBProjectSource</string> |
1076 | - <string key="minorKey">./Classes/U1LocalAssetsViewController.h</string> |
1077 | - </object> |
1078 | - </object> |
1079 | - </array> |
1080 | - </object> |
1081 | + <int key="maxID">27</int> |
1082 | + </object> |
1083 | + <object class="IBClassDescriber" key="IBDocument.Classes"/> |
1084 | <int key="IBDocument.localizationMode">0</int> |
1085 | <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> |
1086 | <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> |
1087 | |
1088 | === modified file 'Files/iPhone/en.lproj/MainWindow_iPhone.xib' |
1089 | --- Files/iPhone/en.lproj/MainWindow_iPhone.xib 2011-11-01 17:13:15 +0000 |
1090 | +++ Files/iPhone/en.lproj/MainWindow_iPhone.xib 2011-11-03 18:34:27 +0000 |
1091 | @@ -68,12 +68,12 @@ |
1092 | </object> |
1093 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
1094 | <bool key="IBUIHorizontal">NO</bool> |
1095 | - <object class="IBUINavigationController" key="IBUISelectedViewController" id="175250829"> |
1096 | - <object class="IBUITabBarItem" key="IBUITabBarItem" id="1047769425"> |
1097 | - <string key="IBUITitle">Files</string> |
1098 | + <object class="IBUINavigationController" key="IBUISelectedViewController" id="941272465"> |
1099 | + <object class="IBUITabBarItem" key="IBUITabBarItem" id="463875161"> |
1100 | + <string key="IBUITitle">Uploads</string> |
1101 | <object class="NSCustomResource" key="IBUIImage"> |
1102 | <string key="NSClassName">NSImage</string> |
1103 | - <string key="NSResourceName">folder.png</string> |
1104 | + <string key="NSResourceName">upload.png</string> |
1105 | </object> |
1106 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
1107 | </object> |
1108 | @@ -85,7 +85,7 @@ |
1109 | </object> |
1110 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
1111 | <bool key="IBUIHorizontal">NO</bool> |
1112 | - <object class="IBUINavigationBar" key="IBUINavigationBar" id="131246382"> |
1113 | + <object class="IBUINavigationBar" key="IBUINavigationBar" id="499706903"> |
1114 | <nil key="NSNextResponder"/> |
1115 | <int key="NSvFlags">256</int> |
1116 | <string key="NSFrameSize">{0, 0}</string> |
1117 | @@ -100,12 +100,12 @@ |
1118 | </object> |
1119 | <object class="NSMutableArray" key="IBUIViewControllers"> |
1120 | <bool key="EncodedWithXMLCoder">YES</bool> |
1121 | - <object class="IBUIViewController" id="852027692"> |
1122 | - <object class="IBUINavigationItem" key="IBUINavigationItem" id="570921376"> |
1123 | + <object class="IBUIViewController" id="743143347"> |
1124 | + <object class="IBUINavigationItem" key="IBUINavigationItem" id="374575231"> |
1125 | <string key="IBUITitle">Root View Controller</string> |
1126 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
1127 | </object> |
1128 | - <reference key="IBUIParentViewController" ref="175250829"/> |
1129 | + <reference key="IBUIParentViewController" ref="941272465"/> |
1130 | <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> |
1131 | <int key="IBUIInterfaceOrientation">1</int> |
1132 | <int key="interfaceOrientation">1</int> |
1133 | @@ -117,13 +117,12 @@ |
1134 | </object> |
1135 | <object class="NSMutableArray" key="IBUIViewControllers"> |
1136 | <bool key="EncodedWithXMLCoder">YES</bool> |
1137 | - <reference ref="175250829"/> |
1138 | - <object class="IBUINavigationController" id="941272465"> |
1139 | - <object class="IBUITabBarItem" key="IBUITabBarItem" id="463875161"> |
1140 | - <string key="IBUITitle">Camera Roll</string> |
1141 | + <object class="IBUINavigationController" id="175250829"> |
1142 | + <object class="IBUITabBarItem" key="IBUITabBarItem" id="1047769425"> |
1143 | + <string key="IBUITitle">Files</string> |
1144 | <object class="NSCustomResource" key="IBUIImage"> |
1145 | <string key="NSClassName">NSImage</string> |
1146 | - <string key="NSResourceName">camera.png</string> |
1147 | + <string key="NSResourceName">folder.png</string> |
1148 | </object> |
1149 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
1150 | </object> |
1151 | @@ -135,7 +134,7 @@ |
1152 | </object> |
1153 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
1154 | <bool key="IBUIHorizontal">NO</bool> |
1155 | - <object class="IBUINavigationBar" key="IBUINavigationBar" id="499706903"> |
1156 | + <object class="IBUINavigationBar" key="IBUINavigationBar" id="131246382"> |
1157 | <nil key="NSNextResponder"/> |
1158 | <int key="NSvFlags">256</int> |
1159 | <string key="NSFrameSize">{0, 0}</string> |
1160 | @@ -150,12 +149,12 @@ |
1161 | </object> |
1162 | <object class="NSMutableArray" key="IBUIViewControllers"> |
1163 | <bool key="EncodedWithXMLCoder">YES</bool> |
1164 | - <object class="IBUIViewController" id="743143347"> |
1165 | - <object class="IBUINavigationItem" key="IBUINavigationItem" id="374575231"> |
1166 | + <object class="IBUIViewController" id="852027692"> |
1167 | + <object class="IBUINavigationItem" key="IBUINavigationItem" id="570921376"> |
1168 | <string key="IBUITitle">Root View Controller</string> |
1169 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> |
1170 | </object> |
1171 | - <reference key="IBUIParentViewController" ref="941272465"/> |
1172 | + <reference key="IBUIParentViewController" ref="175250829"/> |
1173 | <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> |
1174 | <int key="IBUIInterfaceOrientation">1</int> |
1175 | <int key="interfaceOrientation">1</int> |
1176 | @@ -165,6 +164,7 @@ |
1177 | </object> |
1178 | </object> |
1179 | </object> |
1180 | + <reference ref="941272465"/> |
1181 | <object class="IBUINavigationController" id="631281359"> |
1182 | <object class="IBUITabBarItem" key="IBUITabBarItem" id="460599548"> |
1183 | <string key="IBUITitle">Settings</string> |
1184 | @@ -535,9 +535,9 @@ |
1185 | <bool key="EncodedWithXMLCoder">YES</bool> |
1186 | <object class="NSArray" key="dict.sortedKeys"> |
1187 | <bool key="EncodedWithXMLCoder">YES</bool> |
1188 | - <string>camera.png</string> |
1189 | <string>folder.png</string> |
1190 | <string>settings.png</string> |
1191 | + <string>upload.png</string> |
1192 | </object> |
1193 | <object class="NSMutableArray" key="dict.values"> |
1194 | <bool key="EncodedWithXMLCoder">YES</bool> |
1195 | |
1196 | === modified file 'Files/uti-mappings.plist' |
1197 | --- Files/uti-mappings.plist 2011-10-28 03:41:49 +0000 |
1198 | +++ Files/uti-mappings.plist 2011-11-03 18:34:27 +0000 |
1199 | @@ -8,6 +8,8 @@ |
1200 | <string>JPG</string> |
1201 | <key>mimetype</key> |
1202 | <string>image/jpeg</string> |
1203 | + <key>type</key> |
1204 | + <string>Image</string> |
1205 | </dict> |
1206 | <key>public.png</key> |
1207 | <dict> |
1208 | @@ -15,6 +17,8 @@ |
1209 | <string>PNG</string> |
1210 | <key>mimetype</key> |
1211 | <string>image/png</string> |
1212 | + <key>type</key> |
1213 | + <string>Image</string> |
1214 | </dict> |
1215 | <key>com.compuserve.gif</key> |
1216 | <dict> |
1217 | @@ -22,6 +26,8 @@ |
1218 | <string>GIF</string> |
1219 | <key>mimetype</key> |
1220 | <string>image/gif</string> |
1221 | + <key>type</key> |
1222 | + <string>Image</string> |
1223 | </dict> |
1224 | <key>public.mpeg-4</key> |
1225 | <dict> |
1226 | @@ -29,6 +35,8 @@ |
1227 | <string>M4V</string> |
1228 | <key>mimetype</key> |
1229 | <string>video/x-m4v</string> |
1230 | + <key>type</key> |
1231 | + <string>Movie</string> |
1232 | </dict> |
1233 | </dict> |
1234 | </plist> |