Set language in elementary on app create. 65/99965/3 submit/tizen/20161125.122111
authorKamil Lipiszko <k.lipiszko@samsung.com>
Thu, 24 Nov 2016 13:37:48 +0000 (14:37 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Fri, 25 Nov 2016 12:00:28 +0000 (13:00 +0100)
Despite the fact that taskmanager should not need to reload the
language due to RTL/LTR at the beginning if it is not set
layout does not adjust to the languages requirements.

Change-Id: Ibcd3c8b2b964ea5be66a737b4d530c399f26e213

CMake/CMakeLists.txt
packaging/org.tizen.task-mgr.spec
src/main.c

index 6c41100..c3dc481 100644 (file)
@@ -30,6 +30,7 @@ pkg_check_modules(MENU_PKGS REQUIRED
        pkgmgr-info
        feedback
        rua
+       vconf
 )
 
 FOREACH (flag ${MENU_PKGS_CFLAGS})
index 832f824..23667ad 100644 (file)
@@ -27,6 +27,7 @@ BuildRequires:  pkgconfig(pkgmgr-info)
 BuildRequires:  pkgconfig(feedback)
 BuildRequires:  pkgconfig(rua)
 BuildRequires:  pkgconfig(libtzplatform-config)
+BuildRequires:  pkgconfig(vconf)
 
 %description
 Taskmanager application reference implementation.
index 9902d8c..2e365d5 100644 (file)
@@ -17,6 +17,7 @@
 #include <app.h>
 #include <Elementary.h>
 #include <malloc.h>
+#include <vconf.h>
 
 #include "conf.h"
 #include "item.h"
@@ -175,6 +176,13 @@ static bool _create_cb(void *data)
 {
        _D("");
 
+       char *language_set = vconf_get_str(VCONFKEY_LANGSET);
+       if (language_set) {
+               _D("Lanugaged changed: %s", language_set);
+               elm_language_set(language_set);
+               free(language_set);
+       }
+
        Ecore_Timer *timer = NULL;
 
        main_info.win = elm_win_add(NULL, "Task-mgr", ELM_WIN_BASIC);