/**
* @brief Pushes new frame. Attaches @content to frame. Updates @item with created frame.
*/
- void push(NaviFrameItem &item, Evas_Object *content = nullptr);
+ void push(NaviFrameItem &item);
/**
* @brief Pops top item from Naviframe.
Eext_Object_Item *item = eext_more_option_item_append(getEo());
m_ItemMap[item] = {cb, userData};
eext_more_option_item_part_content_set(item, "item,icon", icon);
- eext_more_option_item_domain_translatable_part_text_set(item, "selector,main_text", mainText.getDomain(), mainText.getMsg());
+
+ if (mainText.isTranslatable())
+ eext_more_option_item_domain_translatable_part_text_set(item, "selector,main_text", mainText.getDomain(), mainText.getMsg());
+ else
+ eext_more_option_item_part_text_set(item, "selector,main_text", mainText.getMsg());
+
return item;
}
return getItemsCount() <= 0;
}
-void NaviFrameView::push(NaviFrameItem &item, Evas_Object *content)
+void NaviFrameView::push(NaviFrameItem &item)
{
m_TransitionStatus = !isEmpty();
pause();
- Elm_Object_Item *it = elm_naviframe_item_push(getEo(), nullptr, nullptr, nullptr, content, naviTitleStyleEmpty);
+ Elm_Object_Item *it = elm_naviframe_item_push(getEo(), nullptr, nullptr, nullptr, nullptr, naviTitleStyleEmpty);
item.setElmObjItem(it);
processSignal();
resume();
// More option:
void onNewMessageClicked(MoreOption &obj);
void onDeleteClicked(MoreOption &obj);
+ void onSettingsClicked(MoreOption &obj);
// IThreadListListener:
void onItemSelected(ThreadId id) override;
#include "Resource.h"
#include "RecipFrame.h"
#include "ConvFrame.h"
+#include "SettingsFrame.h"
using namespace Msg;
m_pMoreOption->setDirection(EEXT_MORE_OPTION_DIRECTION_RIGHT);
m_pMoreOption->appendItem(msgt("WDS_MSG_OPT_NEW_MESSAGE_ABB"), NEW_MSG_MORE_ICON, makeCbLast(&MsgThreadFrame::onNewMessageClicked), this);
m_pMoreOption->appendItem(msgt("WDS_MSG_OPT_DELETE_ABB"), DELETEG_MORE_ICON, makeCbLast(&MsgThreadFrame::onDeleteClicked), this);
+ m_pMoreOption->appendItem("Settings", nullptr, makeCbLast(&MsgThreadFrame::onSettingsClicked), this); // TODO: only for test
m_pLayout->setMoreOption(*m_pMoreOption);
}
}
setMode(DeleteMode);
}
+void MsgThreadFrame::onSettingsClicked(MoreOption &obj)
+{
+ MSG_LOG("");
+ getParent().push(*new SettingsFrame(getParent()));
+}
+
void MsgThreadFrame::onItemSelected(ThreadId id)
{
MSG_LOG("");
--- /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 SettingsBlockListFrame_h_
+#define SettingsBlockListFrame_h_
+
+#include "FrameController.h"
+#include "ListView.h"
+
+namespace Msg
+{
+ class SettingsBlockListFrame
+ : public FrameController
+ , private IListViewListener
+ {
+ public:
+ SettingsBlockListFrame(NaviFrameController &parent);
+ virtual ~SettingsBlockListFrame();
+
+ protected:
+ // NaviFrameItem:
+ void onAttached(ViewItem &item) override;
+
+ private:
+ // IListViewListener:
+ void onListItemSelected(ListItem &listItem) override;
+
+ void preapareList();
+
+ private:
+ ListView *m_pList;
+ };
+}
+
+#endif /* SettingsBlockListFrame_h_ */
#define SettingsFrame_h_
#include "FrameController.h"
+#include "SettingsBlockListFrame.h"
namespace Msg
{
* sub-components of message settings.
*/
class SettingsFrame
- : public FrameController
+ : public SettingsBlockListFrame
{
public:
/**
--- /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 "SettingsBlockListFrame.h"
+#include "App.h"
+#include "Window.h"
+#include "Logger.h"
+
+using namespace Msg;
+
+SettingsBlockListFrame::SettingsBlockListFrame(NaviFrameController &parent)
+ : FrameController(parent)
+ , m_pList(nullptr)
+{
+ preapareList();
+}
+
+SettingsBlockListFrame::~SettingsBlockListFrame()
+{
+
+}
+
+void SettingsBlockListFrame::onAttached(ViewItem &item)
+{
+ FrameController::onAttached(item);
+ setContent(*m_pList);
+}
+
+void SettingsBlockListFrame::preapareList()
+{
+ if (!m_pList) {
+ m_pList = new ListView(getParent(), App::getInst().getWindow().getCircleSurface());
+ m_pList->setListener(this);
+ m_pList->setHomogeneous(false);
+ m_pList->setMultiSelection(false);
+ }
+}
+
+void SettingsBlockListFrame::onListItemSelected(ListItem &listItem)
+{
+
+}
*/
#include "SettingsFrame.h"
+#include "Logger.h"
using namespace Msg;
SettingsFrame::SettingsFrame(NaviFrameController &parent)
- : FrameController(parent)
+ : SettingsBlockListFrame(parent)
{
}
void SettingsFrame::onAttached(ViewItem &item)
{
+ MSG_LOG("");
+ SettingsBlockListFrame::onAttached(item);
}