fix to disable button focus when user isn't allowed to update/delete other user 52/35752/1
authorSoohye Shin <soohye.shin@samsung.com>
Tue, 24 Feb 2015 08:43:29 +0000 (17:43 +0900)
committerSoohye Shin <soohye.shin@samsung.com>
Tue, 24 Feb 2015 08:51:52 +0000 (17:51 +0900)
Change-Id: I6da7db46edc1f7c70e26a40acfe3b23ea23db4f5
Signed-off-by: Soohye Shin <soohye.shin@samsung.com>
src/ubar.c

index be4aa0a..6143f18 100644 (file)
@@ -1781,6 +1781,7 @@ static Eina_Bool _add_ctxpopup_btn(struct _ubar_item *item, Evas_Object *base)
 
                if (i > 0 && !_check_user(item)) {
                        elm_object_style_set(btn, STYLE_BTN_DIM_HOVERTEXT);
+                       elm_object_focus_allow_set(btn, EINA_FALSE);
                } else {
                        elm_object_style_set(btn, STYLE_BTN_HOVERTEXT);
                        evas_object_event_callback_add(btn, EVAS_CALLBACK_MOUSE_DOWN,
@@ -2078,8 +2079,7 @@ static enum bar_event _enter(struct bar_info *info)
                else if (elm_object_focus_get(bar->cur->btn[1])) {
                        r = _load_edit_popup(bar->cur);
                } else if (elm_object_focus_get(bar->cur->btn[2])) {
-                       if (_check_user(bar->cur))
-                               r = _load_delete_popup(bar->cur);
+                       r = _load_delete_popup(bar->cur);
                }
                break;
        case UBAR_STATE_USER_POPUP: