huchi pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=7efef95b14689e4323830c129abcc9a85f066a3e

commit 7efef95b14689e4323830c129abcc9a85f066a3e
Author: Wonguk Jeong <wonguk.je...@samsung.com>
Date:   Tue Jul 29 04:00:51 2014 +0200

    termio: audio mute for activate media block support
    
    activate media block was not affected by audio muted setting.
    
    testplan:
    1. tycat media file
    2. option->video->Audio muted
    3. check whether the media block is muted/unmuted properly
---
 src/bin/main.c   |  1 +
 src/bin/termio.c | 15 +++++++++++++++
 src/bin/termio.h |  1 +
 3 files changed, 17 insertions(+)

diff --git a/src/bin/main.c b/src/bin/main.c
index ac5effb..28fb230 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -1894,6 +1894,7 @@ main_media_mute_update(const Config *config)
           {
              if (term->config != config) continue;
              if (term->media) media_mute_set(term->media, config->mute);
+             termio_media_mute_set(term->term, config->mute);
           }
      }
 }
diff --git a/src/bin/termio.c b/src/bin/termio.c
index ef6c246..6177c73 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -4997,6 +4997,21 @@ termio_debugwhite_set(Evas_Object *obj, Eina_Bool dbg)
    _smart_apply(obj);
 }
 
+void
+termio_media_mute_set(Evas_Object *obj, Eina_Bool mute)
+{
+   Termio *sd = evas_object_smart_data_get(obj);
+   Eina_List *l;
+   Termblock *blk;
+
+   EINA_SAFETY_ON_NULL_RETURN(sd);
+   EINA_LIST_FOREACH(sd->pty->block.active, l, blk)
+     {
+        if (blk->obj && !blk->edje)
+          media_mute_set(blk->obj, mute);
+     }
+}
+
 Eina_Bool
 termio_selection_exists(const Evas_Object *obj)
 {
diff --git a/src/bin/termio.h b/src/bin/termio.h
index 2d2f2c1..61d25b7 100644
--- a/src/bin/termio.h
+++ b/src/bin/termio.h
@@ -37,6 +37,7 @@ Evas_Object *termio_mirror_add(Evas_Object *obj);
 const char  *termio_title_get(Evas_Object *obj);
 const char  *termio_icon_name_get(Evas_Object *obj);
 void         termio_debugwhite_set(Evas_Object *obj, Eina_Bool dbg);
+void         termio_media_mute_set(Evas_Object *obj, Eina_Bool mute);
 void         termio_config_set(Evas_Object *obj, Config *config);
 Config      *termio_config_get(const Evas_Object *obj);
 

-- 


Reply via email to