summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwoo.shin <jw0227.shin@samsung.com>2015-08-28 17:03:13 +0900
committerjinwoo.shin <jw0227.shin@samsung.com>2015-08-28 17:03:13 +0900
commit530255c68466aab4e856b06b4b3fd81b99ac069b (patch)
treec327bcdf2560b1f50920445aeae761423d5e7d68
parent209b1453e7118ccfcea735cf0fc5446a580a610a (diff)
downloadair_infosquare-530255c68466aab4e856b06b4b3fd81b99ac069b.tar.gz
air_infosquare-530255c68466aab4e856b06b4b3fd81b99ac069b.tar.bz2
air_infosquare-530255c68466aab4e856b06b4b3fd81b99ac069b.zip
Change-Id: I13163d6c84dfe951f7cde5f355d2fecbc38dc648 Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
-rw-r--r--data/view/square_view.edc460
-rw-r--r--src/square_view.c26
2 files changed, 261 insertions, 225 deletions
diff --git a/data/view/square_view.edc b/data/view/square_view.edc
index 3b60f2d..f1b7566 100644
--- a/data/view/square_view.edc
+++ b/data/view/square_view.edc
@@ -247,244 +247,258 @@ group {
fixed, 0 1;
visible, 0;
}
- part {
- name, PART_INFO_USER_MESSAGE;
- type, TEXT;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1.relative, 1.0 0.0;
- rel2.relative, 1.0 0.0;
- text {
- font, FONT_LIGHT;
- text, STR_DEFAULT_USER_MESSAGE;
- size, 56;
- align, 1.0 0.0;
- min, 1 1;
- ellipsis, -1;
- }
- min, 0 56;
+ }
+ part {
+ name, PART_INFO_USER_MESSAGE;
+ type, TEXT;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, PART_INFO;
+ relative, 1.0 0.0;
+ }
+ rel2 {
+ to, PART_INFO;
+ relative, 1.0 0.0;
+ }
+ text {
+ font, FONT_LIGHT;
+ text, STR_DEFAULT_USER_MESSAGE;
+ size, 56;
align, 1.0 0.0;
- fixed, 1 1;
- visible, 1;
+ min, 1 1;
+ ellipsis, -1;
}
+ min, 0 56;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ visible, 1;
}
- part {
- name, "padding.info.time";
- type, SPACER;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1 {
- to_y, PART_INFO_USER_MESSAGE;
- relative, 0.0 1.0;
- }
- rel2 {
- to_y, PART_INFO_USER_MESSAGE;
- relative, 1.0 1.0;
- }
- min, 0 24;
- align, 1.0 0.0;
- fixed, 1 1;
+ }
+ part {
+ name, "padding.info.time";
+ type, SPACER;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to_x, PART_INFO;
+ to_y, PART_INFO_USER_MESSAGE;
+ relative, 0.0 1.0;
+ }
+ rel2 {
+ to_x, PART_INFO;
+ to_y, PART_INFO_USER_MESSAGE;
+ relative, 1.0 1.0;
}
+ min, 0 24;
+ align, 1.0 0.0;
+ fixed, 1 1;
}
- part {
- name, PART_INFO_TIME;
- type, RECT;
- scale, 1;
- description {
- rel1 {
- to_y, "padding.info.time";
- relative, 0.0 1.0;
- }
- rel2 {
- to_y, "padding.info.time";
- relative, 1.0 1.0;
- }
- min, 0 120;
- align, 0.0 0.0;
- fixed, 1 1;
- visible, 0;
+ }
+ part {
+ name, PART_INFO_TIME;
+ type, RECT;
+ scale, 1;
+ description {
+ rel1 {
+ to, "padding.info.time";
+ relative, 0.0 1.0;
}
- part {
- name, PART_INFO_TIME_MINUTE;
- type, TEXT;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1.relative, 1.0 0.0;
- rel2.relative, 1.0 0.0;
- text {
- font, FONT_LIGHT;
- size, 120;
- align, 0.0 1.0;
- min, 1 0;
- ellipsis, -1;
- }
- min, 0 120;
- align, 1.0 0.0;
- fixed, 1 1;
- visible, 1;
- }
+ rel2 {
+ to, "padding.info.time";
+ relative, 1.0 1.0;
}
- part {
- name, "padding_right.info.time_separator";
- type, SPACER;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1 {
- to_x, PART_INFO_TIME_MINUTE;
- relative, 0.0 0.0;
- }
- rel2 {
- to_x, PART_INFO_TIME_MINUTE;
- relative, 0.0 1.0;
- }
- min, 28 120;
- align, 1.0 0.0;
- fixed, 1 1;
- }
+ min, 0 120;
+ align, 0.0 0.0;
+ fixed, 1 1;
+ visible, 0;
+ }
+ }
+ part {
+ name, PART_INFO_TIME_MINUTE;
+ type, TEXT;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, PART_INFO_TIME;
+ relative, 1.0 0.0;
}
- part {
- name, PART_INFO_TIME_SEPARATOR;
- type, IMAGE;
- scale, 1;
- description {
- image.normal, "ic_info_time.png";
- rel1 {
- to_x, "padding_right.info.time_separator";
- relative, 0.0 0.0;
- }
- rel2 {
- to_x, "padding_right.info.time_separator";
- relative, 0.0 1.0;
- }
- min, 14 120;
- align, 1.0 0.0;
- fixed, 1 1;
- visible, 1;
- }
+ rel2 {
+ to, PART_INFO_TIME;
+ relative, 1.0 0.0;
}
- part {
- name, "padding_left.info.time_separator";
- type, SPACER;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1 {
- to_x, PART_INFO_TIME_SEPARATOR;
- relative, 0.0 0.0;
- }
- rel2 {
- to_x, PART_INFO_TIME_SEPARATOR;
- relative, 0.0 1.0;
- }
- min, 20 0;
- align, 1.0 0.0;
- fixed, 1 1;
- }
+ text {
+ font, FONT_LIGHT;
+ size, 120;
+ align, 0.0 1.0;
+ min, 1 0;
+ ellipsis, -1;
}
- part {
- name, PART_INFO_TIME_HOUR;
- type, TEXT;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1 {
- to_x, "padding_left.info.time_separator";
- relative, 0.0 0.0;
- }
- rel2 {
- to_x, "padding_left.info.time_separator";
- relative, 0.0 0.0;
- }
- text {
- font, FONT_LIGHT;
- size, 120;
- align, 0.0 1.0;
- min, 1 0;
- ellipsis, -1;
- }
- min, 0 120;
- align, 1.0 0.0;
- fixed, 1 1;
- visible, 1;
- }
+ min, 0 120;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ visible, 1;
+ }
+ }
+ part {
+ name, "padding_right.info.time_separator";
+ type, SPACER;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, PART_INFO_TIME_MINUTE;
+ relative, 0.0 0.0;
}
- part {
- name, "padding.info.time_am_pm";
- type, SPACER;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1 {
- to_x, PART_INFO_TIME_HOUR;
- relative, 0.0 0.0;
- }
- rel2 {
- to_x, PART_INFO_TIME_HOUR;
- relative, 0.0 0.0;
- }
- min, 10 8;
- align, 1.0 0.0;
- fixed, 1 1;
- }
+ rel2 {
+ to, PART_INFO_TIME_MINUTE;
+ relative, 0.0 1.0;
}
- part {
- name, PART_INFO_TIME_AM_PM;
- type, TEXT;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1 {
- to, "padding.info.time_am_pm";
- relative, 0.0 1.0;
- }
- rel2 {
- to, "padding.info.time_am_pm";
- relative, 0.0 1.0;
- }
- text {
- font, FONT_LIGHT;
- size, 30;
- align, 1.0 1.0;
- min, 1 0;
- ellipsis, -1;
- }
- min, 0 30;
- align, 1.0 0.0;
- fixed, 1 1;
- visible, 1;
- }
+ min, 28 120;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ }
+ }
+ part {
+ name, PART_INFO_TIME_SEPARATOR;
+ type, IMAGE;
+ scale, 1;
+ description {
+ image.normal, "ic_info_time.png";
+ rel1 {
+ to, "padding_right.info.time_separator";
+ relative, 0.0 0.0;
+ }
+ rel2 {
+ to, "padding_right.info.time_separator";
+ relative, 0.0 1.0;
}
+ min, 14 120;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ visible, 1;
}
- part {
- name, PART_INFO_DATE;
- type, TEXT;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1 {
- to_y, PART_INFO_TIME;
- relative, 0.0 1.0;
- }
- rel2 {
- to_y, PART_INFO_TIME;
- relative, 1.0 1.0;
- }
- text {
- font, FONT_LIGHT;
- size, 30;
- align, 1.0 1.0;
- min, 1 1;
- ellipsis, -1;
- }
- min, 0 46;
- align, 1.0 0.0;
- fixed, 1 1;
- visible, 1;
+ }
+ part {
+ name, "padding_left.info.time_separator";
+ type, SPACER;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, PART_INFO_TIME_SEPARATOR;
+ relative, 0.0 0.0;
+ }
+ rel2 {
+ to, PART_INFO_TIME_SEPARATOR;
+ relative, 0.0 1.0;
+ }
+ min, 20 0;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ }
+ }
+ part {
+ name, PART_INFO_TIME_HOUR;
+ type, TEXT;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, "padding_left.info.time_separator";
+ relative, 0.0 0.0;
+ }
+ rel2 {
+ to, "padding_left.info.time_separator";
+ relative, 0.0 0.0;
+ }
+ text {
+ font, FONT_LIGHT;
+ size, 120;
+ align, 0.0 1.0;
+ min, 1 0;
+ ellipsis, -1;
+ }
+ min, 0 120;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ visible, 1;
+ }
+ }
+ part {
+ name, "padding.info.time_am_pm";
+ type, SPACER;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, PART_INFO_TIME_HOUR;
+ relative, 0.0 0.0;
+ }
+ rel2 {
+ to, PART_INFO_TIME_HOUR;
+ relative, 0.0 0.0;
}
+ min, 10 8;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ }
+ }
+ part {
+ name, PART_INFO_TIME_AM_PM;
+ type, TEXT;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, "padding.info.time_am_pm";
+ relative, 0.0 1.0;
+ }
+ rel2 {
+ to, "padding.info.time_am_pm";
+ relative, 0.0 1.0;
+ }
+ text {
+ font, FONT_LIGHT;
+ size, 30;
+ align, 1.0 1.0;
+ min, 1 0;
+ ellipsis, -1;
+ }
+ min, 0 30;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ visible, 1;
+ }
+ }
+ part {
+ name, PART_INFO_DATE;
+ type, TEXT;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, PART_INFO_TIME;
+ relative, 0.0 1.0;
+ }
+ rel2 {
+ to, PART_INFO_TIME;
+ relative, 1.0 1.0;
+ }
+ text {
+ font, FONT_LIGHT;
+ size, 30;
+ align, 1.0 1.0;
+ min, 1 1;
+ ellipsis, -1;
+ }
+ min, 0 46;
+ align, 1.0 0.0;
+ fixed, 1 1;
+ visible, 1;
}
}
}
diff --git a/src/square_view.c b/src/square_view.c
index 5baa108..ce54462 100644
--- a/src/square_view.c
+++ b/src/square_view.c
@@ -40,6 +40,8 @@ static void _button_focused_cb(int id, void *data,
Evas_Object *obj, Elm_Object_Item *it);
static void _button_mouse_move_cb(int id, void *data, Evas *e, Evas_Object *obj,
Evas_Event_Mouse_Move *ev);
+static void _button_key_up_cb(int id, void *data, Evas *e, Evas_Object *obj,
+ Evas_Event_Key_Up *ev);
static void _scroller_focused_cb(int id, void *data,
Evas_Object *obj, Elm_Object_Item *it);
static void _child_removed_cb(void *data, Evas_Object *obj, void *ei);
@@ -65,7 +67,8 @@ static input_handler base_handler = {
static input_handler button_handler = {
.clicked = _button_clicked_cb,
.focused = _button_focused_cb,
- .mouse_move = _button_mouse_move_cb
+ .mouse_move = _button_mouse_move_cb,
+ .key_up = _button_key_up_cb,
};
static input_handler scroller_handler = {
.focused = _scroller_focused_cb
@@ -187,8 +190,10 @@ static void _update_list(struct _priv *priv)
noti_list = notification_list_remove(noti_list, noti);
- if (!priv->last_focused)
+ if (!priv->last_focused) {
+ elm_object_focus_set(item, EINA_TRUE);
priv->last_focused = item;
+ }
}
} else {
elm_object_signal_emit(priv->base,
@@ -457,6 +462,23 @@ static void _button_mouse_move_cb(int id, void *data, Evas *e, Evas_Object *obj,
elm_object_focus_set(obj, EINA_TRUE);
}
+static void _button_key_up_cb(int id, void *data, Evas *e, Evas_Object *obj,
+ Evas_Event_Key_Up *ev)
+{
+ void *noti;
+
+ if (!strcmp(ev->keyname, KEY_MENU) ||
+ !strcmp(ev->keyname, KEY_MENU_REMOTE)) {
+ noti = evas_object_data_get(obj, KEY_NOTI);
+ if (!noti)
+ return;
+
+ viewmgr_update_view(ACTION_MENU_VIEW,
+ UPDATE_TYPE_SET_NOTIFICATION, noti);
+ viewmgr_show_view(ACTION_MENU_VIEW);
+ }
+}
+
static void _scroller_focused_cb(int id, void *data,
Evas_Object *obj, Elm_Object_Item *it)
{