Skip to content
Snippets Groups Projects
Commit 23e95739 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

allow to remove models

parent 331d43f7
No related branches found
No related tags found
No related merge requests found
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad.png

2.26 KiB | W: | H:

contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad.png

3.42 KiB | W: | H:

contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad.png
  • 2-up
  • Swipe
  • Onion skin
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad_retina.png

6.38 KiB | W: | H:

contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad_retina.png

10.7 KiB | W: | H:

contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad_retina.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad_retina.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad_retina.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_ipad_retina.png
  • 2-up
  • Swipe
  • Onion skin
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_iphone_retina.png

4.26 KiB | W: | H:

contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_iphone_retina.png

7.04 KiB | W: | H:

contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_iphone_retina.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_iphone_retina.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_iphone_retina.png
contrib/mobile/iOS/Onelab/Images.xcassets/AppIcon.appiconset/icon_app_iphone_retina.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -126,9 +126,9 @@ ...@@ -126,9 +126,9 @@
if(indexPath == nil) return; if(indexPath == nil) return;
UIActionSheet *actionSheet; UIActionSheet *actionSheet;
if([[models objectAtIndex:indexPath.row] getUrl]) if([[models objectAtIndex:indexPath.row] getUrl])
actionSheet = [[UIActionSheet alloc] initWithTitle:[[models objectAtIndex:indexPath.row] getName] delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: @"Open this model", @"More information", nil]; actionSheet = [[UIActionSheet alloc] initWithTitle:[[models objectAtIndex:indexPath.row] getName] delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: @"Open model", @"Remove model", @"More information", nil];
else else
actionSheet = [[UIActionSheet alloc] initWithTitle:[[models objectAtIndex:indexPath.row] getName] delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: @"Open this model", nil]; actionSheet = [[UIActionSheet alloc] initWithTitle:[[models objectAtIndex:indexPath.row] getName] delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: @"Open model", @"Remove model", nil];
actionSheet.tag = indexPath.row; actionSheet.tag = indexPath.row;
[actionSheet showInView:self.view]; [actionSheet showInView:self.view];
} }
...@@ -136,9 +136,17 @@ ...@@ -136,9 +136,17 @@
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{ {
switch (buttonIndex) { switch (buttonIndex) {
case 1: case 2:
[[UIApplication sharedApplication] openURL:[[models objectAtIndex:actionSheet.tag] getUrl]]; [[UIApplication sharedApplication] openURL:[[models objectAtIndex:actionSheet.tag] getUrl]];
break; break;
case 1:
{
NSString *file = [[models objectAtIndex:actionSheet.tag] getFile];
// just remove xml file; should probably remove the whole directory to save space?
[[NSFileManager defaultManager] removeItemAtPath:file error:nil];
[self refreshList];
}
break;
case 0: case 0:
[self tableView:self.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:actionSheet.tag inSection:0]]; [self tableView:self.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:actionSheet.tag inSection:0]];
break; break;
......
No preview for this file type
utils/icons/gmsh_mobile_1024x1024.png

467 KiB | W: | H:

utils/icons/gmsh_mobile_1024x1024.png

512 KiB | W: | H:

utils/icons/gmsh_mobile_1024x1024.png
utils/icons/gmsh_mobile_1024x1024.png
utils/icons/gmsh_mobile_1024x1024.png
utils/icons/gmsh_mobile_1024x1024.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment