[vlc-commits] macosx: device open: set new media folder as current item when it is added
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 10:51:38 2012 +0200| [478d3fcd61c9f89c0f2c38a34f58ea43647b054c] | committer: David Fuhrmann
macosx: device open: set new media folder as current item when it is added
(cherry picked from commit ad09e6fbfb12153fd79cc5256b33407fec3309b8)
Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=478d3fcd61c9f89c0f2c38a34f58ea43647b054c
---
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 2b21bc5..d08bc53 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -871,6 +871,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
@@ -903,7 +907,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