+#pragma mark -
+#pragma mark Optical Media Panel
+
+- (void)showOpticalMediaView: theView withIcon:(NSImage *)icon
+{
+ NSRect o_view_rect;
+ o_view_rect = [theView frame];
+ [theView setFrame: NSMakeRect( 233, 0, o_view_rect.size.width, o_view_rect.size.height)];
+ [theView setAutoresizesSubviews: YES];
+ if (o_currentOpticalMediaView)
+ {
+ [[[[o_tabview tabViewItemAtIndex: [o_tabview indexOfTabViewItemWithIdentifier:@"optical"]] view] animator] replaceSubview: o_currentOpticalMediaView with: theView];
+ [o_currentOpticalMediaView release];
+ }
+ else
+ [[[[o_tabview tabViewItemAtIndex: [o_tabview indexOfTabViewItemWithIdentifier:@"optical"]] view] animator] addSubview: theView];
+ o_currentOpticalMediaView = theView;
+ [o_currentOpticalMediaView retain];
+
+ NSImageView *imageView;
+ imageView = [[NSImageView alloc] init];
+ [imageView setFrame: NSMakeRect( 53, 61, 128, 128 )];
+ [icon setSize: NSMakeSize(128,128)];
+ [imageView setImage: icon];
+ if (o_currentOpticalMediaIconView)
+ {
+ [[[[o_tabview tabViewItemAtIndex: [o_tabview indexOfTabViewItemWithIdentifier:@"optical"]] view] animator] replaceSubview: o_currentOpticalMediaIconView with: imageView];
+ [o_currentOpticalMediaIconView release];
+ }
+ else
+ [[[[o_tabview tabViewItemAtIndex: [o_tabview indexOfTabViewItemWithIdentifier:@"optical"]] view] animator] addSubview: imageView];
+ o_currentOpticalMediaIconView = imageView;
+ [o_currentOpticalMediaIconView retain];
+ [o_currentOpticalMediaView setNeedsDisplay: YES];
+ [o_currentOpticalMediaIconView setNeedsDisplay: YES];
+ [[[o_tabview tabViewItemAtIndex: [o_tabview indexOfTabViewItemWithIdentifier:@"optical"]] view] setNeedsDisplay: YES];
+ [[[o_tabview tabViewItemAtIndex: [o_tabview indexOfTabViewItemWithIdentifier:@"optical"]] view] displayIfNeeded];
+}
+
+- (NSString *) getBSDNodeFromMountPath:(NSString *)mountPath
+{
+ OSStatus err;
+ FSRef ref;
+ FSVolumeRefNum actualVolume;
+ err = FSPathMakeRef ( (const UInt8 *) [mountPath fileSystemRepresentation], &ref, NULL );
+
+ // get a FSVolumeRefNum from mountPath
+ if ( noErr == err ) {
+ FSCatalogInfo catalogInfo;
+ err = FSGetCatalogInfo ( &ref,
+ kFSCatInfoVolume,
+ &catalogInfo,
+ NULL,
+ NULL,
+ NULL
+ );
+ if ( noErr == err ) {
+ actualVolume = catalogInfo.volume;