change object from layout to button of action menu 99/47099/2
authorSoohye Shin <soohye.shin@samsung.com>
Sun, 30 Aug 2015 07:43:00 +0000 (16:43 +0900)
committerSoohye Shin <soohye.shin@samsung.com>
Sun, 30 Aug 2015 07:46:48 +0000 (16:46 +0900)
Change-Id: I4763f2cc5d67ab864bb759e4840a9940dfd4cabc
Signed-off-by: Soohye Shin <soohye.shin@samsung.com>
edje/home-theme.edc
edje/images/btn_menu_del_dis.png [new file with mode: 0644]
edje/images/btn_menu_del_foc.png [new file with mode: 0644]
edje/images/btn_menu_del_nor.png [new file with mode: 0644]
edje/images/btn_menu_reset_dis.png [moved from images/btn_menu_reset_dis.png with 100% similarity]
edje/images/btn_menu_reset_foc.png [moved from images/btn_menu_reset_foc.png with 100% similarity]
edje/images/btn_menu_reset_nor.png [moved from images/btn_menu_reset_nor.png with 100% similarity]
edje/view/actionmenu.edc
edje/widget/button.edc [new file with mode: 0644]
include/defs.h
src/view/view_action_menu.c

index 2845082..e46fb1b 100644 (file)
@@ -21,4 +21,5 @@ collections {
        #include "widget/gengrid.edc"
        #include "widget/entry.edc"
        #include "widget/notify.edc"
+       #include "widget/button.edc"
 }
diff --git a/edje/images/btn_menu_del_dis.png b/edje/images/btn_menu_del_dis.png
new file mode 100644 (file)
index 0000000..88254af
Binary files /dev/null and b/edje/images/btn_menu_del_dis.png differ
diff --git a/edje/images/btn_menu_del_foc.png b/edje/images/btn_menu_del_foc.png
new file mode 100644 (file)
index 0000000..dfdfb40
Binary files /dev/null and b/edje/images/btn_menu_del_foc.png differ
diff --git a/edje/images/btn_menu_del_nor.png b/edje/images/btn_menu_del_nor.png
new file mode 100644 (file)
index 0000000..169874f
Binary files /dev/null and b/edje/images/btn_menu_del_nor.png differ
index dd18a1b..12310a5 100644 (file)
@@ -53,7 +53,7 @@ group {
                                min, 1 0;
                                align, 1.0 0.5;
                                fixed, 1 0;
-                               color, 224 224 224 255;
+                               color, 0 0 0 25;
                        }
                }
                part {
@@ -232,153 +232,3 @@ group {
                }
        }
 }
-group {
-       name, GRP_ACTION_MENU_TABLE_ITEM;
-       parts {
-               part {
-                       name, "bg";
-                       type, RECT;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               min, 124 124;
-                       }
-               }
-               part {
-                       name, "pad.icon";
-                       type, RECT;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               min, 0 14;
-                               rel1.relative, 0.5 0.0;
-                               rel2.relative, 0.5 0.0;
-                               fixed, 1 1;
-                               align, 0.0 0.0;
-                       }
-               }
-               part {
-                       name, "clip";
-                       type, RECT;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               color, 0 0 0 0;
-                       }
-                       description {
-                               state, "focus" 0.0;
-                               inherit, "default" 0.0;
-                               color, 255 255 255 255;
-                       }
-               }
-               part {
-                       name, PART_ACTION_MENU_TABLE_ITEM_BG;
-                       type, SWALLOW;
-                       scale, 1;
-                       clip_to, "clip";
-                       description {
-                               state, "default" 0.0;
-                               fixed, 1 1;
-                       }
-               }
-               part {
-                       name, PART_ACTION_MENU_TABLE_ITEM_ICON;
-                       type, SWALLOW;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               rel1 {
-                                       to, "pad.icon";
-                                       relative, 1.0 1.0;
-                               }
-                               rel2 {
-                                       to, "pad.icon";
-                                       relative, 1.0 1.0;
-                               }
-                               min, 60 60;
-                               align, 0.5 0.0;
-                               fixed, 1 1;
-                       }
-               }
-               part {
-                       name, PART_ACTION_MENU_TABLE_ITEM_ICON_FOCUS;
-                       type, SWALLOW;
-                       scale, 1;
-                       clip_to, "clip";
-                       description {
-                               state, "default" 0.0;
-                               rel1.to, PART_ACTION_MENU_TABLE_ITEM_ICON;
-                               rel2.to, PART_ACTION_MENU_TABLE_ITEM_ICON;
-                               fixed, 1 1;
-                       }
-               }
-               part {
-                       name, "pad.text";
-                       type, RECT;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               rel1 {
-                                       to, PART_ACTION_MENU_TABLE_ITEM_ICON;
-                                       relative, 0.5 1.0;
-                               }
-                               rel2 {
-                                       to, PART_ACTION_MENU_TABLE_ITEM_ICON;
-                                       relative, 0.5 1.0;
-                               }
-                               min, 0 6;
-                               fixed, 1 1;
-                               align, 0.5 0.0;
-                       }
-               }
-               part {
-                       name, PART_ACTION_MENU_TABLE_ITEM_TEXT;
-                       type, SWALLOW;
-                       scale, 1;
-                       description {
-                               state, "default" 0.0;
-                               rel1 {
-                                       to, "pad.text";
-                                       relative, 1.0 1.0;
-                               }
-                               rel2 {
-                                       to, "pad.text";
-                                       relative, 1.0 1.0;
-                               }
-                               min, 80 20;
-                               align, 0.5 0.0;
-                               fixed, 1 1;
-                       }
-               }
-               part {
-                       name, PART_ACTION_MENU_TABLE_ITEM_TEXT_FOCUS;
-                       type, SWALLOW;
-                       scale, 1;
-                       clip_to, "clip";
-                       description {
-                               state, "default" 0.0;
-                               rel1.to, PART_ACTION_MENU_TABLE_ITEM_TEXT;
-                               rel2.to, PART_ACTION_MENU_TABLE_ITEM_TEXT;
-                               fixed, 1 1;
-                       }
-               }
-       }
-       programs {
-               program {
-                       name, "sig,focus";
-                       signal, SIG_FOCUS;
-                       source, SRC_PROG;
-                       action, STATE_SET "focus" 0.0;
-                       transition, TRANSITION_DECEL;
-                       target, "clip";
-               }
-               program {
-                       name, "sig,unfocus";
-                       signal, SIG_UNFOCUS;
-                       source, SRC_PROG;
-                       action, STATE_SET "default" 0.0;
-                       transition, TRANSITION_DECEL;
-                       target, "clip";
-               }
-       }
-}
diff --git a/edje/widget/button.edc b/edje/widget/button.edc
new file mode 100644 (file)
index 0000000..e3283a0
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+group {
+       name, "elm/button/base/action_menu_reset";
+       data.item, "focus_highlight" "on";
+       images {
+               image, "btn_menu_reset_nor.png" COMP;
+               image, "btn_menu_reset_foc.png" COMP;
+               image, "btn_menu_reset_dis.png" COMP;
+       }
+       parts {
+               part {
+                       name, "bg";
+                       type, RECT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 124 124;
+                       }
+                       description {
+                               state, "focus" 0.0;
+                               inherit, "default" 0.0;
+                               color, 0 119 246 255;
+                       }
+                       description {
+                               state, "disable" 0.0;
+                               inherit, "default" 0.0;
+                       }
+               }
+               part {
+                       name, "pad.icon";
+                       type, SPACER;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 0 14;
+                               rel1.relative, 0.5 0.0;
+                               rel2.relative, 0.5 0.0;
+                               fixed, 1 1;
+                               align, 0.5 0.0;
+                       }
+               }
+               part {
+                       name, "icon";
+                       type, IMAGE;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 60 60;
+                               rel1 {
+                                       to, "pad.icon";
+                                       relative, 0.5 1.0;
+                               }
+                               rel2 {
+                                       to, "pad.icon";
+                                       relative, 0.5 1.0;
+                               }
+                               fixed, 1 1;
+                               align, 0.5 0.0;
+                               image.normal, "btn_menu_reset_nor.png";
+                       }
+                       description {
+                               state, "focus" 0.0;
+                               inherit, "default" 0.0;
+                               image.normal, "btn_menu_reset_foc.png";
+                       }
+                       description {
+                               state, "disable" 0.0;
+                               inherit, "default" 0.0;
+                               image.normal, "btn_menu_reset_dis.png";
+                       }
+               }
+               part {
+                       name, "pad.text";
+                       type, SPACER;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               min, 0 6;
+                               rel1 {
+                                       to, "icon";
+                                       relative, 0.5 1.0;
+                               }
+                               rel2 {
+                                       to, "icon";
+                                       relative, 0.5 1.0;
+                               }
+                               fixed, 1 1;
+                               align, 0.5 0.0;
+                       }
+               }
+               part {
+                       name, "elm.text";
+                       type, TEXT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               rel1 {
+                                       to, "pad.text";
+                                       relative, 0.5 1.0;
+                               }
+                               rel2 {
+                                       to, "pad.text";
+                                       relative, 0.5 1.0;
+                               }
+                               min, 108 20;
+                               fixed, 1 1;
+                               align, 0.5 0.0;
+                               color, 104 104 104 255;
+                               text {
+                                       font, "TizenSans";
+                                       size, 20;
+                               }
+                       }
+                       description {
+                               state, "focus" 0.0;
+                               inherit, "default" 0.0;
+                               color, 255 255 255 255;
+                       }
+                       description {
+                               state, "disable" 0.0;
+                               inherit, "default" 0.0;
+                               color, 104 104 104 125;
+                       }
+
+               }
+       }
+       programs {
+               program {
+                       name, "focused";
+                       signal, "elm,action,focus";
+                       source, "elm";
+                       action, STATE_SET "focus" 0.0;
+                       transition, DECEL 0.2;
+                       target, "bg";
+                       target, "elm.text";
+                       target, "icon";
+               }
+               program {
+                       name, "unfocused";
+                       signal, "elm,action,unfocus";
+                       source, "elm";
+                       action, STATE_SET "default" 0.0;
+                       transition, DECEL 0.2;
+                       target, "bg";
+                       target, "elm.text";
+                       target, "icon";
+               }
+               program {
+                       name, "diabled";
+                       signal, "elm,state,disabled";
+                       source, "elm";
+                       action, STATE_SET "disable" 0.0;
+                       target, "bg";
+                       target, "elm.text";
+                       target, "icon";
+               }
+       }
+}
+group {
+       name, "elm/button/base/action_menu_delete";
+       inherit, "elm/button/base/action_menu_reset";
+       images {
+               image, "btn_menu_del_nor.png" COMP;
+               image, "btn_menu_del_foc.png" COMP;
+               image, "btn_menu_del_dis.png" COMP;
+       }
+       parts {
+               part {
+                       name, "icon";
+                       description {
+                               state, "default" 0.0;
+                               image.normal, "btn_menu_del_nor.png";
+                       }
+                       description {
+                               state, "focus" 0.0;
+                               inherit, "default" 0.0;
+                               image.normal, "btn_menu_del_foc.png";
+                       }
+                       description {
+                               state, "disable" 0.0;
+                               inherit, "default" 0.0;
+                               image.normal, "btn_menu_del_dis.png";
+                       }
+               }
+       }
+}
+group {
+       name, "elm/button/base/action_menu_empty";
+       inherit, "elm/button/base/action_menu_reset";
+       parts {
+               part {
+                       name, "icon";
+                       type, RECT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                       }
+               }
+       }
+}
index 44d1fe2..faf683a 100644 (file)
@@ -54,7 +54,6 @@
 #define GRP_PHOTO_NO_CONTENT "group.photo.no.content"
 #define GRP_ACTION_MENU "group.action.menu"
 #define GRP_ACTION_MENU_LIVETV "group.action.menu.livetv"
-#define GRP_ACTION_MENU_TABLE_ITEM "group.action.menu.table.item"
 
 #define PART_HOME_MENU_BAR "part.home.menu.bar"
 #define PART_HOME_UP_ARROW "part.home.up.arrow"
 #define PART_SWALLOW_CONTENT "elm.swallow.content"
 #define PART_ACTION_MENU_LIVETV "part.action.menu.livetv"
 #define PART_ACTION_MENU_TABLE "part.action.menu.table"
-#define PART_ACTION_MENU_TABLE_ITEM_BG "part.action.menu.table.bg"
-#define PART_ACTION_MENU_TABLE_ITEM_ICON "part.action.menu.table.item.icon"
-#define PART_ACTION_MENU_TABLE_ITEM_ICON_FOCUS "part.action.menu.table.item.icon.focus"
-#define PART_ACTION_MENU_TABLE_ITEM_TEXT "part.action.menu.table.item.text"
-#define PART_ACTION_MENU_TABLE_ITEM_TEXT_FOCUS "part.action.menu.table.item.text.focus"
 
 #define SIG_SHOW_NAVIGATION "sig.show.navigation"
 #define SIG_HIDE_NAVIGATION "sig.hide.navigation"
 #define STYLE_LABEL_ACTION_MENU_TITLE "slide_action_menu_title"
 #define STYLE_LABEL_ACTION_MENU_TITLE_FOCUS "slide_action_menu_title_focus"
 #define STYLE_LABEL_ACTION_MENU_TITLE_DIS "slide_action_menu_title_dis"
+#define STYLE_BTN_ACTION_MENU_RESET "action_menu_reset"
+#define STYLE_BTN_ACTION_MENU_DELETE "action_menu_delete"
+#define STYLE_BTN_ACTION_MENU_EMPTY "action_menu_empty"
 #define STYLE_TOAST "toast"
 
 #define COLOR_DEFAULT_R 0
 #define IMAGE_RECENT_THUMB_APP IMAGEDIR"/ic_default_app.png"
 #define IMAGE_RECENT_THUMB_CHANNEL IMAGEDIR"/ic_default_tv.png"
 #define IMAGE_RECENT_THUMB_SETTING IMAGEDIR"/ic_default_setting"
-#define IMAGE_ACTION_MENU_ICON_RESET IMAGEDIR"/btn_menu_reset_nor.png"
-#define IMAGE_ACTION_MENU_ICON_RESET_FOCUS IMAGEDIR"/btn_menu_reset_foc.png"
-#define IMAGE_ACTION_MENU_ICON_RESET_DIS IMAGEDIR"/btn_menu_reset_dis.png"
 
 #define MAX_ITEM_COUNT 8
 #define MAX_USER_COUNT 9
index e0ea8f9..547ecdf 100644 (file)
 #include "view.h"
 #include "utils.h"
 
-#define ACTION_MENU_TITLE_RESET "Reset"
+#define TITLE_ACTION_MENU_RESET "Reset"
+#define TITLE_ACTION_MENU_DELETE "Delete"
 #define COUNT_MENU_ITEM 4
 
 enum input_handler_type {
        INPUT_HANDLER_TYPE_BTN,
-       INPUT_HANDLER_TYPE_ITEM_RESET,
-       INPUT_HANDLER_TYPE_RESET,
-       INPUT_HANDLER_TYPE_DISCARD,
-       INPUT_HANDLER_TYPE_CANCEL
+       INPUT_HANDLER_TYPE_MENU_RESET,
+       INPUT_HANDLER_TYPE_MENU_DELETE,
+       INPUT_HANDLER_TYPE_MENU_EMPTY,
+       INPUT_HANDLER_TYPE_POPUP_RESET,
+       INPUT_HANDLER_TYPE_POPUP_DISCARD,
+       INPUT_HANDLER_TYPE_POPUP_CANCEL
 };
 
 struct _priv {
@@ -46,12 +49,39 @@ struct _priv {
        bool edited;
 };
 
-struct _btn_info {
-       char *icon;
-       char *focus_icon;
-       char *dis_icon;
-       char *title;
-       int handler_id;
+struct _menu_info {
+       const char *style;
+       const char *title;
+       int id;
+       Eina_Bool disable;
+};
+
+static struct _menu_info menu_info[] = {
+       {
+               .style = STYLE_BTN_ACTION_MENU_RESET,
+               .title = TITLE_ACTION_MENU_RESET,
+               .id = INPUT_HANDLER_TYPE_MENU_RESET,
+               .disable = EINA_FALSE
+       },
+       {
+               .style = STYLE_BTN_ACTION_MENU_EMPTY,
+               .title = NULL,
+               .id = INPUT_HANDLER_TYPE_MENU_EMPTY,
+               .disable = EINA_TRUE
+
+       },
+       {
+               .style = STYLE_BTN_ACTION_MENU_EMPTY,
+               .title = NULL,
+               .id = INPUT_HANDLER_TYPE_MENU_EMPTY,
+               .disable = EINA_TRUE
+       },
+       {
+               .style = STYLE_BTN_ACTION_MENU_EMPTY,
+               .title = NULL,
+               .id = INPUT_HANDLER_TYPE_MENU_EMPTY,
+               .disable = EINA_TRUE
+       }
 };
 
 static void _focused(int id, void *data, Evas_Object *obj,
@@ -140,9 +170,9 @@ static void _select(int id, void *data, Evas_Object *obj)
                        _add_popup(priv, MESSAGE_DISCARD,
                                        MESSAGE_DISCARD_CONTENTS,
                                        MESSAGE_DISCARD,
-                                       INPUT_HANDLER_TYPE_DISCARD,
+                                       INPUT_HANDLER_TYPE_POPUP_DISCARD,
                                        MESSAGE_CANCEL,
-                                       INPUT_HANDLER_TYPE_CANCEL);
+                                       INPUT_HANDLER_TYPE_POPUP_CANCEL);
                        return;
                }
                viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_RESET, NULL);
@@ -151,12 +181,13 @@ static void _select(int id, void *data, Evas_Object *obj)
 
                utils_launch_app(APP_ID_LIVETV, NULL, NULL);
                break;
-       case INPUT_HANDLER_TYPE_ITEM_RESET:
+       case INPUT_HANDLER_TYPE_MENU_RESET:
                _add_popup(priv, MESSAGE_RESET, MESSAGE_RESET_CONTENTS,
-                               MESSAGE_RESET, INPUT_HANDLER_TYPE_RESET,
-                               MESSAGE_CANCEL, INPUT_HANDLER_TYPE_CANCEL);
+                               MESSAGE_RESET, INPUT_HANDLER_TYPE_POPUP_RESET,
+                               MESSAGE_CANCEL,
+                               INPUT_HANDLER_TYPE_POPUP_CANCEL);
                break;
-       case INPUT_HANDLER_TYPE_DISCARD:
+       case INPUT_HANDLER_TYPE_POPUP_DISCARD:
                viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_RESET, NULL);
                viewmgr_hide_view(VIEW_ACTION_MENU);
                viewmgr_hide_view(VIEW_USER_EDIT);
@@ -164,12 +195,12 @@ static void _select(int id, void *data, Evas_Object *obj)
 
                utils_launch_app(APP_ID_LIVETV, NULL, NULL);
                break;
-       case INPUT_HANDLER_TYPE_RESET:
+       case INPUT_HANDLER_TYPE_POPUP_RESET:
                viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_RESET, NULL);
                viewmgr_hide_view(VIEW_ACTION_MENU);
                _delete_popup(priv, obj);
                break;
-       case INPUT_HANDLER_TYPE_CANCEL:
+       case INPUT_HANDLER_TYPE_POPUP_CANCEL:
                _delete_popup(priv, obj);
                break;
        default:
@@ -192,12 +223,13 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj,
                        !strcmp(ev->keyname, KEY_BACK_REMOTE)) {
                switch (id) {
                case INPUT_HANDLER_TYPE_BTN:
-               case INPUT_HANDLER_TYPE_ITEM_RESET:
+               case INPUT_HANDLER_TYPE_MENU_RESET:
+               case INPUT_HANDLER_TYPE_MENU_DELETE:
                        viewmgr_hide_view(VIEW_ACTION_MENU);
                        break;
-               case INPUT_HANDLER_TYPE_RESET:
-               case INPUT_HANDLER_TYPE_DISCARD:
-               case INPUT_HANDLER_TYPE_CANCEL:
+               case INPUT_HANDLER_TYPE_POPUP_RESET:
+               case INPUT_HANDLER_TYPE_POPUP_DISCARD:
+               case INPUT_HANDLER_TYPE_POPUP_CANCEL:
                        if (priv->popup)
                                _delete_popup(priv, obj);
                        break;
@@ -231,6 +263,7 @@ static bool _add_base(struct _priv *priv)
                _ERR("failed to add btn");
                return false;
        }
+       elm_object_focus_next_object_set(btn, btn, ELM_FOCUS_LEFT);
        inputmgr_add_callback(btn, INPUT_HANDLER_TYPE_BTN, &handler, priv);
        priv->btn = btn;
 
@@ -281,93 +314,56 @@ static Evas_Object *_create(Evas_Object *win, void *data)
        return base;
 }
 
-static void _add_empty_item(struct _priv *priv, int index)
+static void _update_focus_sequence(struct _priv *priv)
 {
-       int i;
-       Evas_Object *item;
+       Eina_List *l;
+       Evas_Object *item, *eo;
 
-       for (i = index; i < COUNT_MENU_ITEM; i++) {
-               item = utils_add_layout(priv->tbl, GRP_ACTION_MENU_TABLE_ITEM,
-                               false, NULL);
-               if (!item) {
-                       _ERR("failed to add item");
-                       return;
+       eo = NULL;
+       EINA_LIST_FOREACH(priv->list, l, item) {
+               if (!elm_object_disabled_get(item)) {
+                       eo = item;
+                       break;
                }
-
-               evas_object_show(item);
-               elm_table_pack(priv->tbl, item, i, 0, 1, 1);
-               priv->list = eina_list_append(priv->list, item);
        }
+
+       if (eo) {
+               elm_object_focus_next_object_set(priv->btn, eo, ELM_FOCUS_DOWN);
+               elm_object_focus_next_object_set(eo, eo, ELM_FOCUS_LEFT);
+       } else
+               elm_object_focus_next_object_set(priv->btn, priv->btn,
+                               ELM_FOCUS_DOWN);
 }
 
-static bool _add_item(struct _priv *priv)
+static bool _add_menu_item(struct _priv *priv)
 {
-       Evas_Object *item, *ic, *focus_ic, *lbl, *focus_lbl, *bg;
-       struct _btn_info btn_info[] = {
-               {
-                       IMAGE_ACTION_MENU_ICON_RESET,
-                       IMAGE_ACTION_MENU_ICON_RESET_FOCUS,
-                       IMAGE_ACTION_MENU_ICON_RESET_DIS,
-                       ACTION_MENU_TITLE_RESET,
-                       INPUT_HANDLER_TYPE_ITEM_RESET
-               }
-       };
+       Evas_Object *item;
        int i;
 
-       for (i = 0; i < sizeof(btn_info) / sizeof(*btn_info); i++) {
-               item = utils_add_layout(priv->tbl, GRP_ACTION_MENU_TABLE_ITEM,
-                               priv->edited, NULL);
+       for (i = 0; i < COUNT_MENU_ITEM; i++) {
+               item = elm_button_add(priv->tbl);
                if (!item) {
                        _ERR("failed to add item");
                        return false;
                }
+               elm_object_style_set(item, menu_info[i].style);
+               elm_object_text_set(item, menu_info[i].title);
+               inputmgr_add_callback(item, menu_info[i].id, &handler,
+                               priv);
+               evas_object_show(item);
+               elm_table_pack(priv->tbl, item, i, 0, 1, 1);
 
-               ic = utils_add_icon(item, priv->edited ?
-                               btn_info[i].icon : btn_info[i].dis_icon,
-                               PART_ACTION_MENU_TABLE_ITEM_ICON);
-               if (!ic)
-                       goto err;
+               if ((i == 0 && !priv->edited) || menu_info[i].disable)
+                       elm_object_disabled_set(item, EINA_TRUE);
 
-               lbl = utils_add_label(item, btn_info[i].title,
-                               priv->edited ? STYLE_LABEL_ACTION_MENU_TITLE :
-                               STYLE_LABEL_ACTION_MENU_TITLE_DIS,
-                               PART_ACTION_MENU_TABLE_ITEM_TEXT);
-               if (!lbl)
-                       goto err;
+               elm_object_focus_next_object_set(item, item, ELM_FOCUS_DOWN);
 
-               if (priv->edited) {
-                       focus_ic = utils_add_icon(item, btn_info[i].focus_icon,
-                               PART_ACTION_MENU_TABLE_ITEM_ICON_FOCUS);
-                       if (!focus_ic)
-                               goto err;
-
-                       focus_lbl = utils_add_label(item, btn_info[i].title,
-                                       STYLE_LABEL_ACTION_MENU_TITLE_FOCUS,
-                                       PART_ACTION_MENU_TABLE_ITEM_TEXT_FOCUS);
-                       if (!focus_lbl)
-                               goto err;
-
-                       bg = utils_add_bg(item, COLOR_DEFAULT_R,
-                                       COLOR_DEFAULT_G, COLOR_DEFAULT_B,
-                                       COLOR_DEFAULT_A,
-                                       PART_ACTION_MENU_TABLE_ITEM_BG);
-                       if (!bg)
-                               goto err;
-
-                       inputmgr_add_callback(item, btn_info[i].handler_id,
-                                       &handler, priv);
-               }
-               evas_object_show(item);
-               elm_table_pack(priv->tbl, item, i, 0, 1, 1);
                priv->list = eina_list_append(priv->list, item);
        }
 
-       _add_empty_item(priv, i);
+       _update_focus_sequence(priv);
 
        return true;
-err:
-       evas_object_del(item);
-       return false;
 }
 
 static void _show(void *data)
@@ -381,7 +377,7 @@ static void _show(void *data)
 
        priv = data;
 
-       if (!_add_item(priv)) {
+       if (!_add_menu_item(priv)) {
                _ERR("failed to add item");
                return;
        }