[[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidMountNotification object:nil];
[[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidUnmountNotification object:nil];
- [self performSelector:@selector(qtkToggleUIElements:) withObject:nil afterDelay:.3];
- [self performSelector:@selector(scanOpticalMedia:) withObject:nil afterDelay:.5];
+
+ [self qtkToggleUIElements:nil];
+ [self scanOpticalMedia:nil];
[self setMRL: @""];
}
[[[o_tabview tabViewItemAtIndex: [o_tabview indexOfTabViewItemWithIdentifier:@"optical"]] view] displayIfNeeded];
}
-- (NSString *) getBSDNodeFromMountPath:(NSString *)mountPath
++ (NSString *) getBSDNodeFromMountPath:(NSString *)mountPath
{
OSStatus err;
FSRef ref;
return @"";
}
-- (NSString *)getVolumeTypeFromMountPath:(NSString *)mountPath
++ (NSString *)getVolumeTypeFromMountPath:(NSString *)mountPath
{
OSStatus err;
FSRef ref;
- (NSDictionary *)scanPath:(NSString *)o_path
{
- NSString *o_type = [self getVolumeTypeFromMountPath:o_path];
+ NSString *o_type = [VLCOpen getVolumeTypeFromMountPath:o_path];
NSImage *o_image = [[NSWorkspace sharedWorkspace] iconForFile: o_path];
NSString *o_device_path;
[o_type isEqualToString: kVLCMediaUnknown])
o_device_path = o_path;
else
- o_device_path = [self getBSDNodeFromMountPath:o_path];
+ o_device_path = [VLCOpen getBSDNodeFromMountPath:o_path];
return [NSDictionary dictionaryWithObjectsAndKeys: o_path, @"path",
o_device_path, @"devicePath",