discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=05260fccace48dedd3ae6903088237fb78cd84e0

commit 05260fccace48dedd3ae6903088237fb78cd84e0
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Jan 6 13:05:07 2015 -0500

    add timers for left+right event areas to toggle overlays
    
    edje bitches about an embryo stack underflow from this even though it's 
harmless, so edje logging gets turned off
---
 data/themes/empc.edc | 19 +++++++++++++++++++
 src/bin/empc.c       |  1 +
 2 files changed, 20 insertions(+)

diff --git a/data/themes/empc.edc b/data/themes/empc.edc
index 20bc025..4932d6b 100644
--- a/data/themes/empc.edc
+++ b/data/themes/empc.edc
@@ -20,6 +20,7 @@
 
 #define HIDE_TIMEOUT 3.0
 #define LEFT_CLICK_ACTION_TIMEOUT 0.2
+#define LOCK_TIMEOUT 3.0
 #define PLAYING_FILTER \
                   filter: "fat = buffer(\"alpha\") \
                            padding_set (20) \
@@ -43,6 +44,7 @@ collections {
          public timer_filesystem;
          public timer_controls;
          public timer_playlist;
+         public timer_lock;
          public bg_chooser;
          public lyrics_visible;
          public filesystem_visible;
@@ -90,6 +92,10 @@ collections {
             emit("empc,play,"LEFT_CLICK_ACTION, "empc");
             set_int(timer_left_click_action, 0);
          }
+         public lock_toggle() {
+            set_int(timer_lock, 0);
+            run_program(get_program_id("playlist_overlay_signal"));
+         }
       }
       parts {
          rect { "base"; nomouse;
@@ -818,6 +824,7 @@ collections {
                   cancel_timer(get_int(timer_playlist));
                   set_int(timer_playlist, 0);
                   run_program(get_program_id("playlist_show"));
+                  set_int(timer_lock, timer(LOCK_TIMEOUT, "lock_toggle", 0));
                }
             }
          }
@@ -825,6 +832,8 @@ collections {
             script {
                if (!get_int(overlay_locked)) {
                   set_int(timer_playlist, timer(HIDE_TIMEOUT, "hide_playlist", 
0));
+                  cancel_timer(get_int(timer_lock));
+                  set_int(timer_lock, 0);
                }
             }
          }
@@ -871,6 +880,16 @@ collections {
             script {
                if ((!get_int(overlay_locked)) && 
(!get_int(filesystem_visible)) && get_int(playlist_visible))
                  run_program(get_program_id("playlist_hide"));
+               else if (get_int(overlay_locked) && 
(!get_int(filesystem_visible)))
+                 set_int(timer_lock, timer(LOCK_TIMEOUT, "lock_toggle", 0));
+            }
+         }
+         program { signal: "mouse,out"; source: "left_events";
+            script {
+               if (get_int(overlay_locked) && (!get_int(filesystem_visible))) {
+                  cancel_timer(get_int(timer_lock));
+                  set_int(timer_lock, 0);
+               }
             }
          }
 
diff --git a/src/bin/empc.c b/src/bin/empc.c
index 02ccab6..535e52d 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -3495,6 +3495,7 @@ main(int argc, char *argv[])
    elm_config_scale_set(1.3);
 
    eina_log_domain_level_set("evas_main", EINA_LOG_LEVEL_CRITICAL);
+   eina_log_domain_level_set("edje", EINA_LOG_LEVEL_CRITICAL);
    empc_log_dom = eina_log_domain_register("empc", EINA_COLOR_YELLOW);
    eina_log_domain_level_set("empc", EINA_LOG_LEVEL_DBG);
 

-- 


Reply via email to