NaviFrameView &getOwner();
const NaviFrameView &getOwner() const;
+ /**
+ * @brief Gets popping status
+ * @return true if current frame is popping and will be destroyed, false otherwise.
+ */
+ bool isPopping() const;
+
protected:
virtual void onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId) {};
private:
NaviFrameView &m_Owner;
NaviBar *m_pNaviBar;
+ bool m_IsPopping;
};
/**
NaviFrameItem::NaviFrameItem(NaviFrameView &owner)
: ViewItem()
, m_Owner(owner)
+ , m_IsPopping(false)
{
m_pNaviBar = new NaviBar(*this);
}
return m_Owner;
}
+bool NaviFrameItem::isPopping() const
+{
+ return m_IsPopping;
+}
+
void NaviFrameItem::setTitleVisibility(bool visible)
{
if (visible)
void NaviFrameView::pop(NaviFrameItem &item)
{
// Workaround solution to avoid rejected JIRA issue: http://suprem.sec.samsung.net/jira/browse/TSAM-6776
+ item.m_IsPopping = true;
if(getTransitionStatus())
{
m_ItemsToDelete.push_back(&item);
// Popup callbacks:
void onSendReadReportPopupDel(Evas_Object *popup, void *eventInfo);
void onSendReadReportPopupButtonClicked(Popup &popup, int buttonId);
- void onPopupDel(Evas_Object *popup, void *eventInfo);
+ void onNoRecipPopupDel(Evas_Object *popup, void *eventInfo);
void onRecipPopupDel(Evas_Object *popup, void *eventInfo);
void onMsgSendErrorButtonClicked(Popup &popup, int buttonId);
void onMsgSettingsButtonClicked(Popup &popup, int buttonId);
- void onNoRecipCancelButtonClicked(Popup &popup, int buttonId);
void onNoRecipDiscardButtonClicked(Popup &popup, int buttonId);
void onDeleteItemPressed(PopupListItem &item);
void onAddRecipientsItemPressed(PopupListItem &item);
void Conversation::showNoRecipPopup()
{
Popup &popup = getApp().getPopupManager().getPopup();
- popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Conversation, onPopupDel), this);
- popup.addButton(msgt("IDS_MSG_BUTTON_CANCEL_ABB"), Popup::CancelButtonId, POPUP_BUTTON_CB(Conversation, onNoRecipCancelButtonClicked), this);
+ popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Conversation, onNoRecipPopupDel), this);
+ popup.addButton(msgt("IDS_MSG_BUTTON_CANCEL_ABB"), Popup::CancelButtonId);
popup.addButton(msgt("IDS_MSG_BUTTON_DISCARD_ABB"), Popup::OkButtonId, POPUP_BUTTON_CB(Conversation, onNoRecipDiscardButtonClicked), this);
popup.setTitle(msgt("IDS_MSG_HEADER_DISCARD_MESSAGE_M_CLOSE_ABB"));
popup.setContent(msgt("IDS_MSG_POP_NO_VALID_RECIPIENTS_HAVE_BEEN_ADDED_THIS_MESSAGE_WILL_BE_DISCARDED"));
auto &popupMngr = getApp().getPopupManager();
Popup &popup = popupMngr.getPopup();
popup.setTitle(msgt("IDS_MSG_HEADER_COULDNT_SEND_MESSAGE_ABB"));
- popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Conversation, onPopupDel), this);
popup.addButton(msgt("IDS_MSG_BUTTON_CANCEL_ABB2"), Popup::CancelButtonId, POPUP_BUTTON_CB(Conversation, onMsgSendErrorButtonClicked), this);
popup.addButton(msgt("IDS_MSGF_BODY_SETTINGS"), Popup::OkButtonId, POPUP_BUTTON_CB(Conversation, onMsgSettingsButtonClicked), this);
popup.setContent(msgt("IDS_MSGC_POP_MOBILE_DATA_IS_DISABLED_ENABLE_MOBILE_DATA_AND_TRY_AGAIN"));
}
}
-void Conversation::onPopupDel(Evas_Object *popup, void *eventInfo)
+void Conversation::onNoRecipPopupDel(Evas_Object *popup, void *eventInfo)
{
MSG_LOG("");
- if(m_pBody)
- m_pBody->setFocus(true);
+ resetDefferedCmd();
}
void Conversation::onSendReadReportPopupDel(Evas_Object *popup, void *eventInfo)
{
MSG_LOG("");
popup.destroy();
- if(m_pBody)
- m_pBody->setFocus(true);
}
void Conversation::onMsgSettingsButtonClicked(Popup &popup, int buttonId)
popup.destroy();
}
-void Conversation::onNoRecipCancelButtonClicked(Popup &popup, int buttonId)
-{
- popup.destroy();
- if(m_pBody)
- m_pBody->setFocus(true);
-}
-
void Conversation::onNoRecipDiscardButtonClicked(Popup &popup, int buttonId)
{
- popup.destroy();
if(isDefferedCmd())
{
if(m_pBody)
{
pop();
}
+
+ if(!isPopping())
+ popup.destroy();
}
void Conversation::onDeleteItemPressed(PopupListItem &item)
Evas_Object *MessageInputPanel::createButton(Evas_Object *parent, ButtonId buttonId, const char *res)
{
Evas_Object *button = elm_button_add(parent);
+ if(buttonId == SendButtonId)
+ elm_object_focus_allow_set(button, false);
elm_object_style_set(button, "transparent");
evas_object_data_set(button, buttonIdKey, (void*)buttonId);
evas_object_size_hint_weight_set(button, 0.0, 0.0);
evas_object_show(button);
Evas_Object *icon = elm_icon_add(button);
+ if(buttonId == SendButtonId)
+ elm_object_focus_allow_set(icon, false);
std::string resPath = PathUtils::getResourcePath(IMAGES_EDJ_PATH);
elm_image_file_set(icon, resPath.c_str(), res);
evas_object_color_set(icon, BUTTON_COLOR);