summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/icon_contacts.pngbin7232 -> 8907 bytes
-rw-r--r--edc/progress.edc8
-rw-r--r--images/phone.pngbin7232 -> 8907 bytes
-rwxr-xr-xlib/common/ct-group-edit-view.c6
-rwxr-xr-xlib/common/ct-list-detail.c3
-rwxr-xr-xlib/common/ct-list-setting.c24
-rwxr-xr-xlib/common/ct-text.c1
-rwxr-xr-xlib/details/ct-detail-view.c90
-rwxr-xr-xlib/details/ct-input-num-email.c105
-rwxr-xr-xlib/details/ct-input-utils.c1
-rwxr-xr-xlib/details/ct-input-view.c8
-rwxr-xr-xlib/include/ct-common.h7
-rwxr-xr-xlib/list/ct-list-contact-view.c9
-rwxr-xr-xlib/list/ct-list-edit-view.c8
-rwxr-xr-xlib/settings/ct-setting-main.c1
-rwxr-xr-xlib/settings/ct-setting-view.c31
-rw-r--r--po/de.po5
-rw-r--r--po/el.po3
-rw-r--r--po/en_GB.po3
-rw-r--r--po/en_US.po5
-rw-r--r--po/es.po5
-rw-r--r--po/fr.po5
-rw-r--r--po/it.po3
-rw-r--r--po/ja.po5
-rw-r--r--po/ko.po5
-rw-r--r--po/nl.po5
-rw-r--r--po/pt.po5
-rw-r--r--po/ru.po5
-rw-r--r--po/tr_TR.po5
-rw-r--r--po/zh_CN.po5
-rw-r--r--po/zh_HK.po5
-rw-r--r--po/zh_TW.po5
-rw-r--r--viewer/icon_contacts-viewer.pngbin7232 -> 8907 bytes
33 files changed, 266 insertions, 110 deletions
diff --git a/app/icon_contacts.png b/app/icon_contacts.png
index cba7ae7..cd751bd 100644
--- a/app/icon_contacts.png
+++ b/app/icon_contacts.png
Binary files differ
diff --git a/edc/progress.edc b/edc/progress.edc
index 145a1b9..eba50ee 100644
--- a/edc/progress.edc
+++ b/edc/progress.edc
@@ -74,17 +74,13 @@ collections {
}
part{ name:"elm.swallow.content";
type: SWALLOW;
- scale : 1;
description { state: "default" 0.0;
- min: 400 0;
- align: 0.5 0.5;
- fixed: 1 0;
rel1 {
- relative: 0.5 1.0;
+ relative: 0.0 1.0;
to: "pad_t";
}
rel2 {
- relative: 0.5 0.0;
+ relative: 1.0 0.0;
to: "pad_b";
}
}
diff --git a/images/phone.png b/images/phone.png
index cba7ae7..cd751bd 100644
--- a/images/phone.png
+++ b/images/phone.png
Binary files differ
diff --git a/lib/common/ct-group-edit-view.c b/lib/common/ct-group-edit-view.c
index e297a08..e2d152c 100755
--- a/lib/common/ct-group-edit-view.c
+++ b/lib/common/ct-group-edit-view.c
@@ -300,6 +300,8 @@ static void gedit_redraw_genlist(ct_group_edit_data *cgedit_d)
gedit_navi_item_clear(cgedit_d->navi_it);
ctui_gedit_navi_create_btn(cgedit_d);
+ elm_genlist_select_mode_set(cgedit_d->genlist, ELM_OBJECT_SELECT_MODE_DEFAULT);
+
item = elm_genlist_first_item_get(genlist);
while (item) {
elm_object_item_disabled_set(item, EINA_FALSE);
@@ -462,6 +464,8 @@ static void gedit_enter_name_mode(Elm_Object_Item *item, ct_group_edit_data *cge
Evas_Object *r_btn;
Evas_Object *l_btn;
+ elm_genlist_select_mode_set(cgedit_d->genlist, ELM_OBJECT_SELECT_MODE_NONE);
+
elm_object_item_part_content_set(cgedit_d->navi_it, "controlbar", NULL);
elm_object_item_part_content_set(cgedit_d->navi_it, "prev_btn", NULL);
ctui_hide_notify(cgedit_d->navi);
@@ -605,6 +609,7 @@ static Evas_Object* gedit_gl_icon_get(void *data, Evas_Object *obj, const char *
evas_object_show(entry);
elm_object_focus_set(entry, EINA_TRUE);
+ elm_entry_cursor_end_set(entry);
return edit_field;
}
@@ -779,7 +784,6 @@ Evas_Object * ctui_gedit_create_view(ct_group_edit_data *cgedit_d)
cgedit_d->genlist = elm_genlist_add(base);
elm_genlist_decorate_mode_set(cgedit_d->genlist, EINA_TRUE);
- elm_genlist_select_mode_set(cgedit_d->genlist, ELM_OBJECT_SELECT_MODE_NONE);
gedit_genlist_style_set();
evas_object_size_hint_weight_set(cgedit_d->genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(cgedit_d->genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/lib/common/ct-list-detail.c b/lib/common/ct-list-detail.c
index 7ca2f31..27f6679 100755
--- a/lib/common/ct-list-detail.c
+++ b/lib/common/ct-list-detail.c
@@ -332,9 +332,6 @@ char* ctui_entry_markup_to_utf8(const char *s)
void ctui_entry_entry_set(Evas_Object *entry, const char *s)
{
char *s_markup;
- if(NULL == s || '\0' == s[0])
- return;
-
s_markup = elm_entry_utf8_to_markup(s);
elm_entry_entry_set(entry, s_markup);
free(s_markup);
diff --git a/lib/common/ct-list-setting.c b/lib/common/ct-list-setting.c
index 2399a06..298544d 100755
--- a/lib/common/ct-list-setting.c
+++ b/lib/common/ct-list-setting.c
@@ -26,11 +26,12 @@
#include "contacts.h"
#include "ct-common.h"
-Evas_Object* ctui_progressbar_popup(Evas_Object *parent, ct_progress_info *p_info)
+Evas_Object* ctui_progressbar_popup(Evas_Object *parent, ct_progress_info *p_info, const char *title)
{
+ char buf[CT_TEXT_MAX_LEN];
Evas_Object *popup;
Evas_Object *layout;
- Evas_Object *title;
+ Evas_Object *label;
Evas_Object *progressbar;
popup = elm_popup_add(parent);
@@ -42,20 +43,21 @@ Evas_Object* ctui_progressbar_popup(Evas_Object *parent, ct_progress_info *p_inf
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
p_info->layout = layout;
- title = elm_label_add(layout);
- c_retvm_if(NULL == title, NULL, "elm_label_add() return NULL");
- elm_object_style_set(title, "popup_description/default");
- elm_label_line_wrap_set(title, EINA_TRUE);
- evas_object_size_hint_weight_set(title, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(title, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(title);
- p_info->label = title;
+ label = elm_label_add(layout);
+ c_retvm_if(NULL == label, NULL, "elm_label_add() return NULL");
+ snprintf(buf, sizeof(buf), "<align=middle>%s</>", title);
+ elm_object_text_set(label, buf);
+ elm_object_style_set(label, "popup_description/default");
+ elm_label_line_wrap_set(label, EINA_TRUE);
+ evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_show(label);
progressbar = elm_progressbar_add(layout);
c_retvm_if(NULL == progressbar, NULL, "elm_progressbar_add() return NULL");
p_info->progressbar= progressbar;
- elm_object_part_content_set(layout, "elm.swallow.content", title);
+ elm_object_part_content_set(layout, "elm.swallow.content", label);
elm_object_part_content_set(layout, "elm.swallow.end", progressbar);
if (0 < p_info->cnt_checked_total) {
diff --git a/lib/common/ct-text.c b/lib/common/ct-text.c
index 1d0d647..fcca876 100755
--- a/lib/common/ct-text.c
+++ b/lib/common/ct-text.c
@@ -110,6 +110,7 @@ static const char *err_str[] = {
N_("IDS_PB_POP_MAXIMUM_NUMBER_OF_ENTRIES_EXCEEDED"),
N_("IDS_PB_POP_INITIALISING_TRY_LATER_ING"),
N_("IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"),
+ N_("IDS_PB_BODY_INVALID_NUMBER"),
};
static const char *base_op_str[] = {
diff --git a/lib/details/ct-detail-view.c b/lib/details/ct-detail-view.c
index 1827914..683f86e 100755
--- a/lib/details/ct-detail-view.c
+++ b/lib/details/ct-detail-view.c
@@ -29,7 +29,6 @@
#include <vconf.h>
#include <vconf-keys.h>
#include <unicode/udatpg.h>
-#include <unicode/udat.h>
#include <unicode/ucal.h>
#include <unicode/ustring.h>
#include "contacts.h"
@@ -120,55 +119,27 @@ static char *detail_gl_address_label_get(void *data, Evas_Object *obj, const cha
return NULL;
}
-static char* detail_get_datetime_str(int year, int mon, int day)
+static char* detail_get_datetime_str(UDateFormat* formatter, int year, int mon, int day)
{
- char *locale;
- char *ret_str;
+ time_t timer;
+ struct tm stime;
+ char *ret_str = NULL;
char formatted_str[CT_TEXT_SHORT_LEN];
- int32_t pattern_capacity;
int32_t formattedCapacity;
- UCalendar *cal;
- UChar *tzId;
- UChar pattern[CT_TEXT_SHORT_LEN];
UChar formatted[CT_TEXT_SHORT_LEN];
- UChar customSkeleton[CT_TEXT_SHORT_LEN];
- UDate date;
- UDateFormat *formatter = NULL;
- UDateTimePatternGenerator generator;
UErrorCode status = U_ZERO_ERROR;
- u_uastrncpy(customSkeleton, UDAT_YEAR_MONTH_DAY, strlen(UDAT_YEAR_MONTH_DAY));
-
- locale = vconf_get_str(VCONFKEY_REGIONFORMAT);
- c_retvm_if(NULL == locale, NULL, "vconf_get_str() return NULL");
-
- generator = udatpg_open(locale, &status);
- c_retvm_if(U_FAILURE(status), NULL, "udatpg_open() Failed()");
+ memset(&stime, 0, sizeof(struct tm));
+ stime.tm_year = year-1900;
+ stime.tm_mon = mon-1;
+ stime.tm_mday = day;
+ timer=mktime(&stime);
- pattern_capacity = (int32_t) (sizeof(pattern) / sizeof((pattern)[0]));
- udatpg_getBestPattern(generator, customSkeleton, 6, pattern, pattern_capacity, &status);
- c_retvm_if(U_FAILURE(status), NULL, "udatpg_getBestPattern() Failed()");
-
- formatter = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, pattern, -1, &status);
- c_retvm_if(U_FAILURE(status), NULL, "udat_open() Failed()");
-
- formattedCapacity = (int32_t) (sizeof(formatted) / sizeof((formatted)[0]));
-
- tzId = (UChar*)malloc(sizeof(UChar) * (strlen("PST")+1) );
- c_retvm_if(NULL == tzId, NULL, "malloc() return NULL");
- u_uastrcpy(tzId, "PST");
- cal = ucal_open(tzId, u_strlen(tzId), NULL, UCAL_TRADITIONAL, &status);
- free(tzId);
-
- ucal_setDate(cal, year, mon, day, &status);
- c_retvm_if(U_FAILURE(status), NULL, "ucal_setDate() Failed()");
- date = ucal_getMillis(cal, &status);
-
- udat_format(formatter, date, formatted, formattedCapacity, NULL, &status);
+ formattedCapacity = (int32_t)(sizeof(formatted)/sizeof((formatted)[0]));
+ udat_format(formatter, (UDate)timer*1000, formatted, formattedCapacity, NULL, &status);
c_retvm_if(U_FAILURE(status), NULL, "udat_format() Failed()");
u_austrcpy(formatted_str, formatted);
- udat_close(formatter);
ret_str = g_strdup(formatted_str);
return ret_str;
@@ -179,6 +150,7 @@ static char* detail_gl_title_big_text_label_get(void *data, Evas_Object *obj, co
int type;
const char *ret_str;
CTSvalue *value = data;
+ ct_detail_data *cdetail_d = evas_object_data_get(obj, "cdetail_d");
c_retvm_if(NULL == value, NULL, "parameter(CTSvalue) is NULL");
@@ -199,7 +171,7 @@ static char* detail_gl_title_big_text_label_get(void *data, Evas_Object *obj, co
year = date/10000;
c_retvm_if(mon < 1 || 12 < mon || day < 1 || 31 < day, NULL, "Invalid date(mon=%d,day=%d)",mon,day);
- return detail_get_datetime_str(year, mon - 1, day - 1);
+ return detail_get_datetime_str(cdetail_d->formatter, year, mon, day);
case CTS_VALUE_MESSENGER:
ret_str = contacts_svc_value_get_str(value, CTS_MESSENGER_VAL_IM_ID_STR);
@@ -361,7 +333,6 @@ static void detail_number_cb(CTSvalue *value, ct_detail_data *cdetail_d)
detail_voice_call_cb, num);
item = elm_ctxpopup_item_append(cdetail_d->popup, S_(CT_SYS_BODY_MESSAGE), NULL,
detail_msg_ug_cb, num);
- elm_object_item_disabled_set(item, EINA_TRUE);
evas_object_move(cdetail_d->popup, cdetail_d->touch_x, cdetail_d->touch_y);
evas_object_show(cdetail_d->popup);
@@ -589,9 +560,6 @@ static Evas_Object *detail_gl_number_util_icon_get(void *data, Evas_Object *obj,
btn = ctui_create_btn(obj, label);
c_retvm_if(NULL == btn, NULL, "ctui_create_btn() return NULL");
- if (0 == strcmp(part, "elm.icon.2"))
- elm_object_disabled_set(btn, EINA_TRUE);
-
evas_object_data_set(btn, "cdetail_d", cdetail_d);
evas_object_smart_callback_add(btn, "clicked", clicked_fn, number);
@@ -744,6 +712,10 @@ static void detail_view_delete_cb(void *data, Evas *e, Evas_Object *obj,
evas_object_data_del(cdetail_d->navi, "cdetail_d");
+ if (cdetail_d->formatter)
+ udat_close(cdetail_d->formatter);
+ cdetail_d->formatter = NULL;
+
if (cdetail_d->has_input)
cdetail_d->has_detail = false;
else
@@ -935,6 +907,33 @@ API Evas_Object* ctui_detail_genlist_update(ct_detail_data *cdetail_d)
return genlist;
}
+static UDateFormat* detail_init_time_formatter()
+{
+ const char *locale;
+ int32_t pattern_capacity;
+ UChar pattern[CT_TEXT_SHORT_LEN];
+ UChar customSkeleton[CT_TEXT_SHORT_LEN];
+ UDateFormat *formatter = NULL;
+ UDateTimePatternGenerator generator;
+ UErrorCode status = U_ZERO_ERROR;
+
+ u_uastrncpy(customSkeleton, UDAT_YEAR_MONTH_DAY, strlen(UDAT_YEAR_MONTH_DAY));
+
+ locale = uloc_getDefault();
+ c_retvm_if(NULL == locale, NULL, "uloc_getDefault() return NULL");
+
+ generator = udatpg_open(locale, &status);
+ c_retvm_if(U_FAILURE(status), NULL, "udatpg_open() Failed()");
+
+ pattern_capacity = (int32_t) (sizeof(pattern) / sizeof((pattern)[0]));
+ udatpg_getBestPattern(generator, customSkeleton, 6, pattern, pattern_capacity, &status);
+
+ if (!U_FAILURE(status))
+ formatter = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, pattern, -1, &status);
+
+ udatpg_close(generator);
+ return formatter;
+}
Evas_Object* ct_detail_create_content(ct_detail_data *cdetail_d)
{
@@ -992,6 +991,7 @@ Evas_Object* ct_detail_create_content(ct_detail_data *cdetail_d)
}
detail_create_itcs();
+ cdetail_d->formatter = detail_init_time_formatter();
genlist = ctui_detail_genlist_update(cdetail_d);
evas_object_data_set(cdetail_d->navi, "cdetail_d", cdetail_d);
diff --git a/lib/details/ct-input-num-email.c b/lib/details/ct-input-num-email.c
index 718201e..32a4f02 100755
--- a/lib/details/ct-input-num-email.c
+++ b/lib/details/ct-input-num-email.c
@@ -471,19 +471,107 @@ static Evas_Object* input_add_new_number(ct_input_data *cinput_d)
return layout;
}
+static inline bool input_num_email_check_dirty_number(char digit)
+{
+ switch (digit)
+ {
+ case '0' ... '9':
+ case 'p':
+ case 'w':
+ case 'P':
+ case 'W':
+ case '#':
+ case '*':
+ return false;
+ case '+': //only first position
+ default:
+ return true;
+ }
+}
+
+static inline int input_check_utf8(char c)
+{
+ if (c < 128)
+ return 1;
+ else if ((c & (char)0xe0) == (char)0xc0)
+ return 2;
+ else if ((c & (char)0xf0) == (char)0xe0)
+ return 3;
+ else if ((c & (char)0xf8) == (char)0xf0)
+ return 4;
+ else if ((c & (char)0xfc) == (char)0xf8)
+ return 5;
+ else if ((c & (char)0xfe) == (char)0xfc)
+ return 6;
+ else
+ return CTS_ERR_FAIL;
+}
+
+static int input_num_email_clean_number(const char *src, char *dest, int dest_size)
+{
+ int s_pos=0, d_pos=0, char_type;
+
+ if (NULL == src)
+ ERR("The parameter(src) is NULL");
+ else
+ {
+ if ('+' == src[s_pos])
+ dest[d_pos++] = src[s_pos++];
+
+ while (src[s_pos] != 0)
+ {
+ if (d_pos >= dest_size-2) break;
+ char_type = input_check_utf8(src[s_pos]);
+ if (char_type <= 1) {
+ if (input_num_email_check_dirty_number(src[s_pos])) {
+ s_pos++;
+ continue;
+ }
+ dest[d_pos++] = src[s_pos++];
+ }
+ else
+ s_pos += char_type;
+ }
+ }
+
+ dest[d_pos] = 0;
+ return d_pos;
+}
+
static void input_number_changed_cb(void *data, Evas_Object *obj, void *event_info)
{
+ int len;
int ret;
- ct_input_data *cinput_d = data;
+ char *tmp;
+ char buf[CT_TEXT_MAX_LEN];
Evas_Object *btn_minus;
+ ct_input_data *cinput_d = data;
ct_input_typed_data *typed_data;
- evas_object_smart_callback_del(obj, "changed", input_number_changed_cb);
c_retm_if(NULL == cinput_d, "parameter(ct_input_data) is NULL");
+ tmp = ctui_entry_markup_to_utf8(elm_entry_entry_get(obj));
+ c_retm_if(NULL == tmp, "ctui_entry_markup_to_utf8() return NULL");
+ len = input_num_email_clean_number(tmp, buf, sizeof(buf));
+
+ if (strlen(tmp) != len) {
+ CT_DBG("buf=%s",buf);
+ ctui_entry_entry_set(obj, buf);
+ elm_entry_cursor_end_set(obj);
+ ctui_create_popup(cinput_d->cdetail_d->win, T_(CT_GET_TEXT_ERR, CTTEXT_INVALID_NUMBER), 2.0);
+ free(tmp);
+ return;
+ }
+ free(tmp);
+ if (0 == len)
+ return;
+
typed_data = evas_object_data_get(obj, "typed_data");
c_retm_if(NULL == typed_data, "evas_object_data_get() return NULL");
+ if (!contacts_svc_value_get_bool(typed_data->value, CTS_NUM_VAL_DELETE_BOOL))
+ return;
+
ret = contacts_svc_value_set_bool(typed_data->value, CTS_NUM_VAL_DELETE_BOOL, false);
c_warn_if(CTS_SUCCESS != ret, "contacts_svc_value_set_bool() failed(%d)", ret);
cinput_d->cnt_num++;
@@ -558,6 +646,9 @@ static void input_number_unfocused_cb(void *data, Evas_Object *obj, void *event_
cinput_d->ly_number_default = typed_data->ly_main;
edje_object_signal_emit(_EDJ(typed_data->ly_content), "elm,state,contact,default_number,enabled", "elm");
+
+ ret = contacts_svc_value_set_bool(typed_data->value, CTS_NUM_VAL_DEFAULT_BOOL, true);
+ c_warn_if(CTS_SUCCESS != ret, "contacts_svc_value_set_bool() Failed(%d)", ret);
}
}
else if (!contacts_svc_value_get_bool(typed_data->value, CTS_NUM_VAL_DELETE_BOOL)) {
@@ -572,9 +663,6 @@ static void input_number_unfocused_cb(void *data, Evas_Object *obj, void *event_
if (cinput_d->ly_number_set_default)
input_number_set_default_button_reset(cinput_d);
-
- if (typed_data->data)
- evas_object_smart_callback_add(typed_data->data, "changed", input_number_changed_cb, cinput_d);
}
free(input);
@@ -632,11 +720,10 @@ static Evas_Object *input_number_get_edit_rename(ct_input_data *cinput_d,
elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_PHONENUMBER);
val_str = contacts_svc_value_get_str(typed_data->value, CTS_NUM_VAL_NUMBER_STR);
- if (val_str && *val_str) {
+ if (val_str && *val_str)
ctui_entry_entry_set(entry, val_str);
- }
- else
- evas_object_smart_callback_add(entry, "changed", input_number_changed_cb, cinput_d);
+
+ evas_object_smart_callback_add(entry, "changed", input_number_changed_cb, cinput_d);
return editfield;
diff --git a/lib/details/ct-input-utils.c b/lib/details/ct-input-utils.c
index 9625f26..0f06ee1 100755
--- a/lib/details/ct-input-utils.c
+++ b/lib/details/ct-input-utils.c
@@ -292,7 +292,6 @@ void ct_input_save_cb(void *data, Evas_Object *obj, void *event_info)
ct_input_data *cinput_d = data;
elm_object_focus_set(obj, EINA_FALSE);
-
c_retm_if(NULL == cinput_d, "cinput_d is NULL");
cdetail_d = cinput_d->cdetail_d;
diff --git a/lib/details/ct-input-view.c b/lib/details/ct-input-view.c
index 6ec5c28..232e55c 100755
--- a/lib/details/ct-input-view.c
+++ b/lib/details/ct-input-view.c
@@ -248,7 +248,10 @@ static void input_company_unfocused_cb(void *data, Evas_Object *obj, void *event
ct_input_data *cinput_d = data;
ret = contacts_svc_struct_get_value(cinput_d->contact, CTS_CF_COMPANY_VALUE, &value);
- c_retm_if(CTS_SUCCESS != ret, "contacts_svc_struct_get_value() Failed(%d)", ret);
+ if (NULL == value) {
+ value = contacts_svc_value_new(CTS_VALUE_COMPANY);
+ contacts_svc_struct_store_value(cinput_d->contact, CTS_CF_COMPANY_VALUE, value);
+ }
input_baseinfo_value_set(value, obj, CTS_COMPANY_VAL_NAME_STR);
}
@@ -259,7 +262,8 @@ static void input_nick_unfocused_cb(void *data, Evas_Object *obj, void *event_in
ct_input_data *cinput_d = data;
value = ct_input_get_nickname(cinput_d->contact);
- c_retm_if(NULL == value, "ct_input_get_nickname() return NULL");
+ if (NULL == value)
+ value = input_new_nickname(cinput_d->contact);
input_baseinfo_value_set(value, obj, CTS_NICKNAME_VAL_NAME_STR);
}
diff --git a/lib/include/ct-common.h b/lib/include/ct-common.h
index 1305b1c..f83aa44 100755
--- a/lib/include/ct-common.h
+++ b/lib/include/ct-common.h
@@ -31,6 +31,7 @@
#include <libintl.h>
#include <ui-gadget.h>
#include <contacts-svc.h>
+#include <unicode/udat.h>
#include "contacts-ug.h"
#include "ct-path.h"
@@ -80,7 +81,6 @@ typedef struct {
Ecore_Timer *timer;
Evas_Object *progressbar;
Evas_Object *layout;
- Evas_Object *label;
} ct_progress_info;
typedef struct {
@@ -194,6 +194,8 @@ typedef struct {
int view_creat_ver;
CTSstruct *contact;
ct_list_data *clist_d;
+
+ UDateFormat* formatter;
}ct_detail_data;
typedef struct {
@@ -293,7 +295,7 @@ void ctui_get_number_type_str(int cts_num_type, char *dest, int dest_len);
Evas_Object* ctui_create_base_layout(Evas_Object *parent, bool is_fullview);
Evas_Object* ctui_create_popup(Evas_Object *parent, const char *desc, double timeout);
-Evas_Object* ctui_progressbar_popup(Evas_Object *parent, ct_progress_info *p_info);
+Evas_Object* ctui_progressbar_popup(Evas_Object *parent, ct_progress_info *p_info, const char *title);
void ctui_progress_popup_hide_cb(void *data, Evas_Object *obj, void *event_info);
void ctui_ld_to_dd(ct_list_data *clist_d, ct_detail_data *cdetail_d);
void ctui_ug_layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv);
@@ -407,6 +409,7 @@ enum {
CTTEXT_EXCEED_LIMIT,
CTTEXT_INITIALISING_TRY_LATER_ING,
CTTEXT_DATA_NOT_EXIST,
+ CTTEXT_INVALID_NUMBER,
};//CT_GET_TEXT_ERR
enum {
diff --git a/lib/list/ct-list-contact-view.c b/lib/list/ct-list-contact-view.c
index b2d1dac..7c6b15a 100755
--- a/lib/list/ct-list-contact-view.c
+++ b/lib/list/ct-list-contact-view.c
@@ -796,6 +796,15 @@ static void list_group_changed_cb(void *data)
FREEandSTRDUP(clist_d->title, T_(CT_GET_TEXT_BASIC, CTTEXT_ALL_CONTACTS));
list_lazy_update(clist_d);
}
+ else {
+ const char *grp_name;
+ char buf[CT_TEXT_MAX_LEN];
+ grp_name = contacts_svc_value_get_str(group, CTS_GROUP_VAL_NAME_STR);
+ snprintf(buf, sizeof(buf), "%s (%d)", grp_name, clist_d->cnt_list);
+ free(clist_d->title);
+ clist_d->title = strdup(buf);
+ elm_object_item_text_set(clist_d->navi_item, buf);
+ }
}
static void list_view_delete_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
diff --git a/lib/list/ct-list-edit-view.c b/lib/list/ct-list-edit-view.c
index b37c6e8..f7dc2b0 100755
--- a/lib/list/ct-list-edit-view.c
+++ b/lib/list/ct-list-edit-view.c
@@ -254,8 +254,7 @@ static void list_edit_del_cb(void *data, Evas_Object *obj, void *event_info)
return;
}
- clist_d->popup = ctui_progressbar_popup(clist_d->win, p_info);
- elm_object_text_set(p_info->label, T_(CT_GET_TEXT_BASIC, CTTEXT_DELETING_CONTACTS));
+ clist_d->popup = ctui_progressbar_popup(clist_d->win, p_info, T_(CT_GET_TEXT_BASIC, CTTEXT_DELETING_CONTACTS));
btn = ctui_create_popup_button(clist_d->popup, 1, S_(CT_SYS_SK_CANCEL), ctui_progress_popup_hide_cb, &p_info->alive);
evas_object_data_set(btn, "p_popup", &clist_d->popup);
}
@@ -563,11 +562,10 @@ static void list_edit_move_copy_contacts_btn_cb(void *data, Evas_Object *obj, vo
return;
}
- clist_d->popup = ctui_progressbar_popup(clist_d->win, p_info);
if (CT_LIST_EDIT_MOVE == clist_d->edit_op)
- elm_object_text_set(p_info->label, T_(CT_GET_TEXT_BASIC, CTTEXT_MOVING_CONTACTS));
+ clist_d->popup = ctui_progressbar_popup(clist_d->win, p_info, T_(CT_GET_TEXT_BASIC, CTTEXT_MOVING_CONTACTS));
else
- elm_object_text_set(p_info->label, T_(CT_GET_TEXT_BASIC, CTTEXT_COPYING_CONTACTS));
+ clist_d->popup = ctui_progressbar_popup(clist_d->win, p_info, T_(CT_GET_TEXT_BASIC, CTTEXT_COPYING_CONTACTS));
btn = ctui_create_popup_button(clist_d->popup, 1, S_(CT_SYS_SK_CANCEL), ctui_progress_popup_hide_cb, &p_info->alive);
evas_object_data_set(btn, "p_popup", &clist_d->popup);
diff --git a/lib/settings/ct-setting-main.c b/lib/settings/ct-setting-main.c
index a578cdc..05dc974 100755
--- a/lib/settings/ct-setting-main.c
+++ b/lib/settings/ct-setting-main.c
@@ -90,6 +90,7 @@ static void* settings_on_create(struct ui_gadget *ug, enum ug_mode mode,
c_warn_if(CTS_SUCCESS != ret, "contacts_svc_disconnect() Failed(%d)", ret);
return NULL;
}
+ elm_object_style_set(bg, "group_list");
if (create_setting_view(base, csetting_d ))
elm_object_part_content_set(base, "elm.swallow.content", csetting_d->navi);
diff --git a/lib/settings/ct-setting-view.c b/lib/settings/ct-setting-view.c
index 0623aad..7ee3f46 100755
--- a/lib/settings/ct-setting-view.c
+++ b/lib/settings/ct-setting-view.c
@@ -279,8 +279,7 @@ static void setting_import_sim_cb(void *data, Evas_Object *obj, void *event_info
csetting_d->p_info = NULL;
return;
}
- csetting_d->popup = ctui_progressbar_popup(csetting_d->navi, p_info);
- elm_object_text_set(p_info->label, T_(CT_GET_TEXT_BASIC, CTTEXT_IMPORTING_SIM_CONTACTS));
+ csetting_d->popup = ctui_progressbar_popup(csetting_d->navi, p_info, T_(CT_GET_TEXT_BASIC, CTTEXT_IMPORTING_SIM_CONTACTS));
}
static inline Eina_List* setting_get_contact_list(Eina_List *list_ab)
@@ -519,8 +518,7 @@ static void setting_export_myfile_ug_result(struct ui_gadget *ug, bundle *result
return;
}
- csetting_d->popup = ctui_progressbar_popup(csetting_d->navi, p_info);
- elm_object_text_set(p_info->label, title);
+ csetting_d->popup = ctui_progressbar_popup(csetting_d->navi, p_info, title);
ctui_create_popup_button(csetting_d->popup, 1, S_(CT_SYS_SK_CANCEL), setting_popup_hide_cb, NULL);
}
@@ -665,8 +663,7 @@ static void setting_import_myfile_ug_result(struct ui_gadget *ug, bundle *result
return;
}
- csetting_d->popup = ctui_progressbar_popup(csetting_d->navi, p_info);
- elm_object_text_set(p_info->label, title);
+ csetting_d->popup = ctui_progressbar_popup(csetting_d->navi, p_info, title);
ctui_create_popup_button(csetting_d->popup, 1, S_(CT_SYS_SK_CANCEL), setting_popup_hide_cb, NULL);
}
@@ -713,6 +710,18 @@ static void setting_export_ab_popup_response(void *data, Evas_Object *obj, void
}
item = elm_genlist_item_next_get(item);
}
+
+ if(NULL == csetting_d->list_id_ab) {
+ char err[CT_TEXT_SHORT_LEN];
+ snprintf(err, sizeof(err), "Fail (%s)", T_(CT_GET_TEXT_ERR, CTTEXT_NO_CONTACTS));
+ ctui_show_notify(csetting_d->navi, err, 2.0);
+
+ csetting_d->select_all_checked = EINA_FALSE;
+ evas_object_del(csetting_d->popup);
+ csetting_d->popup = NULL;
+ return;
+ }
+
if (csetting_d->list_id_ab && 1 != eina_list_count(csetting_d->list_id_ab)) {
free(csetting_d->name_ab);
csetting_d->name_ab = NULL;
@@ -1071,17 +1080,15 @@ Evas_Object* ct_setting_create_layout(ct_setting_data *csetting_d)
{
Evas_Object *genlist;
Elm_Object_Item *item;
- Evas_Object *base;
int sim_state;
setting_create_itcs();
- base = ctui_create_base_layout(csetting_d->navi, true);
-
- genlist = elm_genlist_add(base);
- elm_object_part_content_set(base, "elm.swallow.content", genlist);
+ genlist = elm_genlist_add(csetting_d->navi);
evas_object_data_set(genlist, "csetting_d", csetting_d);
+ ctui_list_detail_genlist_append_separator_line_20px(genlist);
+
vconf_get_int(VCONFKEY_TELEPHONY_SIM_PB_INIT, &sim_state);
if (sim_state)
elm_genlist_item_append(genlist, &setting_itcs[SETTING_ITC_IMPORT_SIM],
@@ -1111,7 +1118,7 @@ Evas_Object* ct_setting_create_layout(ct_setting_data *csetting_d)
evas_object_smart_callback_add(genlist, "expanded", setting_gl_exp, csetting_d);
evas_object_smart_callback_add(genlist, "contracted", setting_gl_con, csetting_d);
- return base;
+ return genlist;
}
diff --git a/po/de.po b/po/de.po
index d82551d..5b16ec6 100644
--- a/po/de.po
+++ b/po/de.po
@@ -640,4 +640,7 @@ msgstr "Initialisierung. Später versuchen..."
#~ msgstr "Exchange-Server suchen"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "Ausgewählte Daten sind nicht vorhanden" \ No newline at end of file
+msgstr "Ausgewählte Daten sind nicht vorhanden"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Ungültige Nummer"
diff --git a/po/el.po b/po/el.po
index a837622..a6c7030 100644
--- a/po/el.po
+++ b/po/el.po
@@ -641,3 +641,6 @@ msgstr "Προετοιμασία. Προσπαθήστε αργότερα..."
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
msgstr "Τα επιλεγμένα δεδομένα δεν υπάρχουν"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Μη έγκυρος αριθμός" \ No newline at end of file
diff --git a/po/en_GB.po b/po/en_GB.po
index 4d1b76b..43770fb 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -639,3 +639,6 @@ msgstr "Initialising. Try later..."
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
msgstr "Selected data does not exist"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Invalid number"
diff --git a/po/en_US.po b/po/en_US.po
index 5acabbe..8481c4d 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -638,4 +638,7 @@ msgstr "Initializing. Try later..."
#~ msgstr "Search Exchange server"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "Selected data does not exist" \ No newline at end of file
+msgstr "Selected data does not exist"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Invalid number"
diff --git a/po/es.po b/po/es.po
index 54b7c38..49da7fa 100644
--- a/po/es.po
+++ b/po/es.po
@@ -638,4 +638,7 @@ msgstr "Inicializando. Inténtelo más tarde..."
#~ msgstr "Buscar Exchange server"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "Los datos seleccionados no existe" \ No newline at end of file
+msgstr "Los datos seleccionados no existe"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Número no válido"
diff --git a/po/fr.po b/po/fr.po
index e0a99f4..5260eb3 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -638,4 +638,7 @@ msgstr "Initialisation en cours. Essayez plus tard..."
#~ msgstr "Rechercher serveur Exchange"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "Les données sélectionnées n'existent pas" \ No newline at end of file
+msgstr "Les données sélectionnées n'existent pas"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Numéro non valide"
diff --git a/po/it.po b/po/it.po
index ba18479..dc8f902 100644
--- a/po/it.po
+++ b/po/it.po
@@ -639,3 +639,6 @@ msgstr "Inizializzazione in corso. Riprovare più tardi..."
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
msgstr "I dati selezionati non esistono"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Numero non valido"
diff --git a/po/ja.po b/po/ja.po
index bc89fc4..52e530c 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -638,4 +638,7 @@ msgstr "初期化中です。後ほどお試しください..."
#~ msgstr "Exchange serverの連絡先を検索"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "選択したデータは存在しません" \ No newline at end of file
+msgstr "選択したデータは存在しません"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "番号​が​無効​です。"
diff --git a/po/ko.po b/po/ko.po
index f11a119..26f7dcf 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -638,4 +638,7 @@ msgstr "초기화 중... 잠시 후 다시 시도하세요"
#~ msgstr "익스체인지 서버 검색"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "존재하지 않는 데이터입니다" \ No newline at end of file
+msgstr "존재하지 않는 데이터입니다"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "전화번호가 바르지 않습니다"
diff --git a/po/nl.po b/po/nl.po
index d3f59c5..877b33f 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -638,4 +638,7 @@ msgstr "Bezig met initialiseren. Probeer het later..."
#~ msgstr "Exchange-server zoeken"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "Geselecteerde gegevens bestaan niet" \ No newline at end of file
+msgstr "Geselecteerde gegevens bestaan niet"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Ongeldig getal"
diff --git a/po/pt.po b/po/pt.po
index b0f7466..2e042ca 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -640,4 +640,7 @@ msgstr "A iniciar. Tente mais tarde..."
#~ msgstr "Procurar servidor Exchange"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "Os dados seleccionados não existem" \ No newline at end of file
+msgstr "Os dados seleccionados não existem"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Número inválido" \ No newline at end of file
diff --git a/po/ru.po b/po/ru.po
index f16dc59..ecd71a8 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -640,4 +640,7 @@ msgstr "Инициализация. Повторите попытку позже
#~ msgstr "Поиск на сервере Exchange"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "Выбранные данные не существуют" \ No newline at end of file
+msgstr "Выбранные данные не существуют"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Неправильный номер"
diff --git a/po/tr_TR.po b/po/tr_TR.po
index 18715f7..875e9c5 100644
--- a/po/tr_TR.po
+++ b/po/tr_TR.po
@@ -638,4 +638,7 @@ msgstr "Başlatılıyor. Sonra deneyin..."
#~ msgstr "Exchange sunucusu ara"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "Seçilen veriler mevcut değil" \ No newline at end of file
+msgstr "Seçilen veriler mevcut değil"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Geçersiz numara"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index d274a2d..7597bfb 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -638,4 +638,7 @@ msgstr "正在初始化。稍后重试…"
#~ msgstr "搜索Exchange服务器"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "选择的数据不存在" \ No newline at end of file
+msgstr "选择的数据不存在"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "Geçersiz numara"
diff --git a/po/zh_HK.po b/po/zh_HK.po
index f96f272..542941c 100644
--- a/po/zh_HK.po
+++ b/po/zh_HK.po
@@ -638,4 +638,7 @@ msgstr "正在初始化。請稍後再試..."
#~ msgstr "搜尋 Exchange 伺服器"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "已選資料不存在" \ No newline at end of file
+msgstr "已選資料不存在"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "號碼無效" \ No newline at end of file
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 7b4d5fa..158f8d8 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -638,4 +638,7 @@ msgstr "初始化中。請稍候再試…"
#~ msgstr "搜尋Exchange伺服器"
msgid "IDS_SEARCH_BODY_DATA_DOES_NOT_EXIST"
-msgstr "選定的數據不存在" \ No newline at end of file
+msgstr "選定的數據不存在"
+
+msgid "IDS_PB_BODY_INVALID_NUMBER"
+msgstr "號碼無效"
diff --git a/viewer/icon_contacts-viewer.png b/viewer/icon_contacts-viewer.png
index cba7ae7..cd751bd 100644
--- a/viewer/icon_contacts-viewer.png
+++ b/viewer/icon_contacts-viewer.png
Binary files differ