Renamed playlist "item-append/deleted" to "playlist-item-append/deleted".
authorLaurent Aimar <fenrir@videolan.org>
Mon, 16 Feb 2009 21:30:58 +0000 (22:30 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 16 Feb 2009 21:30:58 +0000 (22:30 +0100)
I hope they will reduce the risk of error until the playlist API is rewritten.

include/vlc_playlist.h
modules/control/dbus.c
modules/gui/beos/InterfaceWindow.cpp
modules/gui/macosx/intf.m
modules/gui/ncurses.c
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/skins2/src/vlcproc.cpp
src/playlist/engine.c
src/playlist/item.c
src/playlist/tree.c

index dd56d01..ea02b7a 100644 (file)
@@ -122,8 +122,8 @@ TYPEDEF_ARRAY(playlist_item_t*, playlist_item_array_t);
  * * - "item-current": It will contains a input_item_t->i_id of the current
  * item being played.
  *
- * - "item-append": It will contains a pointer to a playlist_add_t.
- * - "item-deleted": It will contains the playlist_item_t->i_id of a deleted
+ * - "playlist-item-append": It will contains a pointer to a playlist_add_t.
+ * - "playlist-item-deleted": It will contains the playlist_item_t->i_id of a deleted
  * playlist_item_t.
  *
  * XXX Be really carefull, playlist_item_t->i_id and input_item_t->i_id are not
index 5897acf..8f47d77 100644 (file)
@@ -759,8 +759,8 @@ static int Open( vlc_object_t *p_this )
     PL_LOCK;
     var_AddCallback( p_playlist, "item-current", TrackChange, p_intf );
     var_AddCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf );
-    var_AddCallback( p_playlist, "item-append", TrackListChangeEmit, p_intf );
-    var_AddCallback( p_playlist, "item-deleted", TrackListChangeEmit, p_intf );
+    var_AddCallback( p_playlist, "playlist-item-append", TrackListChangeEmit, p_intf );
+    var_AddCallback( p_playlist, "playlist-item-deleted", TrackListChangeEmit, p_intf );
     var_AddCallback( p_playlist, "random", StatusChangeEmit, p_intf );
     var_AddCallback( p_playlist, "repeat", StatusChangeEmit, p_intf );
     var_AddCallback( p_playlist, "loop", StatusChangeEmit, p_intf );
@@ -788,8 +788,8 @@ static void Close   ( vlc_object_t *p_this )
 
     var_DelCallback( p_playlist, "item-current", TrackChange, p_intf );
     var_DelCallback( p_playlist, "intf-change", TrackListChangeEmit, p_intf );
-    var_DelCallback( p_playlist, "item-append", TrackListChangeEmit, p_intf );
-    var_DelCallback( p_playlist, "item-deleted", TrackListChangeEmit, p_intf );
+    var_DelCallback( p_playlist, "playlist-item-append", TrackListChangeEmit, p_intf );
+    var_DelCallback( p_playlist, "playlist-item-deleted", TrackListChangeEmit, p_intf );
     var_DelCallback( p_playlist, "random", StatusChangeEmit, p_intf );
     var_DelCallback( p_playlist, "repeat", StatusChangeEmit, p_intf );
     var_DelCallback( p_playlist, "loop", StatusChangeEmit, p_intf );
@@ -861,7 +861,7 @@ static int TrackListChangeEmit( vlc_object_t *p_this, const char *psz_var,
     VLC_UNUSED(oldval);
     intf_thread_t *p_intf = p_data;
 
-    if( !strcmp( psz_var, "item-append" ) )
+    if( !strcmp( psz_var, "playlist-item-append" ) )
     {
         /* don't signal when items are added/removed in p_category */
         playlist_t *p_playlist = (playlist_t*)p_this;
index cddbc54..12220de 100644 (file)
@@ -207,8 +207,8 @@ InterfaceWindow::InterfaceWindow( intf_thread_t * _p_intf, BRect frame,
 
     var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this );
     var_AddCallback( p_playlist, "item-change", PlaylistChanged, this );
-    var_AddCallback( p_playlist, "item-append", PlaylistChanged, this );
-    var_AddCallback( p_playlist, "item-deleted", PlaylistChanged, this );
+    var_AddCallback( p_playlist, "playlist-item-append", PlaylistChanged, this );
+    var_AddCallback( p_playlist, "playlist-item-deleted", PlaylistChanged, this );
     var_AddCallback( p_playlist, "item-current", PlaylistChanged, this );
 
     char psz_tmp[1024];
index 0df3b5a..2ac52a1 100644 (file)
@@ -1413,8 +1413,8 @@ static void * manage_cleanup( void * args )
     var_AddCallback( p_playlist, "item-current", PlaylistChanged, self );
     var_AddCallback( p_playlist, "intf-change", PlaylistChanged, self );
     var_AddCallback( p_playlist, "item-change", PlaylistChanged, self );
-    var_AddCallback( p_playlist, "item-append", PlaylistChanged, self );
-    var_AddCallback( p_playlist, "item-deleted", PlaylistChanged, self );
+    var_AddCallback( p_playlist, "playlist-item-append", PlaylistChanged, self );
+    var_AddCallback( p_playlist, "playlist-item-deleted", PlaylistChanged, self );
 
     pl_Release( p_intf );
 
@@ -1436,8 +1436,8 @@ static void * manage_cleanup( void * args )
     var_AddCallback( p_playlist, "item-current", PlaylistChanged, self );
     var_AddCallback( p_playlist, "intf-change", PlaylistChanged, self );
     var_AddCallback( p_playlist, "item-change", PlaylistChanged, self );
-    var_AddCallback( p_playlist, "item-append", PlaylistChanged, self );
-    var_AddCallback( p_playlist, "item-deleted", PlaylistChanged, self );
+    var_AddCallback( p_playlist, "playlist-item-append", PlaylistChanged, self );
+    var_AddCallback( p_playlist, "playlist-item-deleted", PlaylistChanged, self );
 
     struct manage_cleanup_stack stack = { p_intf, &p_input, p_playlist, self };
     pthread_cleanup_push(manage_cleanup, &stack);
index 569eac8..382fe51 100644 (file)
@@ -385,7 +385,7 @@ static void Run( intf_thread_t *p_intf )
      */
     PlaylistRebuild( p_intf );
     var_AddCallback( p_playlist, "intf-change", PlaylistChanged, p_intf );
-    var_AddCallback( p_playlist, "item-append", PlaylistChanged, p_intf );
+    var_AddCallback( p_playlist, "playlist-item-append", PlaylistChanged, p_intf );
     var_AddCallback( p_playlist, "item-change", PlaylistChanged, p_intf );
 
     while( vlc_object_alive( p_intf ) )
@@ -438,7 +438,7 @@ static void Run( intf_thread_t *p_intf )
         }
     }
     var_DelCallback( p_playlist, "intf-change", PlaylistChanged, p_intf );
-    var_DelCallback( p_playlist, "item-append", PlaylistChanged, p_intf );
+    var_DelCallback( p_playlist, "playlist-item-append", PlaylistChanged, p_intf );
     var_DelCallback( p_playlist, "item-change", PlaylistChanged, p_intf );
     vlc_restorecancel( canc );
 }
index bbdb77a..285d17e 100644 (file)
@@ -224,8 +224,8 @@ void PLModel::addCallbacks()
     var_AddCallback( p_playlist, "item-current", PlaylistNext, this );
     /* One item has been updated */
     var_AddCallback( p_playlist, "item-change", ItemChanged, this );
-    var_AddCallback( p_playlist, "item-append", ItemAppended, this );
-    var_AddCallback( p_playlist, "item-deleted", ItemDeleted, this );
+    var_AddCallback( p_playlist, "playlist-item-append", ItemAppended, this );
+    var_AddCallback( p_playlist, "playlist-item-deleted", ItemDeleted, this );
 }
 
 void PLModel::delCallbacks()
@@ -233,8 +233,8 @@ void PLModel::delCallbacks()
     var_DelCallback( p_playlist, "item-change", ItemChanged, this );
     var_DelCallback( p_playlist, "item-current", PlaylistNext, this );
     var_DelCallback( p_playlist, "intf-change", PlaylistChanged, this );
-    var_DelCallback( p_playlist, "item-append", ItemAppended, this );
-    var_DelCallback( p_playlist, "item-deleted", ItemDeleted, this );
+    var_DelCallback( p_playlist, "playlist-item-append", ItemAppended, this );
+    var_DelCallback( p_playlist, "playlist-item-deleted", ItemDeleted, this );
 }
 
 void PLModel::activateItem( const QModelIndex &index )
index e551022..a124845 100644 (file)
@@ -143,11 +143,11 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
     var_AddCallback( pIntf->p_sys->p_playlist, "intf-change",
                      onIntfChange, this );
     // Called when a playlist item is added
-    var_AddCallback( pIntf->p_sys->p_playlist, "item-append",
+    var_AddCallback( pIntf->p_sys->p_playlist, "playlist-item-append",
                      onItemAppend, this );
     // Called when a playlist item is deleted
     // TODO: properly handle item-deleted
-    var_AddCallback( pIntf->p_sys->p_playlist, "item-deleted",
+    var_AddCallback( pIntf->p_sys->p_playlist, "playlist-item-deleted",
                      onItemDelete, this );
     // Called when the "interface shower" wants us to show the skin
     var_AddCallback( pIntf->p_libvlc, "intf-show",
@@ -183,9 +183,9 @@ VlcProc::~VlcProc()
 
     var_DelCallback( getIntf()->p_sys->p_playlist, "intf-change",
                      onIntfChange, this );
-    var_DelCallback( getIntf()->p_sys->p_playlist, "item-append",
+    var_DelCallback( getIntf()->p_sys->p_playlist, "playlist-item-append",
                      onItemAppend, this );
-    var_DelCallback( getIntf()->p_sys->p_playlist, "item-deleted",
+    var_DelCallback( getIntf()->p_sys->p_playlist, "playlist-item-deleted",
                      onItemDelete, this );
     var_DelCallback( getIntf()->p_libvlc, "intf-show",
                      onIntfShow, this );
index cf4d3f0..c25b43f 100644 (file)
@@ -273,10 +273,10 @@ static void VariablesInit( playlist_t *p_playlist )
     var_Create( p_playlist, "item-change", VLC_VAR_INTEGER );
     var_SetInteger( p_playlist, "item-change", -1 );
 
-    var_Create( p_playlist, "item-deleted", VLC_VAR_INTEGER );
-    var_SetInteger( p_playlist, "item-deleted", -1 );
+    var_Create( p_playlist, "playlist-item-deleted", VLC_VAR_INTEGER );
+    var_SetInteger( p_playlist, "playlist-item-deleted", -1 );
 
-    var_Create( p_playlist, "item-append", VLC_VAR_ADDRESS );
+    var_Create( p_playlist, "playlist-item-append", VLC_VAR_ADDRESS );
 
     var_Create( p_playlist, "item-current", VLC_VAR_INTEGER );
     var_SetInteger( p_playlist, "item-current", -1 );
index 383771a..6cee468 100644 (file)
@@ -789,7 +789,7 @@ void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
     if( b_signal )
         vlc_cond_signal( &pl_priv(p_playlist)->signal );
 
-    var_Set( p_playlist, "item-append", val );
+    var_Set( p_playlist, "playlist-item-append", val );
     free( p_add );
 }
 
@@ -888,7 +888,7 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
         return playlist_NodeDelete( p_playlist, p_item, true, false );
     }
     pl_priv(p_playlist)->b_reset_currently_playing = true;
-    var_SetInteger( p_playlist, "item-deleted", i_id );
+    var_SetInteger( p_playlist, "playlist-item-deleted", i_id );
 
     /* Remove the item from the bank */
     ARRAY_BSEARCH( p_playlist->all_items,->i_id, int, i_id, i );
index 3e12300..1eab637 100644 (file)
@@ -164,7 +164,7 @@ int playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
     else
     {
         int i;
-        var_SetInteger( p_playlist, "item-deleted", p_root->i_id );
+        var_SetInteger( p_playlist, "playlist-item-deleted", p_root->i_id );
         ARRAY_BSEARCH( p_playlist->all_items, ->i_id, int,
                        p_root->i_id, i );
         if( i != -1 )