]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/playlist.cpp: removed useless lock.
authorGildas Bazin <gbazin@videolan.org>
Thu, 26 Feb 2004 08:24:29 +0000 (08:24 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 26 Feb 2004 08:24:29 +0000 (08:24 +0000)
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/wxwindows.h

index 82e7f2df5372c5eb5231341caacc433dd76e49dd..34bf04c44a14377e3e98df0863bf81b71775c106 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2004 VideoLAN
- * $Id: playlist.cpp,v 1.44 2004/02/26 00:23:04 gbazin Exp $
+ * $Id: playlist.cpp,v 1.45 2004/02/26 08:24:29 gbazin Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *
@@ -179,7 +179,6 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
     i_update_counter = 0;
     i_sort_mode = MODE_NONE;
     b_need_update = VLC_FALSE;
-    vlc_mutex_init( p_intf, &lock );
     SetIcon( *p_intf->p_sys->p_icon );
 
     i_title_sorted = 0;
@@ -519,22 +518,14 @@ void Playlist::ShowPlaylist( bool show )
 
 void Playlist::UpdatePlaylist()
 {
-    vlc_bool_t b_need_update = VLC_FALSE;
     i_update_counter++;
 
     /* If the playlist isn't show there's no need to update it */
     if( !IsShown() ) return;
 
-    vlc_mutex_lock( &lock );
     if( this->b_need_update )
     {
-        b_need_update = VLC_TRUE;
         this->b_need_update = VLC_FALSE;
-    }
-    vlc_mutex_unlock( &lock );
-
-    if( b_need_update )
-    {
         Rebuild();
     }
 
@@ -1189,9 +1180,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
                      vlc_value_t old_val, vlc_value_t new_val, void *param )
 {
     Playlist *p_playlist_dialog = (Playlist *)param;
-    vlc_mutex_lock( &p_playlist_dialog->lock );
     p_playlist_dialog->b_need_update = VLC_TRUE;
-    vlc_mutex_unlock( &p_playlist_dialog->lock );
     return VLC_SUCCESS;
 }
 
index e667d7653d5c187f6a66cc79e9d992a8cf5d9073..fbca8cc590632d235b661789c29a41d2baab86c4 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
  * Copyright (C) 1999-2004 VideoLAN
- * $Id: wxwindows.h,v 1.93 2004/02/25 18:42:38 gbazin Exp $
+ * $Id: wxwindows.h,v 1.94 2004/02/26 08:24:29 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -762,7 +762,6 @@ public:
     void UpdateItem( int );
 
     bool b_need_update;
-    vlc_mutex_t lock;
 
 private:
     void DeleteItem( int item );