[vlc-devel] commit: Remove unused i_enabled member from the playlist struct ( Rafaël Carré )

git version control git at videolan.org
Thu Apr 17 00:37:03 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Thu Apr 17 00:31:17 2008 +0200| [04cfbc32da890e7ce71d4bc5e150c581cd9f48f9]

Remove unused i_enabled member from the playlist struct

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04cfbc32da890e7ce71d4bc5e150c581cd9f48f9
---

 include/vlc_playlist.h              |    2 --
 modules/gui/qt4/menus.cpp           |    2 +-
 modules/gui/wince/interface.cpp     |    2 +-
 modules/gui/wince/iteminfo.cpp      |    5 -----
 modules/gui/wxwidgets/interface.cpp |    2 +-
 src/playlist/item.c                 |    1 -
 6 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index ce21567..acddcf4 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -170,8 +170,6 @@ struct playlist_t
     } ** pp_sds;
     int                   i_sds;   /**< Number of service discovery modules */
 
-    int                   i_enabled; /**< How many items are enabled ? */
-
     playlist_item_array_t items; /**< Arrays of items */
     playlist_item_array_t all_items; /**< Array of items and nodes */
 
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 0f83f9f..577accf 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -508,7 +508,7 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
             addMIMStaticEntry( p_intf, menu, qtr( "Play" ), "",
                     ":/pixmaps/play_16px.png", SLOT( togglePlayPause() ) );
     }
-    else if( THEPL->items.i_size && THEPL->i_enabled )
+    else if( THEPL->items.i_size )
         addMIMStaticEntry( p_intf, menu, qtr( "Play" ), "",
                 ":/pixmaps/play_16px.png", SLOT( togglePlayPause() ) );
 
diff --git a/modules/gui/wince/interface.cpp b/modules/gui/wince/interface.cpp
index 37cef1f..25f8795 100644
--- a/modules/gui/wince/interface.cpp
+++ b/modules/gui/wince/interface.cpp
@@ -638,7 +638,7 @@ void Interface::OnPlayStream( void )
         vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
     if( p_playlist == NULL ) return;
 
-    if( p_playlist->i_size && p_playlist->i_enabled )
+    if( p_playlist->i_size )
     {
         vlc_value_t state;
 
diff --git a/modules/gui/wince/iteminfo.cpp b/modules/gui/wince/iteminfo.cpp
index 26a056e..bfcd5a9 100644
--- a/modules/gui/wince/iteminfo.cpp
+++ b/modules/gui/wince/iteminfo.cpp
@@ -274,11 +274,6 @@ void ItemInfoDialog::OnOk()
     if( p_playlist != NULL )
     {
         b_state = SendMessage( enabled_checkbox, BM_GETCHECK, 0, 0 );
-        if( b_old_enabled == false && (b_state & BST_CHECKED) )
-            p_playlist->i_enabled ++;
-        else if( b_old_enabled == true && (b_state & BST_UNCHECKED) )
-            p_playlist->i_enabled --;
-
         vlc_object_release( p_playlist );
     }
 
diff --git a/modules/gui/wxwidgets/interface.cpp b/modules/gui/wxwidgets/interface.cpp
index a4bd81a..256cf2a 100644
--- a/modules/gui/wxwidgets/interface.cpp
+++ b/modules/gui/wxwidgets/interface.cpp
@@ -1080,7 +1080,7 @@ void Interface::PlayStream()
                                        FIND_ANYWHERE );
     if( p_playlist == NULL ) return;
 
-    if( !playlist_IsEmpty(p_playlist) && p_playlist->i_enabled )
+    if( !playlist_IsEmpty(p_playlist) )
     {
         vlc_value_t state;
 
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 8899ed5..0abf61b 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -808,7 +808,6 @@ static void AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
 {
     ARRAY_APPEND(p_playlist->items, p_item);
     ARRAY_APPEND(p_playlist->all_items, p_item);
-    p_playlist->i_enabled ++;
 
     if( i_pos == PLAYLIST_END )
         playlist_NodeAppend( p_playlist, p_item, p_node );




More information about the vlc-devel mailing list