From 6e9ca149ec1fa4076d2f82110fa4213cd50ac697 Mon Sep 17 00:00:00 2001 From: Aleksandr Sapozhnik Date: Wed, 27 Apr 2016 13:53:26 +0300 Subject: [PATCH] Added use of WIDGET_APP_DESTROY_TYPE_PERMANENT enum value after it was supported in Fw Change-Id: Ie15aef382b7b266d49393ecbc73b452d41414763 Signed-off-by: Aleksandr Sapozhnik --- contacts-widget/src/Widget.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contacts-widget/src/Widget.cpp b/contacts-widget/src/Widget.cpp index 50bfc34..4862d1f 100644 --- a/contacts-widget/src/Widget.cpp +++ b/contacts-widget/src/Widget.cpp @@ -64,8 +64,9 @@ void Widget::onCreate(bundle *content) void Widget::onDestroy(widget_app_destroy_type reason) { - /* FIXME: use reason == WIDGET_APP_DESTROY_TYPE_PERMANENT once Tizen 3.0 API is updated */ - m_Items.destroy(); + if (reason == WIDGET_APP_DESTROY_TYPE_PERMANENT) { + m_Items.destroy(); + } } void Widget::onResize(int width, int height) @@ -88,7 +89,7 @@ void Widget::initializeItems(bundle *content) m_Items.initialize(id); - if (!content) { + if (id == 0) { content = bundle_create(); bundle_add_str(content, WIDGET_ID_KEY, std::to_string(m_Items.getWidgetId()).c_str()); saveContent(content); -- 2.7.4