* playlist.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: playlist.m,v 1.46 2003/11/20 02:39:09 hartman Exp $
+ * $Id: playlist.m,v 1.47 2003/12/10 12:57:12 bigben Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
- (IBAction)searchItem:(id)sender
{
- int i_current = 0;
+ int i_current = -1;
NSString *o_current_name;
NSString *o_current_author;
if ([o_table_view selectedRow] == [o_table_view numberOfRows]-1 )
{
- i_current = 0;
+ i_current =-1;
}
else
{
- i_current = [o_table_view selectedRow]+1;
+ i_current = [o_table_view selectedRow];
}
- while (i_current != [o_table_view selectedRow])
+ do
{
+ i_current++;
+
vlc_mutex_lock( &p_playlist->object_lock );
o_current_name = [NSString stringWithUTF8String:
p_playlist->pp_items[i_current]->psz_name];
[o_table_view scrollRowToVisible: i_current];
break;
}
- if ( i_current == [o_table_view numberOfRows] - 1 )
- {
- i_current = 0;
- }
- else
+ if ( i_current == [o_table_view numberOfRows] - 1 )
{
- i_current++;
+ i_current = -1;
}
}
+ while (i_current != [o_table_view selectedRow]);
vlc_object_release( p_playlist );
}