Mercurial > mplayer.hg
changeset 36001:b58152190d4e
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.
author | ib |
---|---|
date | Fri, 29 Mar 2013 17:21:31 +0000 |
parents | 9bdcd4ec73ae |
children | 6fc16dfa49d6 |
files | gui/dialog/fileselect.c |
diffstat | 1 files changed, 8 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/fileselect.c Fri Mar 29 17:17:02 2013 +0000 +++ b/gui/dialog/fileselect.c Fri Mar 29 17:21:31 2013 +0000 @@ -274,15 +274,6 @@ 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 @@ 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 @@ 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) {