# HG changeset patch # User ib # Date 1364577827 0 # Node ID 6fc16dfa49d6f7e4c0fb7731ef4b78d4041460ce # Parent b58152190d4ed21cb1f32c388e1a81917083da96 Remove HideEqualizer() and HideEquConfig(). Simply destroy the windows. (It's pointless to check whether the window is existing, because it cannot be called without an existing window.) diff -r b58152190d4e -r 6fc16dfa49d6 gui/dialog/equalizer.c --- a/gui/dialog/equalizer.c Fri Mar 29 17:21:31 2013 +0000 +++ b/gui/dialog/equalizer.c Fri Mar 29 17:23:47 2013 +0000 @@ -125,23 +125,6 @@ gtk_clist_select_row( GTK_CLIST( ChannelsList ),0,0 ); } -static void HideEquConfig( void ) -{ - if ( !EquConfig ) return; - gtk_widget_hide( EquConfig ); - gtk_widget_destroy( EquConfig ); - EquConfig=NULL; -} - -static void HideEqualizer( void ) -{ - if ( !Equalizer ) return; - gtk_widget_hide( Equalizer ); - gtk_widget_destroy( Equalizer ); - Equalizer=NULL; - if ( EquConfig ) HideEquConfig(); -} - static gboolean eqHScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ) { equalizer_t eq; @@ -189,7 +172,15 @@ { switch( (int)user_data ) { - case 0: HideEqualizer(); break; + case 0: + gtk_widget_destroy( Equalizer ); + Equalizer=NULL; + if ( EquConfig ) + { + gtk_widget_destroy( EquConfig ); + EquConfig=NULL; + } + break; case 1: if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) { @@ -572,7 +563,8 @@ nfree( gtkEquChannel6 ); gtkEquChannel6=gstrdup( gtk_entry_get_text( GTK_ENTRY( CEChannel6 ) ) ); eqSetChannelNames(); } - HideEquConfig(); + gtk_widget_destroy( EquConfig ); + EquConfig=NULL; } GtkWidget * CreateEquConfig( void )