Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : apps/euphoria
Dir : e17/apps/euphoria/src
Modified Files:
callbacks.c playlist_item.c playlist_item.h
Log Message:
fixed playlist item property handling. the properties hash is freed when the
xmmsc_result_t is freed, so don't unref it in the handler
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/callbacks.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- callbacks.c 25 Mar 2004 20:39:29 -0000 1.23
+++ callbacks.c 28 Mar 2004 15:59:53 -0000 1.24
@@ -1,5 +1,5 @@
/*
- * $Id: callbacks.c,v 1.23 2004/03/25 20:39:29 tsauerbeck Exp $
+ * $Id: callbacks.c,v 1.24 2004/03/28 15:59:53 tsauerbeck Exp $
* vim:noexpandtab:sw=4:sts=4:ts=4
*/
@@ -599,7 +599,7 @@
return;
}
- playlist_item_properties_set(pli, hash);
+ playlist_item_properties_set(pli, res);
/* we need to call this here, too, since the Edje might have been
* created after the playback_currentid callback has been called
@@ -608,8 +608,6 @@
hilight_current_track(e);
ui_fill_track_info(e, pli);
}
-
- xmmsc_result_unref(res);
}
XMMS_CB(playlist_entry_changed) {
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/playlist_item.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- playlist_item.c 25 Mar 2004 20:39:30 -0000 1.10
+++ playlist_item.c 28 Mar 2004 15:59:53 -0000 1.11
@@ -1,5 +1,5 @@
/*
- * $Id: playlist_item.c,v 1.10 2004/03/25 20:39:30 tsauerbeck Exp $
+ * $Id: playlist_item.c,v 1.11 2004/03/28 15:59:53 tsauerbeck Exp $
* vim:noexpandtab:sw=4:sts=4:ts=4
*/
@@ -110,8 +110,10 @@
void playlist_item_free(PlayListItem *pli) {
assert(pli);
- if (pli->properties)
- xmmsc_playlist_entry_free(pli->properties);
+ if (pli->props_res) {
+ xmmsc_result_unref(pli->props_res);
+ pli->props_res = NULL;
+ }
if (pli->container && pli->edje)
e_container_element_destroy(pli->container, pli->edje);
@@ -146,17 +148,24 @@
playlist_item_title_get(pli));
}
-void playlist_item_properties_set(PlayListItem *pli, x_hash_t *p) {
+void playlist_item_properties_set(PlayListItem *pli, xmmsc_result_t *r) {
+ x_hash_t *hash = NULL;
+
assert(pli);
- assert(p);
+ assert(r);
+
+ xmmsc_result_get_mediainfo(r, &hash);
- if (pli->properties == p)
+ if (pli->properties == hash)
return;
- if (pli->properties)
- xmmsc_playlist_entry_free(pli->properties);
+ if (pli->props_res) {
+ xmmsc_result_unref(pli->props_res);
+ pli->props_res = NULL;
+ }
- pli->properties = p;
+ pli->properties = hash;
+ pli->props_res = r;
if (pli->edje)
set_parts_text(pli);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/playlist_item.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- playlist_item.h 25 Mar 2004 20:39:30 -0000 1.4
+++ playlist_item.h 28 Mar 2004 15:59:53 -0000 1.5
@@ -2,7 +2,7 @@
#define __PLAYLIST_ITEM_H
/*
- * $Id: playlist_item.h,v 1.4 2004/03/25 20:39:30 tsauerbeck Exp $
+ * $Id: playlist_item.h,v 1.5 2004/03/28 15:59:53 tsauerbeck Exp $
* vim:noexpandtab:sw=4:sts=4:ts=4
*/
@@ -17,6 +17,7 @@
unsigned int id;
x_hash_t *properties;
+ xmmsc_result_t *props_res;
} PlayListItem;
PlayListItem *playlist_item_new(unsigned int id, Evas *evas,
@@ -27,7 +28,7 @@
bool playlist_item_show(PlayListItem *pli);
void playlist_item_container_set(PlayListItem *pli,
Evas_Object *container);
-void playlist_item_properties_set(PlayListItem *pli, x_hash_t *p);
+void playlist_item_properties_set(PlayListItem *pli, xmmsc_result_t *r);
const char *playlist_item_artist_get(PlayListItem *pli);
const char *playlist_item_title_get(PlayListItem *pli);
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs