elm check: Backport r82845. Bug fix "changed" signal being sent twice in case of...
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 16 Jan 2013 01:15:09 +0000 (01:15 +0000)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 16 Jan 2013 01:15:09 +0000 (01:15 +0000)
SVN revision: 82847

ChangeLog
NEWS
data/themes/widgets/check.edc

index 5817af55c403ba741584c97cbde66838cd68a8a9..f27ea6cd177165b98e82e9477572b25e6dc32dcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2013-01-10  Shinwoo Kim
 
        * backport r82456: Fix potential problem which would cause resource leak.
+
+2013-01-16  Shilpa Singh <shilpa.singh@samsung.com>, Rajeev Ranjan <rajeev.r@samsung.com>
+
+        * Fix "changed" signal being sent twice in case of toggle style when check is clicked.
diff --git a/NEWS b/NEWS
index ab55d845b1b5af5eed698119c73dfd5a3a5d8e46..0beb5594eb3fb18b9ddad6159e0739d685232fa9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Fixes:
    * Fix potential problem which would cause resource leak.
    * Fix omitting signal emission when customized text parts change the text.
    * Fix the bug which the callbacks of the sub-object are added even if the sub-object is added the parent object.
+   * Fix "changed" signal being sent twice in case of toggle style when check is clicked.
 
 Changes since Elementary 1.7.4:
 -------------------------
index cc87e99d04e06f8beebf7290d6cd66578ebdae8b..d9f827eb14e54231b804ef00bb38fcfafe206bd0 100644 (file)
@@ -583,29 +583,25 @@ group { name: "elm/check/base/toggle";
             set_int(is_drag, 0);
          }
       }
-      program { name:   "drag_end";
+      program { name: "drag_end";
          signal: "mouse,up,1";
          source: "button";
          script {
             new Float:dx, Float:dy;
             get_drag(PART:"button", dx, dy);
-            if (dx > 0.5)
-            {
-               set_drag(PART:"button", 1.0, 0.0);
-            }
-            else
-            {
-               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)) {
-               emit("elm,action,check,on", "");
-            }
-            else {
-               emit("elm,action,check,off", "");
+            if (get_int(is_drag)) {
+               if (dx > 0.5)
+                  set_drag(PART:"button", 1.0, 0.0);
+               else
+                  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))
+                  emit("elm,action,check,on", "");
+               else
+                  emit("elm,action,check,off", "");
+               set_int(was_drag, 1);
+               set_int(is_drag, 0);
             }
-            set_int(was_drag, get_int(is_drag));
-            set_int(is_drag, 0);
          }
       }
       program { name: "check_on";