Disable live button 48/46348/1
authorjinwoo.shin <jw0227.shin@samsung.com>
Wed, 19 Aug 2015 12:00:36 +0000 (21:00 +0900)
committerjinwoo.shin <jw0227.shin@samsung.com>
Wed, 19 Aug 2015 12:00:36 +0000 (21:00 +0900)
Change-Id: I17d00979dee18e0dcf10b7850cda7228ae318c45
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
data/widget/button.edc
src/view_action_menu.c

index bfcd086..8899e1c 100644 (file)
@@ -96,6 +96,11 @@ group {
                                inherit: "default" 0.0;
                                color: 255 255 255 255;
                        }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               color: 87 87 87 128;
+                       }
                }
 
                part {
@@ -178,6 +183,14 @@ group {
        }
        programs {
                program {
+                       name: "disabled";
+                       signal: "elm,state,disabled";
+                       source: "elm";
+                       action: STATE_SET "disabled" 0.0;
+                       target: "part.bg";
+                       target: "elm.text";
+               }
+               program {
                        name: "focused";
                        signal: "elm,action,focus";
                        source: "elm";
index 1ab1cf8..1f43c6d 100644 (file)
@@ -42,7 +42,6 @@ enum _button_id {
 
 struct _priv {
        Evas_Object *base;
-       Evas_Object *live_btn;
        Evas_Object *menu_btn[BUTTON_MAX];
 };
 
@@ -163,8 +162,7 @@ static bool _draw_top_area(struct _priv *priv)
                return false;
        }
 
-       inputmgr_add_callback(btn, BUTTON_LIVETV, &button_handler, priv);
-       priv->live_btn = btn;
+       elm_object_disabled_set(btn, EINA_TRUE);
 
        return true;
 }
@@ -328,7 +326,7 @@ static void _show(void *data)
 
        evas_object_show(priv->base);
 
-       elm_object_focus_set(priv->live_btn, EINA_TRUE);
+       elm_object_focus_set(priv->menu_btn[0], EINA_TRUE);
 }
 
 static void _hide(void *data)
@@ -355,7 +353,6 @@ static void _destroy(void *data)
        }
        priv = data;
 
-       inputmgr_remove_callback(priv->live_btn, &button_handler);
        inputmgr_remove_callback(priv->base, &key_handler);
 
        i = 0;