-static void __change_ui_theme_changed_cb(keynode_t *pNode, void *pUserData)
-{
- MYACCOUNT_DBUG("__change_ui_theme_changed_cb");
- if(!pUserData) {
- MYACCOUNT_ERROR("pUserDate is NULL:__vp_play_view_change_ui_theme_changed_cb.");
- return;
- }
- int value = vconf_keynode_get_int(pNode);
- MYACCOUNT_DBUG("value[%d]", value);
-
- myaccount_appdata *ad = (myaccount_appdata*)pUserData;
-
-// ea_theme_object_style_set(ad->layout_main, EA_THEME_STYLE_DARK);
-// // Color Table
-// if (ad->color_table) {
-// ea_theme_object_colors_set(ad->layout_main, ad->color_table, EA_THEME_STYLE_DARK);
-// }
- ea_theme_object_style_set(ad->layout_main, EA_THEME_STYLE_LIGHT);
- // Color Table
- if (ad->color_table) {
- ea_theme_object_colors_set(ad->layout_main, ad->color_table, EA_THEME_STYLE_LIGHT);
- }
- // Font Table
- if (ad->font_table) {
- ea_theme_object_fonts_set(ad->layout_main, ad->font_table);
- }
-
- return;
-}
-
-static void __init_changeable_resource(myaccount_appdata *ugd)
-{
- if (!ugd) {
- MYACCOUNT_ERROR("app data is NULL");
- return;
- }
- // Color Table
- ugd->color_table = ea_theme_color_table_new("/usr/apps/setting-myaccount-efl/res/ug-setting-cloud/shared/res/tables/com.samsung.my-account_ChangeableColorInfo.xml");
- if (ugd->color_table) {
-// ea_theme_object_colors_set(ugd->layout_main, ugd->color_table, EA_THEME_STYLE_DARK);
- ea_theme_object_colors_set(ugd->layout_main, ugd->color_table, EA_THEME_STYLE_LIGHT);
- MYACCOUNT_DBUG("color table create SUCCESS");
- } else {
- MYACCOUNT_ERROR("color table create fail");
- }
-
- // Font Table
- ugd->font_table = ea_theme_font_table_new("/usr/apps/setting-myaccount-efl/res/ug-setting-cloud/shared/res/tables/com.samsung.my-account_ChangeableFontInfo.xml");
- if (ugd->font_table) {
- ea_theme_object_fonts_set(ugd->layout_main, ugd->font_table);
- MYACCOUNT_DBUG("font table create SUCCESS");
- } else {
- MYACCOUNT_ERROR("font table create fail");
- }
-
- // regist UI theme
- int err = 0;
- err = vconf_notify_key_changed(VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT, __change_ui_theme_changed_cb, ugd);
- if (err != 0) {
- MYACCOUNT_ERROR("vconf_notify_key_changed is fail [0x%x]", err);
- }
- MYACCOUNT_DBUG("VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT[%s]", VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT);
-
-}
-
-static void __free_changeable_resource(myaccount_appdata *ad)
-{
- if (!ad) {
- MYACCOUNT_ERROR("app data is NULL");
- return;
- }
- vconf_ignore_key_changed( VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT, __change_ui_theme_changed_cb );
- if (ad->color_table != NULL) {
-// ea_theme_colors_unset(ad->color_table, EA_THEME_STYLE_DARK);
- ea_theme_colors_unset(ad->color_table, EA_THEME_STYLE_LIGHT);
- ea_theme_color_table_free(ad->color_table);
- ad->color_table = NULL;
- }
- if (ad->font_table != NULL) {
- ea_theme_font_table_free(ad->font_table);
- ad->font_table = NULL;
- }
-}
-