profile = mobile-3.0
# C/CPP Sources
-USER_SRCS = src/Common/MsgEngine/src/MsgThreadItem.cpp src/Common/Utils/src/VCalendarParser.cpp src/Conversation/Body/View/src/BodyView.cpp src/Conversation/ConvList/Controller/src/ConvList.cpp src/MsgThread/Controller/src/MsgThread.cpp src/Common/Controller/src/SaveAttachmentsListItem.cpp src/Conversation/ConvList/Controller/src/BubbleCalEventEntity.cpp src/Conversation/Utils/src/MessageDetailContent.cpp src/Common/MsgEngine/src/private/MsgAddressPrivate.cpp src/MainApp/MainApp.cpp src/Common/MsgEngine/src/private/MsgReportPrivate.cpp src/Conversation/Utils/src/WorkingDir.cpp src/Common/View/src/ListItem.cpp src/MsgThread/Controller/src/BaseThreadListItem.cpp src/Viewer/Controller/src/SmilPlayer.cpp src/Common/MsgEngine/src/private/MsgTransportPrivate.cpp src/MsgThread/View/src/MsgThreadLayout.cpp src/Common/Controller/src/SaveAttachments.cpp src/Conversation/ContactList/Controller/src/ConvContactList.cpp src/Common/MsgEngine/src/Message.cpp src/Viewer/Utils/src/MediaPlayer.cpp src/Common/AppControl/src/AppControlDefault.cpp src/Common/View/src/ListView.cpp src/Settings/Controller/src/MsgOnSimCard.cpp src/Common/MsgEngine/src/MessageMms.cpp src/Conversation/Main/Controller/src/Conversation.cpp src/Common/MsgEngine/src/private/MsgConvMediaPrivate.cpp src/Common/MsgEngine/src/MsgTransport.cpp src/Viewer/View/src/SmilImageItemView.cpp src/Common/ContactManager/src/ContactRecord.cpp src/Conversation/ContactList/View/src/ConvContactListView.cpp src/MsgThread/Controller/src/ThreadSearchList.cpp src/MsgThread/View/src/MsgThreadSearchPanel.cpp src/Common/Utils/src/FileUtils.cpp src/Common/View/src/ContextPopup.cpp src/Common/MsgEngine/src/MessageSMS.cpp src/Conversation/ConvList/Controller/src/BubbleContactEntity.cpp src/Conversation/ContactList/View/src/ContactListViewItem.cpp src/Common/MsgEngine/src/private/MessagePrivate.cpp src/Conversation/ConvList/Controller/src/BubbleAudioEntity.cpp src/Common/View/src/MbeRecipientsView.cpp src/MsgThread/Controller/src/ThreadListItem.cpp src/Settings/View/src/SettingsGroupListViewItem.cpp src/Common/View/src/Popup.cpp src/Common/Controller/src/ViewItemController.cpp src/Settings/Controller/src/Settings.cpp src/Common/ContactManager/src/ContactVCardParser.cpp src/Viewer/Controller/src/Viewer.cpp src/Viewer/Controller/src/SmilPage.cpp src/Conversation/ConvList/Controller/src/BubbleUnknownFileEntity.cpp src/Common/Utils/src/HwButtonListener.cpp src/Common/AppControl/src/AppControlCompose.cpp src/Common/MsgEngine/src/MsgUtils.cpp src/Conversation/ConvList/View/src/BubbleTextViewItem.cpp src/Common/Utils/src/PhoneNumberUtils.cpp src/Common/MsgEngine/src/private/MessageSMSPrivate.cpp src/Conversation/ConvList/Controller/src/BubbleEntityFactory.cpp src/Viewer/View/src/SmilPageLayout.cpp src/Common/View/src/View.cpp src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp src/Common/MsgEngine/src/private/MsgConversationItemPrivate.cpp src/Common/Controller/src/FrameController.cpp src/Conversation/ConvList/View/src/DateLineViewItem.cpp src/Common/AppControl/src/AppControlCommand.cpp src/Viewer/View/src/SmilTextItemView.cpp src/Settings/View/src/SimMsgLayout.cpp src/Common/MsgEngine/src/private/MsgThreadItemPrivate.cpp src/Common/MsgEngine/src/MsgEngine.cpp src/Viewer/View/src/PlayerControl.cpp src/Common/AppControl/src/AppControlParser.cpp src/Common/Controller/src/ViewController.cpp src/Conversation/ConvList/View/src/BubbleIconTextLayoutItem.cpp src/Common/View/src/NaviFrameView.cpp src/Common/AppControl/src/FileViewer.cpp src/Common/Utils/src/PathUtils.cpp src/Conversation/ConvList/Controller/src/ComposeListItem.cpp src/Conversation/ConvList/Controller/src/DateLineItem.cpp src/Conversation/ConvList/View/src/BubbleItemContainer.cpp src/Common/AppControl/src/VoiceCall.cpp src/Common/View/src/Scroller.cpp src/Conversation/ConvList/Controller/src/BubbleVideoEntity.cpp src/Common/MsgEngine/src/MsgSettings.cpp src/Conversation/ContactList/Controller/src/ContactListItem.cpp src/Common/ContactManager/src/ContactVCardGenerator.cpp src/Viewer/View/src/SmilAudioItemView.cpp src/Common/Utils/src/LoggerImpl.cpp src/Conversation/ConvList/View/src/ConvSelectAll.cpp src/Common/ContactManager/src/ContactManager.cpp src/Conversation/Utils/src/AttachmentHandler.cpp src/Conversation/ConvList/View/src/ComposeListViewItem.cpp src/Common/MsgEngine/src/private/MsgAttachmentPrivate.cpp src/Common/View/src/ViewItem.cpp src/Conversation/AppControl/src/ContactPicker.cpp src/Common/MsgEngine/src/private/MsgMediaPrivate.cpp src/Viewer/View/src/SubjectLayout.cpp src/Conversation/Main/View/src/MessageInputPanel.cpp src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp src/Common/Controller/src/BaseController.cpp src/Conversation/AppControl/src/AttachPanel.cpp src/Settings/Controller/src/SettingsSound.cpp src/Conversation/ConvList/View/src/ConvListViewItem.cpp src/Common/AppControl/src/Share.cpp src/Conversation/Body/Controller/src/Body.cpp src/Common/View/src/StandardWindow.cpp src/Common/MsgEngine/src/MsgConversationItem.cpp src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp src/Viewer/View/src/SmilAttachmentItemView.cpp src/MsgThread/Controller/src/ThreadSearchListItem.cpp src/Common/View/src/DefaultLayout.cpp src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp src/Conversation/ConvList/View/src/BubbleVideoViewItem.cpp src/Common/View/src/PopupListItem.cpp src/Conversation/ConvList/View/src/BubbleViewItem.cpp src/Viewer/View/src/SmilVideoItemView.cpp src/Common/Controller/src/NaviFrameController.cpp src/MsgThread/Controller/src/ThreadList.cpp src/Common/Utils/src/TextDecorator.cpp src/Common/MsgEngine/src/MsgStorage.cpp src/Common/View/src/SelectAllListItem.cpp src/Conversation/ConvList/View/src/BubbleDownloadButtonViewItem.cpp src/Common/AppControl/src/ContactViewer.cpp src/Common/View/src/Box.cpp src/Common/Utils/src/ThumbnailMaker.cpp src/Common/View/src/NaviFrameItem.cpp src/Common/View/src/PopupList.cpp src/MsgThread/View/src/FloatingButton.cpp src/MsgThread/Controller/src/MsgSearchListItem.cpp src/Common/Controller/src/App.cpp src/Conversation/ConvList/View/src/ConvListLayout.cpp src/Common/View/src/PopupAttachmentListItem.cpp src/Common/MsgEngine/src/private/MsgComposerPrivate.cpp src/Viewer/View/src/ViewerLayout.cpp src/Common/Utils/src/MediaUtils.cpp src/Common/Controller/src/MbeRecipients.cpp src/Settings/Controller/src/SimListViewItem.cpp src/Common/Utils/src/TimeUtils.cpp src/Common/MsgEngine/src/private/MsgSettingsPrivate.cpp src/Viewer/View/src/SmilPlayerView.cpp src/MainApp/main.cpp src/Conversation/ConvList/View/src/BubbleImageViewItem.cpp src/Common/View/src/NoContentLayout.cpp src/Common/SystemSettingsManager/src/SystemSettingsManager.cpp src/Common/MsgEngine/src/MsgPage.cpp src/Common/AppControl/src/ContactEditor.cpp src/Conversation/Main/View/src/ConversationLayout.cpp src/Common/MsgEngine/src/private/MsgUtilsPrivate.cpp src/Common/View/src/PopupManager.cpp src/Settings/View/src/SettingsListViewItem.cpp src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp src/Conversation/ConvList/Controller/src/ConvListItem.cpp src/Conversation/ConvList/View/src/BubbleBgViewItem.cpp src/MsgThread/View/src/ThreadListViewItem.cpp src/Common/MsgEngine/src/private/MsgPagePrivate.cpp src/Common/AppControl/src/AppControlUtils.cpp src/Conversation/AppControl/src/LaunchSettings.cpp
+USER_SRCS = src/Common/MsgEngine/src/MsgThreadItem.cpp src/Common/Utils/src/VCalendarParser.cpp src/Conversation/Body/View/src/BodyView.cpp src/Conversation/ConvList/Controller/src/ConvList.cpp src/MsgThread/Controller/src/MsgThread.cpp src/Common/Controller/src/SaveAttachmentsListItem.cpp src/Conversation/ConvList/Controller/src/BubbleCalEventEntity.cpp src/Conversation/Utils/src/MessageDetailContent.cpp src/Common/MsgEngine/src/private/MsgAddressPrivate.cpp src/MainApp/MainApp.cpp src/Common/MsgEngine/src/private/MsgReportPrivate.cpp src/Conversation/Utils/src/WorkingDir.cpp src/Common/View/src/ListItem.cpp src/MsgThread/Controller/src/BaseThreadListItem.cpp src/Viewer/Controller/src/SmilPlayer.cpp src/Common/MsgEngine/src/private/MsgTransportPrivate.cpp src/MsgThread/View/src/MsgThreadLayout.cpp src/Common/Controller/src/SaveAttachments.cpp src/Conversation/ContactList/Controller/src/ConvContactList.cpp src/Common/MsgEngine/src/Message.cpp src/Viewer/Utils/src/MediaPlayer.cpp src/Common/AppControl/src/AppControlDefault.cpp src/Common/View/src/ListView.cpp src/Settings/Controller/src/MsgOnSimCard.cpp src/Common/MsgEngine/src/MessageMms.cpp src/Conversation/Main/Controller/src/Conversation.cpp src/Common/MsgEngine/src/private/MsgConvMediaPrivate.cpp src/Common/MsgEngine/src/MsgTransport.cpp src/Viewer/View/src/SmilImageItemView.cpp src/Common/ContactManager/src/ContactRecord.cpp src/Conversation/ContactList/View/src/ConvContactListView.cpp src/MsgThread/Controller/src/ThreadSearchList.cpp src/MsgThread/View/src/MsgThreadSearchPanel.cpp src/Common/Utils/src/FileUtils.cpp src/Common/View/src/ContextPopup.cpp src/Common/MsgEngine/src/MessageSMS.cpp src/Conversation/ConvList/Controller/src/BubbleContactEntity.cpp src/Conversation/ContactList/View/src/ContactListViewItem.cpp src/Common/MsgEngine/src/private/MessagePrivate.cpp src/Conversation/ConvList/Controller/src/BubbleAudioEntity.cpp src/Common/View/src/MbeRecipientsView.cpp src/MsgThread/Controller/src/ThreadListItem.cpp src/Settings/View/src/SettingsGroupListViewItem.cpp src/Common/View/src/Popup.cpp src/Common/Controller/src/ViewItemController.cpp src/Settings/Controller/src/Settings.cpp src/Common/ContactManager/src/ContactVCardParser.cpp src/Viewer/Controller/src/Viewer.cpp src/Viewer/Controller/src/SmilPage.cpp src/Conversation/ConvList/Controller/src/BubbleUnknownFileEntity.cpp src/Common/Utils/src/HwButtonListener.cpp src/Common/AppControl/src/AppControlCompose.cpp src/Common/MsgEngine/src/MsgUtils.cpp src/Conversation/ConvList/View/src/BubbleTextViewItem.cpp src/Common/Utils/src/PhoneNumberUtils.cpp src/Common/MsgEngine/src/private/MessageSMSPrivate.cpp src/Conversation/ConvList/Controller/src/BubbleEntityFactory.cpp src/Viewer/View/src/SmilPageLayout.cpp src/Common/View/src/View.cpp src/Conversation/Main/Controller/src/PopupRecipientListItem.cpp src/Common/MsgEngine/src/private/MsgConversationItemPrivate.cpp src/Conversation/ConvList/Controller/src/MsgDetailsPopup.cpp src/Common/Controller/src/FrameController.cpp src/Conversation/ConvList/View/src/DateLineViewItem.cpp src/Common/AppControl/src/AppControlCommand.cpp src/Viewer/View/src/SmilTextItemView.cpp src/Settings/View/src/SimMsgLayout.cpp src/Common/MsgEngine/src/private/MsgThreadItemPrivate.cpp src/Common/MsgEngine/src/MsgEngine.cpp src/Viewer/View/src/PlayerControl.cpp src/Common/AppControl/src/AppControlParser.cpp src/Common/Controller/src/ViewController.cpp src/Conversation/ConvList/View/src/BubbleIconTextLayoutItem.cpp src/Common/View/src/NaviFrameView.cpp src/Common/AppControl/src/FileViewer.cpp src/Common/Utils/src/PathUtils.cpp src/Conversation/ConvList/Controller/src/ComposeListItem.cpp src/Conversation/ConvList/Controller/src/DateLineItem.cpp src/Conversation/ConvList/View/src/BubbleItemContainer.cpp src/Common/AppControl/src/VoiceCall.cpp src/Common/View/src/Scroller.cpp src/Conversation/ConvList/Controller/src/BubbleVideoEntity.cpp src/Common/MsgEngine/src/MsgSettings.cpp src/Conversation/ContactList/Controller/src/ContactListItem.cpp src/Common/ContactManager/src/ContactVCardGenerator.cpp src/Viewer/View/src/SmilAudioItemView.cpp src/Common/Utils/src/LoggerImpl.cpp src/Conversation/ConvList/View/src/ConvSelectAll.cpp src/Common/ContactManager/src/ContactManager.cpp src/Conversation/Utils/src/AttachmentHandler.cpp src/Conversation/ConvList/View/src/ComposeListViewItem.cpp src/Common/MsgEngine/src/private/MsgAttachmentPrivate.cpp src/Common/View/src/ViewItem.cpp src/Conversation/AppControl/src/ContactPicker.cpp src/Common/MsgEngine/src/private/MsgMediaPrivate.cpp src/Viewer/View/src/SubjectLayout.cpp src/Conversation/Main/View/src/MessageInputPanel.cpp src/Conversation/Recipients/View/src/ConvRecipientsPanelView.cpp src/Common/Controller/src/BaseController.cpp src/Conversation/AppControl/src/AttachPanel.cpp src/Settings/Controller/src/SettingsSound.cpp src/Conversation/ConvList/View/src/ConvListViewItem.cpp src/Common/AppControl/src/Share.cpp src/Conversation/Body/Controller/src/Body.cpp src/Common/View/src/StandardWindow.cpp src/Common/MsgEngine/src/MsgConversationItem.cpp src/Common/MsgEngine/src/private/MessageMmsPrivate.cpp src/Viewer/View/src/SmilAttachmentItemView.cpp src/MsgThread/Controller/src/ThreadSearchListItem.cpp src/Common/View/src/DefaultLayout.cpp src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp src/Conversation/ConvList/View/src/BubbleVideoViewItem.cpp src/Common/View/src/PopupListItem.cpp src/Conversation/ConvList/View/src/BubbleViewItem.cpp src/Viewer/View/src/SmilVideoItemView.cpp src/Common/Controller/src/NaviFrameController.cpp src/MsgThread/Controller/src/ThreadList.cpp src/Common/Utils/src/TextDecorator.cpp src/Common/MsgEngine/src/MsgStorage.cpp src/Common/View/src/SelectAllListItem.cpp src/Conversation/ConvList/View/src/BubbleDownloadButtonViewItem.cpp src/Common/AppControl/src/ContactViewer.cpp src/Common/View/src/Box.cpp src/Common/Utils/src/ThumbnailMaker.cpp src/Common/View/src/NaviFrameItem.cpp src/Common/View/src/PopupList.cpp src/MsgThread/View/src/FloatingButton.cpp src/MsgThread/Controller/src/MsgSearchListItem.cpp src/Common/Controller/src/App.cpp src/Conversation/ConvList/View/src/ConvListLayout.cpp src/Common/View/src/PopupAttachmentListItem.cpp src/Common/MsgEngine/src/private/MsgComposerPrivate.cpp src/Viewer/View/src/ViewerLayout.cpp src/Common/Utils/src/MediaUtils.cpp src/Common/Controller/src/MbeRecipients.cpp src/Settings/Controller/src/SimListViewItem.cpp src/Common/Utils/src/TimeUtils.cpp src/Common/MsgEngine/src/private/MsgSettingsPrivate.cpp src/Viewer/View/src/SmilPlayerView.cpp src/MainApp/main.cpp src/Conversation/ConvList/View/src/BubbleImageViewItem.cpp src/Common/View/src/NoContentLayout.cpp src/Common/SystemSettingsManager/src/SystemSettingsManager.cpp src/Common/MsgEngine/src/MsgPage.cpp src/Common/AppControl/src/ContactEditor.cpp src/Conversation/Main/View/src/ConversationLayout.cpp src/Common/MsgEngine/src/private/MsgUtilsPrivate.cpp src/Common/View/src/PopupManager.cpp src/Settings/View/src/SettingsListViewItem.cpp src/Common/MsgEngine/src/private/MsgStoragePrivate.cpp src/Conversation/ConvList/Controller/src/ConvListItem.cpp src/Conversation/ConvList/View/src/BubbleBgViewItem.cpp src/MsgThread/View/src/ThreadListViewItem.cpp src/Common/MsgEngine/src/private/MsgPagePrivate.cpp src/Common/AppControl/src/AppControlUtils.cpp src/Conversation/AppControl/src/LaunchSettings.cpp
# EDC Sources
USER_EDCS =
# PO Sources
-USER_POS = res/po/et.po res/po/eu.po res/po/kk.po res/po/it_IT.po res/po/ga.po res/po/lv.po res/po/de.po res/po/lt.po res/po/mk.po res/po/tr_TR.po res/po/hr.po res/po/pl.po res/po/es_ES.po res/po/uz.po res/po/ko_KR.po res/po/ja_JP.po res/po/en.po res/po/fr_CA.po res/po/en_PH.po res/po/cs.po res/po/ro.po res/po/zh_HK.po res/po/ar.po res/po/ka.po res/po/zh_CN.po res/po/gl.po res/po/hy.po res/po/es_US.po res/po/ru_RU.po res/po/el_GR.po res/po/pt_BR.po res/po/az.po res/po/en_US.po res/po/ca.po res/po/nl.po res/po/pt_PT.po res/po/hu.po res/po/is.po res/po/da.po res/po/bg.po res/po/fr.po res/po/sk.po res/po/sv.po res/po/nb.po res/po/sl.po res/po/zh_TW.po res/po/uk.po res/po/sr.po res/po/fi.po
+USER_POS = res/po/et.po res/po/eu.po res/po/kk.po res/po/it_IT.po res/po/ga.po res/po/lv.po res/po/de.po res/po/lt.po res/po/mk.po res/po/tr_TR.po res/po/hr.po res/po/pl.po res/po/es_ES.po res/po/uz.po res/po/ko_KR.po res/po/ja_JP.po res/po/en.po res/po/fr_CA.po res/po/en_PH.po res/po/cs.po res/po/ro.po res/po/zh_HK.po res/po/ar.po res/po/ka.po res/po/zh_CN.po res/po/gl.po res/po/hy.po res/po/es_US.po res/po/ru_RU.po res/po/el_GR.po res/po/pt_BR.po res/po/az.po res/po/en_US.po res/po/ca.po res/po/nl.po res/po/pt_PT.po res/po/hu.po res/po/is.po res/po/da.po res/po/hi.po res/po/bg.po res/po/fr.po res/po/sk.po res/po/sv.po res/po/nb.po res/po/sl.po res/po/zh_TW.po res/po/uk.po res/po/sr.po res/po/fi.po
# User Defines
USER_DEFS =
Popup(PopupManager &parent);
virtual ~Popup();
+ void show(bool deferred = true);
Evas_Object *getHostEvasObject() const;
Evas_Object *setContent(Evas_Object *content);
void setContent(const std::string &text);
bool m_MoreKeyDismiss;
bool m_PauseAppDismiss;
PopupManager *m_pManager;
+ Ecore_Idler *m_pShowIdler;
};
}
void reset();
/**
- * @brief Destroys specified popup.
- * @param[in] popup a popup to be destroyed.
+ * @brief Destroys previous popup and register new in manager
+ * @param[in] popup a new popup for register.
*/
void reset(Popup &popup);
*/
Popup &getPopup();
+ /**
+ * @brief Creates specific popup.
+ * @param[in] variadic arguments
+ * @return popup created.
+ */
+ template<typename ClassName, typename... Args>
+ ClassName &getPopup(Args&&... args);
+
/**
* @brief Checks whether popup exists and it's visible.
* @return true if popup exists and it's visible, false otherwise.
ContextPopup *m_pCtxPopup;
Window &m_Window;
};
+
+ template<typename ClassName, typename... Args>
+ ClassName &PopupManager::getPopup(Args&&... args)
+ {
+ reset();
+ m_pPopup = new ClassName(*this, std::forward<Args>(args)...);
+ eext_object_event_callback_add(*m_pPopup, EEXT_CALLBACK_BACK, SMART_CALLBACK(PopupManager, onHwBackButtonPopupClicked), this);
+ return static_cast<ClassName&>(*m_pPopup);
+ }
}
#endif /* PopupManager_h_ */
, m_MoreKeyDismiss(false)
, m_PauseAppDismiss(false)
, m_pManager(nullptr)
+ , m_pShowIdler(nullptr)
{
create(parent);
}
Popup::~Popup()
{
MSG_LOG("Destructor");
+ if(m_pShowIdler)
+ {
+ ecore_idler_del(m_pShowIdler);
+ m_pShowIdler = nullptr;
+ }
}
void Popup::create(Evas_Object *parent)
setText(title, titlePart);
}
+void Popup::show(bool deferred)
+{
+ if(!deferred)
+ {
+ View::show();
+ }
+ else
+ {
+ if(!m_pShowIdler)
+ {
+ m_pShowIdler = ecore_idler_add
+ (
+ [](void *data)->Eina_Bool
+ {
+ auto *self =(Popup*)data;
+ self->m_pShowIdler = nullptr;
+ self->View::show();
+ return false; // Delete idler
+ },
+ this
+ );
+ }
+ }
+}
+
void Popup::on_button_clicked(void *data, Evas_Object *obj, void *event_info)
{
PopupButtonCb cb = (PopupButtonCb)evas_object_data_get(obj, buttonCbKey);
void PopupManager::reset(Popup &popup)
{
- reset();
- eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, SMART_CALLBACK(PopupManager, onHwBackButtonPopupClicked), this);
- m_pPopup = &popup;
+ if(&popup != m_pPopup)
+ {
+ reset();
+ eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, SMART_CALLBACK(PopupManager, onHwBackButtonPopupClicked), this);
+ m_pPopup = &popup;
+ }
}
Popup &PopupManager::getPopup()
--- /dev/null
+/*
+ * Copyright (c) 2009-2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef MsgDetailsPopup_h_
+#define MsgDetailsPopup_h_
+
+#include "Popup.h"
+#include "MsgTypes.h"
+#include "App.h"
+#include "ContactManager.h"
+#include "SystemSettingsManager.h"
+
+namespace Msg
+{
+ class MsgDetailsPopup
+ : public Popup
+ , private IContactManagerListener
+ , private ISystemSettingsManager
+ {
+ public:
+ MsgDetailsPopup(PopupManager &mngr, App &app, MsgId msgId);
+ virtual ~MsgDetailsPopup();
+
+ private:
+ void updateContent();
+
+ // IContactManagerListener:
+ virtual void onContactChanged();
+
+ // ISystemSettingsManager:
+ virtual void onLanguageChanged();
+ virtual void onTimeFormatChanged();
+
+ private:
+ App &m_App;
+ MsgId m_MsgId;
+ };
+}
+
+#endif /* MsgDetailsPopup_h_ */
#include "FileViewer.h"
#include "BubbleItemContainer.h"
#include "Share.h"
+#include "MsgDetailsPopup.h"
// Bubble items:
#include "BubbleTextEntity.h"
void ConvListItem::onViewDetailsItemPressed(PopupListItem &item)
{
MSG_LOG("");
- Popup &popup = m_App.getPopupManager().getPopup();
- popup.addButton(msgt("IDS_MSG_BUTTON_OK_ABB"), Popup::CancelButtonId, POPUP_BUTTON_CB(ConvListItem, onCancelButtonClicked), this);
- popup.setTitle(msgt("IDS_MSGF_HEADER_MESSAGE_DETAILS"));
- popup.setContent(MessageDetailContent::getMsgDetailsPopupContent(m_App, m_MsgId));
- popup.show();
+ m_App.getPopupManager().getPopup<MsgDetailsPopup>(m_App, m_MsgId).show();
}
void ConvListItem::onEditButtonClicked(Evas_Object *obj, void *event_info)
--- /dev/null
+/*
+ * Copyright (c) 2009-2016 Samsung Electronics Co., Ltd All Rights contenterved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expcontents or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "MsgDetailsPopup.h"
+#include "MessageDetailContent.h"
+#include "LangUtils.h"
+#include "Logger.h"
+
+using namespace Msg;
+using namespace MessageDetailContent;
+
+MsgDetailsPopup::MsgDetailsPopup(PopupManager &mngr, App &app, MsgId msgId)
+ : Popup(mngr)
+ , m_App(app)
+ , m_MsgId(msgId)
+{
+ m_App.getSysSettingsManager().addListener(*this);
+ m_App.getContactManager().addListener(*this);
+ addButton(msgt("IDS_MSG_BUTTON_OK_ABB"), Popup::OkButtonId);
+ setTitle(msgt("IDS_MSGF_HEADER_MESSAGE_DETAILS"));
+ updateContent();
+}
+
+MsgDetailsPopup::~MsgDetailsPopup()
+{
+ m_App.getSysSettingsManager().removeListener(*this);
+ m_App.getContactManager().removeListener(*this);
+}
+
+void MsgDetailsPopup::updateContent()
+{
+ static const std::string brTag = "<br/><br/>";
+
+ std::string content;
+ MsgStorage &msgStorage = m_App.getMsgEngine().getStorage();
+ Message::Direction msgDirection = msgStorage.getMessage(m_MsgId)->getDirection();
+ Message::Type msgType = msgStorage.getMessage(m_MsgId)->getType();
+ Message::NetworkStatus msgStatus = msgStorage.getMessage(m_MsgId)->getNetworkStatus();
+ ThreadId msgThreadId = msgStorage.getMessage(m_MsgId)->getThreadId();
+
+ content += getMessageType(msgType);
+ content += getContactsInfo(m_App, msgDirection, msgThreadId);
+ content += getSentReceivedTime(msgStorage, msgDirection, m_MsgId);
+
+ if(msgDirection == Message::MD_Sent && msgType == Message::MT_SMS)
+ {
+ content += brTag;
+ content += makeDeliveryReportResult(m_App, msgStatus, msgType, msgThreadId, m_MsgId);
+ content += getSmsStatus(msgStatus);
+ }
+ else if(msgType == Message::MT_MMS_Noti)
+ {
+ content += brTag;
+ content += getMmsSubject(m_App, m_MsgId, ViewDetailsTextStyle);
+ content += getMmsMessageSize(m_App, m_MsgId, ViewDetailsTextStyle);
+ content += getMmsMessageExpired(m_App, m_MsgId, ViewDetailsTextStyle);
+ }
+ else if(msgType == Message::MT_MMS)
+ {
+ content += brTag;
+ content += getMmsSubject(m_App, m_MsgId, ViewDetailsTextStyle);
+ content += getMmsMessageSize(m_App, m_MsgId, ViewDetailsTextStyle);
+
+ if(msgDirection == Message::MD_Sent)
+ {
+ content += brTag;
+ content += makeDeliveryReportResult(m_App, msgStatus, msgType, msgThreadId, m_MsgId);
+ content += makeReadReportResult(m_App, m_MsgId, msgThreadId, msgStatus);
+ }
+ }
+
+ setContent(content);
+}
+
+void MsgDetailsPopup::onContactChanged()
+{
+ MSG_LOG("");
+ updateContent();
+}
+
+void MsgDetailsPopup::onLanguageChanged()
+{
+ MSG_LOG("");
+ updateContent();
+}
+
+void MsgDetailsPopup::onTimeFormatChanged()
+{
+ MSG_LOG("");
+ updateContent();
+}
+
namespace Msg
{
- class MessageDetailContent
+ namespace MessageDetailContent
{
enum TextStyle
{
DownloadTextStyle
};
- public:
- static std::string getMsgDetailsPopupContent(App &app, MsgId msgId);
- static std::string getMmsNotiConvListItemContent(App &app, MsgId msgId);
-
- private:
- // Create Content of Popup for View Details
- static std::string createMsgDetailsPopupText(App &app, MsgId msgId);
- static std::string getMessageType(Message::Type msgType);
- static std::string getContactsInfo(App &app, Message::Direction m_Direction, ThreadId msgThreadId);
- static std::string getSentReceivedTime(MsgStorage &msgStorage, Message::Direction msgDirection, MsgId msgId);
- static std::string makeDeliveryReportResult(App &app, Message::NetworkStatus msgStatus, Message::Type msgType, ThreadId msgThreadId, MsgId msgId);
- static std::string getSubscriberNumber();
- static std::string getSmsStatus(Message::NetworkStatus msgStatus);
- static std::string getMmsSubject(App &app, MsgId msgId, int style);
- static std::string getMmsMessageSize(App &app, MsgId msgId, int style);
- static std::string getMmsMessageExpired(App &app, MsgId msgId, int style);
- static std::string makeReadReportResult(App &app, MsgId msgId, ThreadId msgThreadId, Message::NetworkStatus msgStatus);
- static std::string makeDispAddress(App &app, const std::string &address);
- static std::string makeMainText(const std::string &text);
- static std::string makeSecondText(const std::string &text);
-
+ // TODO: Ineffective get methods by MsgId
+ std::string getMmsNotiConvListItemContent(App &app, MsgId msgId);
+ std::string getMessageType(Message::Type msgType);
+ std::string getContactsInfo(App &app, Message::Direction m_Direction, ThreadId msgThreadId);
+ std::string getSentReceivedTime(MsgStorage &msgStorage, Message::Direction msgDirection, MsgId msgId);
+ std::string makeDeliveryReportResult(App &app, Message::NetworkStatus msgStatus, Message::Type msgType, ThreadId msgThreadId, MsgId msgId);
+ std::string getSmsStatus(Message::NetworkStatus msgStatus);
+ std::string getMmsSubject(App &app, MsgId msgId, int style);
+ std::string getMmsMessageSize(App &app, MsgId msgId, int style);
+ std::string getMmsMessageExpired(App &app, MsgId msgId, int style);
+ std::string makeReadReportResult(App &app, MsgId msgId, ThreadId msgThreadId, Message::NetworkStatus msgStatus);
+ std::string makeDispAddress(App &app, const std::string &address);
+ std::string makeMainText(const std::string &text);
+ std::string makeSecondText(const std::string &text);
};
}
#include <telephony_common.h>
#include <telephony_sim.h>
-using namespace Msg;
+namespace Msg
+{
+namespace MessageDetailContent
+{
namespace
{
const unsigned int secondTextSize = 32;
}
-std::string MessageDetailContent::getMsgDetailsPopupContent(App &app, MsgId msgId)
-{
- return createMsgDetailsPopupText(app, msgId);
-}
-
-std::string MessageDetailContent::createMsgDetailsPopupText(App &app, MsgId msgId)
-{
- std::string msgDetails;
- Message::Direction msgDirection = app.getMsgEngine().getStorage().getMessage(msgId)->getDirection();
- Message::Type msgType = app.getMsgEngine().getStorage().getMessage(msgId)->getType();
- Message::NetworkStatus msgStatus = app.getMsgEngine().getStorage().getMessage(msgId)->getNetworkStatus();
- ThreadId msgThreadId = app.getMsgEngine().getStorage().getMessage(msgId)->getThreadId();
- MsgStorage &msgStorage = app.getMsgEngine().getStorage();
-
- msgDetails += getMessageType(msgType);
- msgDetails += getContactsInfo(app, msgDirection, msgThreadId);
- msgDetails += getSentReceivedTime(msgStorage, msgDirection, msgId);
-
- if(msgDirection == Message::MD_Sent && msgType == Message::MT_SMS)
- {
- msgDetails.append("<br/><br/>");
- msgDetails += makeDeliveryReportResult(app, msgStatus, msgType, msgThreadId, msgId);
- msgDetails += getSmsStatus(msgStatus);
- }
- else if(msgType == Message::MT_MMS_Noti)
- {
- msgDetails.append("<br/><br/>");
- msgDetails += getMmsSubject(app, msgId, ViewDetailsTextStyle);
- msgDetails += getMmsMessageSize(app, msgId, ViewDetailsTextStyle);
- msgDetails += getMmsMessageExpired(app, msgId, ViewDetailsTextStyle);
- }
- else if(msgType == Message::MT_MMS)
- {
- msgDetails.append("<br/><br/>");
- msgDetails += getMmsSubject(app, msgId, ViewDetailsTextStyle);
- msgDetails += getMmsMessageSize(app, msgId, ViewDetailsTextStyle);
-
- if(msgDirection == Message::MD_Sent)
- {
- msgDetails.append("<br/><br/>");
- msgDetails += makeDeliveryReportResult(app, msgStatus, msgType, msgThreadId, msgId);
- msgDetails += makeReadReportResult(app, msgId, msgThreadId, msgStatus);
- }
- }
- return msgDetails;
-}
-
-std::string MessageDetailContent::getMmsNotiConvListItemContent(App &app, MsgId msgId)
+std::string getMmsNotiConvListItemContent(App &app, MsgId msgId)
{
std::string msgDetails;
msgDetails += getMmsSubject(app, msgId, DownloadTextStyle);
return msgDetails;
}
-std::string MessageDetailContent::getMessageType(Message::Type msgType)
+std::string getMessageType(Message::Type msgType)
{
std::string msgDetails = makeMainText(msg("IDS_MSG_POP_TYPE"));
msgDetails.append("<br/>");
return msgDetails;
}
-std::string MessageDetailContent::getContactsInfo(App &app, Message::Direction msgDirection, ThreadId msgThreadId)
+std::string getContactsInfo(App &app, Message::Direction msgDirection, ThreadId msgThreadId)
{
MsgAddressListRef addrList = app.getMsgEngine().getStorage().getAddressList(msgThreadId);
return contactsInfo;
}
-std::string MessageDetailContent::getSentReceivedTime(MsgStorage &msgStorage, Message::Direction msgDirection, MsgId msgId)
+std::string getSentReceivedTime(MsgStorage &msgStorage, Message::Direction msgDirection, MsgId msgId)
{
std::string msgDetails;
if(msgDirection == Message::MD_Sent)
return msgDetails;
}
-std::string MessageDetailContent::makeDeliveryReportResult(App &app, Message::NetworkStatus msgStatus, Message::Type msgType, ThreadId msgThreadId, MsgId msgId)
+std::string makeDeliveryReportResult(App &app, Message::NetworkStatus msgStatus, Message::Type msgType, ThreadId msgThreadId, MsgId msgId)
{
std::string deliverText = makeMainText(msg("IDS_MSGF_BODY_DELIVERY_REPORT"));
return deliverText;
}
-std::string MessageDetailContent::getSubscriberNumber()
-{
- std::string subscriberNumber;
- telephony_handle_list_s telHandleList;
- int err = telephony_init(&telHandleList);
-
- if(err == TELEPHONY_ERROR_NONE)
- {
- if(telHandleList.count != 0)
- {
- char *tmpSubscriberNumber = nullptr;
- telephony_sim_get_subscriber_number(telHandleList.handle[0], &tmpSubscriberNumber);
- if(tmpSubscriberNumber)
- {
- subscriberNumber = tmpSubscriberNumber;
- free(tmpSubscriberNumber);
- }
- }
- telephony_deinit(&telHandleList);
- }
-
- return !subscriberNumber.empty() ? subscriberNumber : msg("IDS_MSGF_BODY_UNKNOWN");
-
-}
-
-std::string MessageDetailContent::getSmsStatus(Message::NetworkStatus msgStatus)
+std::string getSmsStatus(Message::NetworkStatus msgStatus)
{
std::string status = makeMainText(msg("IDS_MSG_BODY_STATUS_C"));
status.append("<br/>");
return status;
}
-std::string MessageDetailContent::getMmsSubject(App &app, MsgId msgId, int style)
+std::string getMmsSubject(App &app, MsgId msgId, int style)
{
std::string msgDetails;
std::string subject = app.getMsgEngine().getStorage().getMessage(msgId)->getSubject();
return msgDetails;
}
-std::string MessageDetailContent::getMmsMessageSize(App &app, MsgId msgId, int style)
+std::string getMmsMessageSize(App &app, MsgId msgId, int style)
{
std::string msgDetails;
int msgSize = app.getMsgEngine().getStorage().getMessage(msgId)->getSize();
return msgDetails;
}
-std::string MessageDetailContent::getMmsMessageExpired(App &app, MsgId msgId, int style)
+std::string getMmsMessageExpired(App &app, MsgId msgId, int style)
{
std::string msgDetails;
MessageMmsRef mms = std::dynamic_pointer_cast<MessageMms>(app.getMsgEngine().getStorage().getMessage(msgId));
return msgDetails;
}
-std::string MessageDetailContent::makeReadReportResult(App &app, MsgId msgId, ThreadId msgThreadId, Message::NetworkStatus msgStatus)
+std::string makeReadReportResult(App &app, MsgId msgId, ThreadId msgThreadId, Message::NetworkStatus msgStatus)
{
std::string readReport = makeMainText(msg("IDS_MSGF_POP_READ_REPORT"));
bool readFlag = app.getMsgEngine().getStorage().isReadReportChecked(msgId);
return readReport;
}
-std::string MessageDetailContent::makeDispAddress(App &app, const std::string &address)
+std::string makeDispAddress(App &app, const std::string &address)
{
std::string res;
ContactAddressRef rec = app.getContactManager().getContactAddress(address);
return res;
}
-std::string MessageDetailContent::makeMainText(const std::string &text)
+std::string makeMainText(const std::string &text)
{
return TextDecorator::make(text, mainTextSize);
}
-std::string MessageDetailContent::makeSecondText(const std::string &text)
+std::string makeSecondText(const std::string &text)
{
return TextDecorator::make(text, secondTextSize, secondTextColor);
}
+
+} // namespace MessageDetailContent
+} // namespace Msg