pkgmgr
capi-system-system-settings
iniparser
- efl-assist
+ efl-extension
# notification
)
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")
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)
-Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
\r
Apache License\r
Version 2.0, January 2004\r
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
-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.
#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"
char *called_from;
account_subscribe_h account_subscribe;
- Ea_Theme_Color_Table *color_table;
- Eina_List *font_table;
Evas_Object *popup;
}myaccount_appdata;
#include <app_manager.h>
#include <vconf.h>
#include <package-manager.h>
-#include <efl_assist.h>
#include <glib.h>
#define ENABLE_NOTI
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);
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)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(iniparser)
BuildRequires: pkgconfig(capi-system-system-settings)
+BuildRequires: pkgconfig(efl-extension)
BuildRequires: cmake
BuildRequires: gettext-devel
BuildRequires: edje-bin
%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
<?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>
} 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;
}
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);
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,
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);
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
{
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) {
}
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 {
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");
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);
}
}
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;
}
}
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);
}
}
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);
}
}
-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;
{
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");
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;
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);
+
}
//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;
}
{
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)
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;
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,
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(
}
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 {
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;
}
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);
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)
{
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;
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");
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", "");
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);
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;
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"),
#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;
} 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);
{
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);
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);
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);
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;
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;
}
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;
}
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);
*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;
}
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);
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);
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;
}
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) {
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);
}
} 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);
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) {
myaccount_addaccount_refresh_item_list(ugd);
}
}
+ MA_MEMFREE(language);
}
static void __reset_indicator(myaccount_appdata *ugd)
account_unsubscribe_notification_ex(ugd->account_subscribe);
ugd->account_subscribe = NULL;
- __free_changeable_resource(ugd);
myaccount_destroy_appdata();
if (g_handle_noti > 0) {
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)