[MPlayer-cvslog] r36095 - trunk/gui/dialog/fileselect.c

ib subversion at mplayerhq.hu
Fri Mar 29 18:21:31 CET 2013


Author: ib
Date: Fri Mar 29 18:21:31 2013
New Revision: 36095

Log:
Remove HideFileSelect().

Simply destroy the window.

(It's pointless to check whether the window is existing,
because it cannot be called without an existing window.)

Additionally, relocate and call fs_Cancel_released()
which holds the destruction code now.

Modified:
   trunk/gui/dialog/fileselect.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Fri Mar 29 18:17:02 2013	(r36094)
+++ trunk/gui/dialog/fileselect.c	Fri Mar 29 18:21:31 2013	(r36095)
@@ -274,15 +274,6 @@ static void fs_AddPathUtf8 (const char *
   g_hash_table_insert(fsPathTable, strdup(utf8name), strdup(name));
 }
 
-static void HideFileSelect( void )
-{
- if ( !FileSelector ) return;
- gtk_widget_hide( FileSelector );
- gtk_widget_destroy( FileSelector );
- FileSelector=NULL;
- fsLastFNameListSelected = fsCurrFNameListSelected;
-}
-
 static void fs_PersistantHistory( char * subject )
 {
  unsigned int i;
@@ -388,6 +379,13 @@ static void fs_Up_released( GtkButton * 
  return;
 }
 
+static void fs_Cancel_released( GtkButton * button,gpointer user_data )
+{
+ gtk_widget_destroy( FileSelector );
+ FileSelector=NULL;
+ fsLastFNameListSelected = fsCurrFNameListSelected;
+}
+
 static void fs_Ok_released( GtkButton * button, gpointer user_data )
 {
  char          * fsSelectedDirectory;
@@ -444,17 +442,12 @@ static void fs_Ok_released( GtkButton * 
 
  free(fsSelectedDirectory);
 
- HideFileSelect();
+ fs_Cancel_released(NULL, NULL);
 
  if ( uiLoadPlay ) { uiLoadPlay=False; uiEvent( evPlay,0 ); }
   else gui( GUI_SET_STATE,(void *) GUI_STOP );
 }
 
-static void fs_Cancel_released( GtkButton * button,gpointer user_data )
-{
- HideFileSelect();
-}
-
 static void fs_fsFNameList_select_row( GtkCList * clist, gint row, gint column,
                                        GdkEvent * event, gpointer user_data)
 {


More information about the MPlayer-cvslog mailing list