fix channel entry focus issues when activating channels
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
aead1f5b32
commit
1104b6a136
|
@ -209,7 +209,7 @@ _cb_options_done(void *data)
|
|||
Channel *chl;
|
||||
|
||||
chl = data;
|
||||
if (chl->active) elm_object_focus_set(chl->o_grid, EINA_TRUE);
|
||||
if (chl->active) elm_object_focus_set(chl->o_entry, EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -272,6 +272,7 @@ _channel_userlist_create(Channel *chl)
|
|||
WEIGHT_SET(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
ALIGN_SET(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_object_text_set(o, "Users");
|
||||
elm_object_focus_allow_set(o, EINA_FALSE);
|
||||
|
||||
chl->userlist.o_frame = o;
|
||||
edje_object_part_swallow(chl->o_base, "userlist.content", o);
|
||||
|
@ -284,6 +285,7 @@ _channel_userlist_create(Channel *chl)
|
|||
o = elm_list_add(chl->o_win);
|
||||
WEIGHT_SET(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
ALIGN_SET(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_object_focus_allow_set(o, EINA_FALSE);
|
||||
|
||||
chl->userlist.o_list = o;
|
||||
elm_object_content_set(chl->userlist.o_frame, o);
|
||||
|
@ -298,6 +300,7 @@ _channel_userlist_create(Channel *chl)
|
|||
elm_icon_standard_set(o, "user-idle");
|
||||
elm_coords_finger_size_adjust(1, &w, 1, &h);
|
||||
evas_object_size_hint_min_set(o, w, h);
|
||||
elm_object_focus_allow_set(o, EINA_FALSE);
|
||||
|
||||
chl->userlist.o_spacer = o;
|
||||
edje_object_part_swallow(chl->o_bg, "userlist.control", o);
|
||||
|
@ -469,7 +472,6 @@ _channel_focus(Channel *chl)
|
|||
|
||||
edje_object_signal_emit(chl->o_bg, "focus,in", PACKAGE_NAME);
|
||||
edje_object_signal_emit(chl->o_base, "focus,in", PACKAGE_NAME);
|
||||
elm_object_focus_set(chl->o_entry, EINA_TRUE);
|
||||
|
||||
chl->focused = EINA_TRUE;
|
||||
}
|
||||
|
@ -479,7 +481,6 @@ _channel_unfocus(Channel *chl)
|
|||
{
|
||||
if (!chl->focused) return;
|
||||
|
||||
elm_object_focus_set(chl->o_entry, EINA_FALSE);
|
||||
edje_object_signal_emit(chl->o_bg, "focus,out", PACKAGE_NAME);
|
||||
edje_object_signal_emit(chl->o_base, "focus,out", PACKAGE_NAME);
|
||||
|
||||
|
@ -490,6 +491,7 @@ void
|
|||
_channel_active_set(Channel *chl, Eina_Bool active)
|
||||
{
|
||||
chl->active = active;
|
||||
elm_object_focus_allow_set(chl->o_entry, active);
|
||||
elm_object_focus_set(chl->o_entry, active);
|
||||
}
|
||||
|
||||
|
@ -739,8 +741,11 @@ _channel_window_set(Channel *chl, Evas_Object *win)
|
|||
if (chl->o_entry) return;
|
||||
|
||||
chl->o_entry = elm_entry_add(win);
|
||||
WEIGHT_SET(chl->o_entry, EVAS_HINT_EXPAND, 0.0);
|
||||
ALIGN_SET(chl->o_entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_entry_single_line_set(chl->o_entry, EINA_TRUE);
|
||||
elm_entry_scrollable_set(chl->o_entry, EINA_TRUE);
|
||||
elm_entry_line_wrap_set(chl->o_entry, ELM_WRAP_NONE);
|
||||
elm_scroller_policy_set(chl->o_entry, ELM_SCROLLER_POLICY_OFF,
|
||||
ELM_SCROLLER_POLICY_OFF);
|
||||
elm_entry_input_panel_layout_set(chl->o_entry,
|
||||
|
@ -751,12 +756,13 @@ _channel_window_set(Channel *chl, Evas_Object *win)
|
|||
ELM_INPUT_PANEL_LANG_ALPHABET);
|
||||
elm_entry_input_panel_return_key_type_set(chl->o_entry,
|
||||
ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO);
|
||||
elm_entry_prediction_allow_set(chl->o_entry, EINA_FALSE);
|
||||
elm_entry_prediction_allow_set(chl->o_entry, EINA_TRUE);
|
||||
|
||||
evas_object_smart_callback_add(chl->o_entry, "activated", _cb_entry_go, chl);
|
||||
|
||||
edje_object_part_swallow(chl->o_base, "channel.entry", chl->o_entry);
|
||||
elm_entry_entry_set(chl->o_entry, "");
|
||||
elm_object_focus_allow_set(chl->o_entry, EINA_FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -780,6 +786,7 @@ _channel_userlist_user_append(Channel *chl, const char *user, Eina_Bool op)
|
|||
elm_image_resizable_set(icon, EINA_TRUE, EINA_TRUE);
|
||||
WEIGHT_SET(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
ALIGN_SET(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_object_focus_allow_set(icon, EINA_FALSE);
|
||||
|
||||
snprintf(buff, sizeof(buff), "%s/images/operator.png",
|
||||
elm_app_data_dir_get());
|
||||
|
@ -808,6 +815,7 @@ _channel_tabbar_lbox_create(Channel *chl, Evas_Object *win)
|
|||
WEIGHT_SET(chl->tabbar.l.o_box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
FILL_SET(chl->tabbar.l.o_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
edje_object_part_swallow(chl->o_bg, "tabl.content", chl->tabbar.l.o_box);
|
||||
elm_object_focus_allow_set(chl->tabbar.l.o_box, EINA_FALSE);
|
||||
evas_object_show(chl->tabbar.l.o_box);
|
||||
}
|
||||
}
|
||||
|
@ -823,6 +831,7 @@ _channel_tabbar_rbox_create(Channel *chl, Evas_Object *win)
|
|||
WEIGHT_SET(chl->tabbar.r.o_box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
FILL_SET(chl->tabbar.r.o_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
edje_object_part_swallow(chl->o_bg, "tabr.content", chl->tabbar.r.o_box);
|
||||
elm_object_focus_allow_set(chl->tabbar.r.o_box, EINA_FALSE);
|
||||
evas_object_show(chl->tabbar.r.o_box);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue