Changeset 5d3edb82f37d177671789808248251bfdeaf7fd1
- Timestamp:
- 13/12/04 22:48:06 (4 years ago)
- git-parent:
- Files:
-
- extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib (modified) (2 diffs)
- extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib (modified) (2 diffs)
- extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib (modified) (previous)
- modules/gui/macosx/playlist.h (modified) (2 diffs)
- modules/gui/macosx/playlist.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
r251ee86 r5d3edb8 396 396 searchItem = id; 397 397 selectAll = id; 398 sortNodeByAuthor = id; 399 sortNodeByName = id; 398 400 }; 399 401 CLASS = VLCPlaylist; … … 408 410 "o_mi_save_playlist" = id; 409 411 "o_mi_selectall" = id; 412 "o_mi_sort_author" = id; 413 "o_mi_sort_name" = id; 410 414 "o_outline_view" = id; 411 415 "o_random_ckb" = id; extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
r251ee86 r5d3edb8 4 4 <dict> 5 5 <key>IBDocumentLocation</key> 6 <string> 94 104 505 517 0 0 1024 746 </string>6 <string>230 -84 505 517 0 0 1024 746 </string> 7 7 <key>IBEditorPositions</key> 8 8 <dict> … … 14 14 <string>84 667 419 44 0 0 1024 746 </string> 15 15 <key>915</key> 16 <string> 620 326 100 130 0 0 1024 746 </string>16 <string>731 416 165 180 0 0 1024 746 </string> 17 17 </dict> 18 18 <key>IBFramework Version</key> modules/gui/macosx/playlist.h
r5eb406b r5d3edb8 53 53 IBOutlet id o_mi_info; 54 54 IBOutlet id o_mi_selectall; 55 IBOutlet id o_mi_sort_name; 56 IBOutlet id o_mi_sort_author; 55 57 56 58 NSImage *o_descendingSortingImage; … … 69 71 70 72 - (void)playlistUpdated; 73 - (void)sortNode:(int)i_mode; 71 74 72 75 - (IBAction)playItem:(id)sender; 73 76 - (IBAction)deleteItem:(id)sender; 74 77 - (IBAction)selectAll:(id)sender; 78 - (IBAction)sortNodeByName:(id)sender; 79 - (IBAction)sortNodeByAuthor:(id)sender; 75 80 76 81 - (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue; modules/gui/macosx/playlist.m
rc5d6896 r5d3edb8 153 153 [o_mi_selectall setTitle: _NS("Select All")]; 154 154 [o_mi_info setTitle: _NS("Properties")]; 155 [o_mi_sort_name setTitle: _NS("Sort Node by Name")]; 156 [o_mi_sort_author setTitle: _NS("Sort Node by Author")]; 155 157 [[o_tc_name headerCell] setStringValue:_NS("Name")]; 156 158 [[o_tc_author headerCell] setStringValue:_NS("Author")]; … … 317 319 [self playlistUpdated]; 318 320 } 321 } 322 323 - (IBAction)sortNodeByName:(id)sender 324 { 325 [self sortNode: SORT_TITLE]; 326 } 327 328 - (IBAction)sortNodeByAuthor:(id)sender 329 { 330 [self sortNode: SORT_AUTHOR]; 331 } 332 333 - (void)sortNode:(int)i_mode 334 { 335 playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST, 336 FIND_ANYWHERE ); 337 playlist_item_t * p_item; 338 339 if (p_playlist == NULL) 340 { 341 return; 342 } 343 344 if ([o_outline_view selectedRow] > -1) 345 { 346 p_item = [[o_outline_view itemAtRow: [o_outline_view selectedRow]] 347 pointerValue]; 348 } 349 else 350 /*If no item is selected, sort the whole playlist*/ 351 { 352 playlist_view_t * p_view = playlist_ViewFind( p_playlist, VIEW_SIMPLE ); 353 p_item = p_view->p_root; 354 } 355 356 if (p_item->i_children > -1) 357 { 358 vlc_mutex_lock(&p_playlist->object_lock ); 359 playlist_RecursiveNodeSort( p_playlist, p_item, i_mode, ORDER_NORMAL ); 360 vlc_mutex_unlock(&p_playlist->object_lock ); 361 } 362 else 363 { 364 int i; 365 366 for (i = 0 ; i < p_item->i_parents ; i++) 367 { 368 if (p_item->pp_parents[i]->i_view == VIEW_SIMPLE) 369 { 370 vlc_mutex_lock(&p_playlist->object_lock ); 371 playlist_RecursiveNodeSort( p_playlist, 372 p_item->pp_parents[i]->p_parent, i_mode, ORDER_NORMAL ); 373 vlc_mutex_unlock(&p_playlist->object_lock ); 374 break; 375 } 376 } 377 } 378 vlc_object_release(p_playlist); 379 [self playlistUpdated]; 319 380 } 320 381
