[vlc-commits] macosx: device open: set new media folder as current item when it is added

David Fuhrmann git at videolan.org
Sun Jun 24 10:53:38 CEST 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Jun 24 10:51:38 2012 +0200| [ad09e6fbfb12153fd79cc5256b33407fec3309b8] | committer: David Fuhrmann

macosx: device open: set new media folder as current item when it is added

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

 modules/gui/macosx/open.m |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 82b1a2e..d3f37b8 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -941,6 +941,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
         else
             [o_disc_selector_pop setHidden: NO];
 
+        // select newly added media folder
+        if (o_notification && [[o_notification name] isEqualToString:@"VLCNewMediaFolderNotification"])
+            [o_disc_selector_pop selectItemAtIndex: [[o_disc_selector_pop itemArray] count] - 1];
+
         [self showSelectedOpticalDisc];
     }
     else
@@ -973,7 +977,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
         if ([o_path length] > 0 )
         {
             [o_specialMediaFolders addObject: o_path];
-            [self scanOpticalMedia: nil];
+            [self scanOpticalMedia: [NSNotification notificationWithName:@"VLCNewMediaFolderNotification" object:nil]];
         }
     }
 }



More information about the vlc-commits mailing list