Update toast popup logic according to UI. 90/140290/1
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 24 Jul 2017 09:56:15 +0000 (12:56 +0300)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 24 Jul 2017 09:56:15 +0000 (12:56 +0300)
Change-Id: Ic7ea34615684157fe1baf2936e2cf9a00223e62c
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
alarm-app/inc/Input/InputView.h
alarm-app/src/Input/InputView.cpp

index eb129ca40ff1c95078786e4f00aba06eb8a925db..f8489fbc36df05128f52efb754a7ba0b16fd8bf1 100644 (file)
@@ -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);
index 89c45ee8e71bc33a81c1c5d8f9213752811a8e4b..8a996ab51d994e839d853c24b8ce9ab75841ec17 100644 (file)
@@ -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();
 }