Enlightenment CVS committal

Author  : tsauerbeck
Project : misc
Module  : eplayer

Dir     : misc/eplayer/src


Modified Files:
        callbacks.c 


Log Message:
the playlist marker now always follows the track that's being played
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/callbacks.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- callbacks.c 1 Feb 2004 17:34:47 -0000       1.40
+++ callbacks.c 1 Feb 2004 18:34:15 -0000       1.41
@@ -1,5 +1,5 @@
 /*
- * $Id: callbacks.c,v 1.40 2004/02/01 17:34:47 tsauerbeck Exp $
+ * $Id: callbacks.c,v 1.41 2004/02/01 18:34:15 tsauerbeck Exp $
  */
 
 #include <config.h>
@@ -30,11 +30,6 @@
 
 /**
  * Starts/resumes playback.
- *
- * @param player
- * @param e
- * @param o
- * @param event
  */
 EDJE_CB(play) {
        int res;
@@ -61,11 +56,6 @@
 
 /**
  * Stops playback.
- *
- * @param player
- * @param e
- * @param o
- * @param event
  */
 EDJE_CB(stop) {
        debug(DEBUG_LEVEL_INFO, "Stop callback entered\n");
@@ -77,11 +67,6 @@
 
 /**
  * Pauses/resumes playback.
- *
- * @param player
- * @param e
- * @param o
- * @param event
  */
 EDJE_CB(pause) {
        debug(DEBUG_LEVEL_INFO, "Pause callback entered\n");
@@ -105,17 +90,26 @@
 }
 
 /**
+ * Hilight the current playlist item.
+ * This automatically un-highlights all other items
+ * (see EDJE_CB(playlist_item_selected).
+ */
+static void hilight_current_track(ePlayer *player) {
+       PlayListItem *pli;
+       
+       if (!(pli = playlist_current_item_get(player->playlist)))
+               return;
+
+       edje_object_signal_emit(pli->edje, "PLAYLIST_ITEM_SELECTED", "");
+}
+
+/**
  * Moves to the next track and plays it, except when we're going
  * back to the beginning of the playlist.
- *
- * @param player
- * @param e
- * @param o
- * @param event
  */
 EDJE_CB(track_next) {
-       int play = 1;
-       
+       bool play = true;
+
        debug(DEBUG_LEVEL_INFO, "Next File Called\n");
 
        eplayer_playback_stop(player);
@@ -132,16 +126,13 @@
                track_open(player);
                state = PLAYBACK_STATE_STOPPED;
        }
+
+       hilight_current_track(player);
 }
 
 /**
  * Moves to the previous track and plays it, except when we're
  * at the first track already.
- *
- * @param player
- * @param e
- * @param o
- * @param event
  */
 EDJE_CB(track_prev) {
        debug(DEBUG_LEVEL_INFO, "Previous File Called\n");
@@ -157,6 +148,8 @@
 
        if (eplayer_playback_start(player, true))
                state = PLAYBACK_STATE_PLAYING;
+       
+       hilight_current_track(player);
 }
 
 EDJE_CB(volume_raise) {




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to