From e953a2e4ea1043139683659c4b3be69a3513c17d Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 25 Dec 2012 15:14:36 +0000 Subject: [PATCH] and handle loop.. or not looping.. i there is a queue. :) SVN revision: 81688 --- src/bin/main.c | 58 ++++++++++++++++++++++++++++++++++++++++--------- src/bin/media.c | 1 + 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/src/bin/main.c b/src/bin/main.c index 3970d66e..718a7003 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -139,7 +139,10 @@ static void _cb_media_loop(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *info __UNUSED__) { if (_popmedia_queue) - edje_object_signal_emit(bg, "popmedia,off", "terminology"); + { + if (popmedia) media_play_set(popmedia, EINA_FALSE); + edje_object_signal_emit(bg, "popmedia,off", "terminology"); + } } static void @@ -226,27 +229,62 @@ _cb_command(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event) { if (cmd[1] == 't') // temporary { + Config *config = termio_config_get(term); + + if (config) + { + config->temporary = EINA_TRUE; + eina_stringshare_replace(&(config->background), cmd + 2); + main_media_update(config); + } } else if (cmd[1] == 'p') // permanent { + Config *config = termio_config_get(term); + + if (config) + { + config->temporary = EINA_FALSE; + eina_stringshare_replace(&(config->background), cmd + 2); + main_media_update(config); + } } } else if (cmd[0] == 'a') // set alpha { if (cmd[1] == 't') // temporary { + Config *config = termio_config_get(term); + + if (config) + { + config->temporary = EINA_TRUE; + if ((cmd[2] == '1') || + (!strcasecmp(cmd + 2, "on")) || + (!strcasecmp(cmd + 2, "true")) || + (!strcasecmp(cmd + 2, "yes"))) + config->translucent = EINA_FALSE; + else + config->translucent = EINA_FALSE; + main_trans_update(config); + } } else if (cmd[1] == 'p') // permanent { - } - } - else if (cmd[0] == 'a') // set alpha - { - if (cmd[1] == 't') // temporary - { - } - else if (cmd[1] == 'p') // permanent - { + Config *config = termio_config_get(term); + + if (config) + { + config->temporary = EINA_FALSE; + if ((cmd[2] == '1') || + (!strcasecmp(cmd + 2, "on")) || + (!strcasecmp(cmd + 2, "true")) || + (!strcasecmp(cmd + 2, "yes"))) + config->translucent = EINA_FALSE; + else + config->translucent = EINA_FALSE; + main_trans_update(config); + } } } } diff --git a/src/bin/media.c b/src/bin/media.c index 98993c8b..3a400591 100644 --- a/src/bin/media.c +++ b/src/bin/media.c @@ -68,6 +68,7 @@ static const char *extn_mov[] = ".ogg", ".ogm", ".ogv", ".qt", ".rm", ".rmj", ".rmm", ".rms", ".rmvb", ".rmx", ".rv", ".swf", ".ts", ".weba", ".webm", ".wmv", ".3g2", ".3gp", ".3gp2", ".3gpp", ".3gpp2", ".3p2", ".264", + ".mp3", ".aac", ".wav", NULL };