Evas_Object *bg;
Evas_Object *ctxpopup;
Evas_Object *entry_win; /* For 3D view */
+ Evas_Object* tabbar;
int rotate_mode; /* Type: appcore_rm; Indicate rotation mode of whole application */
int view_mode; /* Type: gl_view_mode; Indicate view mode of whole application */
bool reentrant;
__gl_main_create_naviframe(ad->maininfo.layout);
GL_CHECK_VAL(ad->maininfo.naviframe, -1);
/* Set Naviframe to main layout */
- Evas_Object* tabbar=create_tabbar_with_title(ad->maininfo.layout,ad);
+ ad->maininfo.tabbar=create_tabbar_with_title(ad->maininfo.layout,ad);
elm_object_part_content_set(ad->maininfo.layout, "elm.swallow.content",ad->maininfo.naviframe);
- elm_object_part_content_set(ad->maininfo.layout, "tabbar",tabbar);
+ elm_object_part_content_set(ad->maininfo.layout, "tabbar", ad->maininfo.tabbar);
/* Save conform pointer to naviframe object */
evas_object_data_set(ad->maininfo.naviframe, GL_NAVIFRAME_OBJ_DATA_KEY,
conform);
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <system_settings.h>
#include "gl-main.h"
#include "gl-debug.h"
#include "gl-lang.h"
#include "gl-entry.h"
#include "gl-db-update.h"
#include "gl-albums.h"
+#include "gl-popup.h"
/* *
* The basic policy of Tizen applications for OOM case is "silent exit" as
void *data)
{
GL_CHECK(data);
+ gl_dbg("");
gl_appdata *ad = (gl_appdata *) data;
+ _gl_del_popup(ad);
+
+ char* locale = NULL;
+ int retcode =
+ system_settings_get_value_string
+ (SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
+ if (retcode != SYSTEM_SETTINGS_ERROR_NONE) {
+ gl_dbgE
+ ("Unable to fetch the current language setting with return value %d",
+ retcode);
+ }
+ if (locale) {
+ gl_dbg("locale is [%s]", locale);
+ elm_language_set(locale);
+ GL_FREE(locale);
+ locale = NULL;
+ }
+
evas_object_smart_callback_call(ad->maininfo.naviframe,
"gallery,language,changed", data);
/* Change text in APP */
return 0;
}
+void _gl_update_lang_tabbar(void* data)
+{
+ gl_dbg("");
+ gl_appdata* ad = (gl_appdata*)data;
+ Evas_Object* toolbar = ad->maininfo.tabbar;
+
+ Elm_Object_Item* it = NULL;
+ char* text = GL_STR_PHOTO_TAB;
+ it = elm_toolbar_first_item_get(toolbar);
+ elm_object_item_part_text_set(it,NULL,_gl_str(text));
+ it = elm_toolbar_last_item_get(toolbar);
+ text = GL_STR_ALBUM_TAB;
+ elm_object_item_part_text_set(it,NULL,_gl_str(text));
+ gl_dbg("tabs language changed");
+}
+
/**
*
* @param data
*/
int _gl_lang_update(void *data)
{
- char *locale = NULL;
- int retcode =
- system_settings_get_value_string
- (SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
-
- if (retcode != SYSTEM_SETTINGS_ERROR_NONE) {
- gl_dbgW("failed to get language[%d]", retcode);
- }
-
- if (locale) {
- elm_language_set(locale);
- GL_FREE(locale);
- }
- GL_CHECK_VAL(data, -1);
+ gl_dbg("");
gl_appdata *ad = (gl_appdata *) data;
ad->maininfo.lang_changed = true;
int view_mode = gl_get_view_mode(ad);
/* Remove ctxpopup */
_gl_ctxpopup_del(data);
+ _gl_update_lang_tabbar(data);
+
switch (view_mode) {
case GL_VIEW_ALBUMS:
case GL_VIEW_ALBUM_REORDER: