Mercurial > mplayer.hg
comparison gui/ui/gtk/fileselect.c @ 34518:d476fbab0a28
Fix bug with selected file in file selector.
If files have been deleted since the last selection,
the focussed row can be out of range.
author | ib |
---|---|
date | Fri, 27 Jan 2012 14:47:18 +0000 |
parents | a650895d50a5 |
children | b03481253518 |
comparison
equal
deleted
inserted
replaced
34517:03a6ae3bee1e | 34518:d476fbab0a28 |
---|---|
359 if (stat( "/mnt",&f ) == 0) fsTopList_items=g_list_append( fsTopList_items,"/mnt" ); | 359 if (stat( "/mnt",&f ) == 0) fsTopList_items=g_list_append( fsTopList_items,"/mnt" ); |
360 fsTopList_items=g_list_append( fsTopList_items,"/" ); | 360 fsTopList_items=g_list_append( fsTopList_items,"/" ); |
361 gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items ); | 361 gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items ); |
362 | 362 |
363 gtk_widget_grab_focus( fsFNameList ); | 363 gtk_widget_grab_focus( fsFNameList ); |
364 if (fsLastFNameListSelected + 1 > ((GtkCList *)fsFNameList)->rows) fsLastFNameListSelected = 0; | |
364 ((GtkCList *)fsFNameList)->focus_row = fsLastFNameListSelected; | 365 ((GtkCList *)fsFNameList)->focus_row = fsLastFNameListSelected; |
365 gtk_clist_select_row( GTK_CLIST( fsFNameList ),fsLastFNameListSelected,1 ); | 366 gtk_clist_select_row( GTK_CLIST( fsFNameList ),fsLastFNameListSelected,1 ); |
366 fsLastFNameListSelected = 0; | 367 fsLastFNameListSelected = 0; |
367 | 368 |
368 gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal ); | 369 gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal ); |