Merge lp:~mikemc/ubuntuone-ios-files/use-options-menu into lp:ubuntuone-ios-files

Proposed by Mike McCracken
Status: Merged
Approved by: dobey
Approved revision: 110
Merged at revision: 108
Proposed branch: lp:~mikemc/ubuntuone-ios-files/use-options-menu
Merge into: lp:ubuntuone-ios-files
Diff against target: 71 lines (+8/-35)
2 files modified
Files/U1FileDetailsViewController.m (+4/-31)
Files/U1FilePreviewViewController.m (+4/-4)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-ios-files/use-options-menu
Reviewer Review Type Date Requested Status
dobey (community) Approve
Review via email: mp+166868@code.launchpad.net

Commit message

Use "options menu" instead of "open-in" menu to let users do more things with downloaded files.

Description of the change

See bug LP: #1186362 for a screenshot of the new options menu from the simulator

presents a menu with a superset of functionality, adding useful things like save to photo roll or tweet/fb/weibo an image, or mail the file for other files.

NOTE, also adds an autorelease for the alert view, since it will leak. However, it looks like since you can always email a file, we may never create that alert view in the first place. Still.

To post a comment you must log in.
Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Files/U1FileDetailsViewController.m'
--- Files/U1FileDetailsViewController.m 2013-05-24 18:26:45 +0000
+++ Files/U1FileDetailsViewController.m 2013-05-31 18:07:36 +0000
@@ -324,43 +324,16 @@
324 [self.navigationController pushViewController:previewController animated:YES];324 [self.navigationController pushViewController:previewController animated:YES];
325 [previewController release];325 [previewController release];
326 326
327// QLPreviewController *previewController = [[QLPreviewController alloc] init];
328// previewController.dataSource = self;
329// previewController.delegate = self;
330//
331// UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 20)];
332// // TODO: Ubuntu font
333// [titleLabel setFont:[UIFont boldSystemFontOfSize:18.f]];
334// [titleLabel setTextColor:[UIColor blackColor]];
335// [titleLabel setShadowColor:[UIColor whiteColor]];
336// [titleLabel setShadowOffset:CGSizeMake(-1, -1)];
337// [titleLabel setText:self.title];
338// [titleLabel sizeToFit];
339// [titleLabel setOpaque:NO];
340// [titleLabel setBackgroundColor:[UIColor clearColor]];
341// [previewController.navigationItem setTitleView:titleLabel];
342// [titleLabel release];
343//
344//// [self.navigationController presentModalViewController:previewController animated:YES];
345// [self.navigationController pushViewController:previewController animated:YES];
346// [previewController release];
347//
348// // TODO: manage preview view vs. modal presentation
349//// UIView *previewView = previewController.view;
350//// previewView.frame = [self.view bounds];
351//// [previewController viewWillAppear:NO];
352//// [self.view addSubview:previewView];
353//// [previewController viewDidAppear:NO];
354}327}
355328
356- (IBAction)openIn:(UIBarButtonItem*)sender;329- (IBAction)openIn:(UIBarButtonItem*)sender;
357{330{
358 BOOL success = [self.docController presentOpenInMenuFromBarButtonItem:sender animated:YES];331 BOOL success = [self.docController presentOptionsMenuFromBarButtonItem:sender animated:YES];
359 if(!success){332 if(!success){
360 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Unable to Open File"333 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"No Options Available"
361 message:@"No apps that can open this file type were found."334 message:@"No external options found for this file type."
362 delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];335 delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
363 [alertView show];336 [[alertView autorelease] show];
364 }337 }
365}338}
366339
367340
=== modified file 'Files/U1FilePreviewViewController.m'
--- Files/U1FilePreviewViewController.m 2013-04-03 23:01:10 +0000
+++ Files/U1FilePreviewViewController.m 2013-05-31 18:07:36 +0000
@@ -178,12 +178,12 @@
178178
179- (IBAction)openIn:(UIBarButtonItem*)sender;179- (IBAction)openIn:(UIBarButtonItem*)sender;
180{180{
181 BOOL success = [self.docController presentOpenInMenuFromBarButtonItem:sender animated:YES];181 BOOL success = [self.docController presentOptionsMenuFromBarButtonItem:sender animated:YES];
182 if(!success){182 if(!success){
183 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Unable to Open File"183 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"No Options Available"
184 message:@"No apps that can open this file type were found."184 message:@"No external options found for this file type."
185 delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];185 delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
186 [alertView show];186 [[alertView autorelease] show];
187 }187 }
188}188}
189189

Subscribers

People subscribed via source and target branches