Enlightenment CVS committal
Author : technikolor
Project : misc
Module : eplayer
Dir : misc/eplayer/src
Modified Files:
interface.c playlist_item.c
Log Message:
In the event that there is no comments in the input file, use the file name itself
instead.
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/interface.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- interface.c 6 Feb 2004 11:29:58 -0000 1.50
+++ interface.c 6 Feb 2004 11:39:58 -0000 1.51
@@ -1,5 +1,5 @@
/*
- * $Id: interface.c,v 1.50 2004/02/06 11:29:58 technikolor Exp $
+ * $Id: interface.c,v 1.51 2004/02/06 11:39:58 technikolor Exp $
*/
#include <config.h>
@@ -184,8 +184,16 @@
track_update_time(player);
- edje_object_part_text_set(player->gui.edje, "song_name",
- pli->comment[COMMENT_ID_TITLE]);
+ /* If there is no Title Name, use the file name */
+ /* The other fields can stay blank. */
+ if(strcmp(pli->comment[COMMENT_ID_TITLE], "")) {
+ edje_object_part_text_set(player->gui.edje, "song_name",
+ pli->comment[COMMENT_ID_TITLE]);
+ } else {
+ edje_object_part_text_set(player->gui.edje, "song_name",
+ pli->file);
+ }
+
edje_object_part_text_set(player->gui.edje, "artist_name",
pli->comment[COMMENT_ID_ARTIST]);
edje_object_part_text_set(player->gui.edje, "album_name",
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/playlist_item.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- playlist_item.c 3 Feb 2004 22:01:57 -0000 1.5
+++ playlist_item.c 6 Feb 2004 11:39:58 -0000 1.6
@@ -1,5 +1,5 @@
/*
- * $Id: playlist_item.c,v 1.5 2004/02/03 22:01:57 tsauerbeck Exp $
+ * $Id: playlist_item.c,v 1.6 2004/02/06 11:39:58 technikolor Exp $
*/
#include <config.h>
@@ -91,8 +91,15 @@
snprintf(len, sizeof(len), "%i:%02i", pli->duration / 60,
pli->duration % 60);
edje_object_part_text_set(pli->edje, "length", len);
- edje_object_part_text_set(pli->edje, "title",
- pli->comment[COMMENT_ID_TITLE]);
+
+ /* If there is no title, use the file name */
+ if( strcmp( pli->comment[COMMENT_ID_TITLE], "" )) {
+ edje_object_part_text_set(pli->edje, "title",
+ pli->comment[COMMENT_ID_TITLE]);
+ } else {
+ edje_object_part_text_set(pli->edje, "title",
+ pli->file);
+ }
/* set parts dimensions */
edje_object_size_min_get(pli->edje, &w, &h);
-------------------------------------------------------
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