[MPlayer-cvslog] r34606 - trunk/gui/ui/gtk/fileselect.c

ib subversion at mplayerhq.hu
Fri Jan 27 15:47:18 CET 2012


Author: ib
Date: Fri Jan 27 15:47:18 2012
New Revision: 34606

Log:
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.

Modified:
   trunk/gui/ui/gtk/fileselect.c

Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c	Fri Jan 27 12:24:59 2012	(r34605)
+++ trunk/gui/ui/gtk/fileselect.c	Fri Jan 27 15:47:18 2012	(r34606)
@@ -361,6 +361,7 @@ void ShowFileSelect( int type,int modal 
  gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items );
 
  gtk_widget_grab_focus( fsFNameList );
+ if (fsLastFNameListSelected + 1 > ((GtkCList *)fsFNameList)->rows) fsLastFNameListSelected = 0;
  ((GtkCList *)fsFNameList)->focus_row = fsLastFNameListSelected;
  gtk_clist_select_row( GTK_CLIST( fsFNameList ),fsLastFNameListSelected,1 );
  fsLastFNameListSelected = 0;


More information about the MPlayer-cvslog mailing list