summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Kobec <s.kobec@samsung.com>2017-10-12 13:45:32 +0300
committerSergei Kobec <s.kobec@samsung.com>2017-10-12 13:45:32 +0300
commitd265e9bf00b30432e5e3963c6c6a8193eee49e85 (patch)
tree8c42e42386a7091025969264f7278557d8939870
parent59d4ce76cda779e06bdeea7199f0a525e16bc04e (diff)
downloadalarm-d265e9bf00b30432e5e3963c6c6a8193eee49e85.tar.gz
alarm-d265e9bf00b30432e5e3963c6c6a8193eee49e85.tar.bz2
alarm-d265e9bf00b30432e5e3963c6c6a8193eee49e85.zip
TizenRefApp-9533 Alarm widget not updated after language change
Change-Id: Ib17fdf0206a8c3ae9d655d5bca3ee3f0311654b4 Signed-off-by: Sergei Kobec <s.kobec@samsung.com>
-rw-r--r--alarm-widget/src/AlarmWidget.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/alarm-widget/src/AlarmWidget.cpp b/alarm-widget/src/AlarmWidget.cpp
index 662ebc0..339816d 100644
--- a/alarm-widget/src/AlarmWidget.cpp
+++ b/alarm-widget/src/AlarmWidget.cpp
@@ -22,6 +22,7 @@
#include "App/AppControl.h"
#include "App/AppControlUtils.h"
#include "App/Path.h"
+#include "System/Settings.h"
#include "Ui/Accessibility.h"
#include "Ui/Window.h"
#include "Utils/Bundle.h"
@@ -35,6 +36,7 @@
using namespace Model;
using namespace Common;
using namespace Common::Model;
+using namespace System::Settings;
#define ALARM_ID_KEY "alarm_id"
#define TIME_SIZE 40
@@ -47,6 +49,7 @@ AlarmWidget::AlarmWidget()
AlarmWidget::~AlarmWidget()
{
+ removeCallback(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, this);
delete m_Alarm;
}
@@ -144,10 +147,14 @@ void AlarmWidget::updateEmptyState()
{
Evas_Object *parent = getWindow()->getBaseLayout();
if (!m_Alarm) {
+ removeCallback(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, this);
m_Layout = createEmptyLayout(parent);
} else {
m_Layout = createContentLayout(parent);
updateContentLayout(Alarm::ChangedAll);
+ addCallback(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, { [this] (system_settings_key_e key) {
+ updateContentLayout(Alarm::ChangedDate | Alarm::ChangedRepeat);
+ }, this });
}
elm_object_part_content_set(parent, "elm.swallow.content", m_Layout);