Commit 6197001f authored by Benjamin Pracht's avatar Benjamin Pracht

* Fix title display above the scrollbar

* Fix the shuffle checkbox
* Expand playlist to the currently playing item and select it
parent 6ad10b63
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>25 92 505 517 0 0 1280 938 </string> <string>470 105 505 517 0 0 1024 746 </string>
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<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>237 313 596 367 0 0 1024 746 </string> <string>91 300 596 367 0 0 1024 746 </string>
<key>29</key> <key>29</key>
<string>326 879 419 44 0 0 1280 938 </string> <string>229 690 419 44 0 0 1024 746 </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>
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>21</integer> <integer>21</integer>
<integer>29</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>7S215</string> <string>7S215</string>
......
...@@ -883,14 +883,12 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -883,14 +883,12 @@ static VLCMain *_o_sharedMainInstance = nil;
{ {
return; return;
} }
#if 0
o_temp = [NSString stringWithUTF8String: o_temp = [NSString stringWithUTF8String:
p_playlist->p_input.psz_name]; p_playlist->status.p_item->input.psz_name];
if( o_temp == NULL ) if( o_temp == NULL )
o_temp = [NSString stringWithCString: o_temp = [NSString stringWithCString:
p_playlist->p_input.psz_name]; p_playlist->status.p_item->input.psz_name];
[o_scrollfield setStringValue: o_temp ]; [o_scrollfield setStringValue: o_temp ];
#endif
p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE ); FIND_ANYWHERE );
...@@ -908,7 +906,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -908,7 +906,7 @@ static VLCMain *_o_sharedMainInstance = nil;
} }
vlc_object_release( (vlc_object_t *)p_vout ); vlc_object_release( (vlc_object_t *)p_vout );
} }
//[o_playlist updateRowSelection]; [o_playlist updateRowSelection];
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
p_intf->p_sys->b_current_title_update = FALSE; p_intf->p_sys->b_current_title_update = FALSE;
} }
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
- (void)updateTogglePlaylistState; - (void)updateTogglePlaylistState;
- (void)playlistUpdated; - (void)playlistUpdated;
- (void)sortNode:(int)i_mode; - (void)sortNode:(int)i_mode;
- (void)updateRowSelection;
- (IBAction)playItem:(id)sender; - (IBAction)playItem:(id)sender;
- (IBAction)deleteItem:(id)sender; - (IBAction)deleteItem:(id)sender;
......
...@@ -259,6 +259,51 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -259,6 +259,51 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
} }
} }
- (void)updateRowSelection
{
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
playlist_item_t * p_item, * p_temp_item;
NSMutableArray * o_array = [NSMutableArray array];
int i,i_row;
unsigned int j;
if (p_playlist == NULL)
return;
p_item = p_playlist->status.p_item;
p_temp_item = p_item;
while (p_temp_item->i_parents > 0)
{
[o_array insertObject: [NSValue valueWithPointer: p_temp_item] atIndex: 0];
for (i = 0 ; i < p_temp_item->i_parents ; i++)
{
if (p_temp_item->pp_parents[i]->i_view == VIEW_SIMPLE)
{
p_temp_item = p_temp_item->pp_parents[i]->p_parent;
break;
}
}
}
for (j = 0 ; j < [o_array count] - 1 ; j++)
{
[o_outline_view expandItem: [o_outline_dict objectForKey:
[NSString stringWithFormat: @"%p",
[[o_array objectAtIndex:j] pointerValue]]]];
}
i_row = [o_outline_view rowForItem:[o_outline_dict
objectForKey:[NSString stringWithFormat: @"%p", p_item]]];
[o_outline_view selectRow: i_row byExtendingSelection: NO];
[o_outline_view scrollRowToVisible: i_row];
vlc_object_release(p_playlist);
}
- (bool)isItem:(playlist_item_t *)p_item inNode:(playlist_item_t *)p_node - (bool)isItem:(playlist_item_t *)p_item inNode:(playlist_item_t *)p_node
{ {
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST, playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
......
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