Commit 1e96bee0 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* New OSX controller (iTunes style)

  - Drag and drop implemented
  - still need new sliders and remove the titlebar.
* revert the mozilla plugin changes. i will build a seperate module for that
* simplified previous/next (only playlist, people with chapters and titles
   will have to use the menu
* Moved the disable screensaver from interface to vout.
parent 02619e2b
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = MPSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; },
{
ACTIONS = {showPanel = id; };
CLASS = VLAboutBox;
......@@ -16,6 +17,8 @@
},
{CLASS = VLBrushedMetalImageView; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
{CLASS = VLCApplication; LANGUAGE = ObjC; SUPERCLASS = NSApplication; },
{CLASS = VLCControllerView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{CLASS = VLCControllerWindow; LANGUAGE = ObjC; SUPERCLASS = NSWindow; },
{
ACTIONS = {
backward = id;
......@@ -66,13 +69,13 @@
CLASS = VLCMain;
LANGUAGE = ObjC;
OUTLETS = {
"o_btn_faster" = id;
"o_btn_ff" = id;
"o_btn_fullscreen" = id;
"o_btn_next" = id;
"o_btn_play" = id;
"o_btn_playlist" = id;
"o_btn_prefs" = id;
"o_btn_prev" = id;
"o_btn_slower" = id;
"o_btn_rewind" = id;
"o_btn_stop" = id;
"o_controls" = id;
"o_dmi_mute" = id;
......@@ -171,6 +174,7 @@
"o_mu_window" = id;
"o_playlist" = id;
"o_prefs" = id;
"o_scrollfield" = id;
"o_timefield" = id;
"o_timeslider" = id;
"o_volumeslider" = id;
......
......@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>53 61 772 722 0 0 1280 1002 </string>
<string>27 143 356 496 0 0 1280 1002 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
......@@ -16,13 +16,11 @@
<key>IBFramework Version</key>
<string>349.0</string>
<key>IBLockedObjects</key>
<array>
<integer>977</integer>
</array>
<array/>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>21</integer>
<integer>1647</integer>
</array>
<key>IBSystem Version</key>
<string>7C107</string>
......
extras/MacOSX/Resources/pause.png

1.61 KB | W: | H:

extras/MacOSX/Resources/pause.png

2.77 KB | W: | H:

extras/MacOSX/Resources/pause.png
extras/MacOSX/Resources/pause.png
extras/MacOSX/Resources/pause.png
extras/MacOSX/Resources/pause.png
  • 2-up
  • Swipe
  • Onion skin
extras/MacOSX/Resources/play.png

1000 Bytes | W: | H:

extras/MacOSX/Resources/play.png

2.95 KB | W: | H:

extras/MacOSX/Resources/play.png
extras/MacOSX/Resources/play.png
extras/MacOSX/Resources/play.png
extras/MacOSX/Resources/play.png
  • 2-up
  • Swipe
  • Onion skin
extras/MacOSX/Resources/stop.png

547 Bytes | W: | H:

extras/MacOSX/Resources/stop.png

1.13 KB | W: | H:

extras/MacOSX/Resources/stop.png
extras/MacOSX/Resources/stop.png
extras/MacOSX/Resources/stop.png
extras/MacOSX/Resources/stop.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: controls.m,v 1.53 2003/11/11 23:50:41 hartman Exp $
* $Id: controls.m,v 1.54 2003/11/15 22:42:16 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -43,35 +43,46 @@
- (IBAction)play:(id)sender
{
vlc_value_t val;
playlist_t * p_playlist;
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
input_thread_t * p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
if( p_playlist == NULL )
val.i_int = PLAYING_S;
if( p_input )
{
return;
var_Get( p_input, "state", &val );
}
if( playlist_IsPlaying( p_playlist ) )
if( p_input && val.i_int != PAUSE_S )
{
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Pause" ) );
playlist_Pause( p_playlist );
vlc_object_release( p_playlist );
vout_OSDMessage( VLC_OBJECT(p_intf), _( "Pause" ) );
val.i_int = PAUSE_S;
var_Set( p_input, "state", val );
}
else
{
if( !playlist_IsEmpty( p_playlist ) )
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist )
{
playlist_Play( p_playlist );
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Play" ) );
vlc_object_release( p_playlist );
}
else
{
vlc_object_release( p_playlist );
[o_open openFileGeneric: nil];
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->i_size )
{
vlc_mutex_unlock( &p_playlist->object_lock );
vout_OSDMessage( VLC_OBJECT(p_intf), _( "Play" ) );
playlist_Play( p_playlist );
vlc_object_release( p_playlist );
}
else
{
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
[o_open openFileGeneric: nil];
}
}
}
if( p_input ) vlc_object_release( p_input );
}
- (IBAction)stop:(id)sender
......@@ -119,100 +130,28 @@
- (IBAction)prev:(id)sender
{
vlc_value_t val;
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->p_input == NULL )
{
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
return;
}
vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
val.b_bool = VLC_TRUE;
#define p_area p_playlist->p_input->stream.p_selected_area
if( p_area->i_part > 0 && p_area->i_part_nb > 1)
{
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
var_Set( p_playlist->p_input, "prev-chapter", val );
vlc_mutex_unlock( &p_playlist->object_lock );
}
else if( p_area->i_id > 1 )
{
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
var_Set( p_playlist->p_input, "prev-title", val );
vlc_mutex_unlock( &p_playlist->object_lock );
}
else
if( p_playlist )
{
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Prev( p_playlist );
vlc_object_release( p_playlist );
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Previous" ) );
}
#undef p_area
vlc_object_release( p_playlist );
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Previous" ) );
}
- (IBAction)next:(id)sender
{
vlc_value_t val;
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->p_input == NULL )
{
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
return;
}
vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
val.b_bool = VLC_TRUE;
#define p_area p_playlist->p_input->stream.p_selected_area
if( p_area->i_part < p_area->i_part_nb - 1 && p_area->i_part_nb > 1 )
if( p_playlist )
{
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
var_Set( p_playlist->p_input, "next-chapter", val );
vlc_mutex_unlock( &p_playlist->object_lock );
}
else if( p_area->i_id < p_playlist->p_input->stream.i_area_nb && p_playlist->p_input->stream.i_area_nb > 1 )
{
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
var_Set( p_playlist->p_input, "next-title", val );
vlc_mutex_unlock( &p_playlist->object_lock );
}
else
{
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Next( p_playlist );
vlc_object_release( p_playlist );
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Next" ) );
}
#undef p_area
vlc_object_release( p_playlist );
vout_OSDMessage( (vlc_object_t *)p_intf, _( "Next" ) );
}
- (IBAction)random:(id)sender
......@@ -397,9 +336,7 @@
{
if( [[o_window className] isEqualToString: @"VLCWindow"] )
{
if( [o_title isEqualToString: _NS("Fullscreen") ] )
[o_window toggleFullscreen];
else if( [o_title isEqualToString: _NS("Half Size") ] )
if( [o_title isEqualToString: _NS("Half Size") ] )
[o_window scaleWindowWithFactor: 0.5];
else if( [o_title isEqualToString: _NS("Normal Size") ] )
[o_window scaleWindowWithFactor: 1.0];
......@@ -412,6 +349,8 @@
if( ![o_window isZoomed] )
[o_window performZoom:self];
}
else
[o_window toggleFullscreen];
break;
}
}
......
......@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.h,v 1.48 2003/11/11 23:50:41 hartman Exp $
* $Id: intf.h,v 1.49 2003/11/15 22:42:16 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -93,6 +93,7 @@ struct intf_sys_t
id o_prefs; /* VLCPrefs */
IBOutlet id o_window; /* main window */
IBOutlet id o_infofield; /* info field */
IBOutlet id o_timefield; /* time field */
IBOutlet id o_timeslider; /* time slider */
float f_slider; /* slider value */
......@@ -101,15 +102,17 @@ struct intf_sys_t
IBOutlet id o_btn_playlist; /* btn playlist */
IBOutlet id o_btn_prev; /* btn previous */
IBOutlet id o_btn_slower; /* btn slower */
IBOutlet id o_btn_rewind; /* btn rewind */
IBOutlet id o_btn_play; /* btn play */
IBOutlet id o_btn_stop; /* btn stop */
IBOutlet id o_btn_faster; /* btn faster */
IBOutlet id o_btn_ff; /* btn fast forward */
IBOutlet id o_btn_next; /* btn next */
IBOutlet id o_btn_prefs; /* btn prefs */
IBOutlet id o_btn_fullscreen;/* btn fullscreen */
NSImage * o_img_play; /* btn play img */
NSImage * o_img_pause; /* btn pause img */
NSImage * o_img_play_pressed; /* btn play img */
NSImage * o_img_pause_pressed; /* btn pause img */
IBOutlet id o_controls; /* VLCControls */
IBOutlet id o_playlist; /* VLCPlaylist */
......@@ -226,6 +229,7 @@ struct intf_sys_t
}
- (id)getControls;
- (id)getPlaylist;
- (void)terminate;
- (void)initStrings;
......
......@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.100 2003/11/11 23:50:41 hartman Exp $
* $Id: intf.m,v 1.101 2003/11/15 22:42:16 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -376,7 +376,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
{
unsigned int i_key;
intf_thread_t * p_intf = [NSApp getIntf];
[self initStrings];
[o_window setExcludedFromWindowsMenu: TRUE];
[o_msgs_panel setExcludedFromWindowsMenu: TRUE];
......@@ -431,12 +431,12 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
/* button controls */
[o_btn_playlist setToolTip: _NS("Playlist")];
[o_btn_prev setToolTip: _NS("Previous")];
[o_btn_slower setToolTip: _NS("Slower")];
[o_btn_rewind setToolTip: _NS("Rewind")];
[o_btn_play setToolTip: _NS("Play")];
[o_btn_stop setToolTip: _NS("Stop")];
[o_btn_faster setToolTip: _NS("Faster")];
[o_btn_ff setToolTip: _NS("Fast Forward")];
[o_btn_next setToolTip: _NS("Next")];
[o_btn_prefs setToolTip: _NS("Preferences")];
[o_btn_fullscreen setToolTip: _NS("Fullscreen")];
[o_volumeslider setToolTip: _NS("Volume")];
[o_timeslider setToolTip: _NS("Position")];
......@@ -556,7 +556,9 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
o_msg_arr = [[NSMutableArray arrayWithCapacity: 200] retain];
o_img_play = [[NSImage imageNamed: @"play"] retain];
o_img_play_pressed = [[NSImage imageNamed: @"play_blue"] retain];
o_img_pause = [[NSImage imageNamed: @"pause"] retain];
o_img_pause_pressed = [[NSImage imageNamed: @"pause_blue"] retain];
[p_intf->p_sys->o_sendport setDelegate: self];
[[NSRunLoop currentRunLoop]
......@@ -591,6 +593,15 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
return nil;
}
- (id)getPlaylist
{
if ( o_playlist )
{
return o_playlist;
}
return nil;
}
- (void)manage
{
NSDate * o_sleep_date;
......@@ -715,7 +726,6 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
vlc_bool_t b_control = VLC_FALSE;
vlc_bool_t b_seekable = VLC_FALSE;
vlc_bool_t b_chapters = VLC_FALSE;
vlc_value_t val;
b_plmul = p_playlist->i_size > 1;
......@@ -733,23 +743,11 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
b_chapters = p_input->stream.i_area_nb > 1;
vlc_mutex_unlock( &p_input->stream.stream_lock );
/* play status */
var_Get( p_input, "state", &val );
p_intf->p_sys->b_play_status = val.i_int != PAUSE_S;
}
else
{
/* play status */
p_intf->p_sys->b_play_status = FALSE;
[self setSubmenusEnabled: FALSE];
}
[self playStatusUpdated: p_intf->p_sys->b_play_status];
[o_btn_stop setEnabled: b_input];
[o_btn_faster setEnabled: b_control];
[o_btn_slower setEnabled: b_control];
[o_btn_ff setEnabled: b_control];
[o_btn_rewind setEnabled: b_control];
[o_btn_prev setEnabled: (b_plmul || b_chapters)];
[o_btn_next setEnabled: (b_plmul || b_chapters)];
......@@ -764,19 +762,9 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
if( p_intf->p_sys->b_playing && p_input != NULL )
{
vlc_value_t time, val;
vlc_value_t time;
NSString * o_time;
mtime_t i_seconds;
var_Get( p_input, "state", &val );
if( !p_input->b_die && ( p_intf->p_sys->b_play_status !=
( val.i_int != PAUSE_S ) ) )
{
p_intf->p_sys->b_play_status =
!p_intf->p_sys->b_play_status;
[self playStatusUpdated: p_intf->p_sys->b_play_status];
}
if( p_input->stream.b_seekable )
{
......@@ -800,9 +788,27 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
(int) (i_seconds / 60 % 60),
(int) (i_seconds % 60)];
[o_timefield setStringValue: o_time];
}
if( p_input )
{
vlc_value_t val;
var_Get( p_input, "state", &val );
/* disable screen saver */
UpdateSystemActivity( UsrActivity );
if( val.i_int != PAUSE_S )
{
p_intf->p_sys->b_play_status = TRUE;
}
else
{
p_intf->p_sys->b_play_status = FALSE;
}
[self playStatusUpdated: p_intf->p_sys->b_play_status];
}
else
{
p_intf->p_sys->b_play_status = FALSE;
[self playStatusUpdated: p_intf->p_sys->b_play_status];
[self setSubmenusEnabled: FALSE];
}
#undef p_input
......@@ -964,6 +970,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
if( b_pause )
{
[o_btn_play setImage: o_img_pause];
[o_btn_play setAlternateImage: o_img_pause_pressed];
[o_btn_play setToolTip: _NS("Pause")];
[o_mi_play setTitle: _NS("Pause")];
[o_dmi_play setTitle: _NS("Pause")];
......@@ -971,6 +978,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
else
{
[o_btn_play setImage: o_img_play];
[o_btn_play setAlternateImage: o_img_play_pressed];
[o_btn_play setToolTip: _NS("Play")];
[o_mi_play setTitle: _NS("Play")];
[o_dmi_play setTitle: _NS("Play")];
......@@ -983,6 +991,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
[o_mi_title setEnabled: b_enabled];
[o_mi_chapter setEnabled: b_enabled];
[o_mi_audiotrack setEnabled: b_enabled];
[o_mi_visual setEnabled: b_enabled];
[o_mi_videotrack setEnabled: b_enabled];
[o_mi_subtitle setEnabled: b_enabled];
[o_mi_channels setEnabled: b_enabled];
......@@ -1073,6 +1082,18 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
playlist_Destroy( p_playlist );
}
if( o_img_pause_pressed != nil )
{
[o_img_pause_pressed release];
o_img_pause_pressed = nil;
}
if( o_img_pause_pressed != nil )
{
[o_img_pause_pressed release];
o_img_pause_pressed = nil;
}
if( o_img_pause != nil )
{
[o_img_pause release];
......
......@@ -2,7 +2,7 @@
* misc.h: code not specific to vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: misc.h,v 1.2 2003/03/13 22:24:17 hartman Exp $
* $Id: misc.h,v 1.3 2003/11/15 22:42:16 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -21,6 +21,26 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* VLCControllerWindow
*****************************************************************************/
@interface VLCControllerWindow : NSWindow
{
}
@end
/*****************************************************************************
* VLCControllerView
*****************************************************************************/
@interface VLCControllerView : NSView
{
}
@end
/*****************************************************************************
* VLBrushedMetalImageView
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* misc.m: code not specific to vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: misc.m,v 1.2 2003/03/13 22:24:17 hartman Exp $
* $Id: misc.m,v 1.3 2003/11/15 22:42:16 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -24,6 +24,98 @@
#include <Cocoa/Cocoa.h>
#include "misc.h"
#include "playlist.h"
/*****************************************************************************
* VLCControllerWindow
*****************************************************************************/
@implementation VLCControllerWindow
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)styleMask
backing:(NSBackingStoreType)backingType defer:(BOOL)flag
{
self = [super initWithContentRect:contentRect styleMask:styleMask //& ~NSTitledWindowMask
backing:backingType defer:flag];
return( self );
}
@end
/*****************************************************************************
* VLCControllerView
*****************************************************************************/
@implementation VLCControllerView
- (void)dealloc
{
[self unregisterDraggedTypes];
[super dealloc];
}
- (void)awakeFromNib
{
[self registerForDraggedTypes:[NSArray arrayWithObjects:NSTIFFPboardType,
NSFilenamesPboardType, nil]];
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
if ((NSDragOperationGeneric & [sender draggingSourceOperationMask])
== NSDragOperationGeneric)
{
return NSDragOperationGeneric;
}
else
{
return NSDragOperationNone;
}
}
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
{
return YES;
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *o_paste = [sender draggingPasteboard];
NSArray *o_types = [NSArray arrayWithObjects: NSFilenamesPboardType, nil];
NSString *o_desired_type = [o_paste availableTypeFromArray:o_types];
NSData *o_carried_data = [o_paste dataForType:o_desired_type];
if( o_carried_data )
{
if ([o_desired_type isEqualToString:NSFilenamesPboardType])
{
int i;
NSArray *o_array = [NSArray array];
NSArray *o_values = [[o_paste propertyListForType: NSFilenamesPboardType]
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
for( i = 0; i < (int)[o_values count]; i++)
{
NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
o_array = [o_array arrayByAddingObject: o_dic];
}
[(VLCPlaylist *)[[NSApp delegate] getPlaylist] appendArray: o_array atPos: -1 enqueue:NO];
return YES;
}
}
[self setNeedsDisplay:YES];
return YES;
}
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
{
[self setNeedsDisplay:YES];
}
@end
/*****************************************************************************
* VLBrushedMetalImageView
......@@ -36,6 +128,71 @@
return YES;
}
- (void)dealloc
{
[self unregisterDraggedTypes];
[super dealloc];
}
- (void)awakeFromNib
{
[self registerForDraggedTypes:[NSArray arrayWithObjects:NSTIFFPboardType,
NSFilenamesPboardType, nil]];
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
if ((NSDragOperationGeneric & [sender draggingSourceOperationMask])
== NSDragOperationGeneric)
{
return NSDragOperationGeneric;
}
else
{
return NSDragOperationNone;
}
}
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
{
return YES;
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *o_paste = [sender draggingPasteboard];
NSArray *o_types = [NSArray arrayWithObjects: NSFilenamesPboardType, nil];
NSString *o_desired_type = [o_paste availableTypeFromArray:o_types];
NSData *o_carried_data = [o_paste dataForType:o_desired_type];
if( o_carried_data )
{
if ([o_desired_type isEqualToString:NSFilenamesPboardType])
{
int i;
NSArray *o_array = [NSArray array];
NSArray *o_values = [[o_paste propertyListForType: NSFilenamesPboardType]
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
for( i = 0; i < (int)[o_values count]; i++)
{
NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
o_array = [o_array arrayByAddingObject: o_dic];
}
[(VLCPlaylist *)[[NSApp delegate] getPlaylist] appendArray: o_array atPos: -1 enqueue:NO];
return YES;
}
}
[self setNeedsDisplay:YES];
return YES;
}
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
{
[self setNeedsDisplay:YES];
}
@end
......@@ -65,12 +222,12 @@
if( self != nil )
{
_bgColor = [[NSColor colorWithDeviceRed: 0.8627451
green: 0.8784314
blue: 0.7725490
alpha: 1.0] retain];
green: 0.8784314
blue: 0.7725490
alpha: 1.0] retain];
_knobColor = [[NSColor blackColor] retain];
}
NSLog(@"boe");
return( self );
}
......
......@@ -2,7 +2,7 @@
* playlist.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: playlist.m,v 1.37 2003/11/12 02:45:26 hartman Exp $
* $Id: playlist.m,v 1.38 2003/11/15 22:42:16 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
......@@ -305,7 +305,6 @@
temp = strrchr( psz_dev , 's' );
psz_dev[temp - psz_dev] = '\0';
o_url = [NSString stringWithCString: psz_dev ];
NSLog(@"%@", o_url);
}
if (i_item == 0 && !b_enqueue)
......
......@@ -2,7 +2,7 @@
* vout.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.h,v 1.15 2003/11/06 16:28:28 hartman Exp $
* $Id: vout.h,v 1.16 2003/11/15 22:42:16 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -73,10 +73,6 @@ struct vout_sys_t
NSRect s_rect;
int b_pos_saved;
VLCWindow * o_window;
Rect rect;
int portx;
int porty;
int isplugin;
vlc_bool_t b_mouse_moved;
mtime_t i_time_mouse_last_moved;
......@@ -84,12 +80,10 @@ struct vout_sys_t
#ifdef __QUICKTIME__
CodecType i_codec;
CGrafPtr p_qdport;
CGrafPtr p_qdportold;
ImageSequence i_seq;
MatrixRecordPtr p_matrix;
DecompressorComponent img_dc;
ImageDescriptionHandle h_img_descr;
Ptr p_fullscreen_state;
RgnHandle mask;
#endif
};
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment