</option>
<option id="gnu.cpp.compiler.option.include.paths.2037910591" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Conversation/Main/Controller/inc}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Composer/Controller/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/MsgThread/View/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Settings/Controller/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/MsgThread/Controller/inc}""/>
</option>
<option id="gnu.cpp.compiler.option.include.paths.1895069727" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Conversation/Main/Controller/inc}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Composer/Controller/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/MsgThread/View/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Settings/Controller/inc}""/>
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/MsgThread/Controller/inc}""/>
#include "AppControlLauncher.h"
#include "MsgEngine.h"
#include "Callback.h"
+#include "ToastPopup.h"
#include <memory>
-#include <notification.h>
using namespace Msg;
std::string errorMsg;
if (!App::getInst().getMsgEngine().isReady(errorMsg)) {
MSG_LOG_ERROR(errorMsg);
- notification_status_message_post(errorMsg.c_str());
+ ToastPopup::toast(errorMsg.c_str());
return false;
}
return true;
*/
bool getTransitionStatus() const;
+
+ void destroy();
+
protected:
virtual void onPause(NaviFrameItem &item) {};
virtual void onResume(NaviFrameItem &item) {};
setStyle("select_mode");
}
- CtxPopupItem *SelectCtxPopup::appendTopItem(const std::string &text, CtxPopupItemPressedCb cb, void *userData)
+ inline CtxPopupItem *SelectCtxPopup::appendTopItem(const std::string &text, CtxPopupItemPressedCb cb, void *userData)
{
m_pTopItem = appendItem(text, nullptr, cb, userData);
return m_pTopItem;
}
- CtxPopupItem *SelectCtxPopup::appendBottomItem(const std::string &text, CtxPopupItemPressedCb cb, void *userData)
+ inline CtxPopupItem *SelectCtxPopup::appendBottomItem(const std::string &text, CtxPopupItemPressedCb cb, void *userData)
{
m_pBottomItem = appendItem(text, nullptr, cb, userData);
return m_pBottomItem;
}
- void SelectCtxPopup::go()
+ inline void SelectCtxPopup::go()
{
show();
if (m_pTopItem && m_pBottomItem) {
void setText(const std::string &text);
static ToastPopup *toast(const TText &text, const char *iconName = nullptr);
+ static ToastPopup *toast(const std::string &text, const char *iconName = nullptr);
};
}
#include "Logger.h"
#include "Callback.h"
-#include <Elementary.h>
-
using namespace Msg;
-const char *naviTitleStyleEmpty = "empty";
+namespace {
+ const char *naviTitleStyleEmpty = "empty";
+ const char *transFinishedEvent = "transition,finished";
+}
+
NaviFrameView::NaviFrameView(Evas_Object *parent)
: View()
void NaviFrameView::create(Evas_Object *parent)
{
setEo(elm_naviframe_add(parent));
- addSmartCb("transition,finished", makeCbFirst(&NaviFrameView::onTransitionFinished), this);
+ addSmartCb(transFinishedEvent, makeCbFirst(&NaviFrameView::onTransitionFinished), this);
show();
}
pause();
}
+void NaviFrameView::destroy()
+{
+ evas_object_smart_callback_del(getEo(), transFinishedEvent, makeCbFirst(&NaviFrameView::onTransitionFinished));
+ View::destroy();
+}
+
bool NaviFrameView::getTransitionStatus() const
{
// TODO: Move functionality for gets TransitionStatus to EFL (elm_naviframe) side.
using namespace Msg;
+namespace {
+ ToastPopup *createToast(const char *iconName)
+ {
+ auto *toast = new ToastPopup;
+ if (iconName)
+ toast->setIcon(iconName);
+ toast->show();
+ return toast;
+ }
+}
+
ToastPopup::ToastPopup(double timeout)
: Popup()
{
ToastPopup *ToastPopup::toast(const TText &text, const char *iconName)
{
- auto *toast = new ToastPopup;
+ auto *toast = createToast(iconName);
if (text.getMsg())
toast->setText(text);
- if (iconName)
- toast->setIcon(iconName);
- toast->show();
+ return toast;
+}
+
+ToastPopup *ToastPopup::toast(const std::string &text, const char *iconName)
+{
+ auto *toast = createToast(iconName);
+ toast->setText(text);
return toast;
}
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 ComposerFrame_h_
+#define ComposerFrame_h_
+
+#include "FrameController.h"
+#include "DefaultLayout.h"
+#include "BottomButton.h"
+
+namespace Msg {
+ class ComposerFrame
+ : public FrameController {
+
+ public:
+ ComposerFrame(NaviFrameController &parent);
+ virtual ~ComposerFrame();
+
+ private:
+ // NaviFrameItem:
+ void onAttached(ViewItem &item) override;
+
+ // Hw buttons:
+ void onHwBackButtonPreessed(Evas_Object *obj, void *event);
+
+ private:
+ void prepareMainLayout();
+
+ private:
+ DefaultLayout *m_pLayout;
+ };
+}
+
+#endif /* ComposerFrame */
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 RecipFrame_h_
+#define RecipFrame_h_
+
+#include "FrameController.h"
+#include "DefaultLayout.h"
+#include "BottomButton.h"
+
+namespace Msg {
+ class RecipFrame
+ : public FrameController {
+
+ public:
+ RecipFrame(NaviFrameController &parent);
+ virtual ~RecipFrame();
+
+ private:
+ // NaviFrameItem:
+ void onAttached(ViewItem &item) override;
+
+ // Hw buttons:
+ void onHwBackButtonPreessed(Evas_Object *obj, void *event);
+
+ // Bottom Button:
+ void onNextButtonClicked(Evas_Object *obj, void *event);
+
+ private:
+ void prepareMainLayout();
+ void prepareNextButton();
+
+ private:
+ DefaultLayout *m_pLayout;
+ BottomButton *m_pNextButton;
+ };
+}
+
+#endif /* RecipFrame_h_ */
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#include "ComposerFrame.h"
+#include "Callback.h"
+
+using namespace Msg;
+
+ComposerFrame::ComposerFrame(NaviFrameController &parent)
+ : FrameController(parent)
+ , m_pLayout(nullptr)
+{
+ MSG_LOG("");
+ prepareMainLayout();
+}
+
+ComposerFrame::~ComposerFrame()
+{
+ MSG_LOG("");
+}
+
+void ComposerFrame::prepareMainLayout()
+{
+ if (!m_pLayout) {
+ m_pLayout = new DefaultLayout(getParent());
+ m_pLayout->addHwButtonEvent(EEXT_CALLBACK_BACK, makeCbFirst(&ComposerFrame::onHwBackButtonPreessed), this);
+ }
+}
+
+void ComposerFrame::onAttached(ViewItem &item)
+{
+ MSG_LOG("");
+ FrameController::onAttached(item);
+ setContent(*m_pLayout);
+}
+
+void ComposerFrame::onHwBackButtonPreessed(Evas_Object *obj, void *event_info)
+{
+ MSG_LOG("");
+ pop();
+}
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#include "RecipFrame.h"
+#include "Callback.h"
+#include "ComposerFrame.h"
+
+using namespace Msg;
+
+RecipFrame::RecipFrame(NaviFrameController &parent)
+ : FrameController(parent)
+ , m_pLayout(nullptr)
+ , m_pNextButton(nullptr)
+{
+ MSG_LOG("");
+ prepareMainLayout();
+ prepareNextButton();
+}
+
+RecipFrame::~RecipFrame()
+{
+ MSG_LOG("");
+}
+
+void RecipFrame::prepareMainLayout()
+{
+ if (!m_pLayout) {
+ m_pLayout = new DefaultLayout(getParent());
+ m_pLayout->addHwButtonEvent(EEXT_CALLBACK_BACK, makeCbFirst(&RecipFrame::onHwBackButtonPreessed), this);
+ }
+}
+
+void RecipFrame::prepareNextButton()
+{
+ if (!m_pNextButton) {
+ m_pNextButton = new BottomButton(*m_pLayout);
+ View::addSmartCb(m_pNextButton->getInnerButton(), "clicked", makeCbFirst(&RecipFrame::onNextButtonClicked), this);
+ m_pNextButton->setText(msgt("Next")); // TODO: localization
+ m_pLayout->setBottomButton(*m_pNextButton);
+ m_pLayout->showBottomButton(true);
+ }
+}
+
+void RecipFrame::onAttached(ViewItem &item)
+{
+ MSG_LOG("");
+ FrameController::onAttached(item);
+ setContent(*m_pLayout);
+}
+
+void RecipFrame::onHwBackButtonPreessed(Evas_Object *obj, void *event_info)
+{
+ MSG_LOG("");
+ pop();
+}
+
+void RecipFrame::onNextButtonClicked(Evas_Object *obj, void *event)
+{
+ MSG_LOG("");
+ auto *composerFrame = new ComposerFrame(getParent());
+ getParent().push(*composerFrame);
+}
#include "LangUtils.h"
#include "App.h"
#include "Resource.h"
+#include "RecipFrame.h"
using namespace Msg;
void MsgThreadFrame::onNewMessageClicked(MoreOption &obj)
{
MSG_LOG("");
+ auto *recipFrame = new RecipFrame(getParent());
+ getParent().push(*recipFrame);
}
void MsgThreadFrame::onDeleteClicked(MoreOption &obj)