Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : apps/euphoria
Dir : e17/apps/euphoria/src
Modified Files:
euphoria.c interface.c
Log Message:
Add files specified on the command line to the playlist. Remove the idler that
was only called at the beginning of the main loop.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/euphoria.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- euphoria.c 25 Feb 2004 06:06:52 -0000 1.2
+++ euphoria.c 27 Feb 2004 18:26:46 -0000 1.3
@@ -1,5 +1,5 @@
/*
- * $Id: euphoria.c,v 1.2 2004/02/25 06:06:52 atmosphere Exp $
+ * $Id: euphoria.c,v 1.3 2004/02/27 18:26:46 rbdpngn Exp $
*/
#include <config.h>
@@ -133,31 +133,6 @@
return e;
}
-/**
- * Add files/directories/m3u's to the playlist
- *
- * @param e
- */
-static int load_playlist(void *data) {
- Euphoria *e = data;
-#if 0
- int i;
-#endif
-
- e->playlist = playlist_new(e->gui.evas, e->cfg.theme, e->xmms);
- assert(e->playlist);
-
-#if 0
- for (i = e->opt_start; e->args[i]; i++)
- playlist_load_any(e->playlist, e->args[i], i > 1);
-#endif
-
- ui_refresh_time(e, 0);
- ui_refresh_seeker(e, 0);
-
- return 0; /* stop idler */
-}
-
static void handle_args(Euphoria *e, int argc, const char **argv) {
int o;
struct option opts[] = {{"help", no_argument, 0, 'h'},
@@ -193,6 +168,17 @@
}
}
+ for (o = optind; o < argc; o++) {
+ char buf[PATH_MAX];
+
+ if (*argv[o] == '/')
+ snprintf(buf, PATH_MAX, "file://%s", (char *)argv[o]);
+ else
+ snprintf(buf, PATH_MAX, "file://%s/%s", getenv("PWD"),
+ (char *)argv[o]);
+ xmmsc_playlist_add(e->xmms, buf);
+ }
+
e->args = argv;
e->opt_start = optind;
}
@@ -213,11 +199,8 @@
return 1;
}
- /* the playlist is loaded in an Ecore_Idler, so the GUI
- * will be drawn first
- */
- ecore_idler_add(load_playlist, e);
-
+ ui_refresh_time(e, 0);
+ ui_refresh_seeker(e, 0);
ui_refresh_volume(e);
ecore_timer_add(1.5, ui_refresh_volume, e);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/src/interface.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- interface.c 22 Feb 2004 10:12:11 -0000 1.1
+++ interface.c 27 Feb 2004 18:26:47 -0000 1.2
@@ -1,5 +1,5 @@
/*
- * $Id: interface.c,v 1.1 2004/02/22 10:12:11 tsauerbeck Exp $
+ * $Id: interface.c,v 1.2 2004/02/27 18:26:47 rbdpngn Exp $
*/
#include <config.h>
@@ -144,7 +144,13 @@
if (!ui_init_dragger(e))
return false;
- return ui_init_edje(e, PACKAGE);
+ if (!ui_init_edje(e, PACKAGE))
+ return false;
+
+ e->playlist = playlist_new(e->gui.evas, e->cfg.theme, e->xmms);
+ assert(e->playlist);
+
+ return true;
}
void ui_shutdown_edje(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