From: Woochan Lee Date: Mon, 4 Jul 2016 10:04:45 +0000 (+0900) Subject: Remove useless signal sending logic. X-Git-Tag: submit/tizen/20160707.233627~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b7306081fe18c6ff110c73dcc39fdea3fe58449;p=platform%2Fcore%2Fuifw%2Fui-viewmgr.git Remove useless signal sending logic. Change-Id: I7add9c86a98e18ccf9580748146e901250555e8a --- diff --git a/src/lib/efl/mobile/UiStandardView.cpp b/src/lib/efl/mobile/UiStandardView.cpp index a77bfc3..2c28b2d 100644 --- a/src/lib/efl/mobile/UiStandardView.cpp +++ b/src/lib/efl/mobile/UiStandardView.cpp @@ -203,15 +203,20 @@ bool UiStandardViewImpl::setTitleLeftBtn(Elm_Button *titleLeftBtn) { Elm_Layout *layout = this->getBase(); LAYOUT_VALIDATE(); + Elm_Button *pbtn; - //FIXME: inside of the unset_title_left_btn, it will send a title_left_btn,hide signal. - //But right after it needs to send a show signal again if new title_left_btn is valid. - //We don't need to send a hide signal in this case. - Elm_Button *pbtn = this->unsetTitleLeftBtn(); + if (!titleLeftBtn) + { + pbtn = this->unsetTitleLeftBtn(); + evas_object_del(pbtn); + + return true; + } + + pbtn = this->getTitleLeftBtn(); evas_object_del(pbtn); this->_titleLeftBtn = titleLeftBtn; - if (!titleLeftBtn) return true; elm_object_style_set(titleLeftBtn, "tizen_view/title_left"); elm_object_part_content_set(layout, "title_left_btn", titleLeftBtn); @@ -224,16 +229,20 @@ bool UiStandardViewImpl::setTitleLeftBtn(Elm_Button *titleLeftBtn) bool UiStandardViewImpl::setTitleRightBtn(Elm_Button *titleRightBtn) { Elm_Layout *layout = this->getBase(); - LAYOUT_VALIDATE(); + Elm_Button *pbtn; - //FIXME: inside of the unset_title_right_btn, it will send a title_right_btn,hide signal. - //But right after it needs to send a show signal again if new title_right_btn is valid. - //We don't need to send a hide signal in this case. - Elm_Button *pbtn = this->unsetTitleRightBtn(); + if (!titleRightBtn) + { + pbtn = this->unsetTitleRightBtn(); + evas_object_del(pbtn); + + return true; + } + + pbtn = this->getTitleRightBtn(); evas_object_del(pbtn); this->_titleRightBtn = titleRightBtn; - if (!titleRightBtn) return true; elm_object_style_set(titleRightBtn, "tizen_view/title_right"); elm_object_part_content_set(layout, "title_right_btn", titleRightBtn);