change add/edit layout and set id/pw callback 74/35774/1 accepted/tizen/tv/20150225.005403 submit/tizen/20150224.130118
authorSoohye Shin <soohye.shin@samsung.com>
Tue, 24 Feb 2015 12:06:50 +0000 (21:06 +0900)
committerSoohye Shin <soohye.shin@samsung.com>
Tue, 24 Feb 2015 12:06:50 +0000 (21:06 +0900)
Change-Id: If48a8c585f332d521523b99ec631ce98a652f383
Signed-off-by: Soohye Shin <soohye.shin@samsung.com>
edje/bar/ubar.edc
include/defs.h
src/ubar.c

index c145a1c..b05b05f 100644 (file)
@@ -510,7 +510,7 @@ group {
                        clip_to, "clip.bg";
                        description {
                                state, "default" 0.0;
-                               min, 85 90;
+                               min, 120 120;
                                color, 0 0 0 0;
                        }
                }
@@ -568,7 +568,7 @@ group {
                                rel1.to, PART_BG;
                                rel2.relative, 0.0 0.0;
                                rel2.to, PART_BG;
-                               min, 85 85;
+                               min, 120 120;
                                align, 0.0 0.0;
                                fixed, 1 1;
                                color, 27 32 45 55;
@@ -584,7 +584,7 @@ group {
                                rel1.to, PART_BG;
                                rel2.relative, 0.0 0.0;
                                rel2.to, PART_BG;
-                               min, 85 85;
+                               min, 120 120;
                                align, 0.0 0.0;
                                fixed, 1 1;
                        }
@@ -1147,7 +1147,7 @@ group {
                        }
                }
                part {
-                       name, "wrong.pw";
+                       name, "message.pw";
                        type, TEXT;
                        scale, 1;
                        description {
@@ -1158,9 +1158,9 @@ group {
                                text {
                                        font, "TizenSans:style=Bold";
                                        size, 23;
-                                       text, "Wrong Password";
+                                       text, "Password";
                                }
-                               color, 255 0 0 255;
+                               color, 0 0 0 255;
                                visible, 0;
                        }
                        description {
@@ -1168,23 +1168,36 @@ group {
                                inherit, "default" 0.0;
                                visible, 1;
                        }
+                       description {
+                               state, "wrong.pw" 0.0;
+                               inherit, "default" 0.0;
+                               text.text, "Wrong Password";
+                               color, 255 0 0 255;
+                               visible, 1;
+                       }
                }
        }
        programs {
                program {
                        name, "show,wrong,pw";
+                       signal, SIG_SHOW_WRONG_PW;
+                       source, SRC_PROG;
+                       action, STATE_SET "wrong.pw" 0.0;
+                       target, "message.pw";
+               }
+               program {
+                       name, "show,message,pw";
                        signal, SIG_SHOW_PW;
                        source, SRC_PROG;
                        action, STATE_SET "show" 0.0;
-                       target, "wrong.pw";
-                       transition, LINEAR 1.2;
-                       after, "hide,wrong,pw";
+                       target, "message.pw";
                }
                program {
-                       name, "hide,wrong,pw";
+                       name, "hide,message,pw";
+                       signal, SIG_HIDE_PW;
                        source, SRC_PROG;
                        action, STATE_SET "default" 0.0;
-                       target, "wrong.pw";
+                       target, "message.pw";
                }
        }
 }
@@ -1276,7 +1289,7 @@ group {
                        }
                }
                part {
-                       name, "wrong.pw";
+                       name, "message.pw";
                        type, TEXT;
                        scale, 1;
                        description {
@@ -1287,9 +1300,9 @@ group {
                                text {
                                        font, "TizenSans:style=Bold";
                                        size, 23;
-                                       text, "Wrong Password";
+                                       text, "Password";
                                }
-                               color, 255 0 0 255;
+                               color, 0 0 0 255;
                                visible, 0;
                        }
                        description {
@@ -1297,23 +1310,36 @@ group {
                                inherit, "default" 0.0;
                                visible, 1;
                        }
+                       description{
+                               state, "wrong.pw" 0.0;
+                               inherit, "default" 0.0;
+                               text.text, "Wrong Password";
+                               color, 255 0 0 255;
+                               visible, 1;
+                       }
                }
        }
        programs {
                program {
                        name, "show,wrong,pw";
+                       signal, SIG_SHOW_WRONG_PW;
+                       source, SRC_PROG;
+                       action, STATE_SET "wrong.pw" 0.0;
+                       target, "message.pw";
+               }
+               program {
+                       name, "show,message,pw";
                        signal, SIG_SHOW_PW;
                        source, SRC_PROG;
                        action, STATE_SET "show" 0.0;
-                       target, "wrong.pw";
-                       transition, LINEAR 1.2;
-                       after, "hide,wrong,pw";
+                       target, "message.pw";
                }
                program {
-                       name, "hide,wrong,pw";
+                       name, "hide,message,pw";
+                       signal, SIG_HIDE_PW;
                        source, SRC_PROG;
                        action, STATE_SET "default" 0.0;
-                       target, "wrong.pw";
+                       target, "message.pw";
                }
        }
 }
@@ -1404,7 +1430,7 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               min, 75 30;
+                               min, 100 30;
                                fixed, 1 1;
                                align, 0.0 0.0;
                                rel1.to, "area";
@@ -1421,7 +1447,7 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               min, 240 130;
+                               min, 120 120;
                                fixed, 1 1;
                                align, 0.0 0.0;
                                rel1 {
@@ -1440,7 +1466,7 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               min, 30 30;
+                               min, 50 30;
                                fixed, 1 1;
                                align, 1.0 0.5;
                                rel1 {
@@ -1478,7 +1504,7 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               min, 60 40;
+                               min, 90 35;
                                fixed, 1 1;
                                align, 1.0 0.0;
                                rel1 {
@@ -1498,7 +1524,7 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               min, 270 50;
+                               min, 310 50;
                                fixed, 1 1;
                                align, 1.0 0.0;
                                rel1 {
@@ -1512,6 +1538,30 @@ group {
                        }
                }
                part {
+                       name, "message.id";
+                       type, TEXT;
+                       scale, 1;
+                       description {
+                               state, "default" 0.0;
+                               fixed, 1 1;
+                               rel1.to, PART_POPUP_ENTRY_NAME;
+                               rel2.to, PART_POPUP_ENTRY_NAME;
+                               text {
+                                       font, "TizenSans:style=Bold";
+                                       size, 23;
+                                       text, "ID";
+                               }
+                               color, 0 0 0 255;
+                               visible, 0;
+                       }
+                       description {
+                               state, "show" 0.0;
+                               inherit, "default" 0.0;
+                               visible, 1;
+                       }
+               }
+
+               part {
                        name, "padding.pw";
                        type, RECT;
                        scale, 1;
@@ -1537,7 +1587,7 @@ group {
                        description {
                                state, "default" 0.0;
                                fixed, 1 1;
-                               min, 270 50;
+                               min, 310 50;
                                align, 0.0 0.0;
                                rel1 {
                                        to, "padding.pw";
@@ -1547,7 +1597,7 @@ group {
                        }
                }
                part {
-                       name, "wrong.pw";
+                       name, "message.pw";
                        type, TEXT;
                        scale, 1;
                        description {
@@ -1558,9 +1608,9 @@ group {
                                text {
                                        font, "TizenSans:style=Bold";
                                        size, 23;
-                                       text, "Wrong Password";
+                                       text, "Password";
                                }
-                               color, 255 0 0 255;
+                               color, 0 0 0 255;
                                visible, 0;
                        }
                        description {
@@ -1568,23 +1618,50 @@ group {
                                inherit, "default" 0.0;
                                visible, 1;
                        }
+                       description {
+                               state, "wrong.pw" 0.0;
+                               inherit, "default" 0.0;
+                               text.text, "Wrong Password";
+                               color, 255 0 0 255;
+                               visible, 1;
+                       }
                }
        }
        programs {
                program {
-                       name, "show,wrong,pw";
+                       name, "hide,message,pw";
+                       signal, SIG_HIDE_PW;
+                       source, SRC_PROG;
+                       action, STATE_SET "default" 0.0;
+                       target, "message.pw";
+               }
+               program {
+                       name, "show,message,pw";
                        signal, SIG_SHOW_PW;
                        source, SRC_PROG;
                        action, STATE_SET "show" 0.0;
-                       target, "wrong.pw";
-                       transition, LINEAR 1.2;
-                       after, "hide,wrong,pw";
+                       target, "message.pw";
                }
                program {
-                       name, "hide,wrong,pw";
+                       name, "hide,message,id";
+                       signal, SIG_HIDE_ID;
                        source, SRC_PROG;
                        action, STATE_SET "default" 0.0;
-                       target, "wrong.pw";
+                       target, "message.id";
+               }
+               program {
+                       name, "show,message,id";
+                       signal, SIG_SHOW_ID;
+                       source, SRC_PROG;
+                       action, STATE_SET "show" 0.0;
+                       target, "message.id";
+               }
+               program {
+                       name, "show,wrong,pw";
+                       signal, SIG_SHOW_WRONG_PW;
+                       source, SRC_PROG;
+                       action, STATE_SET "wrong.pw" 0.0;
+                       target, "message.pw";
                }
        }
 }
index abefe28..9e6e766 100644 (file)
 #define SIG_SHOW_AGE "show.age"
 #define SIG_HIDE_PW "hide.pw"
 #define SIG_SHOW_PW "show.pw"
-#define SIG_HIDE_NAME "hide.name"
-#define SIG_SHOW_NAME "show.name"
+#define SIG_HIDE_ID "hide.id"
+#define SIG_SHOW_ID "show.id"
 #define SIG_SHOW_WRONG_PW "show.wrong.pw"
 #define SIG_SHOW_ARROW "show.arrow"
 #define SIG_HIDE_ARROW "hide.arrow"
index 6143f18..834058d 100644 (file)
@@ -949,7 +949,7 @@ static void _show_wrong_password(struct _ubar_item *item)
                return;
        }
 
-       elm_object_signal_emit(ly, SIG_SHOW_PW, SRC_PROG);
+       elm_object_signal_emit(ly, SIG_SHOW_WRONG_PW, SRC_PROG);
 }
 
 static Eina_Bool _check_delete_user(struct _ubar_item *item)
@@ -1237,6 +1237,22 @@ static void _popup_arrow_clicked(void *data, Evas_Object *obj,
        _update_arrow(scr, item->right_arrow, item->left_arrow);
 }
 
+static void _pw_entry_focused(void *data, Evas_Object *obj, void *ei)
+{
+       if (!elm_entry_is_empty(obj))
+               return;
+
+       elm_object_signal_emit(data, SIG_HIDE_PW, SRC_PROG);
+}
+
+static void _pw_entry_unfocused(void *data, Evas_Object *obj, void *ei)
+{
+       if (!elm_entry_is_empty(obj))
+               return;
+
+       elm_object_signal_emit(data, SIG_SHOW_PW, SRC_PROG);
+}
+
 static Evas_Object *_add_popup_items(struct _ubar_item *item, Evas_Object *popup)
 {
        Evas_Object *ly, *pw_entry, *right_arrow, *left_arrow;
@@ -1288,6 +1304,11 @@ static Evas_Object *_add_popup_items(struct _ubar_item *item, Evas_Object *popup
        }
        elm_object_focus_next_object_set(pw_entry, item->btn[0],
                        ELM_FOCUS_DOWN);
+       elm_object_signal_emit(ly, SIG_SHOW_PW, SRC_PROG);
+       evas_object_smart_callback_add(pw_entry, "focused",
+                       _pw_entry_focused, ly);
+       evas_object_smart_callback_add(pw_entry, "unfocused",
+                       _pw_entry_unfocused, ly);
 
        item->left_arrow = left_arrow;
        item->right_arrow = right_arrow;
@@ -1485,6 +1506,11 @@ static Eina_Bool _add_delete_item(Evas_Object *p, struct _ubar_item *item)
                evas_object_del(ly);
                return EINA_FALSE;
        }
+       elm_object_signal_emit(ly, SIG_SHOW_PW, SRC_PROG);
+       evas_object_smart_callback_add(entry, "focused", _pw_entry_focused, ly);
+       evas_object_smart_callback_add(entry, "unfocused", _pw_entry_unfocused,
+                       ly);
+
        item->pw_entry = entry;
 
        return EINA_TRUE;
@@ -1646,6 +1672,10 @@ static Eina_Bool _add_login_item(Evas_Object *p, struct _ubar_item *item)
        }
        elm_object_focus_next_object_set(entry, item->btn[0],
                        ELM_FOCUS_DOWN);
+       elm_object_signal_emit(ly, SIG_SHOW_PW, SRC_PROG);
+       evas_object_smart_callback_add(entry, "focused", _pw_entry_focused, ly);
+       evas_object_smart_callback_add(entry, "unfocused", _pw_entry_unfocused,
+                       ly);
 
        item->pw_entry = entry;
 
@@ -1968,6 +1998,22 @@ static void _popup_add_clicked(void *data, Evas *e, Evas_Object *obj,
        _check_add_user(data);
 }
 
+static void _id_entry_focused(void *data, Evas_Object *obj, void *ei)
+{
+       if (!elm_entry_is_empty(obj))
+               return;
+
+       elm_object_signal_emit(data, SIG_HIDE_ID, SRC_PROG);
+}
+
+static void _id_entry_unfocused(void *data, Evas_Object *obj, void *ei)
+{
+       if (!elm_entry_is_empty(obj))
+               return;
+
+       elm_object_signal_emit(data, SIG_SHOW_ID, SRC_PROG);
+}
+
 static Eina_Bool _load_add_popup(struct _ubar_item *item)
 {
        struct _ubar_data *bar;
@@ -2020,6 +2066,9 @@ static Eina_Bool _load_add_popup(struct _ubar_item *item)
                evas_object_del(ly);
                return EINA_FALSE;
        }
+       elm_object_signal_emit(ly, SIG_SHOW_ID, SRC_PROG);
+       evas_object_smart_callback_add(id_entry, "focused", _id_entry_focused, ly);
+       evas_object_smart_callback_add(id_entry, "unfocused", _id_entry_unfocused, ly);
 
        if (bar->popup_list) {
                cur = eina_list_data_get(bar->popup_list);