changeset 36000:9bdcd4ec73ae

Remove HidePlaylist(). Simply destroy the window. (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:17:02 +0000
parents 135a2c940db8
children b58152190d4e
files gui/dialog/playlist.c
diffstat 1 files changed, 7 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/playlist.c	Fri Mar 29 17:15:19 2013 +0000
+++ b/gui/dialog/playlist.c	Fri Mar 29 17:17:02 2013 +0000
@@ -90,18 +90,6 @@
  return i;
 }
 
-static void HidePlaylist( void )
-{
- if ( !Playlist ) return;
- NrOfSelected=NrOfEntrys=0;
- nfree( CLListSelected ); nfree( CLFileSelected );
- free( old_path );
- old_path=strdup( current_path );
- gtk_widget_hide( Playlist );
- gtk_widget_destroy( Playlist );
- Playlist=NULL;
-}
-
 static void plRowSelect( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data )
 {
  switch ( (int) user_data )
@@ -177,7 +165,13 @@
 	free(curr.name);
        }
   case 0: // cancel
-       HidePlaylist();
+       NrOfSelected=NrOfEntrys=0;
+       nfree( CLListSelected );
+       nfree( CLFileSelected );
+       free( old_path );
+       old_path=strdup( current_path );
+       gtk_widget_destroy( Playlist );
+       Playlist=NULL;
        break;
   case 2: // remove
        {