summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShilpa Singh <shilpa.singh@samsung.com>2015-11-09 14:34:37 -0800
committerCedric BAIL <cedric@osg.samsung.com>2015-11-09 14:34:40 -0800
commit3a6a1253220ccebec2957413d9a232a78202499a (patch)
tree6765785e0f610135facf9217cf41872df8e00655
parentcf94160b6bd9a1180c8a1fdcb35b8ee1e055f37f (diff)
downloadelementary-3a6a1253220ccebec2957413d9a232a78202499a.tar.gz
naviframe: subtitle,show signal not sent
Summary: 1. When subtitle is set using actual part name "elm.text.subtitle", subtitle,show signal is not sent issue fix. 2. Remove unnecessary checks, maintain code readability. @fix Test Plan: Set text using edc part name elm.text.subtitle Reviewers: Hermet, cedric Reviewed By: cedric Subscribers: shashank0990 Differential Revision: https://phab.enlightenment.org/D2988 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/elc_naviframe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index 353f9fae5..441c418e6 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -469,7 +469,7 @@ _elm_naviframe_item_elm_widget_item_part_text_set(Eo *eo_it EINA_UNUSED,
elm_object_signal_emit(VIEW(it), "elm,state,title_label,hide", "elm");
elm_object_part_text_set(VIEW(it), TITLE_PART, label);
}
- else if (!strcmp("subtitle", part))
+ else if ((!strcmp(part, "subtitle")) || (!strcmp(part, SUBTITLE_PART)))
{
eina_stringshare_replace(&nit->subtitle_label, label);
if (label)
@@ -730,7 +730,7 @@ _item_title_icon_unset(Elm_Naviframe_Item_Data *it)
static void
_part_aliasing_eval(const char **part)
{
- if (!*part || !strcmp("default", *part))
+ if (!*part || !strcmp(*part, "default"))
*part = CONTENT_PART;
else if (!strcmp(*part, "prev_btn"))
*part = PREV_BTN_PART;
@@ -811,7 +811,7 @@ _elm_naviframe_item_elm_widget_item_part_content_set(Eo *eo_nit EINA_UNUSED,
_part_aliasing_eval(&part);
//specified parts
- if (!part || !strcmp(CONTENT_PART, part))
+ if (!strcmp(part, CONTENT_PART))
_item_content_set(nit, content);
else if (!strcmp(part, PREV_BTN_PART))
_item_title_prev_btn_set(nit, content);
@@ -833,7 +833,7 @@ _elm_naviframe_item_elm_widget_item_part_content_get(Eo *eo_nit EINA_UNUSED,
_part_aliasing_eval(&part);
//specified parts
- if (!part || !strcmp(CONTENT_PART, part))
+ if (!strcmp(part, CONTENT_PART))
return nit->content;
else if (!strcmp(part, PREV_BTN_PART))
return nit->title_prev_btn;
@@ -887,7 +887,7 @@ _elm_naviframe_item_elm_widget_item_part_content_unset(Eo *eo_nit EINA_UNUSED,
_part_aliasing_eval(&part);
//specified parts
- if (!part || !strcmp(CONTENT_PART, part))
+ if (!strcmp(part, CONTENT_PART))
o = _item_content_unset(nit);
else if (!strcmp(part, PREV_BTN_PART))
o = _item_title_prev_btn_unset(nit);