changeset 36002:6fc16dfa49d6

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.)
author ib
date Fri, 29 Mar 2013 17:23:47 +0000
parents b58152190d4e
children 8fea01665c83
files gui/dialog/equalizer.c
diffstat 1 files changed, 11 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- 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 )