From 80e6e4fa28bd55baf35a008f8b72a7db8223f8d2 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Tue, 21 Jul 2015 13:31:16 +0900 Subject: [PATCH 01/16] limit notification count to 99 Change-Id: I325ef11e8d6ef92f8aa94f5a016b3c0fd2dfefc5 Signed-off-by: Soohye Shin --- src/data/data_home.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/data/data_home.c b/src/data/data_home.c index 8b17560..8c6ecf1 100644 --- a/src/data/data_home.c +++ b/src/data/data_home.c @@ -100,6 +100,9 @@ static void _get_notification(char **noti) _get_notification_count(NOTIFICATION_TYPE_ONGOING, &count); _get_notification_count(NOTIFICATION_TYPE_NOTI, &count); + if (count > 99) + count = 99; + snprintf(buf, sizeof(buf), "%d", count); *noti = strdup(buf); } -- 2.7.4 From 89a11875de341cbb2275abe65f6719d78de8c1b6 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Tue, 21 Jul 2015 16:07:42 +0900 Subject: [PATCH 02/16] add down arrow for user edit Change-Id: Ibfc97a37092bbe81fdec92bd9653b25d90e6190d Signed-off-by: Soohye Shin --- edje/view/baritem.edc | 17 ++++++++- edje/view/user.edc | 104 ++++++++++++++++++++++++++++++++++++++++++++++---- src/view/view_user.c | 1 + 3 files changed, 113 insertions(+), 9 deletions(-) diff --git a/edje/view/baritem.edc b/edje/view/baritem.edc index 400f4cf..5cf3693 100644 --- a/edje/view/baritem.edc +++ b/edje/view/baritem.edc @@ -31,6 +31,19 @@ group { description { state, "default" 0.0; min, 158 158; + visible, 0; + } + } + part { + name, "pad"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 158 158; + rel2.relative, 0.0 0.0; + align, 0.0 0.0; + fixed, 1 1; } } part { @@ -81,7 +94,9 @@ group { clip_to, "clip"; description { state, "default" 0.0; - min, 158 158; + rel1.to, "pad"; + rel2.to, "pad"; + fixed, 1 1; } } part { diff --git a/edje/view/user.edc b/edje/view/user.edc index f1244c4..8bcd7e3 100644 --- a/edje/view/user.edc +++ b/edje/view/user.edc @@ -89,7 +89,7 @@ group { to, "pad.list"; relative, 1.0 1.0; } - min, 1422 158; + min, 1422 228; align, 0.5 0.0; fixed, 1 1; } @@ -101,8 +101,21 @@ group { name, GRP_USER_ITEM; inherit, GRP_BAR_ITEM; data.item, TITLE_WIDTH "130"; + images { + image, "btn_navigation_down.png" COMP; + } parts { part { + name, "bg"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + min, 158 228; + visible, 0; + } + } + part { name, "pad.icon"; type, RECT; scale, 1; @@ -141,10 +154,16 @@ group { scale, 1; description { state, "default" 0.0; - min, 0 24; - rel1.relative, 0.5 1.0; - rel2.relative, 0.5 1.0; - align, 0.5 1.0; + min, 0 12; + rel1 { + to, PART_BAR_ITEM_ICON; + relative, 0.5 1.0; + } + rel2 { + to, PART_BAR_ITEM_ICON; + relative, 0.5 1.0; + } + align, 0.5 0.0; fixed, 1 1; visible, 0; } @@ -157,13 +176,13 @@ group { state, "default" 0.0; rel1 { to, "pad.text"; - relative, 0.0 0.0; + relative, 1.0 1.0; } rel2 { to, "pad.text"; - relative, 0.0 0.0; + relative, 1.0 1.0; } - align, 0.5 1.0; + align, 0.5 0.0; fixed, 1 1; min, 130 22; } @@ -223,5 +242,74 @@ group { rel2.to, PART_BAR_ITEM_LOCK; } } + part { + name, "text"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + min, 158 50; + rel1 { + to, "pad"; + relative, 0.5 1.0; + } + rel2 { + to, "pad"; + relative, 0.5 1.0; + } + align, 0.5 0.0; + fixed, 1 1; + text { + size, 26; + font, "TizenSans"; + text, "Edit"; + } + color, 255 255 255 178; + visible, 0; + } + description { + state, "focus"; + inherit, "default" 0.0; + visible, 1; + } + } + part { + name, "arrow"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + min, 86 30; + rel1.relative, 0.5 1.0; + rel2.relative, 0.5 1.0; + image.normal, "btn_navigation_down.png"; + align, 0.5 1.0; + fixed, 1 1; + visible, 0; + } + description { + state, "focus"; + inherit, "default" 0.0; + visible, 1; + } + } + } + programs { + program { + name, "sig,show,arrow"; + signal, SIG_FOCUS; + source, SRC_PROG; + action, STATE_SET "focus"; + target, "text"; + target, "arrow"; + } + program { + name, "sig,hide,arrow"; + signal, SIG_UNFOCUS; + source, SRC_PROG; + action, STATE_SET "default"; + target, "text"; + target, "arrow"; + } } } diff --git a/src/view/view_user.c b/src/view/view_user.c index cdbe5d1..d13782e 100644 --- a/src/view/view_user.c +++ b/src/view/view_user.c @@ -296,6 +296,7 @@ static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box, if (!bg) goto err; + evas_object_size_hint_align_set(eo, 0.5, 0.0); inputmgr_add_callback(eo, INPUT_HANDLER_TYPE_EO, &handler, bi); elm_box_pack_end(box, eo); evas_object_show(eo); -- 2.7.4 From 3bab96bf6e82937323b63d3a226430037605966d Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Tue, 28 Jul 2015 15:23:09 +0900 Subject: [PATCH 03/16] modify a deleting user button according to v0.4 GUI Change-Id: Id27fb8619cd31355c924521016179d0b747ff8e3 Signed-off-by: Soohye Shin --- edje/images/btn_user_del.png | Bin 1337 -> 0 bytes edje/view/useredit.edc | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 edje/images/btn_user_del.png diff --git a/edje/images/btn_user_del.png b/edje/images/btn_user_del.png deleted file mode 100644 index 3c4fa041192b0ea8e12a2c77695aa094ea90e2d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1337 zcmeAS@N?(olHy`uVBq!ia0vp^VLDSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_u(a6Hd$->py)WXc!+`T*ya5c4bba8UC zv~V^uws1B!GjM_F^~@_SNz6-5h1r`4v=^$^60cq>=c3falKi5O{QMkP3JA!^FUc>? z$S+WE4mMNJ2+zz*$uBR~1Vs#&rIbo&`bc{YIaUdlYm=G`pf|&5659GizPih`8 z#}omx#@~YeR0amdOivfbkcwMxX6@}d>xD z+wh{_jro7w%pEy}ZpX{6JMPKc`R(iZtt$@jrLqbG%B8Z)SKIe}j)-v%%zk26n)3lQ3^>5S evZiSs6AuGh?ctErlb8KLg_) Date: Tue, 28 Jul 2015 16:49:40 +0900 Subject: [PATCH 04/16] modify user edit view according to v0.4 GUI doc - remove title divider - remove function button layer - locate require text under photo - add pin code text under name Change-Id: I4efcb5ab5c90d04399f1b910e305e8af8ed0ae85 Signed-off-by: Soohye Shin --- edje/view/useredit.edc | 281 +++++++++++++++++++++++++------------------------ 1 file changed, 141 insertions(+), 140 deletions(-) diff --git a/edje/view/useredit.edc b/edje/view/useredit.edc index 34dc7aa..b114ac1 100644 --- a/edje/view/useredit.edc +++ b/edje/view/useredit.edc @@ -46,56 +46,6 @@ group { } } part { - name, "divider.up"; - type, RECT; - scale, 1; - description { - state, "default" 0.0; - rel1 { - to, "title"; - relative, 0.0 1.0; - } - rel2.to, "title"; - min, 0 1; - fixed, 0 1; - align, 0.5 0.0; - color, 210 219 230 255; - } - } - part { - name, "function.btn"; - type, RECT; - scale, 1; - description { - rel1 { - to, "divider.up"; - relative, 0.0 1.0; - } - rel2.to, "divider.up"; - min, 0 114; - fixed, 0 1; - align, 0.5 0.0; - color, 221 231 242 255; - } - } - part { - name, "divider.down"; - type, RECT; - scale, 1; - description { - state, "default" 0.0; - rel1 { - to, "function.btn"; - relative, 0.0 1.0; - } - rel2.to, "function.btn"; - min, 0 1; - fixed, 0 1; - align, 0.5 0.0; - color, 210 219 230 255; - } - } - part { name, "action.btn"; type, RECT; scale, 1; @@ -165,7 +115,7 @@ group { description { state, "default" 0.0; rel1 { - to, "divider.down"; + to, "title"; relative, 0.0 1.0; } rel2 { @@ -190,7 +140,7 @@ group { to, "contents"; relative, 0.5 0.5; } - min, 1036 452; + min, 1128 408; fixed, 1 1; } } @@ -211,7 +161,7 @@ group { scale, 1; description { state, "default" 0.0; - min, 1036 452; + min, 1128 408; visible, 0; } } @@ -334,6 +284,90 @@ group { } } part { + name, "pad.require"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, PART_USER_EDIT_CONTENTS_PHOTO; + relative, 0.0 1.0; + } + rel2 { + to, PART_USER_EDIT_CONTENTS_PHOTO; + relative, 0.0 1.0; + } + min, 0 22; + fixed, 1 1; + align, 0.0 0.0; + visible, 0; + } + } + part { + name, "icon.require"; + type, IMAGE; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, "pad.require"; + relative, 1.0 1.0; + } + rel2.to, "pad.require"; + min, 12 24; + fixed, 1 1; + align, 0.0 0.0; + image.normal, "ic_user_require_02.png"; + } + } + part { + name, "pad.require.text"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, "icon.require"; + relative, 1.0 0.0; + } + rel2 { + to, "icon.require"; + relative, 1.0 0.0; + } + min, 6 0; + align, 0.0 0.0; + fixed, 1 1; + visible, 0; + } + } + part { + name, "require"; + type, TEXT; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, "pad.require.text"; + relative, 1.0 1.0; + } + rel2 { + to, "pad.require.text"; + relative, 1.0 1.0; + } + min, 294 24; + fixed, 1 1; + align, 0.0 0.0; + text { + font, "TizenSans"; + size, 24; + align, 0.0 0.5; + text, "Required fields"; + } + color, 64 136 211 255; + } + } + + part { name, "pad.profile"; type, RECT; scale, 1; @@ -354,7 +388,7 @@ group { } } part { - name, "information"; + name, "name"; type, TEXT; scale, 1; description { @@ -367,30 +401,30 @@ group { to, "pad.profile"; relative, 1.0 0.0; } - min, 180 32; + min, 95 32; fixed, 1 1; align, 0.0 0.0; text { font, "TizenSans"; size, 32; - text, "Information"; + text, "Name"; align, 0.0 0.5; } color, 77 77 77 255; } } part { - name, "information.require"; + name, "name.require"; type, IMAGE; scale, 1; description { state, "default" 0.0; rel1 { - to, "information"; + to, "name"; relative, 1.0 0.0; } rel2 { - to, "information"; + to, "name"; relative, 1.0 0.0; } min, 16 20; @@ -406,11 +440,11 @@ group { description { state, "default" 0.0; rel1 { - to, "information"; + to, "name"; relative, 0.0 1.0; } rel2 { - to, "information"; + to, "name"; relative, 0.0 1.0; } min, 0 22; @@ -450,190 +484,157 @@ group { to, PART_USER_EDIT_CONTENTS_NAME; relative, 0.0 1.0; } - min, 0 16; + min, 0 32; fixed, 1 1; align, 0.0 0.0; visible, 0; } } part { - name, PART_USER_EDIT_CONTENTS_PIN; - type, SWALLOW; + name, "pin"; + type, TEXT; scale, 1; description { state, "default" 0.0; rel1 { to, "pad.pin"; - relative, 1.0 1.0; - } - rel2.to, "pad.pin"; - min, 436 64; - fixed, 1 1; - align, 0.0 0.0; - } - } - part { - name, "pad.lock"; - type, RECT; - scale, 1; - description { - state, "default" 0.0; - rel1 { - to, PART_USER_EDIT_CONTENTS_PIN; relative, 0.0 1.0; } rel2 { - to, PART_USER_EDIT_CONTENTS_PIN; + to, "pad.pin"; relative, 0.0 1.0; } - min, 0 32; - fixed, 1 1; - align, 0.0 0.0; - visible, 0; - } - } - part { - name, "lock"; - type, TEXT; - scale, 1; - description { - state, "default" 0.0; - rel1 { - to, "pad.lock"; - relative, 1.0 1.0; - } - rel2.to, "pad.lock"; min, 436 32; fixed, 1 1; align, 0.0 0.0; text { + text, "Pin code"; font, "TizenSans"; size, 32; - text, "Privacy lock"; align, 0.0 0.5; } color, 77 77 77 255; } } part { - name, "pad.lock.down"; + name, "pad.pin.down"; type, RECT; scale, 1; description { state, "default" 0.0; rel1 { - to, "lock"; + to, "pin"; relative, 0.0 1.0; } rel2 { - to, "lock"; + to, "pin"; relative, 0.0 1.0; } min, 0 22; - fixed, 1 1; align, 0.0 0.0; + fixed, 1 1; visible, 0; } } part { - name, PART_USER_EDIT_CONTENTS_LOCK; + name, PART_USER_EDIT_CONTENTS_PIN; type, SWALLOW; scale, 1; description { state, "default" 0.0; rel1 { - to, "pad.lock.down"; + to, "pad.pin.down"; relative, 1.0 1.0; } - rel2.to, "pad.lock.down"; - min, 104 54; + rel2 { + to, "pad.pin.down"; + relative, 1.0 1.0; + } + min, 436 64; fixed, 1 1; align, 0.0 0.0; } } part { - name, "pad.require"; + name, "pad.lock"; type, RECT; scale, 1; description { state, "default" 0.0; rel1 { - to, PART_USER_EDIT_CONTENTS_LOCK; + to, PART_USER_EDIT_CONTENTS_PIN; relative, 0.0 1.0; } rel2 { - to, PART_USER_EDIT_CONTENTS_LOCK; + to, PART_USER_EDIT_CONTENTS_PIN; relative, 0.0 1.0; } - min, 0 22; + min, 0 32; fixed, 1 1; align, 0.0 0.0; visible, 0; } } part { - name, "icon.require"; - type, IMAGE; + name, "lock"; + type, TEXT; scale, 1; description { state, "default" 0.0; rel1 { - to, "pad.require"; + to, "pad.lock"; relative, 1.0 1.0; } - rel2.to, "pad.require"; - min, 12 24; + rel2.to, "pad.lock"; + min, 436 32; fixed, 1 1; align, 0.0 0.0; - image.normal, "ic_user_require_02.png"; + text { + font, "TizenSans"; + size, 32; + text, "Privacy lock"; + align, 0.0 0.5; + } + color, 77 77 77 255; } } part { - name, "pad.require.text"; + name, "pad.lock.down"; type, RECT; scale, 1; description { state, "default" 0.0; rel1 { - to, "icon.require"; - relative, 1.0 0.0; + to, "lock"; + relative, 0.0 1.0; } rel2 { - to, "icon.require"; - relative, 1.0 0.0; + to, "lock"; + relative, 0.0 1.0; } - min, 6 0; - align, 0.0 0.0; + min, 0 22; fixed, 1 1; + align, 0.0 0.0; visible, 0; } } part { - name, "require"; - type, TEXT; + name, PART_USER_EDIT_CONTENTS_LOCK; + type, SWALLOW; scale, 1; description { state, "default" 0.0; rel1 { - to, "pad.require.text"; - relative, 1.0 0.0; - } - rel2 { - to, "pad.require.text"; - relative, 1.0 0.0; + to, "pad.lock.down"; + relative, 1.0 1.0; } - min, 418 24; + rel2.to, "pad.lock.down"; + min, 104 54; fixed, 1 1; align, 0.0 0.0; - text { - font, "TizenSans"; - size, 24; - align, 0.0 0.5; - text, "Required fields"; - } - color, 64 136 211 255; } } + part { name, "pad.delete"; type, RECT; -- 2.7.4 From 9dea3b329d76d1f0c6e3c3cfeba26132a50d9047 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Tue, 28 Jul 2015 17:16:15 +0900 Subject: [PATCH 05/16] modify photo view according to v0.4 GUI doc - decrease swallow size to 3 line of grid Change-Id: I852e2d4accf2af18b3533684fb0f4ac692b1a9d7 Signed-off-by: Soohye Shin --- edje/view/photo.edc | 52 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/edje/view/photo.edc b/edje/view/photo.edc index b52550c..e3953d2 100644 --- a/edje/view/photo.edc +++ b/edje/view/photo.edc @@ -48,33 +48,51 @@ group { } } part { - name, "bottom"; + name, "bg"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, "title"; + relative, 0.0 1.0; + } + fixed, 1 1; + color, 244 244 244 255; + } + } + part { + name, "pad.list.up"; type, RECT; scale, 1; description { state, "default" 0.0; - rel1.relative, 0.0 1.0; - min, 0 157; + rel1.to, "bg"; + rel2 { + to, "bg"; + relative, 1.0 0.0; + } + align, 0.5 0.0; fixed, 0 1; - align, 0.5 1.0; + min, 0 196; + visible, 0; } } part { - name, "bg"; + name, "pad.list.down"; type, RECT; scale, 1; description { state, "default" 0.0; rel1 { - to, "title"; + to, "bg"; relative, 0.0 1.0; } - rel2 { - to, "bottom"; - relative, 1.0 0.0; - } - fixed, 1 1; - color, 244 244 244 255; + rel2.to, "bg"; + fixed, 0 1; + min, 0 148; + align, 0.5 1.0; + visible, 0; } } part { @@ -83,8 +101,14 @@ group { scale, 1; description { state, "default" 0.0; - rel1.to, "bg"; - rel2.to, "bg"; + rel1 { + to, "pad.list.up"; + relative, 0.0 1.0; + } + rel2 { + to, "pad.list.down"; + relative, 1.0 0.0; + } fixed, 1 1; } } -- 2.7.4 From 5df81a5387b0b8990fa46866aa5300f7071e93d0 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Tue, 28 Jul 2015 19:07:16 +0900 Subject: [PATCH 06/16] bug fix - load default icon file when icon is null Change-Id: I8bfbc6513be78df851919fd8b2d04340fddffe9a Signed-off-by: Soohye Shin --- src/data/data_home.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/data/data_home.c b/src/data/data_home.c index 8c6ecf1..b6b9789 100644 --- a/src/data/data_home.c +++ b/src/data/data_home.c @@ -123,6 +123,10 @@ static void _get_login_user(char **name, char **icon, char **focus_icon) g_object_get(G_OBJECT(user), GUM_ATTR_NAME, name, GUM_ATTR_ICON, icon, NULL); + + if (!*icon || strlen(*icon) == 0) + *icon = IMAGE_USER_DEFAULT; + *focus_icon = (char *)utils_get_focus_icon_from_icon(*icon); g_object_unref(user); -- 2.7.4 From 376c897b1f50ac37d876a44de4d9bacc88bb696e Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Tue, 28 Jul 2015 20:25:20 +0900 Subject: [PATCH 07/16] bug fix - clear recent data when pressed enter key Change-Id: I132057cc1972d1f25b2e4933525ff543365536fd Signed-off-by: Soohye Shin --- src/data/data_recent.c | 2 +- src/view/view_recent.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/data_recent.c b/src/data/data_recent.c index 3d231b0..e497e8d 100644 --- a/src/data/data_recent.c +++ b/src/data/data_recent.c @@ -184,7 +184,7 @@ static void _select(struct datamgr_item *di) } } -void _clear(struct datamgr *dm) +static void _clear(struct datamgr *dm) { int r; diff --git a/src/view/view_recent.c b/src/view/view_recent.c index 9afbb96..73e1ed3 100644 --- a/src/view/view_recent.c +++ b/src/view/view_recent.c @@ -122,8 +122,8 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, case INPUT_HANDLER_TYPE_DELETE: priv = data; - if (!strcmp(ev->keyname, KEY_ENTER) || - !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { + if (!strcmp(ev->keyname, KEY_BACK) || + !strcmp(ev->keyname, KEY_BACK_REMOTE)) { elm_object_signal_emit(priv->base, SIG_HIDE_RECENT, SRC_PROG); } else if (!strcmp(ev->keyname, KEY_ENTER) || -- 2.7.4 From cf1073abea575dfbcaf4dc857329091b8b8835e6 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Tue, 28 Jul 2015 21:00:44 +0900 Subject: [PATCH 08/16] set focus move policy from CLICK to IN Change-Id: Ifdf8be7ee67fb96900ac9e3dd0b9aed148046a73 Signed-off-by: Soohye Shin --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 9338fed..8e734d1 100644 --- a/src/main.c +++ b/src/main.c @@ -57,7 +57,7 @@ static bool _create(void *user_data) ad = user_data; elm_theme_overlay_add(NULL, THEMEFILE); - elm_config_focus_move_policy_set(ELM_FOCUS_MOVE_POLICY_CLICK); + elm_config_focus_move_policy_set(ELM_FOCUS_MOVE_POLICY_IN); win = _add_win(ad->name); if (!win) { -- 2.7.4 From 1daf973cb81b9eaf0d5dd3604b4ad3bb97758dc2 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Wed, 29 Jul 2015 16:54:30 +0900 Subject: [PATCH 09/16] add transition animation between home and user view Change-Id: I6d77ac5bcbea45a9c3b4ebdf5109507fdaa8875a Signed-off-by: Soohye Shin --- edje/view/home.edc | 45 ++++++++++++++++++++++++++++++++++++++++- edje/view/user.edc | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++-- include/defs.h | 3 +++ src/view/view_home.c | 21 ++++++++++++++++++-- src/view/view_user.c | 24 ++++++++++++++++++++-- 5 files changed, 142 insertions(+), 7 deletions(-) diff --git a/edje/view/home.edc b/edje/view/home.edc index e8df094..b72d4e2 100644 --- a/edje/view/home.edc +++ b/edje/view/home.edc @@ -104,8 +104,23 @@ group { } } part { + name, "clip"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 0 0 0 0; + } + description { + state, "show" 0.0; + inherit, "default" 0.0; + color, 255 255 255 255; + } + } + part { name, PART_HOME_MENU_BAR; type, SWALLOW; + clip_to, "clip"; scale, 1; description { state, "default" 0.0; @@ -117,14 +132,42 @@ group { relative, 0.0 0.0; to, "pad.list"; } - fixed, 1 1; align, 0.5 1.0; + fixed, 1 1; + min, 0 158; + } + description { + state, "show" 0.0; + inherit, "default" 0.0; min, 948 158; } } } programs { program { + name, "sig,show"; + signal, SIG_SHOW; + source, SRC_PROG; + action, STATE_SET "show" 0.0; + transition, DECEL 0.3; + target, "clip"; + target, PART_HOME_MENU_BAR; + } + program { + name, "sig,hide"; + signal, SIG_HIDE; + source, SRC_PROG; + action, STATE_SET "default" 0.0; + transition, DECEL 0.3; + target, "clip"; + target, PART_HOME_MENU_BAR; + after, "sig,hide,done"; + } + program { + name, "sig,hide,done"; + action, SIGNAL_EMIT SIG_HIDE_DONE SRC_EDJE; + } + program { name, "sig,show,navigation"; signal, SIG_SHOW_NAVIGATION; source, SRC_PROG; diff --git a/edje/view/user.edc b/edje/view/user.edc index 8bcd7e3..0566560 100644 --- a/edje/view/user.edc +++ b/edje/view/user.edc @@ -51,9 +51,14 @@ group { font, "TizenSans"; size, 34; } - color, 255 255 255 178; + color, 0 0 0 0; color2, 0 0 0 255; } + description { + state, "show" 0.0; + inherit, "default" 0.0; + color, 255 255 255 178; + } } part { name, "pad.list"; @@ -76,9 +81,24 @@ group { } } part { + name, "clip"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + color, 0 0 0 0; + } + description { + state, "show" 0.0; + inherit, "default" 0.0; + color, 255 255 255 255; + } + } + part { name, PART_USER_BAR; type, SWALLOW; scale, 1; + clip_to, "clip"; description { state, "default" 0.0; rel1 { @@ -89,10 +109,42 @@ group { to, "pad.list"; relative, 1.0 1.0; } - min, 1422 228; + min, 0 228; align, 0.5 0.0; fixed, 1 1; } + description { + state, "show" 0.0; + inherit, "default" 0.0; + min, 1422 228; + } + } + } + programs { + program { + name, "sig,show"; + signal, SIG_SHOW; + source, SRC_PROG; + action, STATE_SET "show" 0.0; + transition, DECEL 0.3; + target, "clip"; + target, PART_USER_BAR; + target, "text"; + } + program { + name, "sig,hide"; + signal, SIG_HIDE; + source, SRC_PROG; + action, STATE_SET "default" 0.0; + transition, DECEL 0.3; + target, "clip"; + target, PART_USER_BAR; + target, "text"; + after, "sig,hide,done"; + } + program { + name, "sig,hide,done"; + action, SIGNAL_EMIT SIG_HIDE_DONE SRC_EDJE; } } } diff --git a/include/defs.h b/include/defs.h index dcb2a0e..bc98de7 100644 --- a/include/defs.h +++ b/include/defs.h @@ -115,6 +115,9 @@ #define SIG_HIDE_RECENT_DONE "sig.hide.recent.done" #define SIG_DISABLE "sig.disable" #define SIG_SHOW_MASK "sig.show.mask" +#define SIG_SHOW "sig.show" +#define SIG_HIDE "sig.hide" +#define SIG_HIDE_DONE "sig.hide.done" #define TITLE_WIDTH "title.width" diff --git a/src/view/view_home.c b/src/view/view_home.c index 3c06565..11dd94d 100644 --- a/src/view/view_home.c +++ b/src/view/view_home.c @@ -107,7 +107,10 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, viewmgr_push_view(VIEW_RECENT); } else if (!strcmp(ev->keyname, KEY_ENTER) || !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { - datamgr_select_item(priv->dm, priv->foc->di); + if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) + elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); + else + datamgr_select_item(priv->dm, priv->foc->di); } else if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_REMOTE)) { /* It should be implemented later */ @@ -127,7 +130,10 @@ static void _mouse_down(int id, void *data, Evas *e, Evas_Object *obj, bi = data; priv = bi->priv; - datamgr_select_item(priv->dm, priv->foc->di); + if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) + elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); + else + datamgr_select_item(priv->dm, priv->foc->di); break; case INPUT_HANDLER_TYPE_DOWN: viewmgr_push_view(VIEW_RECENT); @@ -290,6 +296,14 @@ static bool _add_home_menu(struct _priv *priv, Evas_Object *base) return true; } +static void _hide_done(void *data, Evas_Object *obj, const char *emission, + const char *source) +{ + struct _priv *priv = data; + + datamgr_select_item(priv->dm, priv->foc->di); +} + static Evas_Object *_create(Evas_Object *win, void *data) { struct _priv *priv; @@ -334,6 +348,8 @@ static Evas_Object *_create(Evas_Object *win, void *data) viewmgr_set_view_data(VIEW_HOME, priv); inputmgr_add_callback(base, INPUT_HANDLER_TYPE_BASE, &handler, priv); + elm_object_signal_callback_add(base, SIG_HIDE_DONE, SRC_EDJE, + _hide_done, priv); return base; } @@ -353,6 +369,7 @@ static void _show(void *data) evas_object_show(priv->base); elm_object_signal_emit(priv->base, SIG_SHOW_NAVIGATION, SRC_PROG); + elm_object_signal_emit(priv->base, SIG_SHOW, SRC_PROG); if (!priv->foc) priv->foc = eina_list_data_get(priv->list); diff --git a/src/view/view_user.c b/src/view/view_user.c index d13782e..22ad054 100644 --- a/src/view/view_user.c +++ b/src/view/view_user.c @@ -135,19 +135,24 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, priv = data; if (!strcmp(ev->keyname, KEY_ENTER) || !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { + if (priv->foc->di->action == ITEM_SELECT_ACTION_POP) { + elm_object_signal_emit(priv->base, SIG_HIDE, + SRC_PROG); + return; + } + if ((priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) && (eina_list_count(priv->list) >= MAX_USER_COUNT)) { _add_popup(priv); return; } - viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, NULL); datamgr_select_item(priv->dm, priv->foc->di); } else if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_REMOTE)) { - viewmgr_pop_view(); + elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); } else if (!strcmp(ev->keyname, KEY_DOWN)) { if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) return; @@ -175,6 +180,12 @@ static void _mouse_down(int id, void *data, Evas *e, Evas_Object *obj, switch (id) { case INPUT_HANDLER_TYPE_BASE: priv = data; + if (priv->foc->di->action == ITEM_SELECT_ACTION_POP) { + elm_object_signal_emit(priv->base, SIG_HIDE, + SRC_PROG); + return; + } + if ((priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) && (eina_list_count(priv->list) >= MAX_USER_COUNT)) { @@ -195,6 +206,12 @@ static void _mouse_down(int id, void *data, Evas *e, Evas_Object *obj, } } +static void _hide_done(void *data, Evas_Object *obj, const char *emission, + const char *source) +{ + viewmgr_pop_view(); +} + static Evas_Object *_create(Evas_Object *win, void *data) { struct _priv *priv; @@ -237,6 +254,8 @@ static Evas_Object *_create(Evas_Object *win, void *data) viewmgr_set_view_data(VIEW_USER, priv); viewmgr_add_view(view_user_edit_get_vclass(), dm); inputmgr_add_callback(base, INPUT_HANDLER_TYPE_BASE, &handler, priv); + elm_object_signal_callback_add(base, SIG_HIDE_DONE, SRC_EDJE, + _hide_done, NULL); return base; } @@ -369,6 +388,7 @@ static void _show(void *data) priv = data; evas_object_show(priv->base); + elm_object_signal_emit(priv->base, SIG_SHOW, SRC_PROG); _add_user(priv); -- 2.7.4 From e676149d7fd56ad16d78c47a34daed2ed246ba74 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Wed, 29 Jul 2015 19:13:00 +0900 Subject: [PATCH 10/16] support mouse handling to enter user edit view from user list Change-Id: I1a79ee5f841cb0e76af35be3f7ee19f647d8c01c Signed-off-by: Soohye Shin --- edje/view/baritem.edc | 18 +++++++++++++++++ edje/view/user.edc | 6 ++++++ include/defs.h | 2 ++ src/view/view_user.c | 56 ++++++++++++++++++++++++++++++++------------------- 4 files changed, 61 insertions(+), 21 deletions(-) diff --git a/edje/view/baritem.edc b/edje/view/baritem.edc index 5cf3693..805ec34 100644 --- a/edje/view/baritem.edc +++ b/edje/view/baritem.edc @@ -158,6 +158,18 @@ group { visible, 1; } } + part { + name, "click_item"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1.to, "pad"; + rel2.to, "pad"; + fixed, 1 1; + color, 0 0 0 0; + } + } } programs { program { @@ -256,5 +268,11 @@ group { set_state(PART:"mask_focus", "show", 0.0); } } + program { + name, "item,clicked"; + source, "click_item"; + signal, "mouse,clicked,1"; + action, SIGNAL_EMIT SIG_CLICK_ITEM SRC_EDJE; + } } } diff --git a/edje/view/user.edc b/edje/view/user.edc index 0566560..b7a8c1e 100644 --- a/edje/view/user.edc +++ b/edje/view/user.edc @@ -363,5 +363,11 @@ group { target, "text"; target, "arrow"; } + program { + name, "arrow,clicked"; + source, "arrow"; + signal, "mouse,clicked,1"; + action, SIGNAL_EMIT SIG_CLICK_ARROW SRC_EDJE; + } } } diff --git a/include/defs.h b/include/defs.h index bc98de7..73d131a 100644 --- a/include/defs.h +++ b/include/defs.h @@ -118,6 +118,8 @@ #define SIG_SHOW "sig.show" #define SIG_HIDE "sig.hide" #define SIG_HIDE_DONE "sig.hide.done" +#define SIG_CLICK_ITEM "sig.click.item" +#define SIG_CLICK_ARROW "sig.click.arrow" #define TITLE_WIDTH "title.width" diff --git a/src/view/view_user.c b/src/view/view_user.c index 22ad054..2557852 100644 --- a/src/view/view_user.c +++ b/src/view/view_user.c @@ -170,33 +170,12 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, static void _mouse_down(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Down *ev) { - struct _priv *priv; - if (!data) { _ERR("Invalid argument"); return; } switch (id) { - case INPUT_HANDLER_TYPE_BASE: - priv = data; - if (priv->foc->di->action == ITEM_SELECT_ACTION_POP) { - elm_object_signal_emit(priv->base, SIG_HIDE, - SRC_PROG); - return; - } - - if ((priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) - && (eina_list_count(priv->list) - >= MAX_USER_COUNT)) { - _add_popup(priv); - return; - } - - viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, - NULL); - datamgr_select_item(priv->dm, priv->foc->di); - break; case INPUT_HANDLER_TYPE_BUTTON: inputmgr_remove_callback(obj, &handler); evas_object_del(data); @@ -260,6 +239,38 @@ static Evas_Object *_create(Evas_Object *win, void *data) return base; } +static void _arrow_clicked(void *data, Evas_Object *obj, const char *emission, + const char *source) +{ + struct _priv *priv = data; + + if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) + return; + + viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, priv->foc->di); + viewmgr_push_view(VIEW_USER_EDIT); +} + +static void _item_clicked(void *data, Evas_Object *obj, const char *emission, + const char *source) +{ + struct _priv *priv = data; + + if (priv->foc->di->action == ITEM_SELECT_ACTION_POP) { + elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); + return; + } + + if ((priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) + && (eina_list_count(priv->list) >= MAX_USER_COUNT)) { + _add_popup(priv); + return; + } + + viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, NULL); + datamgr_select_item(priv->dm, priv->foc->di); +} + static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box, struct datamgr_item *di) { @@ -289,6 +300,8 @@ static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box, PART_BAR_ITEM_TITLE_FOCUS); if (!focus_lbl) goto err; + + elm_object_signal_callback_add(eo, SIG_CLICK_ARROW, SRC_EDJE, _arrow_clicked, priv); } else { eo = utils_add_layout(box, GRP_BAR_ITEM, true, NULL); if (!eo) { @@ -317,6 +330,7 @@ static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box, evas_object_size_hint_align_set(eo, 0.5, 0.0); inputmgr_add_callback(eo, INPUT_HANDLER_TYPE_EO, &handler, bi); + elm_object_signal_callback_add(eo, SIG_CLICK_ITEM, SRC_EDJE, _item_clicked, priv); elm_box_pack_end(box, eo); evas_object_show(eo); -- 2.7.4 From 6abc6143c9af31243c71f6e8b537f58eb31f8c2c Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Wed, 29 Jul 2015 21:23:19 +0900 Subject: [PATCH 11/16] modify settings pkg name in json file Change-Id: I2f576fc6f986d6d7d16d05773c80e63e11297769 Signed-off-by: Soohye Shin --- config/home.json.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/home.json.in b/config/home.json.in index 67d77c8..2bd542f 100644 --- a/config/home.json.in +++ b/config/home.json.in @@ -45,7 +45,7 @@ "icon": "@IMAGEDIR@/btn_menu_setting_nor.png", "focus_icon": "@IMAGEDIR@/btn_menu_setting_foc.png", "select_action": "launch", - "parameter": "org.tizen.settings", + "parameter": "org.tizen.settings-tv-ref", "notification": false } ] -- 2.7.4 From b9c76a47bb951ba047803b1f132d59b7f22c152a Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Wed, 29 Jul 2015 22:03:09 +0900 Subject: [PATCH 12/16] modify transition speed - DECEL 0.3 - LINEAR 0.2 Change-Id: Icf065e28e1900db072641704d496e0185226b013 Signed-off-by: Soohye Shin --- edje/view/baritem.edc | 12 ++++++------ edje/view/home.edc | 12 ++++++------ edje/view/recent.edc | 16 ++++++++-------- edje/view/user.edc | 4 ++-- edje/view/useredit.edc | 20 ++++++++++---------- edje/widget/gengrid.edc | 4 ++-- include/defs.h | 3 +++ 7 files changed, 37 insertions(+), 34 deletions(-) diff --git a/edje/view/baritem.edc b/edje/view/baritem.edc index 805ec34..32e8f0d 100644 --- a/edje/view/baritem.edc +++ b/edje/view/baritem.edc @@ -185,7 +185,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "clip"; } program { @@ -193,7 +193,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "clip"; } program { @@ -201,7 +201,7 @@ group { signal, SIG_FOCUS_TO_UP; source, SRC_PROG; action, STATE_SET "up" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "clip"; } program { @@ -209,7 +209,7 @@ group { signal, SIG_FOCUS_TO_DOWN; source, SRC_PROG; action, STATE_SET "down" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "clip"; } program { @@ -217,7 +217,7 @@ group { signal, SIG_FOCUS_TO_RIGHT; source, SRC_PROG; action, STATE_SET "right" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "clip"; } program { @@ -233,7 +233,7 @@ group { signal, SIG_FOCUS_TO_LEFT; source, SRC_PROG; action, STATE_SET "left" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "clip"; } program { diff --git a/edje/view/home.edc b/edje/view/home.edc index b72d4e2..837fe49 100644 --- a/edje/view/home.edc +++ b/edje/view/home.edc @@ -149,7 +149,7 @@ group { signal, SIG_SHOW; source, SRC_PROG; action, STATE_SET "show" 0.0; - transition, DECEL 0.3; + transition, TRANSITION_DECEL; target, "clip"; target, PART_HOME_MENU_BAR; } @@ -158,7 +158,7 @@ group { signal, SIG_HIDE; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, DECEL 0.3; + transition, TRANSITION_DECEL; target, "clip"; target, PART_HOME_MENU_BAR; after, "sig,hide,done"; @@ -174,7 +174,7 @@ group { action, STATE_SET "show" 0.0; target, "clip.up.arrow"; target, "clip.down.arrow"; - transition, DECEL 0.5; + transition, TRANSITION_DECEL; } program { name, "sig,hide,navigation"; @@ -183,7 +183,7 @@ group { action, STATE_SET "default" 0.0; target, "clip.up.arrow"; target, "clip.down.arrow"; - transition, DECEL 0.5; + transition, TRANSITION_DECEL; } } } @@ -316,7 +316,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus" 0.0; - transition, DECEL 0.5; + transition, TRANSITION_DECEL; target, "focus"; target, "bounce.arrow"; } @@ -325,7 +325,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, DECEL 0.2; + transition, TRANSITION_DECEL; target, "focus"; target, "bounce.arrow"; } diff --git a/edje/view/recent.edc b/edje/view/recent.edc index 5f9fff9..a26d02b 100644 --- a/edje/view/recent.edc +++ b/edje/view/recent.edc @@ -221,7 +221,7 @@ group { signal, SIG_SHOW_RECENT; source, SRC_PROG; action, STATE_SET "show" 0.0; - transition, DECEL 0.5; + transition, TRANSITION_DECEL; target, "clip"; target, "guide"; } @@ -230,7 +230,7 @@ group { signal, SIG_HIDE_RECENT; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, DECEL 0.5; + transition, TRANSITION_DECEL; target, "clip"; target, "guide"; after, "sig.hide.recent.done"; @@ -307,7 +307,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_LINEAR; target, "bg"; target, "clip"; } @@ -316,7 +316,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_LINEAR; target, "bg"; target, "clip"; } @@ -550,7 +550,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "bg"; } program { @@ -558,7 +558,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "bg"; } } @@ -791,7 +791,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "bg"; } program { @@ -799,7 +799,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_DECEL; target, "bg"; } } diff --git a/edje/view/user.edc b/edje/view/user.edc index b7a8c1e..9fc884f 100644 --- a/edje/view/user.edc +++ b/edje/view/user.edc @@ -126,7 +126,7 @@ group { signal, SIG_SHOW; source, SRC_PROG; action, STATE_SET "show" 0.0; - transition, DECEL 0.3; + transition, TRANSITION_DECEL; target, "clip"; target, PART_USER_BAR; target, "text"; @@ -136,7 +136,7 @@ group { signal, SIG_HIDE; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, DECEL 0.3; + transition, TRANSITION_DECEL; target, "clip"; target, PART_USER_BAR; target, "text"; diff --git a/edje/view/useredit.edc b/edje/view/useredit.edc index b114ac1..4aa17b7 100644 --- a/edje/view/useredit.edc +++ b/edje/view/useredit.edc @@ -781,7 +781,7 @@ group { program { name, "sig,focus,1"; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.2; + transition, TRANSITION_LINEAR; target, "pad"; } program { @@ -795,7 +795,7 @@ group { program { name, "sig,unfocus,1"; action, STATE_SET "default" 0.0; - transition, LINEAR 0.2; + transition, TRANSITION_LINEAR; target, "bg.photo"; target, "clip"; } @@ -848,7 +848,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.1; + transition, TRANSITION_LINEAR; target, "clip"; } program { @@ -856,7 +856,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, LINEAR 0.1; + transition, TRANSITION_LINEAR; target, "clip"; } } @@ -915,7 +915,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus"; - transition, LINEAR 0.5; + transition, TRANSITION_LINEAR; target, "bg"; } program { @@ -923,7 +923,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_LINEAR; target, "bg"; } program { @@ -980,7 +980,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_LINEAR; target, "bg"; } program { @@ -988,7 +988,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, LINEAR 0.5; + transition, TRANSITION_LINEAR; target, "bg"; } program { @@ -1089,7 +1089,7 @@ group { signal, SIG_FOCUS; source, SRC_PROG; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.3; + transition, TRANSITION_DECEL; target, "clip"; target, "bg"; } @@ -1098,7 +1098,7 @@ group { signal, SIG_UNFOCUS; source, SRC_PROG; action, STATE_SET "default" 0.0; - transition, LINEAR 0.3; + transition, TRANSITION_DECEL; target, "clip"; target, "bg"; } diff --git a/edje/widget/gengrid.edc b/edje/widget/gengrid.edc index 31efaa4..fab6192 100644 --- a/edje/widget/gengrid.edc +++ b/edje/widget/gengrid.edc @@ -103,7 +103,7 @@ group { signal, "elm,state,focused"; source, "elm"; action, STATE_SET "focus" 0.0; - transition, LINEAR 0.1; + transition, TRANSITION_LINEAR; target, "clip"; } program { @@ -111,7 +111,7 @@ group { signal, "elm,state,unfocused"; source, "elm"; action, STATE_SET "default" 0.0; - transition, LINEAR 0.1; + transition, TRANSITION_LINEAR; target, "clip"; } } diff --git a/include/defs.h b/include/defs.h index 73d131a..ad6dec3 100644 --- a/include/defs.h +++ b/include/defs.h @@ -193,4 +193,7 @@ #define GUM_LIST_USERTYPE_NORMAL "normal" #define GUM_LIST_USERTYPE_ADMIN "admin" +#define TRANSITION_DECEL DECEL 0.3 +#define TRANSITION_LINEAR LINEAR 0.2 + #endif /* __AIR_HOME_DEFS_H__ */ -- 2.7.4 From db2d3dd2e5908fb38ff76a92accf0afdeddcb90c Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Fri, 31 Jul 2015 10:55:46 +0900 Subject: [PATCH 13/16] block to edit and delete user by user authority - owner is possible to edit and delete all users except for itself - normal is possible to edit only itself Change-Id: I332819dc821fdb80f5aa072cb12a1553d5901563 Signed-off-by: Soohye Shin --- edje/view/user.edc | 4 ++-- edje/view/useredit.edc | 12 ------------ include/defs.h | 2 ++ include/view.h | 3 ++- src/view/view_user.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- src/view/view_user_edit.c | 21 ++++++++------------- 6 files changed, 59 insertions(+), 30 deletions(-) diff --git a/edje/view/user.edc b/edje/view/user.edc index 9fc884f..574b5eb 100644 --- a/edje/view/user.edc +++ b/edje/view/user.edc @@ -349,7 +349,7 @@ group { programs { program { name, "sig,show,arrow"; - signal, SIG_FOCUS; + signal, SIG_SHOW_ARROW; source, SRC_PROG; action, STATE_SET "focus"; target, "text"; @@ -357,7 +357,7 @@ group { } program { name, "sig,hide,arrow"; - signal, SIG_UNFOCUS; + signal, SIG_HIDE_ARROW; source, SRC_PROG; action, STATE_SET "default"; target, "text"; diff --git a/edje/view/useredit.edc b/edje/view/useredit.edc index 4aa17b7..6e6889e 100644 --- a/edje/view/useredit.edc +++ b/edje/view/useredit.edc @@ -953,11 +953,6 @@ group { inherit, "default" 0.0; color, 0 119 246 255; } - description { - state, "disable" 0.0; - inherit, "default" 0.0; - color, 87 87 87 125; - } } part { name, "text.delete"; @@ -991,13 +986,6 @@ group { transition, TRANSITION_LINEAR; target, "bg"; } - program { - name, "sig,disable"; - signal, SIG_DISABLE; - source, SRC_PROG; - action, STATE_SET "disable" 0.0; - target, "bg"; - } } } diff --git a/include/defs.h b/include/defs.h index ad6dec3..4a57ebb 100644 --- a/include/defs.h +++ b/include/defs.h @@ -120,6 +120,8 @@ #define SIG_HIDE_DONE "sig.hide.done" #define SIG_CLICK_ITEM "sig.click.item" #define SIG_CLICK_ARROW "sig.click.arrow" +#define SIG_SHOW_ARROW "sig.show.arrow" +#define SIG_HIDE_ARROW "sig.hide.arrow" #define TITLE_WIDTH "title.width" diff --git a/include/view.h b/include/view.h index a981f18..b4559a5 100644 --- a/include/view.h +++ b/include/view.h @@ -20,7 +20,8 @@ enum update_type { UPDATE_TYPE_EDIT, UPDATE_TYPE_PHOTO, - UPDATE_TYPE_NOTI + UPDATE_TYPE_NOTI, + UPDATE_TYPE_USER }; view_class *view_home_get_vclass(void); diff --git a/src/view/view_user.c b/src/view/view_user.c index 2557852..37f54d2 100644 --- a/src/view/view_user.c +++ b/src/view/view_user.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); @@ -34,6 +33,13 @@ enum input_handler_type { INPUT_HANDLER_TYPE_BUTTON }; +enum user_item_type { + USER_ITEM_NONE = 0x00, + USER_ITEM_ADD = 0x01, + USER_ITEM_ADMIN = 0x02, + USER_ITEM_NORMAL = 0x08 +}; + struct _priv { Evas_Object *win; Evas_Object *base; @@ -43,6 +49,8 @@ struct _priv { struct datamgr *dm; struct _bar_item *foc; + + enum user_item_type user_type; }; struct _bar_item { @@ -52,6 +60,27 @@ struct _bar_item { struct _priv *priv; }; +static bool _check_editable_user(struct _priv *priv) +{ + struct _bar_item *bi; + bool r = false; + + switch (priv->user_type) { + case USER_ITEM_NORMAL: + bi = eina_list_data_get(priv->list); + if (priv->foc == bi) + r = true; + break; + case USER_ITEM_ADMIN: + r = true; + break; + default: + break; + } + + return r; +} + static void _focused(int id, void *data, Evas_Object *obj, Elm_Object_Item *item) { @@ -66,6 +95,9 @@ static void _focused(int id, void *data, Evas_Object *obj, priv->foc = bi; elm_object_signal_emit(obj, SIG_FOCUS, SRC_PROG); + + if (_check_editable_user(priv)) + elm_object_signal_emit(obj, SIG_SHOW_ARROW, SRC_PROG); } static void _unfocused(int id, void *data, Evas_Object *obj, @@ -75,6 +107,7 @@ static void _unfocused(int id, void *data, Evas_Object *obj, return; elm_object_signal_emit(obj, SIG_UNFOCUS, SRC_PROG); + elm_object_signal_emit(obj, SIG_HIDE_ARROW, SRC_PROG); } static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, @@ -154,9 +187,12 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, !strcmp(ev->keyname, KEY_BACK_REMOTE)) { elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); } else if (!strcmp(ev->keyname, KEY_DOWN)) { - if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) + if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH || + !_check_editable_user(priv)) return; + viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_USER, + (void *)priv->user_type); viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, priv->foc->di); viewmgr_push_view(VIEW_USER_EDIT); @@ -247,6 +283,7 @@ static void _arrow_clicked(void *data, Evas_Object *obj, const char *emission, if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) return; + viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_USER, (void *)priv->user_type); viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, priv->foc->di); viewmgr_push_view(VIEW_USER_EDIT); } @@ -353,6 +390,7 @@ static void _add_user(struct _priv *priv) Evas_Object *scr, *box; struct _bar_item *bi; struct datamgr_item *di; + int i; scr = utils_add_scroller(priv->base); if (!scr) { @@ -378,11 +416,16 @@ static void _add_user(struct _priv *priv) return; } + i = 0; EINA_LIST_FOREACH(list, l, di) { bi = _pack_bar_item(priv, box, di); if (!bi) continue; + if (i == 0) { + priv->user_type = di->type; + i++; + } priv->list = eina_list_append(priv->list, bi); } diff --git a/src/view/view_user_edit.c b/src/view/view_user_edit.c index cbdf2fa..4140ef3 100644 --- a/src/view/view_user_edit.c +++ b/src/view/view_user_edit.c @@ -85,6 +85,8 @@ struct _priv { struct datamgr *dm; struct datamgr_item *di; + + enum user_item_type user_type; }; static void _focused(int id, void *data, Evas_Object *obj, @@ -663,18 +665,6 @@ static void _load_del_btn(struct _priv *priv) { Evas_Object *btn; - if (priv->di->type == USER_ITEM_ADMIN) { - btn = utils_add_layout(priv->ly, GRP_USER_EDIT_DELETE, false, - PART_USER_EDIT_CONTENTS_DELETE); - if (!btn) { - _ERR("failed to add delete button"); - return; - } - elm_object_signal_emit(btn, SIG_DISABLE, SRC_PROG); - return; - } - - btn = utils_add_layout(priv->ly, GRP_USER_EDIT_DELETE, true, PART_USER_EDIT_CONTENTS_DELETE); if (!btn) { @@ -711,7 +701,9 @@ static void _show(void *data) focus_photo = utils_get_focus_photo_from_photo(photo); _load_user_icon(priv, photo, focus_photo); } - _load_del_btn(priv); + if (priv->user_type == USER_ITEM_ADMIN && + priv->di->type !=USER_ITEM_ADMIN) + _load_del_btn(priv); } else { elm_object_part_text_set(priv->base, PART_USER_EDIT_TITLE, MESSAGE_ADD_USER); @@ -793,6 +785,9 @@ static void _update(void *view_data, int update_type, void *data) case UPDATE_TYPE_PHOTO: priv->selected_photo = data; break; + case UPDATE_TYPE_USER: + priv->user_type = (enum user_item_type) data; + break; default: _ERR("Invalid type"); return; -- 2.7.4 From d8fc6f9b23bac338a0fa72c5aa16433f92ca8885 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Fri, 31 Jul 2015 17:12:13 +0900 Subject: [PATCH 14/16] bug fix - key handling in home view - block the enter key when focus is in recent arrow - move focus to list when focus is in recent arrow Change-Id: Ic0ef5b8a1f0ad4ce20c475c1d5f373d3276c96f3 Signed-off-by: Soohye Shin --- src/view/view_home.c | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/view/view_home.c b/src/view/view_home.c index 11dd94d..2256c9f 100644 --- a/src/view/view_home.c +++ b/src/view/view_home.c @@ -27,7 +27,6 @@ #include "utils.h" enum input_handler_type { - INPUT_HANDLER_TYPE_BASE, INPUT_HANDLER_TYPE_EO, INPUT_HANDLER_TYPE_DOWN }; @@ -92,29 +91,36 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) { struct _priv *priv; + struct bar_item *bi; - if (id != INPUT_HANDLER_TYPE_BASE) + if (!data) return; - if (!data) { - _ERR("Invalid argument"); + switch (id) { + case INPUT_HANDLER_TYPE_EO: + bi = data; + priv = bi->priv; + if (!strcmp(ev->keyname, KEY_DOWN)) { + viewmgr_push_view(VIEW_RECENT); + } else if (!strcmp(ev->keyname, KEY_ENTER) || + !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { + if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) + elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); + else + datamgr_select_item(priv->dm, priv->foc->di); + } + break; + case INPUT_HANDLER_TYPE_DOWN: + priv = data; + if (!strcmp(ev->keyname, KEY_UP)) + elm_object_focus_set(priv->foc->eo, EINA_TRUE); + else if (!strcmp(ev->keyname, KEY_ENTER) || + !strcmp(ev->keyname, KEY_ENTER_REMOTE)) + viewmgr_push_view(VIEW_RECENT); + break; + default: return; } - - priv = data; - - if (!strcmp(ev->keyname, KEY_DOWN)) { - viewmgr_push_view(VIEW_RECENT); - } else if (!strcmp(ev->keyname, KEY_ENTER) || - !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { - if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) - elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); - else - datamgr_select_item(priv->dm, priv->foc->di); - } else if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { - /* It should be implemented later */ - } } static void _mouse_down(int id, void *data, Evas *e, Evas_Object *obj, @@ -347,7 +353,6 @@ static Evas_Object *_create(Evas_Object *win, void *data) } viewmgr_set_view_data(VIEW_HOME, priv); - inputmgr_add_callback(base, INPUT_HANDLER_TYPE_BASE, &handler, priv); elm_object_signal_callback_add(base, SIG_HIDE_DONE, SRC_EDJE, _hide_done, priv); -- 2.7.4 From e23f61cefc8c8817654bd089924e7964f6ab5c7d Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Sat, 1 Aug 2015 13:56:21 +0900 Subject: [PATCH 15/16] fix checkpatch error Change-Id: I078d12117937cbd6f46149ed6bf82d707db34080 Signed-off-by: Soohye Shin --- include/defs.h | 4 ++++ src/data/data_recent.c | 6 ++---- src/view/view_home.c | 3 ++- src/view/view_recent.c | 4 ++-- src/view/view_user.c | 9 ++++++--- src/view/view_user_edit.c | 9 ++------- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/defs.h b/include/defs.h index 4a57ebb..4f47793 100644 --- a/include/defs.h +++ b/include/defs.h @@ -186,6 +186,10 @@ #define MESSAGE_OK "OK" #define MESSAGE_DONE "Done" #define MESSAGE_DISCARD "Discard" +#define MESSAGE_DELETE_CONTENTS "If you delete this user, their data will also be deleted." +#define MESSAGE_DISCARD_CONTENTS "Discard all entered data?
If you are out of this screen, data won't be saved" +#define MESSAGE_ENTRY_NAME "User Name" +#define MESSAGE_ENTRY_PIN "Pin code" #define GUM_ATTR_NAME "username" #define GUM_ATTR_USERTYPE "usertype" diff --git a/src/data/data_recent.c b/src/data/data_recent.c index e497e8d..7259ba1 100644 --- a/src/data/data_recent.c +++ b/src/data/data_recent.c @@ -77,14 +77,12 @@ static void _app_list_foreach(gpointer data, gpointer user_data) } r = pkgmgrinfo_appinfo_get_label(handle, &label); - if (r != PMINFO_R_OK) { + if (r != PMINFO_R_OK) _ERR("failed to get app label"); - } r = pkgmgrinfo_appinfo_get_effectimage(handle, &thumb, &thumb_land); - if (r != PMINFO_R_OK) { + if (r != PMINFO_R_OK) _ERR("failed to get app icon"); - } if (!strcmp(thumb_land, "")) thumb_land = THUMB_DEFAULT; diff --git a/src/view/view_home.c b/src/view/view_home.c index 2256c9f..22058d0 100644 --- a/src/view/view_home.c +++ b/src/view/view_home.c @@ -105,7 +105,8 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, } else if (!strcmp(ev->keyname, KEY_ENTER) || !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) - elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG); + elm_object_signal_emit(priv->base, SIG_HIDE, + SRC_PROG); else datamgr_select_item(priv->dm, priv->foc->di); } diff --git a/src/view/view_recent.c b/src/view/view_recent.c index 73e1ed3..54bad0b 100644 --- a/src/view/view_recent.c +++ b/src/view/view_recent.c @@ -142,7 +142,7 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, if (!strcmp(ev->keyname, KEY_DOWN) || !strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)){ + !strcmp(ev->keyname, KEY_BACK_REMOTE)) { elm_object_signal_emit(priv->base, SIG_HIDE_RECENT, SRC_PROG); } @@ -327,7 +327,7 @@ static struct _bar_item *_pack_item(struct _priv *priv, Evas_Object *box, return NULL; } - if(di->subtitle) { + if (di->subtitle) { sub_lbl = utils_add_label(eo, di->subtitle, STYLE_LABEL_RECENT_SUBTITLE, PART_RECENT_SUBTITLE); diff --git a/src/view/view_user.c b/src/view/view_user.c index 37f54d2..60f811f 100644 --- a/src/view/view_user.c +++ b/src/view/view_user.c @@ -283,7 +283,8 @@ static void _arrow_clicked(void *data, Evas_Object *obj, const char *emission, if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH) return; - viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_USER, (void *)priv->user_type); + viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_USER, + (void *)priv->user_type); viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, priv->foc->di); viewmgr_push_view(VIEW_USER_EDIT); } @@ -338,7 +339,8 @@ static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box, if (!focus_lbl) goto err; - elm_object_signal_callback_add(eo, SIG_CLICK_ARROW, SRC_EDJE, _arrow_clicked, priv); + elm_object_signal_callback_add(eo, SIG_CLICK_ARROW, SRC_EDJE, + _arrow_clicked, priv); } else { eo = utils_add_layout(box, GRP_BAR_ITEM, true, NULL); if (!eo) { @@ -367,7 +369,8 @@ static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box, evas_object_size_hint_align_set(eo, 0.5, 0.0); inputmgr_add_callback(eo, INPUT_HANDLER_TYPE_EO, &handler, bi); - elm_object_signal_callback_add(eo, SIG_CLICK_ITEM, SRC_EDJE, _item_clicked, priv); + elm_object_signal_callback_add(eo, SIG_CLICK_ITEM, SRC_EDJE, + _item_clicked, priv); elm_box_pack_end(box, eo); evas_object_show(eo); diff --git a/src/view/view_user_edit.c b/src/view/view_user_edit.c index 4140ef3..6794072 100644 --- a/src/view/view_user_edit.c +++ b/src/view/view_user_edit.c @@ -25,11 +25,6 @@ #include "datamgr.h" #include "utils.h" -#define MESSAGE_DELETE_CONTENTS "If you delete this user, their data will also be deleted." -#define MESSAGE_DISCARD_CONTENTS "Discard all entered data?
If you are out of this screen, data won't be saved" - -#define MESSAGE_ENTRY_NAME "User Name" -#define MESSAGE_ENTRY_PIN "Pin code" #define KEY_ICON "icon" #define KEY_FOCUS_ICON "focusicon" @@ -642,7 +637,7 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, default: return; } - } else if(!strcmp(ev->keyname, KEY_ENTER) || + } else if (!strcmp(ev->keyname, KEY_ENTER) || !strcmp(ev->keyname, KEY_ENTER_REMOTE)) _select(priv, id, obj); } @@ -702,7 +697,7 @@ static void _show(void *data) _load_user_icon(priv, photo, focus_photo); } if (priv->user_type == USER_ITEM_ADMIN && - priv->di->type !=USER_ITEM_ADMIN) + priv->di->type != USER_ITEM_ADMIN) _load_del_btn(priv); } else { elm_object_part_text_set(priv->base, PART_USER_EDIT_TITLE, -- 2.7.4 From 41726613d2443889ba919e2266bde111ec770a29 Mon Sep 17 00:00:00 2001 From: Soohye Shin Date: Sat, 1 Aug 2015 19:04:55 +0900 Subject: [PATCH 16/16] bug fix - user edit view - support back key - remove pin entry - modify name entry to focus/unfocus - diable name entry when edit user Change-Id: Ie6e485ca853231fe08ca4891da9e3570f8e5ccf2 Signed-off-by: Soohye Shin --- edje/images/search_searchbar_small_bg_nor.png | Bin 0 -> 209 bytes edje/view/useredit.edc | 353 ++++++++++---------------- include/defs.h | 6 +- src/utils.c | 31 +-- src/view/view_user_edit.c | 146 +++++------ 5 files changed, 198 insertions(+), 338 deletions(-) create mode 100644 edje/images/search_searchbar_small_bg_nor.png diff --git a/edje/images/search_searchbar_small_bg_nor.png b/edje/images/search_searchbar_small_bg_nor.png new file mode 100644 index 0000000000000000000000000000000000000000..74848b3bca1b3fa523d0ac55d7cecc63e5155f73 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s0wkH2?q3U}7>k44ofy`glX(f`FeQ1ryDe+xGddG!C5Y46*;wUk@lTmxYybp;gj2yE+ t?tk$x{6$vo(HRnP*{2qAtMku!ODlf<(44$rjF6*2UngI4MLOcKf literal 0 HcmV?d00001 diff --git a/edje/view/useredit.edc b/edje/view/useredit.edc index 6e6889e..67b2b02 100644 --- a/edje/view/useredit.edc +++ b/edje/view/useredit.edc @@ -140,7 +140,7 @@ group { to, "contents"; relative, 0.5 0.5; } - min, 1128 408; + min, 1128 378; fixed, 1 1; } } @@ -153,6 +153,7 @@ group { image, "ic_user_require_01.png" COMP; image, "ic_user_require_02.png" COMP; image, "btn_user_del.png" COMP; + image, "search_searchbar_small_bg_nor.png" COMP; } parts { part { @@ -161,7 +162,7 @@ group { scale, 1; description { state, "default" 0.0; - min, 1128 408; + min, 1128 378; visible, 0; } } @@ -284,90 +285,6 @@ group { } } part { - name, "pad.require"; - type, RECT; - scale, 1; - description { - state, "default" 0.0; - rel1 { - to, PART_USER_EDIT_CONTENTS_PHOTO; - relative, 0.0 1.0; - } - rel2 { - to, PART_USER_EDIT_CONTENTS_PHOTO; - relative, 0.0 1.0; - } - min, 0 22; - fixed, 1 1; - align, 0.0 0.0; - visible, 0; - } - } - part { - name, "icon.require"; - type, IMAGE; - scale, 1; - description { - state, "default" 0.0; - rel1 { - to, "pad.require"; - relative, 1.0 1.0; - } - rel2.to, "pad.require"; - min, 12 24; - fixed, 1 1; - align, 0.0 0.0; - image.normal, "ic_user_require_02.png"; - } - } - part { - name, "pad.require.text"; - type, RECT; - scale, 1; - description { - state, "default" 0.0; - rel1 { - to, "icon.require"; - relative, 1.0 0.0; - } - rel2 { - to, "icon.require"; - relative, 1.0 0.0; - } - min, 6 0; - align, 0.0 0.0; - fixed, 1 1; - visible, 0; - } - } - part { - name, "require"; - type, TEXT; - scale, 1; - description { - state, "default" 0.0; - rel1 { - to, "pad.require.text"; - relative, 1.0 1.0; - } - rel2 { - to, "pad.require.text"; - relative, 1.0 1.0; - } - min, 294 24; - fixed, 1 1; - align, 0.0 0.0; - text { - font, "TizenSans"; - size, 24; - align, 0.0 0.5; - text, "Required fields"; - } - color, 64 136 211 255; - } - } - - part { name, "pad.profile"; type, RECT; scale, 1; @@ -450,12 +367,11 @@ group { min, 0 22; fixed, 1 1; align, 0.0 0.0; - visible, 0; } } part { - name, PART_USER_EDIT_CONTENTS_NAME; - type, SWALLOW; + name, "border.name"; + type, IMAGE; scale, 1; description { state, "default" 0.0; @@ -468,10 +384,56 @@ group { fixed, 1 1; align, 0.0 0.0; fixed, 1 1; + image { + normal, "search_searchbar_small_bg_nor.png"; + border, 4 4 4 4; + border_scale, 1; + } + visible, 1; + } + description { + state, "focus"; + inherit, "default" 0.0; + visible, 0; + } + } + part { + name, PART_USER_EDIT_CONTENTS_NAME; + type, SWALLOW; + scale, 1; + description { + state, "default" 0.0; + rel1 { + to, "border.name"; + relative, 0.5 0.5; + } + rel2 { + to, "border.name"; + relative, 0.5 0.5; + } + min, 432 60; + fixed, 1 1; + } + } + part { + name, "disable.name"; + type, RECT; + scale, 1; + description { + state, "default" 0.0; + rel1.to, PART_USER_EDIT_CONTENTS_NAME; + rel2.to, PART_USER_EDIT_CONTENTS_NAME; + color, 200 200 200 100; + visible, 0; + } + description { + state, "disable"; + inherit, "default" 0.0; + visible, 1; } } part { - name, "pad.pin"; + name, "pad.lock"; type, RECT; scale, 1; description { @@ -484,157 +446,154 @@ group { to, PART_USER_EDIT_CONTENTS_NAME; relative, 0.0 1.0; } - min, 0 32; + min, 0 42; fixed, 1 1; align, 0.0 0.0; visible, 0; } } part { - name, "pin"; + name, "lock"; type, TEXT; scale, 1; description { state, "default" 0.0; rel1 { - to, "pad.pin"; - relative, 0.0 1.0; - } - rel2 { - to, "pad.pin"; - relative, 0.0 1.0; + to, "pad.lock"; + relative, 1.0 1.0; } + rel2.to, "pad.lock"; min, 436 32; fixed, 1 1; align, 0.0 0.0; text { - text, "Pin code"; font, "TizenSans"; size, 32; + text, "Privacy lock"; align, 0.0 0.5; } color, 77 77 77 255; } } part { - name, "pad.pin.down"; + name, "pad.lock.down"; type, RECT; scale, 1; description { state, "default" 0.0; rel1 { - to, "pin"; + to, "lock"; relative, 0.0 1.0; } rel2 { - to, "pin"; + to, "lock"; relative, 0.0 1.0; } min, 0 22; - align, 0.0 0.0; fixed, 1 1; + align, 0.0 0.0; visible, 0; } } part { - name, PART_USER_EDIT_CONTENTS_PIN; + name, PART_USER_EDIT_CONTENTS_LOCK; type, SWALLOW; scale, 1; description { state, "default" 0.0; rel1 { - to, "pad.pin.down"; - relative, 1.0 1.0; - } - rel2 { - to, "pad.pin.down"; + to, "pad.lock.down"; relative, 1.0 1.0; } - min, 436 64; + rel2.to, "pad.lock.down"; + min, 104 54; fixed, 1 1; align, 0.0 0.0; } } part { - name, "pad.lock"; + name, "pad.require"; type, RECT; scale, 1; description { state, "default" 0.0; rel1 { - to, PART_USER_EDIT_CONTENTS_PIN; + to, PART_USER_EDIT_CONTENTS_LOCK; relative, 0.0 1.0; } rel2 { - to, PART_USER_EDIT_CONTENTS_PIN; + to, PART_USER_EDIT_CONTENTS_LOCK; relative, 0.0 1.0; } - min, 0 32; + min, 0 52; fixed, 1 1; align, 0.0 0.0; visible, 0; } } part { - name, "lock"; - type, TEXT; + name, "icon.require"; + type, IMAGE; scale, 1; description { state, "default" 0.0; rel1 { - to, "pad.lock"; + to, "pad.require"; relative, 1.0 1.0; } - rel2.to, "pad.lock"; - min, 436 32; + rel2.to, "pad.require"; + min, 12 24; fixed, 1 1; align, 0.0 0.0; - text { - font, "TizenSans"; - size, 32; - text, "Privacy lock"; - align, 0.0 0.5; - } - color, 77 77 77 255; + image.normal, "ic_user_require_02.png"; } } part { - name, "pad.lock.down"; + name, "pad.require.text"; type, RECT; scale, 1; description { state, "default" 0.0; rel1 { - to, "lock"; - relative, 0.0 1.0; + to, "icon.require"; + relative, 1.0 0.0; } rel2 { - to, "lock"; - relative, 0.0 1.0; + to, "icon.require"; + relative, 1.0 0.0; } - min, 0 22; - fixed, 1 1; + min, 6 0; align, 0.0 0.0; + fixed, 1 1; visible, 0; } } part { - name, PART_USER_EDIT_CONTENTS_LOCK; - type, SWALLOW; + name, "require"; + type, TEXT; scale, 1; description { state, "default" 0.0; rel1 { - to, "pad.lock.down"; + to, "pad.require.text"; relative, 1.0 1.0; } - rel2.to, "pad.lock.down"; - min, 104 54; + rel2 { + to, "pad.require.text"; + relative, 1.0 1.0; + } + min, 294 24; fixed, 1 1; align, 0.0 0.0; + text { + font, "TizenSans"; + size, 24; + align, 0.0 0.5; + text, "Required fields"; + } + color, 64 136 211 255; } } - part { name, "pad.delete"; type, RECT; @@ -643,15 +602,15 @@ group { state, "default" 0.0; rel1 { to, PART_USER_EDIT_CONTENTS_NAME; - relative, 1.0 0.0; + relative, 1.0 0.5; } rel2 { to, PART_USER_EDIT_CONTENTS_NAME; - relative, 1.0 0.0; + relative, 1.0 0.5; } min, 14 0; fixed, 1 1; - align, 0.0 0.0; + align, 0.0 0.5; visible, 0; } } @@ -663,18 +622,48 @@ group { state, "default" 0.0; rel1 { to, "pad.delete"; - relative, 1.0 0.0; + relative, 1.0 0.5; } rel2 { to, "pad.delete"; - relative, 1.0 0.0; + relative, 1.0 0.5; } min, 174 64; fixed, 1 1; - align, 0.0 0.0; + align, 0.0 0.5; } } } + programs { + program { + name, "sig,focus"; + signal, SIG_FOCUS; + source, SRC_PROG; + action, STATE_SET "focus" 0.0; + target, "border.name"; + } + program { + name, "sig,unfocus"; + signal, SIG_UNFOCUS; + source, SRC_PROG; + action, STATE_SET "default" 0.0; + target, "border.name"; + } + program { + name, "sig,disable"; + signal, SIG_DISABLE; + source, SRC_PROG; + action, STATE_SET "disable" 0.0; + target, "disable.name"; + } + program { + name, "sig,enable"; + signal, SIG_ENABLE; + source, SRC_PROG; + action, STATE_SET "default" 0.0; + target, "disable.name"; + } + } } group { @@ -863,80 +852,6 @@ group { } group { - name, GRP_USER_EDIT_ENTRY; - parts { - part { - name, "bg"; - type, RECT; - scale, 1; - description { - state, "default" 0.0; - min, 436 64; - color, 194 194 194 255; - } - description { - state, "focus" 0.0; - inherit, "default" 0.0; - color, 0 119 246 255; - } - description { - state, "disable" 0.0; - inherit, "default" 0.0; - color, 194 194 194 120; - } - } - part { - name, "bg.entry"; - type, RECT; - scale, 1; - description { - state, "default" 0.0; - min, 432 60; - rel1.relative, 0.5 0.5; - rel2.relative, 0.5 0.5; - fixed, 1 1; - } - } - part { - name, PART_USER_EDIT_ENTRY; - type, SWALLOW; - scale, 1; - description { - state, "default" 0.0; - rel1.to, "bg.entry"; - rel2.to, "bg.entry"; - fixed, 1 1; - } - } - } - programs { - program { - name, "sig,focus"; - signal, SIG_FOCUS; - source, SRC_PROG; - action, STATE_SET "focus"; - transition, TRANSITION_LINEAR; - target, "bg"; - } - program { - name, "sig,unfocus"; - signal, SIG_UNFOCUS; - source, SRC_PROG; - action, STATE_SET "default" 0.0; - transition, TRANSITION_LINEAR; - target, "bg"; - } - program { - name, "sig,disable"; - signal, SIG_DISABLE; - source, SRC_PROG; - action, STATE_SET "disable" 0.0; - target, "bg"; - } - } -} - -group { name, GRP_USER_EDIT_DELETE; parts { part { diff --git a/include/defs.h b/include/defs.h index 4f47793..752c66c 100644 --- a/include/defs.h +++ b/include/defs.h @@ -25,6 +25,7 @@ #define SRC_PROG "prog" #define SRC_EDJE "edje" +#define SRC_ELM "elm" #define ICON_ADD "add" #define GRP_HOME "group.home" @@ -114,6 +115,7 @@ #define SIG_HIDE_RECENT "sig.hide.recent" #define SIG_HIDE_RECENT_DONE "sig.hide.recent.done" #define SIG_DISABLE "sig.disable" +#define SIG_ENABLE "sig.enable" #define SIG_SHOW_MASK "sig.show.mask" #define SIG_SHOW "sig.show" #define SIG_HIDE "sig.hide" @@ -122,6 +124,8 @@ #define SIG_CLICK_ARROW "sig.click.arrow" #define SIG_SHOW_ARROW "sig.show.arrow" #define SIG_HIDE_ARROW "sig.hide.arrow" +#define SIG_SELECT "elm,state,selected" +#define SIG_UNSELECT "elm,state,unselected" #define TITLE_WIDTH "title.width" @@ -188,8 +192,6 @@ #define MESSAGE_DISCARD "Discard" #define MESSAGE_DELETE_CONTENTS "If you delete this user, their data will also be deleted." #define MESSAGE_DISCARD_CONTENTS "Discard all entered data?
If you are out of this screen, data won't be saved" -#define MESSAGE_ENTRY_NAME "User Name" -#define MESSAGE_ENTRY_PIN "Pin code" #define GUM_ATTR_NAME "username" #define GUM_ATTR_USERTYPE "usertype" diff --git a/src/utils.c b/src/utils.c index cb24df5..aadb952 100644 --- a/src/utils.c +++ b/src/utils.c @@ -18,7 +18,6 @@ #include #include #include -#include #include "utils.h" #include "defs.h" @@ -313,35 +312,12 @@ Evas_Object *utils_add_button(Evas_Object *base, char *text, const char *part) return btn; } -static void _entry_focused(int id, void *data, Evas_Object *obj, - Elm_Object_Item *item) -{ - elm_object_signal_emit(data, SIG_FOCUS, SRC_PROG); -} - -static void _entry_unfocused(int id, void *data, Evas_Object *obj, - Elm_Object_Item *item) -{ - elm_object_signal_emit(data, SIG_UNFOCUS, SRC_PROG); -} - -static input_handler entry_handle = { - .focused = _entry_focused, - .unfocused = _entry_unfocused -}; - Evas_Object *utils_add_entry(Evas_Object *base, char *text, bool password, const char *part) { - Evas_Object *ly, *entry; - - ly = utils_add_layout(base, GRP_USER_EDIT_ENTRY, false, part); - if (!ly) { - _ERR("failed to add entry layout"); - return NULL; - } + Evas_Object *entry; - entry = elm_entry_add(ly); + entry = elm_entry_add(base); if (!entry) { _ERR("failed to add entry"); return NULL; @@ -362,9 +338,8 @@ Evas_Object *utils_add_entry(Evas_Object *base, char *text, bool password, ELM_SCROLLER_POLICY_OFF); if (text) elm_entry_entry_set(entry, text); - elm_object_part_content_set(ly, PART_USER_EDIT_ENTRY, entry); + elm_object_part_content_set(base, part, entry); - inputmgr_add_callback(entry, 0, &entry_handle, ly); evas_object_show(entry); return entry; diff --git a/src/view/view_user_edit.c b/src/view/view_user_edit.c index 6794072..0ef6b49 100644 --- a/src/view/view_user_edit.c +++ b/src/view/view_user_edit.c @@ -34,7 +34,6 @@ enum input_handler_type { INPUT_HANDLER_TYPE_PHOTO, - INPUT_HANDLER_TYPE_LOCK, INPUT_HANDLER_TYPE_DELETE, INPUT_HANDLER_TYPE_EO, INPUT_HANDLER_TYPE_BTN_DONE, @@ -42,7 +41,8 @@ enum input_handler_type { INPUT_HANDLER_TYPE_POPUP_BTN_DISCARD, INPUT_HANDLER_TYPE_POPUP_BTN_CANCEL, INPUT_HANDLER_TYPE_DELETE_POPUP_BTN_DELETE, - INPUT_HANDLER_TYPE_DELETE_POPUP_BTN_CANCEL + INPUT_HANDLER_TYPE_DELETE_POPUP_BTN_CANCEL, + INPUT_HANDLER_TYPE_ENTRY }; enum user_item_type { @@ -65,8 +65,6 @@ struct _priv { Evas_Object *ly; Evas_Object *photo; Evas_Object *name; - Evas_Object *pin; - Evas_Object *lock; Evas_Object *icon; Evas_Object *focus_icon; Evas_Object *done; @@ -74,7 +72,6 @@ struct _priv { Evas_Object *ctxpopup; Evas_Object *del; Evas_Object *popup; - Evas_Object *lock_icon; char *selected_photo; @@ -87,13 +84,19 @@ struct _priv { static void _focused(int id, void *data, Evas_Object *obj, Elm_Object_Item *item) { + struct _priv *priv; + switch (id) { case INPUT_HANDLER_TYPE_PHOTO: - case INPUT_HANDLER_TYPE_LOCK: case INPUT_HANDLER_TYPE_DELETE: case INPUT_HANDLER_TYPE_EO: elm_object_signal_emit(obj, SIG_FOCUS, SRC_PROG); break; + case INPUT_HANDLER_TYPE_ENTRY: + priv = data; + elm_object_signal_emit(obj, SIG_SELECT, SRC_ELM); + elm_object_signal_emit(priv->ly, SIG_FOCUS, SRC_PROG); + break; default: return; } @@ -102,13 +105,19 @@ static void _focused(int id, void *data, Evas_Object *obj, static void _unfocused(int id, void *data, Evas_Object *obj, Elm_Object_Item *item) { + struct _priv *priv; + switch (id) { case INPUT_HANDLER_TYPE_PHOTO: - case INPUT_HANDLER_TYPE_LOCK: case INPUT_HANDLER_TYPE_DELETE: case INPUT_HANDLER_TYPE_EO: elm_object_signal_emit(obj, SIG_UNFOCUS, SRC_PROG); break; + case INPUT_HANDLER_TYPE_ENTRY: + priv = data; + elm_object_signal_emit(obj, SIG_UNSELECT, SRC_ELM); + elm_object_signal_emit(priv->ly, SIG_UNFOCUS, SRC_PROG); + break; default: return; } @@ -128,10 +137,9 @@ static input_handler handler = { }; static void _get_profile(struct _priv *priv, const char **name, - const char **photo, const char **pin) + const char **photo) { *name = elm_entry_entry_get(priv->name); - *pin = elm_entry_entry_get(priv->pin); elm_image_file_get(priv->icon, photo, NULL); *photo = utils_get_icon_from_photo(*photo); } @@ -179,18 +187,15 @@ static void _add_discard_popup(struct _priv *priv) static bool _check_changed_input(struct _priv *priv) { - const char *photo, *name, *pin; + const char *photo, *name; - _get_profile(priv, &name, &photo, &pin); + _get_profile(priv, &name, &photo); if (priv->di) { - if (!strcmp(name, priv->di->title) && !strcmp(pin, "") && - !strcmp(photo, priv->di->icon)) + if (!strcmp(photo, priv->di->icon)) return false; } else { - if (!strcmp(name, MESSAGE_ENTRY_NAME) && - !strcmp(pin, MESSAGE_ENTRY_PIN) && - !strcmp(photo, IMAGE_USER_DEFAULT)) + if (!strcmp(name, "") && !strcmp(photo, IMAGE_USER_DEFAULT)) return false; } @@ -334,51 +339,9 @@ static void _add_icon_list(struct _priv *priv) priv->ctxpopup = ctxpopup; } -static void _change_entry_status(Evas_Object *pin, Eina_Bool disable, - const char *signal) -{ - Evas_Object *parent; - - elm_entry_editable_set(pin, disable); - parent = elm_object_parent_widget_get(pin); - if (parent) - elm_object_signal_emit(parent, signal, SRC_PROG); - - elm_object_focus_allow_set(pin, disable); -} - -static void _load_lock_icon(struct _priv *priv) -{ - const char *file = NULL; - - if (!priv->lock_icon) { - priv->lock_icon = utils_add_icon(priv->lock, IMAGE_SWITCH_ON, - PART_USER_EDIT_SWITCH); - _change_entry_status(priv->pin, EINA_TRUE, SIG_UNFOCUS); - return; - } - - elm_image_file_get(priv->lock_icon, &file, NULL); - elm_object_part_content_unset(priv->lock, PART_USER_EDIT_SWITCH); - evas_object_del(priv->lock_icon); - - if (!file || !strcmp(file, IMAGE_SWITCH_OFF)) { - file = IMAGE_SWITCH_ON; - _change_entry_status(priv->pin, EINA_TRUE, SIG_UNFOCUS); - elm_entry_entry_set(priv->pin, MESSAGE_ENTRY_PIN); - } else { - file = IMAGE_SWITCH_OFF; - _change_entry_status(priv->pin, EINA_FALSE, SIG_DISABLE); - elm_entry_entry_set(priv->pin, ""); - } - - priv->lock_icon = utils_add_icon(priv->lock, file, - PART_USER_EDIT_SWITCH); -} - static Evas_Object *_add_layout(struct _priv *priv) { - Evas_Object *ly, *photo, *name, *pin, *lock; + Evas_Object *ly, *photo, *name, *lock; ly = utils_add_layout(priv->base, GRP_USER_EDIT_CONTENTS, false, PART_USER_EDIT_CONTENTS); @@ -397,23 +360,18 @@ static Evas_Object *_add_layout(struct _priv *priv) if (!name) goto err; - pin = utils_add_entry(ly, MESSAGE_ENTRY_PIN, false, - PART_USER_EDIT_CONTENTS_PIN); - if (!pin) - goto err; - - lock = utils_add_layout(ly, GRP_USER_EDIT_SWITCH, true, + lock = utils_add_layout(ly, GRP_USER_EDIT_SWITCH, false, PART_USER_EDIT_CONTENTS_LOCK); if (!lock) goto err; - inputmgr_add_callback(lock, INPUT_HANDLER_TYPE_LOCK, &handler, priv); + utils_add_icon(lock, IMAGE_SWITCH_OFF, PART_USER_EDIT_SWITCH); + inputmgr_add_callback(photo, INPUT_HANDLER_TYPE_PHOTO, &handler, priv); + inputmgr_add_callback(name, INPUT_HANDLER_TYPE_ENTRY, &handler, priv); - priv->lock = lock; priv->photo = photo; priv->name = name; - priv->pin = pin; return ly; err: @@ -438,8 +396,6 @@ static bool _add_user_edit(struct _priv *priv) return false; } - /* It should be implemented later about function btn */ - priv->ly = ly; return true; @@ -545,18 +501,17 @@ static void _select_eo(struct _priv *priv, Evas_Object *obj) static void _select_btn_done(struct _priv *priv) { - const char *name, *pin, *photo; + const char *name, *photo; - _get_profile(priv, &name, &photo, &pin); + _get_profile(priv, &name, &photo); if (priv->di) { priv->di->action = ITEM_SELECT_ACTION_UPDATE; priv->di->title = strdup(name ? name : ""); priv->di->icon = strdup(photo ? photo : IMAGE_USER_DEFAULT); - priv->di->parameter = strdup(pin ? pin : ""); datamgr_select_item(priv->dm, priv->di); } else - datamgr_add_item(priv->dm, name, photo, pin); + datamgr_add_item(priv->dm, name, photo, ""); priv->di = NULL; viewmgr_pop_view(); @@ -568,9 +523,6 @@ static void _select(struct _priv *priv, int id, Evas_Object *obj) case INPUT_HANDLER_TYPE_PHOTO: _add_icon_list(priv); break; - case INPUT_HANDLER_TYPE_LOCK: - _load_lock_icon(priv); - break; case INPUT_HANDLER_TYPE_DELETE: _add_delete_popup(priv); break; @@ -620,6 +572,17 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_REMOTE)) { switch (id) { + case INPUT_HANDLER_TYPE_PHOTO: + case INPUT_HANDLER_TYPE_BTN_DONE: + case INPUT_HANDLER_TYPE_BTN_CANCEL: + case INPUT_HANDLER_TYPE_DELETE: + case INPUT_HANDLER_TYPE_ENTRY: + if (_check_changed_input(priv)) { + _add_discard_popup(priv); + return; + } + viewmgr_pop_view(); + break; case INPUT_HANDLER_TYPE_EO: evas_object_del(priv->ctxpopup); priv->ctxpopup = NULL; @@ -638,8 +601,12 @@ static void _key_down(int id, void *data, Evas *e, Evas_Object *obj, return; } } else if (!strcmp(ev->keyname, KEY_ENTER) || - !strcmp(ev->keyname, KEY_ENTER_REMOTE)) + !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { _select(priv, id, obj); + } else if (!strcmp(ev->keyname, KEY_RIGHT)) { + if (id == INPUT_HANDLER_TYPE_PHOTO && priv->del) + elm_object_focus_set(priv->del, EINA_TRUE); + } } static void _mouse_down(int id, void *data, Evas *e, Evas_Object *obj, @@ -671,6 +638,15 @@ static void _load_del_btn(struct _priv *priv) priv->del = btn; } +static void _change_entry(Evas_Object *name, Evas_Object *ly, Eina_Bool disable, + const char *text, const char *signal) +{ + elm_entry_entry_set(name, text); + elm_object_focus_allow_set(name, disable); + elm_entry_editable_set(name, disable); + elm_object_signal_emit(ly, signal, SRC_PROG); +} + static void _show(void *data) { struct _priv *priv; @@ -686,8 +662,8 @@ static void _show(void *data) if (priv->di) { elm_object_part_text_set(priv->base, PART_USER_EDIT_TITLE, MESSAGE_EDIT_USER); - elm_entry_entry_set(priv->name, priv->di->title); - elm_entry_entry_set(priv->pin, ""); + _change_entry(priv->name, priv->ly, EINA_FALSE, priv->di->title, + SIG_DISABLE); if (priv->selected_photo) { _load_user_icon(priv, priv->selected_photo, priv->selected_photo); @@ -702,8 +678,7 @@ static void _show(void *data) } else { elm_object_part_text_set(priv->base, PART_USER_EDIT_TITLE, MESSAGE_ADD_USER); - elm_entry_entry_set(priv->name, MESSAGE_ENTRY_NAME); - elm_entry_entry_set(priv->pin, MESSAGE_ENTRY_PIN); + _change_entry(priv->name, priv->ly, EINA_TRUE, "", SIG_ENABLE); if (priv->selected_photo) _load_user_icon(priv, priv->selected_photo, priv->selected_photo); @@ -712,7 +687,6 @@ static void _show(void *data) IMAGE_USER_CURRENT_DEFAULT_FOCUS); } - _load_lock_icon(priv); evas_object_show(priv->base); elm_object_focus_set(priv->cancel, EINA_TRUE); } @@ -733,11 +707,6 @@ static void _hide(void *data) priv->del = NULL; } - if (priv->lock_icon) { - evas_object_del(priv->lock_icon); - priv->lock_icon = NULL; - } - priv->selected_photo = NULL; evas_object_hide(priv->base); } @@ -754,7 +723,6 @@ static void _destroy(void *data) priv = data; inputmgr_remove_callback(priv->photo, &handler); - inputmgr_remove_callback(priv->lock, &handler); inputmgr_remove_callback(priv->done, &handler); inputmgr_remove_callback(priv->cancel, &handler); viewmgr_remove_view(VIEW_PHOTO); -- 2.7.4