[vlc-commits] macosx: fix bug in disk open panel regarding selected folders

David Fuhrmann git at videolan.org
Wed Jun 27 20:08:17 CEST 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Jun 24 01:26:30 2012 +0200| [31f4c4db0beabfb571aa31d6834f988111e1dee1] | committer: David Fuhrmann

macosx: fix bug in disk open panel regarding selected folders

Previously, the open panel always converted the mrl to an (not available)
mount point when you want to setup a playback without menus
(cherry picked from commit f8d14c628d05db37c286cc48ad44a2555dd53639)

Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=31f4c4db0beabfb571aa31d6834f988111e1dee1
---

 modules/gui/macosx/open.m |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index b9fa361..2b21bc5 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -910,9 +910,18 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
 - (IBAction)dvdreadOptionChanged:(id)sender
 {
+    NSString *o_device_path = [o_opticalDevices objectAtIndex: [o_disc_selector_pop indexOfSelectedItem]];
+    char *diskType = [self getVolumeTypeFromMountPath:o_device_path];
+
+    NSString *pathToOpen;
+    if (diskType == kVLCMediaVideoTSFolder)
+        pathToOpen = o_device_path;
+    else
+        pathToOpen = [self getBSDNodeFromMountPath: o_device_path];
+
     if (sender == o_disc_dvdwomenus_enablemenus_btn) {
         b_nodvdmenus = NO;
-        [self setMRL: [NSString stringWithFormat: @"dvdnav://%@", [self getBSDNodeFromMountPath:[o_opticalDevices objectAtIndex: [o_disc_selector_pop indexOfSelectedItem]]]]];
+        [self setMRL: [NSString stringWithFormat: @"dvdnav://%@", pathToOpen]];
         [self showOpticalMediaView: o_disc_dvd_view withIcon: [o_currentOpticalMediaIconView image]];
         return;
     }
@@ -930,7 +939,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
     if (sender == o_disc_dvdwomenus_chapter_stp)
         [o_disc_dvdwomenus_chapter setIntValue: [o_disc_dvdwomenus_chapter_stp intValue]];
 
-    [self setMRL: [NSString stringWithFormat: @"dvdread://%@#%i:%i-", [self getBSDNodeFromMountPath:[o_opticalDevices objectAtIndex: [o_disc_selector_pop indexOfSelectedItem]]], [o_disc_dvdwomenus_title intValue], [o_disc_dvdwomenus_chapter intValue]]];
+    [self setMRL: [NSString stringWithFormat: @"dvdread://%@#%i:%i-", pathToOpen, [o_disc_dvdwomenus_title intValue], [o_disc_dvdwomenus_chapter intValue]]];
 }
 
 - (IBAction)vcdOptionChanged:(id)sender



More information about the vlc-commits mailing list