Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : apps/euphoria
Dir : e17/apps/euphoria/src
Modified Files:
callbacks.c
Log Message:
playlist_list() doesn't need to call playlist_remove_all(), since it's only called
once (on startup)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/callbacks.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- callbacks.c 27 Feb 2004 21:55:31 -0000 1.5
+++ callbacks.c 27 Feb 2004 22:18:19 -0000 1.6
@@ -1,5 +1,5 @@
/*
- * $Id: callbacks.c,v 1.5 2004/02/27 21:55:31 tsauerbeck Exp $
+ * $Id: callbacks.c,v 1.6 2004/02/27 22:18:19 tsauerbeck Exp $
* vim:noexpandtab:sw=4:sts=4:ts=4
*/
@@ -560,10 +560,6 @@
XMMS_CB(playlist_list) {
int i, *id = arg;
- /*
- playlist_remove_all(e->playlist);
- */
-
if (!id)
return;
@@ -581,16 +577,20 @@
XMMS_CB(playlist_remove) {
PlayListItem *pli = NULL;
unsigned int id = (unsigned int) arg;
-
- if (id > 0) {
- if (xmmscs_playback_current_id(e->xmms) == id) {
+
+ /* make sure we got a valid id. if this assertion fails,
+ * blame XMMS2!
+ */
+ assert (id > 0);
+
+ if (xmmscs_playback_current_id(e->xmms) == id) {
xmmsc_playback_stop(e->xmms);
e->playlist->current_item = NULL;
- }
- pli = playlist_item_find_by_id(e->playlist, id);
- assert(pli);
- playlist_item_remove(e->playlist, pli);
}
+
+ pli = playlist_item_find_by_id(e->playlist, id);
+ assert(pli);
+ playlist_item_remove(e->playlist, pli);
}
XMMS_CB(playlist_clear) {
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs