Commit 699e4bb6 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

OS X intf work

- don't use bool. it's BOOL
- use GNU style C and hungarian notation
- fix the issue with GUI crashes in playlistview
- default is now category view (for experimentation until we have a SD menu)
- experiment with NSViews to fix the 'drawer' issue (not working though)
parent 327dee53
...@@ -125,6 +125,7 @@ ...@@ -125,6 +125,7 @@
"o_btn_prev" = id; "o_btn_prev" = id;
"o_btn_rewind" = id; "o_btn_rewind" = id;
"o_btn_stop" = id; "o_btn_stop" = id;
"o_clip_view" = id;
"o_controls" = id; "o_controls" = id;
"o_dmi_mute" = id; "o_dmi_mute" = id;
"o_dmi_next" = id; "o_dmi_next" = id;
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<key>1617</key> <key>1617</key>
<string>542 480 104 149 0 0 1024 746 </string> <string>542 480 104 149 0 0 1024 746 </string>
<key>2197</key> <key>2197</key>
<string>91 300 596 367 0 0 1024 746 </string> <string>195 211 596 367 0 0 1280 938 </string>
<key>29</key> <key>29</key>
<string>163 439 419 44 0 0 800 578 </string> <string>132 749 419 44 0 0 1280 938 </string>
<key>915</key> <key>915</key>
<string>731 416 165 180 0 0 1024 746 </string> <string>731 416 165 180 0 0 1024 746 </string>
</dict> </dict>
...@@ -22,11 +22,6 @@ ...@@ -22,11 +22,6 @@
<integer>2203</integer> <integer>2203</integer>
<integer>2208</integer> <integer>2208</integer>
<integer>2206</integer> <integer>2206</integer>
<integer>2199</integer>
</array>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>7S215</string> <string>7S215</string>
......
...@@ -87,6 +87,7 @@ struct intf_sys_t ...@@ -87,6 +87,7 @@ struct intf_sys_t
BOOL nib_open_loaded; /* reference to the open-nib */ BOOL nib_open_loaded; /* reference to the open-nib */
IBOutlet id o_window; /* main window */ IBOutlet id o_window; /* main window */
IBOutlet id o_clip_view; /* playlist clipview */
IBOutlet id o_scrollfield; /* info field */ IBOutlet id o_scrollfield; /* info field */
IBOutlet id o_timefield; /* time field */ IBOutlet id o_timefield; /* time field */
IBOutlet id o_timeslider; /* time slider */ IBOutlet id o_timeslider; /* time slider */
...@@ -232,6 +233,10 @@ struct intf_sys_t ...@@ -232,6 +233,10 @@ struct intf_sys_t
IBOutlet id o_dmi_next; IBOutlet id o_dmi_next;
IBOutlet id o_dmi_previous; IBOutlet id o_dmi_previous;
IBOutlet id o_dmi_mute; IBOutlet id o_dmi_mute;
/* stupid outline views .... */
NSRect rect_remember;
NSView *o_document_view;
} }
+ (VLCMain *)sharedInstance; + (VLCMain *)sharedInstance;
......
...@@ -377,6 +377,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -377,6 +377,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[self setSubmenusEnabled: FALSE]; [self setSubmenusEnabled: FALSE];
[self manageVolumeSlider]; [self manageVolumeSlider];
[o_window setDelegate: self];
p_playlist = (playlist_t *) vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); p_playlist = (playlist_t *) vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
...@@ -1437,6 +1438,33 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1437,6 +1438,33 @@ static VLCMain *_o_sharedMainInstance = nil;
} }
} }
- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize
{
if( proposedFrameSize.height <= 200 )
{
if( [sender frame].size.height > 200 )
{
//rect_remember = [[o_playlist playlistView] frame];
o_document_view = [o_clip_view documentView];
[o_document_view retain];
[o_clip_view setDocumentView: NULL];
}
return NSMakeSize( proposedFrameSize.width, 95 );
}
else
{
if( [sender frame].size.height <= 200 )
{
[o_clip_view setDocumentView: o_document_view];
[o_document_view release];
[o_document_view setFrameSize: NSMakeSize( proposedFrameSize.width - 22, proposedFrameSize.height - 120 )];
//[[o_playlist playlistView] setFrame: rect_remember];
}
return proposedFrameSize;
}
return proposedFrameSize;
}
@end @end
@implementation VLCMain (NSMenuValidation) @implementation VLCMain (NSMenuValidation)
......
...@@ -60,18 +60,20 @@ ...@@ -60,18 +60,20 @@
NSImage *o_descendingSortingImage; NSImage *o_descendingSortingImage;
NSImage *o_ascendingSortingImage; NSImage *o_ascendingSortingImage;
NSMutableDictionary * o_outline_dict; NSMutableDictionary *o_outline_dict;
bool b_selected_item_met; BOOL b_selected_item_met;
bool b_isSortDescending; BOOL b_isSortDescending;
int i_current_view;
id o_tc_sortColumn; id o_tc_sortColumn;
} }
- (IBAction)handlePopUp:(id)sender;
- (IBAction)searchItem:(id)sender;
- (void)initStrings; - (void)initStrings;
- (NSMenu *)menuForEvent:(NSEvent *)o_event; - (NSMenu *)menuForEvent:(NSEvent *)o_event;
- (NSOutlineView *)playlistView;
- (IBAction)handlePopUp:(id)sender;
- (IBAction)searchItem:(id)sender;
- (void)updateTogglePlaylistState; - (void)updateTogglePlaylistState;
- (void)playlistUpdated; - (void)playlistUpdated;
......
This diff is collapsed.
...@@ -97,7 +97,6 @@ ...@@ -97,7 +97,6 @@
char *psz_temp; char *psz_temp;
vlc_mutex_lock( &p_item->input.lock ); vlc_mutex_lock( &p_item->input.lock );
/*fill uri / title / author info */ /*fill uri / title / author info */
if( p_item->input.psz_uri ) if( p_item->input.psz_uri )
{ {
...@@ -115,7 +114,7 @@ ...@@ -115,7 +114,7 @@
[NSString stringWithUTF8String:p_item->input.psz_name]]; [NSString stringWithUTF8String:p_item->input.psz_name]];
} }
vlc_mutex_unlock( &p_item->input.lock ); vlc_mutex_unlock( &p_item->input.lock );
psz_temp = vlc_input_item_GetInfo( &p_item->input, _("Meta-information"), _("Artist") ); psz_temp = vlc_input_item_GetInfo( &p_item->input, _("Meta-information"), _("Artist") );
if( psz_temp ) if( psz_temp )
......
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
- (id)initWithVout:(vout_thread_t *)_p_vout - (id)initWithVout:(vout_thread_t *)_p_vout
frame:(NSRect *)s_frame; frame:(NSRect *)s_frame;
- (void)close; - (void)close;
- (void)setOnTop:(bool)b_on_top; - (void)setOnTop:(BOOL)b_on_top;
- (void)hideMouse:(bool)b_hide; - (void)hideMouse:(BOOL)b_hide;
- (void)manage; - (void)manage;
- (void)scaleWindowWithFactor: (float)factor; - (void)scaleWindowWithFactor: (float)factor;
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
[super close]; [super close];
} }
- (void)setOnTop:(bool)b_on_top - (void)setOnTop:(BOOL)b_on_top
{ {
if( b_on_top ) if( b_on_top )
{ {
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
} }
} }
- (void)hideMouse:(bool)b_hide - (void)hideMouse:(BOOL)b_hide
{ {
BOOL b_inside; BOOL b_inside;
NSPoint ml; NSPoint ml;
......
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