TSAM-2015 Popup display center when tap More button - FIXED 60/65360/2
authorMykola Alieksieiev <m.alieksieie@samsung.com>
Fri, 8 Apr 2016 15:03:04 +0000 (18:03 +0300)
committerMykola Alieksieiev <m.alieksieie@samsung.com>
Mon, 11 Apr 2016 09:33:31 +0000 (12:33 +0300)
Change-Id: I9847891eb9411211595a09ca3a9f960faf7114bf
Signed-off-by: Mykola Alieksieiev <m.alieksieie@samsung.com>
src/Conversation/Main/Controller/inc/Conversation.h
src/Conversation/Main/Controller/src/Conversation.cpp
src/MsgThread/Controller/inc/MsgThread.h
src/MsgThread/Controller/src/MsgThread.cpp

index 3c542b2..4fc6e50 100644 (file)
@@ -110,11 +110,8 @@ namespace Msg
             void onMsgSendErrorButtonClicked(Popup &popup, int buttonId);
             void onNoRecipCancelButtonClicked(Popup &popup, int buttonId);
             void onNoRecipDiscardButtonClicked(Popup &popup, int buttonId);
-
-            // ContextPopup callbacks:
-            void onDeleteItemPressed(ContextPopupItem &item);
-            void onAddRecipientsItemPressed(ContextPopupItem &item);
-
+            void onDeleteItemPressed(PopupListItem &item);
+            void onAddRecipientsItemPressed(PopupListItem &item);
             void onMakeVoiceItemPressed(PopupListItem &item);
             void onCreateContactItemPressed(PopupListItem &item);
             void onUpdateContactItemPressed(PopupListItem &item);
@@ -164,7 +161,7 @@ namespace Msg
             void checkAndSetMsgType();
             void navigateToSlideShow(MsgId id);
 
-            void showMainCtxPopup();
+            void showMainPopup();
             void showNoRecipPopup();
             void showAddRecipPopup();
             PopupList &createPopupList(const std::string &title);
index 556c2cd..ff244fe 100644 (file)
@@ -622,14 +622,12 @@ void Conversation::showSendResultPopup(MsgTransport::SendResult result)
     popup.show();
 }
 
-void Conversation::showMainCtxPopup()
+void Conversation::showMainPopup()
 {
-    auto &ctxPopup = getApp().getPopupManager().getCtxPopup();
-
-    ctxPopup.appendItem(msg("IDS_MSG_OPT_DELETE"), nullptr, CTXPOPUP_ITEM_PRESSED_CB(Conversation, onDeleteItemPressed), this);
-    ctxPopup.appendItem(msg("IDS_MSG_OPT_ADD_RECIPIENTS_ABB"), nullptr, CTXPOPUP_ITEM_PRESSED_CB(Conversation, onAddRecipientsItemPressed), this);
-    ctxPopup.align(getApp().getWindow());
-    ctxPopup.show();
+    PopupList &popup = getApp().getPopupManager().getPopupList();
+    popup.appendItem(msg("IDS_MSG_OPT_DELETE"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onDeleteItemPressed), this);
+    popup.appendItem(msg("IDS_MSG_OPT_ADD_RECIPIENTS_ABB"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onAddRecipientsItemPressed), this);
+    popup.show();
 }
 
 void Conversation::onKeyDown(ConvRecipientsPanel &panel, Evas_Event_Key_Down &ev)
@@ -794,7 +792,7 @@ void Conversation::onHwMoreButtonClicked()
 {
     MSG_LOG("");
     if(m_Mode == ConversationMode && m_pConvList->getMode() == ConvList::NormalMode)
-        showMainCtxPopup();
+        showMainPopup();
 }
 
 void Conversation::onNaviOkButtonClicked()
@@ -921,7 +919,7 @@ void Conversation::onNoRecipDiscardButtonClicked(Popup &popup, int buttonId)
     popup.destroy();
 }
 
-void Conversation::onDeleteItemPressed(ContextPopupItem &item)
+void Conversation::onDeleteItemPressed(PopupListItem &item)
 {
     MSG_LOG("");
     item.getParent().destroy();
@@ -929,7 +927,7 @@ void Conversation::onDeleteItemPressed(ContextPopupItem &item)
     updateNavibar();
 }
 
-void Conversation::onAddRecipientsItemPressed(ContextPopupItem &item)
+void Conversation::onAddRecipientsItemPressed(PopupListItem &item)
 {
     MSG_LOG("");
     item.getParent().destroy();
index 082b66c..676b0ac 100644 (file)
@@ -97,7 +97,7 @@ namespace Msg
             void composeNewMessage();
             void navigateToSettings();
             void navigateToConversation(ThreadId threadId, MsgId msgId = MsgId(), const std::string &searchWord = std::string());
-            void showMainCtxPopup();
+            void showMainPopup();
             void setMode(Mode mode);
             void setDeleteMode(bool value);
             void setNormalMode();
index ecafb3a..af0f1a6 100644 (file)
@@ -82,7 +82,7 @@ void MsgThread::onAttached(ViewItem &item)
     setContent(*m_pLayout);
 }
 
-void MsgThread::showMainCtxPopup()
+void MsgThread::showMainPopup()
 {
     PopupList &popup = getApp().getPopupManager().getPopupList();
     if (!m_pThreadList->isEmpty())
@@ -254,7 +254,7 @@ void MsgThread::onHwMoreButtonClicked()
 {
     MSG_LOG("");
     if(m_Mode == NormalMode)
-        showMainCtxPopup();
+        showMainPopup();
 }
 
 void MsgThread::onSettingsItemPressed(PopupListItem &item)