Browse Source

Consistent navigation for the downloads and streams

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Romain Goyet 12 years ago
parent
commit
52f5074063

+ 1 - 1
AspenProject/VLCHTTPDownloadViewController.h

@@ -23,5 +23,5 @@
 
 
 - (IBAction)downloadAction:(id)sender;
 - (IBAction)downloadAction:(id)sender;
 - (IBAction)cancelDownload:(id)sender;
 - (IBAction)cancelDownload:(id)sender;
-
+- (IBAction)dismiss:(id)sender;
 @end
 @end

+ 5 - 0
AspenProject/VLCHTTPDownloadViewController.m

@@ -71,6 +71,11 @@
     }
     }
 }
 }
 
 
+- (IBAction)dismiss:(id)sender
+{
+    [self.navigationController dismissModalViewControllerAnimated:YES];
+}
+
 #pragma mark - download management
 #pragma mark - download management
 - (void)_triggerNextDownload
 - (void)_triggerNextDownload
 {
 {

+ 2 - 3
AspenProject/VLCMenuViewController.m

@@ -122,8 +122,7 @@
 - (IBAction)openNetworkStream:(id)sender
 - (IBAction)openNetworkStream:(id)sender
 {
 {
     UIViewController *openURLController = [[VLCOpenNetworkStreamViewController alloc] initWithNibName:nil bundle:nil];
     UIViewController *openURLController = [[VLCOpenNetworkStreamViewController alloc] initWithNibName:nil bundle:nil];
-
-    [self.navigationController pushViewController:openURLController animated:YES];
+    [self _presentViewController:openURLController];
 }
 }
 
 
 - (IBAction)downloadFromHTTPServer:(id)sender
 - (IBAction)downloadFromHTTPServer:(id)sender
@@ -131,7 +130,7 @@
     if (!_downloadViewController)
     if (!_downloadViewController)
         _downloadViewController = [[VLCHTTPDownloadViewController alloc] initWithNibName:nil bundle:nil];
         _downloadViewController = [[VLCHTTPDownloadViewController alloc] initWithNibName:nil bundle:nil];
 
 
-    [self.navigationController pushViewController:_downloadViewController animated:YES];
+    [self _presentViewController:_downloadViewController];
 }
 }
 
 
 - (IBAction)showSettings:(id)sender
 - (IBAction)showSettings:(id)sender

+ 1 - 0
AspenProject/VLCOpenNetworkStreamViewController.h

@@ -17,5 +17,6 @@
 @property (strong, nonatomic) IBOutlet UITableView *historyTableView;
 @property (strong, nonatomic) IBOutlet UITableView *historyTableView;
 
 
 - (IBAction)openButtonAction:(id)sender;
 - (IBAction)openButtonAction:(id)sender;
+- (IBAction)dismiss:(id)sender;
 
 
 @end
 @end

+ 5 - 0
AspenProject/VLCOpenNetworkStreamViewController.m

@@ -80,6 +80,11 @@
     }
     }
 }
 }
 
 
+- (IBAction)dismiss:(id)sender
+{
+    [self.navigationController dismissModalViewControllerAnimated:YES];
+}
+
 #pragma mark - table view data source
 #pragma mark - table view data source
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
 {
 {