[Check] Multisense Sound support added to Check Button.
authorprince <prince.dubey@samsung.com>
Mon, 18 Mar 2013 07:42:06 +0000 (13:12 +0530)
committerSungho Kwak <sungho1.kwak@samsung.com>
Thu, 21 Mar 2013 08:18:03 +0000 (17:18 +0900)
Change-Id: I3c8edd61f031d61a44170b858b6f6818c0a2cbc3

themes/widgets/check.edc

index 7ec261c..aa82043 100644 (file)
             signal: "mouse,clicked,1"; \
             source: "events1"; \
             action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
+            after: "touch_sound"; \
+         } \
+         program { name: "touch_sound"; \
+            action: PLAY_SAMPLE "touch_sound" 1.0; \
          } \
          program { name: "bg_normal"; \
             signal: "mouse,up,1"; \
@@ -576,6 +580,10 @@ CHECK_STYLE_DEFAULT("default/extended", CHECK_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MI
             signal: "mouse,clicked,1"; \
             source: "events1"; \
             action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
+            after: "touch_sound"; \
+         } \
+         program { name: "touch_sound"; \
+            action: PLAY_SAMPLE "touch_sound" 1.0; \
          } \
          program { name: "check_on"; \
             signal: "elm,state,check,on"; \
@@ -910,6 +918,10 @@ CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_
             signal: "mouse,clicked,1";
             source: "events1";
             action: SIGNAL_EMIT "elm,action,check,toggle" "";
+            after: "touch_sound";
+         }
+         program { name: "touch_sound";
+            action: PLAY_SAMPLE "touch_sound" 1.0;
          }
          program { name: "bg_normal";
             signal: "mouse,up,1";
@@ -1398,7 +1410,7 @@ CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_
                   relative: 1.0 0.0;
                   offset: 1 1;
                }
-               rel2 { 
+               rel2 {
                   to_x: "bg";
                   relative: 1.0 1.0;
                   offset: 2 -2;
@@ -1496,16 +1508,25 @@ CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_
                     set_drag(PART:"button", 1.0, 0.0);
                   if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
                       (get_int(is_rtl) == 0) && (dx > 0.5)) {
-                     if (get_int(check_on))
+                     if (get_int(check_on)) {
                        emit("elm,action,check,off", "");
+                       emit("elm,action,touch,sound", "");
+                     }
                   }
                   else {
-                     if (!get_int(check_on))
+                     if (!get_int(check_on)) {
                        emit("elm,action,check,on", "");
+                       emit("elm,action,touch,sound", "");
+                     }
                   }
                }
             }
          }
+         program { name: "touch_sound";
+            signal: "elm,action,touch,sound";
+            source: "";
+            action: PLAY_SAMPLE "touch_sound" 1.0;
+         }
          program {
             signal: "drag";
             source: "button";
@@ -1535,12 +1556,16 @@ CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_
                     set_drag(PART:"button", 0.0, 0.0);
                   if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
                       (get_int(is_rtl) == 0) && (dx > 0.5)) {
-                     if (!get_int(check_on))
+                     if (!get_int(check_on)) {
                        emit("elm,action,check,on", "");
+                       emit("elm,action,touch,sound", "");
+                     }
                   }
                   else {
-                     if (get_int(check_on))
+                     if (get_int(check_on)) {
                        emit("elm,action,check,off", "");
+                       emit("elm,action,touch,sound", "");
+                     }
                   }
                   set_int(was_drag, get_int(is_drag));
                   set_int(is_drag, 0);
@@ -1843,9 +1868,13 @@ CHECK_STYLE_FOR_GENLIST("default/genlist_edit", CHECK_STYLE_FAVORITE_DEFAULT_BG_
       } \
       programs { \
          program { name: "click"; \
-            signal: "mouse,up,1"; \
+            signal: "mouse,clicked,1"; \
             source: "events"; \
             action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
+            after: "touch_sound"; \
+         } \
+         program { name: "touch_sound"; \
+            action: PLAY_SAMPLE "touch_sound" 1.0; \
          } \
          program { name: "check_on"; \
             signal: "elm,state,check,on"; \
@@ -2248,6 +2277,10 @@ CHECK_STYLE_FAVORITE("favorite/extended", CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE
          }
          program { name: "toggle";
             action: SIGNAL_EMIT "elm,action,check,toggle" "";
+            after: "touch_sound";
+         }
+         program { name: "touch_sound";
+            action: PLAY_SAMPLE "touch_sound" 1.0;
          }
          program { name: "unfocused";
             signal: "elm,action,unfocus";
@@ -2665,9 +2698,13 @@ CHECK_STYLE_FAVORITE("favorite/extended", CHECK_STYLE_FAVORITE_EXTENDED_BG_IMAGE
             }
          }
          program { name: "click";
-            signal: "mouse,up,1";
+            signal: "mouse,clicked,1";
             source: "events";
             action: SIGNAL_EMIT "elm,action,check,toggle" "";
+            after: "touch_sound";
+         }
+         program { name: "touch_sound";
+            action: PLAY_SAMPLE "touch_sound" 1.0;
             after: "bg_normal";
          }
          program { name: "bg_normal";