summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsunyeop.hwnag <sunyeop.hwang@samsung.com>2012-09-05 08:16:55 (GMT)
committersunyeop.hwnag <sunyeop.hwang@samsung.com>2012-09-05 08:16:55 (GMT)
commitcfd2c6d00b015e8cd967e4a7737242f4dea12f72 (patch)
tree627c280402cc8a1a099d274dd2668b21e3b0a9c6
parent7b9d30601742c8f27e43aed0cbcaacc9c8f3c674 (diff)
downloadpwlock-cfd2c6d00b015e8cd967e4a7737242f4dea12f72.zip
pwlock-cfd2c6d00b015e8cd967e4a7737242f4dea12f72.tar.gz
pwlock-cfd2c6d00b015e8cd967e4a7737242f4dea12f72.tar.bz2
Fix operations of ecore_idler add/del
Fix focus problem of puk ui Change-Id: I0c2e1ff05f94b73c8e9c1a0634d4b2d48a36702d
-rwxr-xr-xsrc/pwlock.c4
-rwxr-xr-xsrc/ui.c17
2 files changed, 12 insertions, 9 deletions
diff --git a/src/pwlock.c b/src/pwlock.c
index 0526e5f..a055683 100755
--- a/src/pwlock.c
+++ b/src/pwlock.c
@@ -849,8 +849,10 @@ static Eina_Bool _do_state(void *data)
} else
r = states[ad->state]._do(ad);
- if (r == ECORE_CALLBACK_CANCEL)
+ if (r == ECORE_CALLBACK_CANCEL) {
+ ecore_idler_del(ad->idler);
ad->idler = NULL;
+ }
return r;
}
diff --git a/src/ui.c b/src/ui.c
index bff73bb..97367e1 100755
--- a/src/ui.c
+++ b/src/ui.c
@@ -45,7 +45,7 @@ static void _focused_cb(void *data, Evas_Object * obj, void *event_info);
static void _unfocused_cb(void *data, Evas_Object * obj, void *event_info);
static void _eraser_clicked_cb(void *data, Evas_Object * obj,
const char *emission, const char *source);
-static Evas_Object *_create_editfield(Evas_Object * parent);
+static Evas_Object *_create_editfield(Evas_Object * parent, Eina_Bool focus);
static Evas_Object *_editfield_entry_get(Evas_Object * parent);
static int _ug_destroy = 0;
@@ -695,7 +695,7 @@ static void _eraser_clicked_cb(void *data, Evas_Object * obj,
elm_entry_entry_set(data, "");
}
-static Evas_Object *_create_editfield(Evas_Object * parent)
+static Evas_Object *_create_editfield(Evas_Object * parent, Eina_Bool focus)
{
Evas_Object *layout = NULL;
Evas_Object *entry = NULL;
@@ -724,7 +724,7 @@ static Evas_Object *_create_editfield(Evas_Object * parent)
elm_object_part_text_set(layout, "elm.guidetext", "");
elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm",
_eraser_clicked_cb, entry);
- elm_object_focus_set(entry, EINA_TRUE);
+ elm_object_focus_set(entry, focus);
return layout;
}
@@ -779,7 +779,7 @@ static Evas_Object *_gl_icon_get1(void *data, Evas_Object * obj,
}
if (!strcmp(part, "elm.icon")) {
- layout = _create_editfield(obj);
+ layout = _create_editfield(obj, EINA_TRUE);
evas_object_smart_callback_add(_editfield_entry_get(layout),
"changed", _done_button_changed,
ad);
@@ -819,7 +819,7 @@ static Evas_Object *_gl_icon_get2(void *data, Evas_Object * obj,
return NULL;
}
if (!strcmp(part, "elm.icon")) {
- layout = _create_editfield(obj);
+ layout = _create_editfield(obj, EINA_FALSE);
evas_object_smart_callback_add(_editfield_entry_get(layout),
"changed", _entry_changed_cb,
layout);
@@ -871,7 +871,7 @@ void load_main(struct appdata *ad, int ui_type)
ad->layout_contents = pwlock_add_layout_from_edj(ad->elm_navigation_frame, EDJFILE, "page/genlist");
- genlist = elm_genlist_add(ad->layout_main);
+ genlist = elm_genlist_add(ad->layout_contents);
elm_object_part_content_set(ad->layout_contents, "swl/genlist", genlist);
_list_set_styles();
genlist_item =
@@ -897,12 +897,13 @@ void load_main(struct appdata *ad, int ui_type)
NULL);
elm_genlist_item_select_mode_set(genlist_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
+
ad->elm_conform = _create_conformant(ad->win);
elm_object_content_set(ad->elm_conform, ad->layout_contents);
_DBG("load_main ad->ui_type = %d", ad->ui_type);
- bt_dial = elm_button_add(ad->layout_main);
+ bt_dial = elm_button_add(ad->elm_navigation_frame);
elm_object_style_set(bt_dial, "naviframe/title/default");
evas_object_size_hint_weight_set(bt_dial, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
@@ -913,7 +914,7 @@ void load_main(struct appdata *ad, int ui_type)
ad->elm_button_dial = bt_dial;
evas_object_show(bt_dial);
- bt_done = elm_button_add(ad->layout_main);
+ bt_done = elm_button_add(ad->elm_navigation_frame);
elm_object_style_set(bt_done, "naviframe/title/default");
evas_object_size_hint_weight_set(bt_done, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);