[rhythmbox] [ipod] more rework of playlist delayed actions



commit 61ec12a9b05d6c25527a58fac21a557d90974b3a
Author: Christophe Fergeau <teuf gnome org>
Date:   Fri Oct 1 23:24:10 2010 +0200

    [ipod] more rework of playlist delayed actions
    
    Make the 2nd field of the RbDelayedPlaylistOp a void * pointer
    instead of using a pointer to an Itdb_Track since when we want
    to delay a playlist renaming action, this field will have to
    store a char *.

 plugins/ipod/rb-ipod-db.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/plugins/ipod/rb-ipod-db.c b/plugins/ipod/rb-ipod-db.c
index a454164..029716b 100644
--- a/plugins/ipod/rb-ipod-db.c
+++ b/plugins/ipod/rb-ipod-db.c
@@ -233,7 +233,7 @@ typedef struct _RbIpodDelayedSetThumbnail RbIpodDelayedSetThumbnail;
 
 struct _RbIpodDelayedPlaylistOp {
 	Itdb_Playlist *playlist;
-	Itdb_Track *track;
+	void *data;
 };
 typedef struct _RbIpodDelayedPlaylistOp RbIpodDelayedPlaylistOp;
 
@@ -590,13 +590,13 @@ rb_ipod_db_process_delayed_actions (RbIpodDb *ipod_db)
 			rb_debug ("IPOD_ACTION_ADD_TO_PLAYLIST");
 			rb_ipod_db_add_to_playlist_internal (ipod_db, 
 							     action->playlist_op.playlist,
-							     action->playlist_op.track);
+							     (Itdb_Track *)action->playlist_op.data);
 			break;
 		case RB_IPOD_ACTION_REMOVE_FROM_PLAYLIST:
 			rb_debug ("IPOD_ACTION_REMOVE_FROM_PLAYLIST");
 			rb_ipod_db_remove_from_playlist_internal (ipod_db, 
 								  action->playlist_op.playlist,
-								  action->playlist_op.track);
+								  (Itdb_Track *)action->playlist_op.data);
 			break;
 		}
 		rb_ipod_free_delayed_action (action);
@@ -708,7 +708,7 @@ rb_ipod_db_queue_add_to_playlist (RbIpodDb *ipod_db,
 	action = g_new0 (RbIpodDelayedAction, 1);
 	action->type = RB_IPOD_ACTION_ADD_TO_PLAYLIST;
 	action->playlist_op.playlist = playlist;
-	action->playlist_op.track = track;
+	action->playlist_op.data = track;
 	g_queue_push_tail (priv->delayed_actions, action);
 }
 
@@ -725,7 +725,7 @@ rb_ipod_db_queue_remove_from_playlist (RbIpodDb *ipod_db,
 	action = g_new0 (RbIpodDelayedAction, 1);
 	action->type = RB_IPOD_ACTION_REMOVE_FROM_PLAYLIST;
 	action->playlist_op.playlist = playlist;
-	action->playlist_op.track = track;
+	action->playlist_op.data = track;
 	g_queue_push_tail (priv->delayed_actions, action);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]