summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/widget/button.edc13
-rw-r--r--src/view_action_menu.c7
2 files changed, 15 insertions, 5 deletions
diff --git a/data/widget/button.edc b/data/widget/button.edc
index bfcd086..8899e1c 100644
--- a/data/widget/button.edc
+++ b/data/widget/button.edc
@@ -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";
diff --git a/src/view_action_menu.c b/src/view_action_menu.c
index 1ab1cf8..1f43c6d 100644
--- a/src/view_action_menu.c
+++ b/src/view_action_menu.c
@@ -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;