Enlightenment CVS committal

Author  : atmosphere
Project : e17
Module  : apps/euphoria

Dir     : e17/apps/euphoria/src


Modified Files:
        callbacks.c callbacks.h interface.c interface.h 


Log Message:
support a PLAYLIST_CLEAR callback
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/callbacks.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- callbacks.c 29 Feb 2004 19:50:23 -0000      1.15
+++ callbacks.c 1 Mar 2004 22:17:36 -0000       1.16
@@ -1,5 +1,5 @@
 /*
- * $Id: callbacks.c,v 1.15 2004/02/29 19:50:23 atmosphere Exp $
+ * $Id: callbacks.c,v 1.16 2004/03/01 22:17:36 atmosphere Exp $
  * vim:noexpandtab:sw=4:sts=4:ts=4
  */
 
@@ -477,11 +477,18 @@
        if (e->playlist->current_item)
                remove_playlist_item(e, e->playlist->current_item);
 }
+
 EDJE_CB(playlist_shuffle) {
     assert(e->xmms);
     xmmsc_playlist_shuffle(e->xmms);
 }
 
+EDJE_CB(playlist_clear) {
+    assert(e->xmms);
+    xmmsc_playback_stop(e->xmms);
+    xmmsc_playlist_clear(e->xmms);
+}
+
 XMMS_CB(playback_status) {
        PlaybackState state;
 
@@ -599,8 +606,9 @@
 
 XMMS_CB(playlist_clear) {
        playlist_remove_all(e->playlist);
-       /* FIXME: Set the text in the player to the default */
+       ui_zero_track_info();
 }
+
 XMMS_CB(playlist_shuffle) {
        int i, id, *ids = NULL;
        PlayListItem *pli = NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/callbacks.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- callbacks.h 29 Feb 2004 14:52:07 -0000      1.5
+++ callbacks.h 1 Mar 2004 22:17:36 -0000       1.6
@@ -2,7 +2,7 @@
 #define __CALLBACKS_H
 
 /*
- * $Id: callbacks.h,v 1.5 2004/02/29 14:52:07 atmosphere Exp $
+ * $Id: callbacks.h,v 1.6 2004/03/01 22:17:36 atmosphere Exp $
  * vim:noexpandtab:sw=4:sts=4:ts=4
  */
 
@@ -58,6 +58,7 @@
 EDJE_CB(playlist_add);
 EDJE_CB(playlist_del);
 EDJE_CB(playlist_shuffle);
+EDJE_CB(playlist_clear);
 
 void cb_key_press(void *data, Evas *e, Evas_Object *obj, void *event_info);
 void cb_key_release(void *data, Evas *e, Evas_Object *obj, void *event_info);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/interface.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- interface.c 29 Feb 2004 14:57:22 -0000      1.7
+++ interface.c 1 Mar 2004 22:17:36 -0000       1.8
@@ -1,5 +1,5 @@
 /*
- * $Id: interface.c,v 1.7 2004/02/29 14:57:22 atmosphere Exp $
+ * $Id: interface.c,v 1.8 2004/03/01 22:17:36 atmosphere Exp $
  * vim:noexpandtab:sw=4:sts=4:ts=4
  */
 
@@ -289,6 +289,8 @@
                 (EdjeCb) on_edje_playlist_add},
                {"PLAYLIST_DEL", "*",
                 (EdjeCb) on_edje_playlist_del},
+               {"PLAYLIST_CLEAR", "*",
+                (EdjeCb) on_edje_playlist_clear},
                {"PLAYLIST_SHUFFLE", "*", 
                 (EdjeCb)on_edje_playlist_shuffle}};
 
@@ -368,3 +370,11 @@
        return true;
 }
 
+void ui_zero_track_info(Euphoria *e) {
+       edje_object_part_text_set(e->gui.edje, "song_name", "");
+       edje_object_part_text_set(e->gui.edje, "artist_name", "");
+       edje_object_part_text_set(e->gui.edje, "album_name", "");
+       edje_object_part_text_set(e->gui.edje, "track_samplerate", "44.1");
+       edje_object_part_text_set(e->gui.edje, "track_bitrate", "192");
+       edje_object_part_text_set(e->gui.edje, "time_text", "0:00");
+}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/interface.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- interface.h 27 Feb 2004 21:55:33 -0000      1.2
+++ interface.h 1 Mar 2004 22:17:36 -0000       1.3
@@ -2,7 +2,7 @@
 #define __INTERFACE_H
 
 /*
- * $Id: interface.h,v 1.2 2004/02/27 21:55:33 tsauerbeck Exp $
+ * $Id: interface.h,v 1.3 2004/03/01 22:17:36 atmosphere Exp $
  * vim:noexpandtab:sw=4:sts=4:ts=4
  */
 
@@ -14,6 +14,7 @@
 void ui_shutdown_edje(Euphoria *e);
 void ui_shutdown(Euphoria *e);
 
+void ui_zero_track_info(Euphoria *e);
 void ui_fill_track_info(Euphoria *e, PlayListItem *pli);
 void ui_fill_playlist(Euphoria *e);
 




-------------------------------------------------------
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

Reply via email to