From e465522b01d03d7950dc147ddd8a7fcd971d461f Mon Sep 17 00:00:00 2001 From: Denis Dolzhenko Date: Thu, 1 Sep 2016 15:24:43 +0300 Subject: [PATCH] Fixed: selection of recip. item Change-Id: I61a97f79ae300bd5b796466e3cf65e99082fc62a Signed-off-by: Denis Dolzhenko --- src/Conversation/Main/Controller/inc/Conversation.h | 1 + src/Conversation/Main/Controller/src/Conversation.cpp | 10 ++++++++++ src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Conversation/Main/Controller/inc/Conversation.h b/src/Conversation/Main/Controller/inc/Conversation.h index f0861fe..c705409 100644 --- a/src/Conversation/Main/Controller/inc/Conversation.h +++ b/src/Conversation/Main/Controller/inc/Conversation.h @@ -112,6 +112,7 @@ namespace Msg // Popup callbacks: void onPopupDel(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); diff --git a/src/Conversation/Main/Controller/src/Conversation.cpp b/src/Conversation/Main/Controller/src/Conversation.cpp index c3c8fb9..e426a4d 100644 --- a/src/Conversation/Main/Controller/src/Conversation.cpp +++ b/src/Conversation/Main/Controller/src/Conversation.cpp @@ -188,6 +188,7 @@ void Conversation::recipientClickHandler(const std::string &address) } else if(m_Mode == ConversationMode) { + m_pRecipPanel->unselectMbeItem(); ContactViewer::launch(*contactAddress); } } @@ -200,6 +201,7 @@ void Conversation::recipientClickHandler(const std::string &address) void Conversation::showSavedRecipientPopup(const std::string &title, int contactId, ContactAddress::OwnerType ownerType) { PopupList &popup = createPopupList(title); + popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Conversation, onRecipPopupDel), this); popup.appendItem(msg("IDS_MSGF_OPT_REMOVE"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onRecipRemoveItemPressed), this); popup.appendItem(msg("IDS_MSG_OPT_EDIT"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onEditItemPressed), this); popup.appendItem(*new PopupPersonIdListItem(popup, msg("IDS_MSG_OPT_VIEW_CONTACT_DETAILS_ABB"), contactId, ownerType, @@ -210,6 +212,7 @@ void Conversation::showSavedRecipientPopup(const std::string &title, int contact void Conversation::showUnsavedRecipientPopup(const std::string &address) { PopupList &popup = createPopupList(address); + popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Conversation, onRecipPopupDel), this); if(m_Mode == NewMessageMode) { popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSGF_OPT_REMOVE"), address, @@ -1023,6 +1026,13 @@ void Conversation::onPopupDel(Evas_Object *popup, void *eventInfo) m_pBody->setFocus(true); } +void Conversation::onRecipPopupDel(Evas_Object *popup, void *eventInfo) +{ + MSG_LOG(""); + if(m_pRecipPanel) + m_pRecipPanel->unselectMbeItem(); +} + void Conversation::onMsgSendErrorButtonClicked(Popup &popup, int buttonId) { MSG_LOG(""); diff --git a/src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h b/src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h index c610320..d86ea97 100644 --- a/src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h +++ b/src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h @@ -35,6 +35,7 @@ namespace Msg void editSelectedItem(); void removeSelectedItem(); + void unselectMbeItem(); Evas_Object *getAreaRect() const; void showMbe(bool show, bool animation = true); void showEntry(bool show); @@ -67,7 +68,6 @@ namespace Msg void setMbe(MbeRecipientsView *pMbe); void showButton(ButtonType buttonType); - void unselectMbeItem(); bool isEntryEmpty() const; void setEditMode(bool isEdit); void showInvalidIcon(bool show); -- 2.7.4