tizen 2.4 release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20151029.041424 submit/tizen_2.4/20151028.062632 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 06:41:24 +0000 (15:41 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 06:41:24 +0000 (15:41 +0900)
CMakeLists.txt
LICENSE.APLv2 [moved from LICENSE with 97% similarity]
NOTICE
include/myaccount_ug.h
include/myaccount_ug_common.h
packaging/my-account.spec
setting-myaccount-efl.xml
src/myaccount_ug_account_list.c
src/myaccount_ug_addaccount.c
src/myaccount_ug_common.c
src/myaccount_ug_main.c

index 4f697a6..cc592fb 100755 (executable)
@@ -37,7 +37,7 @@ pkg_check_modules(pkgs REQUIRED
        pkgmgr
        capi-system-system-settings
        iniparser
-       efl-assist
+       efl-extension
 #      notification
 )
 
@@ -49,13 +49,6 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -Werror -fpie")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_C_FLAGS_RELEASE "-O2")
 
-#Build time feature
-IF( _MULTI_WINDOW_ENABLE_ )
-        ADD_DEFINITIONS("-D_MULTI_WINDOW_ENABLE_")
-        SET(EDJE_CC_DEFINES "-D_MULTI_WINDOW_ENABLE_")
-ENDIF()
-
-
 FIND_PROGRAM(UNAME NAMES uname)
 EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
 IF("${ARCH}" STREQUAL "arm")
@@ -95,9 +88,6 @@ INSTALL(FILES ${CMAKE_BINARY_DIR}/setting-myaccount-efl.xml DESTINATION /usr/sha
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
 INSTALL(FILES ${CMAKE_BINARY_DIR}/myaccount.edj DESTINATION ${RESDIR}/edje/${PROJECT_NAME})
 INSTALL(FILES ${CMAKE_BINARY_DIR}/myaccount_edc_images.edj DESTINATION ${RESDIR}/edje/${PROJECT_NAME})
-INSTALL(FILES
-${CMAKE_SOURCE_DIR}/com.samsung.my-account_ChangeableColorInfo.xml DESTINATION ${RESDIR}/ug-setting-cloud/shared/res/tables)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/com.samsung.my-account_ChangeableFontInfo.xml DESTINATION ${RESDIR}/ug-setting-cloud/setting-cloud/shared/res/tables)
 
 # i18n
 ADD_SUBDIRECTORY(po)
similarity index 97%
rename from LICENSE
rename to LICENSE.APLv2
index bbe9d02..75b5248 100755 (executable)
--- a/LICENSE
@@ -1,4 +1,3 @@
-Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
 \r
                                  Apache License\r
                            Version 2.0, January 2004\r
@@ -201,6 +200,3 @@ Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
    See the License for the specific language governing permissions and\r
    limitations under the License.\r
-\r
-\r
-\r
diff --git a/NOTICE b/NOTICE
index ded3804..0e0f016 100755 (executable)
--- a/NOTICE
+++ b/NOTICE
@@ -1 +1,3 @@
-Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
\ No newline at end of file
+Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
index 26de5c5..feed6cc 100755 (executable)
 #include <Elementary.h>
 #include <stdio.h>
 #include <vconf-keys.h>
-#include <bundle.h>
 #include <ui-gadget-module.h>
 #include <package-manager.h>
 #include <account.h>
-#include <efl_assist.h>
+#include <efl_extension.h>
 
 #include "Eina.h"
 
@@ -164,8 +163,6 @@ typedef struct appdata {
        char *called_from;
        account_subscribe_h account_subscribe;
 
-       Ea_Theme_Color_Table *color_table;
-       Eina_List *font_table;
        Evas_Object *popup;
 }myaccount_appdata;
 
index 7d28f0c..f434475 100755 (executable)
@@ -29,7 +29,6 @@
 #include <app_manager.h>
 #include <vconf.h>
 #include <package-manager.h>
-#include <efl_assist.h>
 #include <glib.h>
 
 #define ENABLE_NOTI
@@ -89,7 +88,7 @@ int myaccount_common_launch_application(MyAccountRequestViewType
                                                                                                        MyAccountProviderType sp_type,
                                                                                                        void *data );
 
-int myaccount_common_get_all_account_cnt(int *count);
+int myaccount_common_get_all_account_cnt(int *count, bool include_secret);
 
 int myaccount_common_get_account_cnt_by_capability(const char* capability_type, int *count);
 
index a2e18cb..30c7384 100755 (executable)
@@ -1,12 +1,20 @@
 Name:       my-account
 Summary:    My account application
-Version:    1.9.101
+Version:    1.9.102
 Release:    1
 Group:      main/devel
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
+
+%if "%{?tizen_profile_name}" == "wearable"
+ExcludeArch: %{arm} %ix86 x86_64
+%endif
+
+%if "%{?tizen_profile_name}" == "tv"
+ExcludeArch: %{arm} %ix86 x86_64
+%endif
+
 BuildRequires:  pkgconfig(elementary)
-BuildRequires:  pkgconfig(efl-assist)
 BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(dlog)
@@ -20,6 +28,7 @@ BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(pkgmgr)
 BuildRequires:  pkgconfig(iniparser)
 BuildRequires:  pkgconfig(capi-system-system-settings)
+BuildRequires:  pkgconfig(efl-extension)
 BuildRequires:  cmake
 BuildRequires:  gettext-devel
 BuildRequires:  edje-bin
@@ -46,17 +55,17 @@ make %{?jobs:-j%jobs}
 
 %install
 rm -rf %{buildroot}
+mkdir -p %{buildroot}/usr/share/license
+cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
 %make_install
 
 %files
 %manifest my-account.manifest
 %defattr(-,root,root,-)
+/usr/share/license/%{name}
 %{LIBDIR}/*
 %{RESDIR}/*
 /usr/share/packages/*.xml
-%{RESDIR}/ug-setting-cloud/shared/res/tables/*
 
 %post
 /sbin/ldconfig
-vconftool set -f -t int db/account/auto_sync 1 -s system::vconf_inhouse -g 6514
-vconftool set -t int db/account/sync_all 0 -s system::vconf_inhouse -g 6514
index 33af557..9dff061 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="setting-myaccount-efl" version="1.9.101" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="setting-myaccount-efl" version="1.9.102" install-location="internal-only">
        <label>Accounts</label>
        <author email="wy1115.lee@samsung.com" href="www.samsung.com">Wonyoung Lee</author>
        <description>My Account Application</description>
index ab9f69d..345e372 100755 (executable)
@@ -205,7 +205,7 @@ bool _myaccount_account_list_account_info_cb(account_h account,
        } else {
 
                account_info = _myaccount_account_list_create_priv_item();
-               if( account_info == NULL ) {
+               if ( account_info == NULL ) {
                        MYACCOUNT_ERROR("_myaccount_account_list_create_priv_item fail\n");
                        return false;
                }
@@ -357,18 +357,10 @@ static int _myaccount_ug_account_list_compare(gconstpointer a, gconstpointer b)
 
 static int __myaccount_account_list_populate_account_info(myaccount_appdata *ad)
 {
-       int error_code = -1;
        int count=0;
 
-       error_code = account_connect();
-       if (error_code != ACCOUNT_ERROR_NONE)
-               MYACCOUNT_ERROR("account_connect: Failed \n");
-
        account_foreach_account_from_db(_myaccount_account_list_account_info_cb,
                                                                                        &ad->account_info_list);
-       error_code = account_disconnect();
-       if (error_code != ACCOUNT_ERROR_NONE)
-               MYACCOUNT_ERROR("account_disconnect: Failed \n");
 
        ad->sorted_account_list = g_list_sort(ad->account_info_list, (GCompareFunc)_myaccount_ug_account_list_compare);
        count = g_list_length(ad->sorted_account_list);
@@ -410,7 +402,8 @@ Eina_Bool myaccount_account_list_quit_cb(void *data, Elm_Object_Item *it)
 
 void myaccount_account_list_back_key_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       elm_naviframe_item_pop(obj);
+       myaccount_appdata *ad = (myaccount_appdata*)data;
+       elm_naviframe_item_pop(ad->navi_bar);
 }
 
 static void __myaccount_account_list_addaccount_cb( void *data,
@@ -436,7 +429,7 @@ static char *__myaccount_account_list_gl_label_get(void *data,
                return NULL;
        }
 
-       if (!strcmp(part, "elm.text.main.left.top")) {
+       if (!strcmp(part, "elm.text")) {
                myaccount_common_lowercase(account_info_item->domain_name,
                                                                                                domain_name_lower);
 
@@ -448,7 +441,7 @@ static char *__myaccount_account_list_gl_label_get(void *data,
                        return strdup(account_info_item->username);
                else
                        return strdup("Unknown");
-       } else if (!strcmp(part, "elm.text.sub.left.bottom")) {
+       } else if (!strcmp(part, "elm.text.sub")) {
                if (strlen(account_info_item->capability) <=0 )
                        return strdup(dgettext(MA_UG_NAME, "IDS_MA_BODY_SIGNED_IN"));
                else
@@ -464,9 +457,7 @@ static Evas_Object *__myaccount_account_list_gl_icon_get(void *data,
 {
        char tempbuf[PATH_MAX];
        Evas_Object *icon = NULL;
-       int auto_sync_status = -1;
        myaccount_list_priv *account_info_item = (myaccount_list_priv*)data;
-       char *color = NULL;
        Evas_Object *ic = NULL;
 
        if (!account_info_item) {
@@ -475,7 +466,7 @@ static Evas_Object *__myaccount_account_list_gl_icon_get(void *data,
        }
        memset(tempbuf, 0, sizeof(char)*PATH_MAX);
 
-       if (!strcmp(part, "elm.icon.1")) {
+       if (!strcmp(part, "elm.swallow.icon")) {
                if (strlen(account_info_item->icon_path) > 0) {
                        MA_SNPRINTF(tempbuf, sizeof(tempbuf), "%s", account_info_item->icon_path);
                } else {
@@ -494,17 +485,11 @@ static Evas_Object *__myaccount_account_list_gl_icon_get(void *data,
                elm_layout_content_set(ic, "elm.swallow.content", icon);
        }
 
-       if (!strcmp(part, "elm.icon.2")) {
+       if (!strcmp(part, "elm.swallow.end")) {
                if (account_info_item->sync_status == ACCOUNT_SYNC_NOT_SUPPORT)
                        return NULL;
-               if (vconf_get_int(VCONFKEY_ACCOUNT_AUTO_SYNC_STATUS_INT,
-                                               &auto_sync_status) < 0) {
-                       MYACCOUNT_ERROR("Fail to getVCONFKEY_ACCOUNT_AUTO_SYNC_STATUS_INT\n");
-               }
                MA_SNPRINTF(tempbuf, sizeof(tempbuf), "%s", "account_icon_syncing.png");
-               color = "AO001";
 
-               MYACCOUNT_DBUG("color:[%s]",color);
                if(strlen(tempbuf) > 0) {
                        ic = elm_layout_add(obj);
                        elm_layout_theme_set(ic, "layout", "list/C/type.3", "default");
@@ -515,11 +500,7 @@ static Evas_Object *__myaccount_account_list_gl_icon_get(void *data,
                        else
                                elm_image_file_set(icon, MA_IMAGE_EDJ_NAME, tempbuf);
 
-                       int ret = 0;
-                       if (color) {
-                               ret = ea_theme_object_color_set(icon, color);
-                               MYACCOUNT_DBUG("ret[%d]", ret);
-                       }
+                       evas_object_color_set(icon, 67, 116, 217, 255);
                        elm_layout_content_set(ic, "elm.swallow.content", icon);
                }
        }
@@ -840,7 +821,7 @@ static Evas_Object *__myaccount_account_list_create_genlist(
        int account_count = 0;
        account_count = __myaccount_account_list_populate_account_info(ad);
 
-       account_list_itc.item_style = "2line.top";
+       account_list_itc.item_style = "type1";
        account_list_itc.func.text_get = __myaccount_account_list_gl_label_get;
        account_list_itc.func.content_get = __myaccount_account_list_gl_icon_get;
        account_list_itc.func.state_get = NULL;
@@ -904,8 +885,9 @@ static void _delete_ctxpopup_cb(void *data, Evas *e, Evas_Object *obj, void *eve
                }
        }
        if (ad->popup) {
-               ea_object_event_callback_del(ad->popup, EA_CALLBACK_BACK, ea_ctxpopup_back_cb);
-               ea_object_event_callback_del(ad->popup, EA_CALLBACK_MORE, ea_ctxpopup_back_cb);
+               eext_object_event_callback_del(ad->popup, EEXT_CALLBACK_BACK, eext_ctxpopup_back_cb);
+               eext_object_event_callback_del(ad->popup, EEXT_CALLBACK_MORE, eext_ctxpopup_back_cb);           
+               
                evas_object_event_callback_del(ad->popup, EVAS_CALLBACK_DEL, _delete_ctxpopup_cb);
        }
 }
@@ -923,8 +905,9 @@ static void __create_more_ctxpopup(myaccount_appdata *ad)
                evas_object_smart_callback_add(elm_object_top_widget_get(popup), "wm,rotation,changed", __rotate_more_ctxpopup_cb, ad);
        }
        evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _delete_ctxpopup_cb, ad);
-       ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_ctxpopup_back_cb, popup);
-    ea_object_event_callback_add(popup, EA_CALLBACK_MORE, ea_ctxpopup_back_cb, popup);
+
+       eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_ctxpopup_back_cb, popup);
+       eext_object_event_callback_add(popup, EEXT_CALLBACK_MORE, eext_ctxpopup_back_cb, popup);
 
        elm_ctxpopup_item_append(popup, dgettext(MA_UG_NAME,"IDS_PB_BODY_ADD_ACCOUNT"), NULL, __myaccount_account_list_addaccount_cb, ad);
 
@@ -947,7 +930,7 @@ static void __delete_more_cb(void *data)
        }
 }
 
-static void __more_cb(void *data, Elm_Object_Item *it, const char *emission, const char *source)
+static void __more_cb(void *data, Evas_Object *obj, void *event_info)
 {
        MYACCOUNT_DBUG("__more_cb");
        myaccount_appdata *ad = data;
@@ -959,7 +942,9 @@ void myaccount_ug_account_list_create(void *data)
 {
        myaccount_appdata *ad = data;
        Evas_Object *genlist = NULL;
-       Evas_Object *layout;
+       Evas_Object *back_btn = NULL;
+       Evas_Object *layout = NULL;
+       Evas_Object *more_button = NULL;        
 
        if (ad == NULL) {
                MYACCOUNT_ERROR("myaccount_ug_account_list_create myaccount_appdata is null\n");
@@ -981,10 +966,15 @@ void myaccount_ug_account_list_create(void *data)
 
        elm_object_part_content_set (layout, "accountlist.genlist", genlist);
 
+       back_btn = elm_button_add(ad->navi_bar);
+       elm_object_style_set(back_btn, "naviframe/back_btn/default");
+       evas_object_smart_callback_add(back_btn, "clicked", myaccount_account_list_back_key_cb, ad);
+
        ad->nf_it = elm_naviframe_item_push(ad->navi_bar,
                                                        dgettext(MA_UG_NAME,
                                                        "IDS_ST_BODY_ACCOUNT_LIST"),
-                                                       NULL, NULL, layout, NULL);
+                                                       back_btn, NULL, layout, NULL);
+
        elm_naviframe_item_pop_cb_set(ad->nf_it, myaccount_account_list_quit_cb, (void*)ad);
 
        int count = 0;
@@ -992,8 +982,13 @@ void myaccount_ug_account_list_create(void *data)
 
        MYACCOUNT_DBUG("TOTAL avaiable sp count %d\n", count);
 
-       ea_object_event_callback_add(ad->navi_bar, EA_CALLBACK_MORE, ea_naviframe_more_cb, NULL);
-       elm_object_item_signal_callback_add(ad->nf_it, "elm,action,more_event", "", __more_cb, ad);
+       eext_object_event_callback_add(ad->navi_bar, EEXT_CALLBACK_MORE, eext_naviframe_more_cb, NULL);
+
+       more_button = elm_button_add(ad->navi_bar);
+       elm_object_style_set(more_button, "naviframe/more/default");
+       evas_object_smart_callback_add(more_button, "clicked", __more_cb, ad);
+       elm_object_item_part_content_set(ad->nf_it, "toolbar_more_btn", more_button);   
+       
 
 }
 
@@ -1041,9 +1036,6 @@ static void __myaccount_account_list_init_main_view(myaccount_appdata *ad)
        //elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_SHOW);
        ad->bg = __myaccount_account_list_create_bg(ad->win_main);
        ad->layout_main = __myaccount_account_list_create_main_layout(ad->win_main, ad->bg);
-//     ea_theme_object_style_set(ad->layout_main, EA_THEME_STYLE_DARK);
-//     ea_theme_object_style_set(ad->layout_main, EA_THEME_STYLE_LIGHT);
-
        ad->base = ad->layout_main;
 }
 
@@ -1051,7 +1043,7 @@ void myaccount_list_navi_create(myaccount_appdata *ad)
 {
        ad->navi_bar = __myaccount_account_list_create_navi_layout(ad->layout_main);
 
-       ea_object_event_callback_add(ad->navi_bar, EA_CALLBACK_BACK, myaccount_account_list_back_key_cb, (void*)ad);
+       eext_object_event_callback_add(ad->navi_bar, EEXT_CALLBACK_BACK, myaccount_account_list_back_key_cb, (void*)ad);
 }
 
 void myaccount_list_view_create(myaccount_appdata *priv)
index b056b61..20ec83b 100755 (executable)
@@ -45,7 +45,7 @@ static char *__myaccount_addaccount_gl_label_get(void *data,
        addaccount_list_priv *service = (addaccount_list_priv*)data;
        char buf[2048]={0,};
 
-       if (!strcmp(part, "elm.text.main.left")) {
+       if (!strcmp(part, "elm.text")) {
                int value = -1;
                int rc = -1;
                char *tmp_sp_name = NULL;
@@ -107,7 +107,6 @@ static void __myaccount_addaccount_gl_sel(void *data,
                switch(service->sp_type) {
                        case MYACCOUNT_TYPE_PICASA :
                        case MYACCOUNT_TYPE_YOUTUBE :
-//                     case MYACCOUNT_TYPE_FACEBOOK :
                        case MYACCOUNT_TYPE_EXCHANGE :
                                myaccount_common_launch_application(
                                                MYACCOUNT_REQUEST_SIGNIN,
@@ -129,17 +128,6 @@ static void __myaccount_addaccount_gl_sel(void *data,
                                                service->sp_type,
                                                ad);
                                break;
-//                     case MYACCOUNT_TYPE_MSN :
-//                             MA_SNPRINTF(email_sp, sizeof(email_sp), "%s", "msn");
-//                             myaccount_common_launch_application(
-//                                             MYACCOUNT_REQUEST_SIGNIN,
-//                                             strdup(service->package_name),
-//                                             NULL,
-//                                             email_sp,
-//                                             service->sp_type,
-//                                             -1,
-//                                             ad);
-//                             break;
                        case MYACCOUNT_TYPE_OTHER:
                                MA_SNPRINTF(email_sp, sizeof(email_sp), "%s", "others");
                                myaccount_common_launch_application(
@@ -196,7 +184,7 @@ static Evas_Object *__myaccount_addaccount_icon_get( void *data,
        }
        memset(tempbuf, 0, sizeof(char)*PATH_MAX);
 
-       if (!strcmp(part, "elm.icon.1")) {
+       if (!strcmp(part, "elm.swallow.icon")) {
                if (strlen(service_item->icon_path) > 0) {
                        MA_STRNCPY(tempbuf, service_item->icon_path, sizeof(tempbuf));
                } else {
@@ -301,8 +289,8 @@ static bool _myaccount_addaccount_get_account_type_info_cb(account_type_h accoun
                MA_MEMFREE(sp_info);
                /* SLP email */
                sp_info = _myaccount_addaccount_create_priv_item();
-               if(sp_info == NULL) {
-                       MYACCOUNT_ERROR(" sp_info is NULL \n");
+               if ( sp_info == NULL ) {
+                       MYACCOUNT_ERROR("sp_info is NULL\n");
                        return FALSE;
                }
 
@@ -410,18 +398,11 @@ static bool _myaccount_addaccount_get_account_type_info_cb(account_type_h accoun
 
 static void _myaccount_addaccount_get_account_type_info(const char* capability_filter, GList** sp_info_list)
 {
-       int ret = -1;
        if(!sp_info_list) {
                MYACCOUNT_ERROR("sp_info_list is null\n");
                return;
        }
 
-       ret = account_connect();
-       if(ret != ACCOUNT_ERROR_NONE){
-               MYACCOUNT_ERROR("account database cannot be connected\n");
-               return;
-       }
-
        if(capability_filter) {
                if(!strcmp(capability_filter, "http://tizen.org/account/capability/tizen_email")){
                        account_type_query_by_provider_feature(_myaccount_addaccount_get_account_type_info_cb, "http://tizen.org/account/capability/email", (void*)sp_info_list);
@@ -432,11 +413,6 @@ static void _myaccount_addaccount_get_account_type_info(const char* capability_f
        else {
                account_type_foreach_account_type_from_db(_myaccount_addaccount_get_account_type_info_cb, (void*)sp_info_list);
        }
-       ret = account_disconnect();
-       if(ret != ACCOUNT_ERROR_NONE){
-               MYACCOUNT_ERROR("account database cannot be connected\n");
-               return;
-       }
 }
 
 static int _myaccount_ug_addaccount_compare(gconstpointer a, gconstpointer b)
@@ -509,7 +485,7 @@ static Evas_Object * __myaccount_addaccount_create_genlist_layout(
 {
        Evas_Object *genlist;
 
-       addacc_list_itc.item_style = "1line";
+       addacc_list_itc.item_style = "type1";
        addacc_list_itc.func.text_get = __myaccount_addaccount_gl_label_get;
        addacc_list_itc.func.content_get = __myaccount_addaccount_icon_get;
        addacc_list_itc.func.state_get = NULL;
@@ -593,6 +569,7 @@ static Evas_Object *__myaccount_addaccount_create_genlist(
 static Evas_Object *__myaccount_addaccount_no_account(myaccount_appdata *ad, int count)
 {
        Evas_Object *no_account;
+       char no_content_text[100] = {0,};
 
        if (ad == NULL) {
                MYACCOUNT_ERROR("__myaccount_addaccount_no_account returns NULL\n");
@@ -604,7 +581,10 @@ static Evas_Object *__myaccount_addaccount_no_account(myaccount_appdata *ad, int
        elm_layout_theme_set(no_account, "layout", "nocontents", "default");
        evas_object_size_hint_weight_set(no_account, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(no_account, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       elm_object_part_text_set(no_account, "elm.text", dgettext(MA_UG_NAME, "IDS_MA_NPBODY_NO_ACCOUNT_PROVIDER_APPS_INSTALLED"));
+
+       MA_SNPRINTF(no_content_text, sizeof(no_content_text), "<font=Sans:style=Regular color=#000000>%s</font>", dgettext(MA_UG_NAME, "IDS_MA_NPBODY_NO_ACCOUNT_PROVIDER_APPS_INSTALLED"));
+       elm_object_part_text_set(no_account, "elm.text", no_content_text);
+
        /* left below line to future use */
        //elm_object_part_text_set(no_account, "elm.help.text", "Please install account app to add account");
        elm_layout_signal_emit(no_account, "text,disabled", "");
@@ -646,7 +626,7 @@ Eina_Bool __myaccount_addaccount_quit_cb( void *data,
                                                                                error_code);
                }
        } else {
-               error_code = myaccount_common_get_all_account_cnt(&count);
+               error_code = myaccount_common_get_all_account_cnt(&count, false);
                if (error_code != ACCOUNT_ERROR_NONE) {
                        MYACCOUNT_ERROR("__myaccount_addaccount_quit_cb: myaccount_common_get_all_account_cnt fail(%d) \n",
                                                                                error_code);
@@ -682,6 +662,12 @@ Eina_Bool __myaccount_addaccount_quit_cb( void *data,
        return EINA_TRUE;
 }
 
+void myaccount_addaccount_back_key_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       myaccount_appdata *ad = (myaccount_appdata*)data;
+       elm_naviframe_item_pop(ad->navi_bar);
+}
+
 void myaccount_addaccount_genlist_create(void *data)
 {
        myaccount_appdata *ad = data;
@@ -705,6 +691,7 @@ void myaccount_addaccount_genlist_create(void *data)
 
        l_button = elm_button_add(ad->navi_bar);
        elm_object_style_set(l_button , "naviframe/back_btn/default");
+       evas_object_smart_callback_add(l_button, "clicked", myaccount_addaccount_back_key_cb, ad);
 
        ad->add_nf_it = elm_naviframe_item_push(ad->navi_bar,
                                        dgettext(MA_UG_NAME, "IDS_MA_HEADER_ADD_ACCOUNT"),
index f885d7c..53e534e 100755 (executable)
@@ -24,6 +24,8 @@
 #include "myaccount_ug_addaccount.h"
 #include "myaccount_ug_account_list.h"
 #include <iniparser.h>
+#include <app_control_internal.h>
+#include <account_internal.h>
 
 static myaccount_appdata *g_myaccount_appdata = NULL;
 
@@ -305,7 +307,7 @@ void myaccount_common_handle_notification(const char* event_type)
 
 
        } else {
-               error_code = myaccount_common_get_all_account_cnt(&count);
+               error_code = myaccount_common_get_all_account_cnt(&count, false);
                if (error_code != ACCOUNT_ERROR_NONE) {
                        MYACCOUNT_ERROR("myaccount_common_handle_notification: myaccount_common_get_all_account_cnt code(%d) \n",
                                                                error_code);
@@ -385,14 +387,9 @@ Evas_Object* _myaccount_common_add_popup(Evas_Object* parent, const char* text,
 {
        myaccount_appdata *ad = (myaccount_appdata*)myaccount_get_appdata();
 
-        /* multi window >>> */
-#ifdef _MULTI_WINDOW_ENABLE_
-       MYACCOUNT_DBUG("multi window enabled.\n");
-        ad->modal_popup = ea_center_popup_add(parent);
-#else
        MYACCOUNT_DBUG("multi window not enabled.\n");
        ad->modal_popup = elm_popup_add(parent);
-#endif
+
        evas_object_size_hint_weight_set(ad->modal_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
        elm_object_text_set(ad->modal_popup, text);
@@ -694,10 +691,6 @@ int  myaccount_common_launch_application(MyAccountRequestViewType
                                if(strcmp(package_name,"setting-synchronise-efl") == 0){
                                        int ret = -1, sync_cnt = 0;
                                        char* synchronise_count = NULL;
-                                       ret = account_connect();
-                                       if(ret != ACCOUNT_ERROR_NONE) {
-                                               MYACCOUNT_ERROR("Account connect fail (%x)\n", ret);
-                                       }
                                        ret = account_query_account_by_package_name(_myaccount_common_synchronise_query_cb, "setting-synchronise-efl", (void*)&synchronise_count);
                                        if(ret != ACCOUNT_ERROR_NONE) {
                                                MYACCOUNT_ERROR("account_query_account_by_package_name fail (%x)\n", ret);
@@ -742,23 +735,6 @@ int  myaccount_common_launch_application(MyAccountRequestViewType
                                                return -1;
                                        }
 
-#ifdef _MULTI_WINDOW_ENABLE_
-                                       unsigned int layout = 0;
-                                       if( ecore_x_window_prop_card32_get( elm_win_xwindow_get( (Evas_Object*)ad->win_main ),
-                                                                              ECORE_X_ATOM_E_WINDOW_DESKTOP_LAYOUT, &layout, 1 ) != -1 )
-                                       {
-                                               if( layout == 0 || layout == 1)
-                                               {
-                                                       app_control_add_extra_data( app_control, "window_startup_type", "2");
-                                                       char temp[10] = {0,};
-                                                       snprintf( temp, sizeof(temp), "%d", (int)layout );
-                                                       app_control_add_extra_data( app_control, "window_layout_id", temp);
-                                               }
-                                       }
-                                       MYACCOUNT_SLOGD("### MULTI WINDOW: call with multi win params");
-#endif
-
-
                                }
 
                                app_control_set_operation(app_control, ACCOUNT_OPERATION_SIGNIN);
@@ -883,7 +859,7 @@ Eina_Bool myaccount_common_modal_popup_timer_cb(gpointer data)
        return false;
 }
 
-int myaccount_common_get_all_account_cnt(int *count)
+int myaccount_common_get_all_account_cnt(int *count, bool include_secret)
 {
        int error_code = -1;
        int account_cnt = 0;
@@ -891,28 +867,16 @@ int myaccount_common_get_all_account_cnt(int *count)
                MYACCOUNT_ERROR("myaccount_common_get_all_account_cnt: count ptr is NULL \n");
                return error_code;
        }
-       error_code = account_connect();
-       if (error_code != ACCOUNT_ERROR_NONE) {
-               MYACCOUNT_ERROR("myaccount_common_get_all_account_cnt: fail to connect account DB \n");
-               return error_code;
+       if( include_secret ) {
+               error_code = account_get_total_count_from_db(&account_cnt);
+       }else {
+               error_code = account_get_total_count_from_db_ex(&account_cnt);
        }
-       error_code = account_get_total_count_from_db(&account_cnt);
        if (error_code != ACCOUNT_ERROR_NONE) {
-               int ret = ACCOUNT_ERROR_NONE;
-               ret = account_disconnect();
-               if (ret != ACCOUNT_ERROR_NONE) {
-                       MYACCOUNT_ERROR("myaccount_common_get_all_account_cnt: account_svc_disconnect fail(%d) \n",
-                                                               ret);
-               }
                return error_code;
        }
        *count = account_cnt;
-       error_code = account_disconnect();
-       if (error_code != ACCOUNT_ERROR_NONE) {
-               MYACCOUNT_ERROR("myaccount_common_get_all_account_cnt: account_svc_get_count fail(%d) \n",
-                                               error_code);
-               return error_code;
-       }
+
        return ACCOUNT_ERROR_NONE;
 }
 
@@ -933,32 +897,16 @@ int myaccount_common_get_account_cnt_by_capability(const char* capability_type,
                MYACCOUNT_ERROR("myaccount_common_get_account_cnt_by_capability: count ptr is NULL \n");
                return error_code;
        }
-       error_code = account_connect();
-       if (error_code != ACCOUNT_ERROR_NONE) {
-               MYACCOUNT_ERROR("myaccount_common_get_account_cnt_by_capability: fail to connect account DB \n");
-               return error_code;
-       }
 
        error_code = account_query_account_by_capability_type(_myaccount_common_query_cb, capability_type, &account_cnt);
        if (error_code != ACCOUNT_ERROR_NONE) {
 
                *count = 0;
 
-               int ret = ACCOUNT_ERROR_NONE;
-               ret = account_disconnect();
-               if (ret != ACCOUNT_ERROR_NONE) {
-                       MYACCOUNT_ERROR("myaccount_common_get_account_cnt_by_capability: account_svc_disconnect fail(%d) \n",
-                                                               ret);
-               }
                return error_code;
        }
        *count = account_cnt;
-       error_code = account_disconnect();
-       if (error_code != ACCOUNT_ERROR_NONE) {
-               MYACCOUNT_ERROR("myaccount_common_get_all_account_cnt: account_svc_get_count fail(%d) \n",
-                                               error_code);
-               return error_code;
-       }
+
        return ACCOUNT_ERROR_NONE;
 }
 
@@ -970,11 +918,6 @@ int myaccount_common_get_account_cnt_by_appid(const char* appid, int *count)
                MYACCOUNT_ERROR("myaccount_common_get_account_cnt_by_appid: count ptr is NULL \n");
                return error_code;
        }
-       error_code = account_connect();
-       if (error_code != ACCOUNT_ERROR_NONE) {
-               MYACCOUNT_ERROR("myaccount_common_get_account_cnt_by_appid: fail to connect account DB \n");
-               return error_code;
-       }
 
        error_code = account_query_account_by_package_name(_myaccount_common_query_cb, appid, &account_cnt);
 
@@ -982,21 +925,10 @@ int myaccount_common_get_account_cnt_by_appid(const char* appid, int *count)
 
                *count = 0;
 
-               int ret = ACCOUNT_ERROR_NONE;
-               ret = account_disconnect();
-               if (ret != ACCOUNT_ERROR_NONE) {
-                       MYACCOUNT_ERROR("myaccount_common_get_account_cnt_by_appid: account_svc_disconnect fail(%d) \n",
-                                                               ret);
-               }
                return error_code;
        }
        *count = account_cnt;
-       error_code = account_disconnect();
-       if (error_code != ACCOUNT_ERROR_NONE) {
-               MYACCOUNT_ERROR("myaccount_common_get_account_cnt_by_appid: account_svc_get_count fail(%d) \n",
-                                               error_code);
-               return error_code;
-       }
+
        return ACCOUNT_ERROR_NONE;
 }
 
@@ -1037,7 +969,7 @@ static int _myaccount_common_pkmgr_return_cb(int req_id, const char *pkg_type,
                                                                                        error_code);
                        }
                } else {
-                       error_code = myaccount_common_get_all_account_cnt(&count);
+                       error_code = myaccount_common_get_all_account_cnt(&count, false);
                        if (error_code != ACCOUNT_ERROR_NONE) {
                                MYACCOUNT_ERROR("__myaccount_addaccount_quit_cb: myaccount_common_get_all_account_cnt fail(%d) \n",
                                                                                        error_code);
@@ -1190,15 +1122,8 @@ static bool _myaccount_common_get_account_type_count_cb(account_type_h account_t
 
 int myaccount_common_get_account_type_count(const char* capability_filter)
 {
-       int ret = -1;
        int count = 0;
 
-       ret = account_connect();
-       if(ret != ACCOUNT_ERROR_NONE){
-               MYACCOUNT_ERROR("account database cannot be connected\n");
-               return 0;
-       }
-
        if(capability_filter) {
                if(!strcmp(capability_filter, "http://tizen.org/account/capability/tizen_email")){
                        account_type_query_by_provider_feature(_myaccount_common_get_account_type_count_cb, "http://tizen.org/account/capability/email", (void*)&count);
@@ -1212,12 +1137,6 @@ int myaccount_common_get_account_type_count(const char* capability_filter)
 
        MYACCOUNT_DBUG("count %d\n", count);
 
-       ret = account_disconnect();
-       if(ret != ACCOUNT_ERROR_NONE){
-               MYACCOUNT_ERROR("account database cannot be connected\n");
-               return 0;
-       }
-
        return count;
 }
 
index 3642ae0..741af32 100755 (executable)
@@ -36,90 +36,6 @@ static int g_handle_noti = 0;
 int myaccount_subscribe_to_account_notification_vconfkey();
 static void __reset_indicator(myaccount_appdata *ugd);
 
-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;
-       }
-}
-
 static void lang_changed(void * priv)
 {
        if (!priv) {
@@ -138,6 +54,7 @@ static void lang_changed(void * priv)
                MA_STRNCPY(tmp_buf, language, 6);
                ugd->current_language = strdup(tmp_buf);
        }
+       MA_MEMFREE(language);
 
        elm_object_item_text_set (ugd->nf_it, dgettext(MA_UG_NAME, "IDS_MA_HEADER_ACCOUNTS"));
        myaccount_list_refresh_item_list(ugd);
@@ -260,7 +177,7 @@ void *myaccount_account_list_create(ui_gadget_h ug,
                }
 
        } else {
-               error_code = myaccount_common_get_all_account_cnt(&count);
+               error_code = myaccount_common_get_all_account_cnt(&count, false);
                if (error_code != ACCOUNT_ERROR_NONE) {
                        MYACCOUNT_SLOGE("myaccount_account_list_create: myaccount_common_get_all_account_cnt fail(%d) \n",
                                                                error_code);
@@ -277,11 +194,10 @@ void *myaccount_account_list_create(ui_gadget_h ug,
 
                ugd->current_language = strdup(tmp_buf);
        }
+       MA_MEMFREE(language);
 
        myaccount_list_view_create(ugd);
 
-       __init_changeable_resource(ugd);
-
        myaccount_list_navi_create(ugd);
 
        if (ugd->eMode == eMYACCOUNT_ACCOUNT_LIST) {
@@ -362,6 +278,7 @@ int myaccount_subscribe_to_account_notification_vconfkey()
                        myaccount_addaccount_refresh_item_list(ugd);
                }
        }
+       MA_MEMFREE(language);
 }
 
  static void __reset_indicator(myaccount_appdata *ugd)
@@ -399,7 +316,6 @@ void myaccount_destroy_data()
        account_unsubscribe_notification_ex(ugd->account_subscribe);
        ugd->account_subscribe = NULL;
 
-       __free_changeable_resource(ugd);
        myaccount_destroy_appdata();
 
        if (g_handle_noti > 0) {
@@ -531,7 +447,6 @@ __myaccount_account_exchange_reset(app_control_h data, void *priv)
        if (reset == NULL) {
                MYACCOUNT_ERROR("dlsym return value is NULL : dlsym() error or setting_plugin_reset symbol is NULL");
                dlclose(handle);
-
                return MYACCOUNT_UNDEFINED_LIB_SYMBOL;
        }
        if (reset)