From: hermet Date: Thu, 6 Oct 2011 04:59:02 +0000 (+0000) Subject: elementary/naviframe - modified internal signal names. X-Git-Tag: REL_F_I9500_20120323_1~17^2~1691 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c78a4b6c1569ad629a13f602f22fb4db1654e855;p=framework%2Fuifw%2Felementary.git elementary/naviframe - modified internal signal names. this change resolves the transition problem also When user set the item style again. every time, transition signals are called, Transition start position of the page will be reset. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@63869 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/data/themes/widgets/naviframe.edc b/data/themes/widgets/naviframe.edc index 88dd6dc..5b7208d 100644 --- a/data/themes/widgets/naviframe.edc +++ b/data/themes/widgets/naviframe.edc @@ -81,21 +81,16 @@ group { name:"elm/naviframe/item/basic/default"; clip_to: "content_clip"; description { state: "default" 0.0; align: 0.0 0.0; - rel1.relative: 1.0 1.0; - rel1.to_y: "title_clip"; - rel2.relative: 2.0 1.0; - } - description { state: "show" 0.0; - inherit: "default" 0.0; rel1.relative: 0.0 1.0; + rel1.to_y: "title_clip"; rel2.relative: 1.0 1.0; } - description { state: "pushed" 0.0; + description { state: "left" 0.0; inherit: "default" 0.0; rel1.relative: -1.0 1.0; rel2.relative: 0.0 1.0; } - description { state: "popped" 0.0; + description { state: "right" 0.0; inherit: "default" 0.0; rel1.relative: 1.0 1.0; rel2.relative: 2.0 1.0; @@ -218,30 +213,70 @@ group { name:"elm/naviframe/item/basic/default"; } } programs { - program { name: "show"; - signal: "elm,state,show"; - source: "elm"; - action: STATE_SET "show" 0.0; - target: "elm.swallow.content"; + program { name: "content_new_pusehd"; + signal: "elm,state,new,pushed,internal"; + source: ""; + action: STATE_SET "default" 0.0; transition: DECELERATE 0.5; + target: "elm.swallow.content"; after: "show_finished"; } - program { name: "pushed"; - signal: "elm,state,pushed"; - source: "elm"; - action: STATE_SET "pushed" 0.0; + program { name: "content_cur_pusehd"; + signal: "elm,state,cur,pushed,internal"; + source: ""; + action: STATE_SET "left" 0.0; target: "elm.swallow.content"; transition: DECELERATE 0.5; after: "pushed_finished"; } - program { name: "popped"; - signal: "elm,state,popped"; - source: "elm"; - action: STATE_SET "popped" 0.0; + program { name: "content_prev_popped"; + signal: "elm,state,prev,popped,internal"; + source: ""; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + transition: DECELERATE 0.5; + after: "show_finished"; + } + program { name: "content_cur_popped"; + signal: "elm,state,cur,popped,internal"; + source: ""; + action: STATE_SET "right" 0.0; target: "elm.swallow.content"; transition: DECELERATE 0.5; after: "popped_finished"; } + program { name: "cur_pushed"; + signal: "elm,state,cur,pushed"; + source: "elm"; + script { + set_state(PART:"elm.swallow.content", "default", 0.0); + emit("elm,state,cur,pushed,internal", ""); + } + } + program { name: "new_pushed"; + signal: "elm,state,new,pushed"; + source: "elm"; + script { + set_state(PART:"elm.swallow.content", "right", 0.0); + emit("elm,state,new,pushed,internal", ""); + } + } + program { name: "prev_popped"; + signal: "elm,state,prev,popped"; + source: "elm"; + script { + set_state(PART:"elm.swallow.content", "left", 0.0); + emit("elm,state,prev,popped,internal", ""); + } + } + program { name: "cur_popped"; + signal: "elm,state,cur,popped"; + source: "elm"; + script { + set_state(PART:"elm.swallow.content", "default", 0.0); + emit("elm,state,cur,popped,internal", ""); + } + } program { name: "visible"; signal: "elm,state,visible"; source: "elm"; diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index 32eb26b..a8140cc 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -841,10 +841,10 @@ elm_naviframe_item_push(Evas_Object *obj, evas_object_pass_events_set(wd->base, EINA_TRUE); } edje_object_signal_emit(prev_it->base.view, - "elm,state,pushed", + "elm,state,cur,pushed", "elm"); edje_object_signal_emit(it->base.view, - "elm,state,show", + "elm,state,new,pushed", "elm"); } else @@ -881,11 +881,11 @@ elm_naviframe_item_pop(Evas_Object *obj) //FIXME: evas_object_pass_events_set(wd->base, EINA_TRUE); } - edje_object_signal_emit(it->base.view, "elm,state,popped", "elm"); + edje_object_signal_emit(it->base.view, "elm,state,cur,popped", "elm"); evas_object_show(prev_it->base.view); evas_object_raise(prev_it->base.view); edje_object_signal_emit(prev_it->base.view, - "elm,state,show", + "elm,state,prev,popped", "elm"); } else @@ -968,10 +968,8 @@ elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style) else { if (strlen(item_style) > sizeof(buf)) - WRN("too much long style name! : naviframe=%p", - navi_it->base.widget); - else - sprintf(buf, "item/%s", item_style); + WRN("too much long style name! : naviframe=%p", navi_it->base.widget); + sprintf(buf, "item/%s", item_style); } _elm_theme_object_set(navi_it->base.widget, navi_it->base.view,