diff options
author | MinHyung Ko <minhyung.ko@samsung.com> | 2013-09-16 17:09:25 +0900 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.vlan144.tizendev.org> | 2013-09-16 08:54:39 +0000 |
commit | 199f257baeffc6e634798247da1dde5b88b36ed6 (patch) | |
tree | 5259b090b4384d38de71f55381f33d21fb4a0ab5 | |
parent | 397c2b84dfec6343438b59df339a02cd1795f2ac (diff) | |
download | web-provider-199f257baeffc6e634798247da1dde5b88b36ed6.tar.gz web-provider-199f257baeffc6e634798247da1dde5b88b36ed6.tar.bz2 web-provider-199f257baeffc6e634798247da1dde5b88b36ed6.zip |
Reload DBox when time is changed in setting menu
[Issue#] P130916-00058
[Problem] DBox didn't updated even system time is changed
[Cause] Missing callback for time changed
[Solution] Add callback for time change
[SCMRequest] N/A
Change-Id: Ic2c4618e4efd09fdec44c54e02732d54c82d9042
-rwxr-xr-x | src/Daemon/BoxDaemonImpl.cpp | 18 | ||||
-rw-r--r-- | src/Daemon/BoxDaemonImpl.h | 1 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/Daemon/BoxDaemonImpl.cpp b/src/Daemon/BoxDaemonImpl.cpp index e1300b9..f7abdb5 100755 --- a/src/Daemon/BoxDaemonImpl.cpp +++ b/src/Daemon/BoxDaemonImpl.cpp @@ -51,7 +51,9 @@ BoxDaemonImpl::BoxDaemonImpl() if (vconf_notify_key_changed("db/setting/accessibility/font_name", requestChangeFontCallback, this) != true) { LogD("vconf_notify_key_changed returned FALSE!"); } - + if (vconf_notify_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED, requestChangeTimeCallback, this) != true) { + LogD("vconf_notify_key_changed returned FALSE!"); + } } BoxDaemonImpl::~BoxDaemonImpl() @@ -707,3 +709,17 @@ void BoxDaemonImpl::requestChangeFontCallback(keynode_t* key, void* data) free(fontstr); Ecore_Job* ret = ecore_job_add(requestBoxJobCallback, jobInfo); } + +void BoxDaemonImpl::requestChangeTimeCallback(keynode_t* key, void* data) +{ + LogD("enter"); + + char* timestr = vconf_get_str(VCONFKEY_SYSTEM_TIME_CHANGED); + + BoxDaemonImpl* This = static_cast<BoxDaemonImpl*>(data); + BoxInfoPtr info = BoxInfoPtr(new BoxInfo()); + JobInfo* jobInfo = new JobInfo(REQUEST_CMD_CHANGE_LANGUAGE, info, This); + + free(timestr); + Ecore_Job* ret = ecore_job_add(requestBoxJobCallback, jobInfo); +} diff --git a/src/Daemon/BoxDaemonImpl.h b/src/Daemon/BoxDaemonImpl.h index a8db76b..1c29138 100644 --- a/src/Daemon/BoxDaemonImpl.h +++ b/src/Daemon/BoxDaemonImpl.h @@ -73,6 +73,7 @@ class BoxDaemonImpl { // callback for app-core event static int requestChangeLanguageCallback(void* data); static void requestChangeFontCallback(keynode_t* key, void* data); + static void requestChangeTimeCallback(keynode_t* key, void* data); // common private functions void setProviderCallbacks(ProviderCallbacks& callbacks); std::string getBoxType(const char* boxId); |