[Genlist] Fix dialogue selected issue
authorTae-Hwan Kim <the81.kim@samsung.com>
Sun, 30 Jun 2013 05:06:00 +0000 (14:06 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Mon, 1 Jul 2013 08:12:34 +0000 (17:12 +0900)
When signal is emitted, check if it is selected.

Change-Id: Id868a3910add2adc457b88592cf139e55778c1c3

themes/widgets/genlist/genlist_macro.edc

index 9d054d5..e09f491 100755 (executable)
          }
 
 #define GENLIST_PROGRAM_BG_DIALOGUE \
-         program { name: "bg_default"; \
-            signal: "elm,state,default"; \
-            source: "*"; \
-            script { \
-               new st[31]; \
-               new Float:vl; \
-               get_state(PART:"2depth", st, 30, vl); \
-               if (!strcmp(st, "2depth")) \
-                  set_state(PART:"bg_dialogue", "2depth", 0.0); \
-               else \
-                  set_state(PART:"bg_dialogue", "default", 0.0); \
-            } \
-         } \
          program { name: "bg_top"; \
             signal: "elm,state,top"; \
             source: "*"; \
             script { \
                new st[31]; \
                new Float:vl; \
+               new st2[31]; \
+               new Float:vl2; \
                get_state(PART:"2depth", st, 30, vl); \
-               if (!strcmp(st, "2depth")) \
+               get_state(PART:"bg_dialogue", st2, 30, vl2); \
+               if (!strcmp(st2, "selected") || \
+                  !strcmp(st2, "top_selected") || \
+                  !strcmp(st2, "center_selected") ||  \
+                  !strcmp(st2, "bottom_selected")) \
+                  set_state(PART:"bg_dialogue", "top_selected", 0.0); \
+               else if (!strcmp(st, "2depth")) \
                   set_state(PART:"bg_dialogue", "2depth_top", 0.0); \
                else \
                   set_state(PART:"bg_dialogue", "top", 0.0); \
             script { \
                new st[31]; \
                new Float:vl; \
+               new st2[31]; \
+               new Float:vl2; \
                get_state(PART:"2depth", st, 30, vl); \
-               if (!strcmp(st, "2depth")) \
+               get_state(PART:"bg_dialogue", st2, 30, vl2); \
+               if (!strcmp(st2, "selected") || \
+                  !strcmp(st2, "top_selected") || \
+                  !strcmp(st2, "center_selected") ||  \
+                  !strcmp(st2, "bottom_selected")) \
+                  set_state(PART:"bg_dialogue", "center_selected", 0.0); \
+               else if (!strcmp(st, "2depth")) \
                   set_state(PART:"bg_dialogue", "2depth_center", 0.0); \
                else \
                   set_state(PART:"bg_dialogue", "center", 0.0); \
             script { \
                new st[31]; \
                new Float:vl; \
+               new st2[31]; \
+               new Float:vl2; \
                get_state(PART:"2depth", st, 30, vl); \
-               if (!strcmp(st, "2depth")) \
+               get_state(PART:"bg_dialogue", st2, 30, vl2); \
+               if (!strcmp(st2, "selected") || \
+                  !strcmp(st2, "top_selected") || \
+                  !strcmp(st2, "center_selected") ||  \
+                  !strcmp(st2, "bottom_selected")) \
+                  set_state(PART:"bg_dialogue", "bottom_selected", 0.0); \
+               else if (!strcmp(st, "2depth")) \
                   set_state(PART:"bg_dialogue", "2depth_bottom", 0.0); \
                else \
                   set_state(PART:"bg_dialogue", "bottom", 0.0); \