diff options
author | Eugene Kurzberg <i.kurtsberg@samsung.com> | 2017-07-24 12:56:15 +0300 |
---|---|---|
committer | Eugene Kurzberg <i.kurtsberg@samsung.com> | 2017-07-24 12:56:15 +0300 |
commit | 1d649a47624639f14785f65da58e31c65b35f906 (patch) | |
tree | 773da2c19ccbe921c70212c9aa8e4e2f56cdaea2 | |
parent | 3f541a6e805701c3b1836520072e36bdea21d152 (diff) | |
download | alarm-1d649a47624639f14785f65da58e31c65b35f906.tar.gz alarm-1d649a47624639f14785f65da58e31c65b35f906.tar.bz2 alarm-1d649a47624639f14785f65da58e31c65b35f906.zip |
Update toast popup logic according to UI.
Change-Id: Ic7ea34615684157fe1baf2936e2cf9a00223e62c
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
-rw-r--r-- | alarm-app/inc/Input/InputView.h | 1 | ||||
-rw-r--r-- | alarm-app/src/Input/InputView.cpp | 25 |
2 files changed, 12 insertions, 14 deletions
diff --git a/alarm-app/inc/Input/InputView.h b/alarm-app/inc/Input/InputView.h index eb129ca..f8489fb 100644 --- a/alarm-app/inc/Input/InputView.h +++ b/alarm-app/inc/Input/InputView.h @@ -52,7 +52,6 @@ namespace Input private: virtual Evas_Object *onCreate(Evas_Object *parent) override; virtual void onCreated() override; - virtual void onPageAttached(Ui::NavigatorPage *page) override; Evas_Object *createContent(Evas_Object *parent); Evas_Object *createButton(Evas_Object *parent); diff --git a/alarm-app/src/Input/InputView.cpp b/alarm-app/src/Input/InputView.cpp index 89c45ee..8a996ab 100644 --- a/alarm-app/src/Input/InputView.cpp +++ b/alarm-app/src/Input/InputView.cpp @@ -59,11 +59,6 @@ void InputView::onCreated() "changed", makeCallback(&InputView::onTimeChanged), this); } -void InputView::onPageAttached(Ui::NavigatorPage *page) -{ - page->setStyle("empty"); -} - Evas_Object *InputView::createContent(Evas_Object *parent) { Evas_Object *layout = elm_layout_add(parent); @@ -193,16 +188,20 @@ void InputView::handleDuplicateAlarm() { if (m_Alarm.getId()) { AlarmConsumer::getInstance().deleteDataItem(m_Alarm.getId(), nullptr); - } - char buffer[TOAST_BUFFER_SIZE]; - snprintf(buffer, sizeof(buffer), _("WDS_ALM_TPOP_ALARM_ALREADY_SET_FOR_PS_ABB"), - Common::formatTime(m_Alarm.getDate())); + auto popup = new Common::AlarmSetPopup(m_Alarm); + popup->create(getEvasObject()); + popup->show(); + } else { + char buffer[TOAST_BUFFER_SIZE]; + snprintf(buffer, sizeof(buffer), _("WDS_ALM_TPOP_ALARM_ALREADY_SET_FOR_PS_ABB"), + Common::formatTime(m_Alarm.getDate())); - auto popup = new Ui::Toast(); - popup->create(getEvasObject()); - popup->setText(buffer); - popup->show(); + auto popup = new Ui::Toast(); + popup->create(getEvasObject()); + popup->setText(buffer); + popup->show(); + } getPage()->close(); } |