G_FREE(list_item->sub_desc);//release first
list_item->sub_desc = (char *)g_strdup(entry_str);
- if (NULL == entry_str || 0 == entry_len) {
+ if (isSpaceStr(entry_str)) {
if (!ad->empty_flag)
{
ad->empty_flag = TRUE;
const char *entry_str = elm_entry_entry_get(obj);
char *entry_str_utf8 = NULL;
entry_str_utf8 = elm_entry_markup_to_utf8(entry_str);
- //int len = safeStrLen(entry_str_utf8);
SETTING_TRACE("To store \"%s\" into vconf[%s]", entry_str_utf8, VCONFKEY_SETAPPL_DEVICE_NAME_STR);
//ecore_idler_add(__check_on_idler, ad);
|| safeStrCmp(ev->key, "Return") == 0)
{
// if entry has 1 char at list, hide ime.
- if(safeStrLen(elm_entry_entry_get(obj)) == 0)
+ if(isSpaceStr(elm_entry_entry_get(obj)))
{
if (ad->popup) {
evas_object_del(ad->popup);
char sel_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1] = { 0, };
setting_get_string_slp_key(STR_SLP_SETTING_SELECT_NUM, sel_num, &err);
+ SETTING_TRACE("ad->my_numbers.count[%d]", ad->my_numbers.count);
if (ad->my_numbers.count == 1) {
item_data =
setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
extern char *safeStrNCat(char *dst, const char *src, int maxlen);
extern char *safeCopyStr(char *dst, const char *src, int maxlen);
extern bool isEmptyStr(const char *str);
+extern bool isSpaceStr(const char *str);
extern char *remove_first_substring(const char *parent, const char *pat);
extern int safeStrLen(const char *str);
extern bool get_substring_int(const char **ipStr, int *ipValue, char delim);
return str;
}
-
-//NULL, "", " ", " " etc.. are all empty strings
+//return True just when NULL or '\0'
bool isEmptyStr(const char *str)
{
+ if (NULL == str || '\0' == str[0])
+ return TRUE;
+ return FALSE;
+}
+
+//return True just when str is NULL, '\0' or all strings made up of spaces
+bool isSpaceStr(const char *str)
+{
//if (NULL == str)
// return TRUE;
while (str)