_focus_in(void *data __UNUSED__, Evas *e __UNUSED__, void *event_info)
{
const char *type = evas_object_type_get(event_info);
- if (type && strcmp(type, "elm_widget") == 0)
+ if ((type) && (strcmp(type, "elm_widget") == 0))
type = elm_object_widget_type_get(event_info);
printf("Evas_Object focus in: %p %s\n", event_info, type);
}
_focus_out(void *data __UNUSED__, Evas *e __UNUSED__, void *event_info)
{
const char *type = evas_object_type_get(event_info);
- if (type && strcmp(type, "elm_widget") == 0)
+ if ((type) && (strcmp(type, "elm_widget") == 0))
type = elm_object_widget_type_get(event_info);
printf("Evas_Object focus out: %p %s\n", event_info, type);
}
{
Evas_Object *newfocus = data;
const char *type = evas_object_type_get(newfocus);
- if (type && strcmp(type, "elm_widget") == 0)
+ if ((type) && (strcmp(type, "elm_widget") == 0))
type = elm_object_widget_type_get(newfocus);
printf("elm_object_focus(%p) %s\n", newfocus, type);
elm_object_focus(newfocus);
Evas_Object *box, *entry, *button;
char item_data[] = "Just a simple test";
- if (!event_info || !data) return;
+ if ((!event_info) || (!data)) return;
box = elm_box_add(info->win);
elm_box_homogenous_set(box, 0);
Evas_Object *box, *entry, *button;
struct Pginfo *info = data;
char *item_data;
- if (!event_info || !data) return;
+ if ((!event_info) || (!data)) return;
item_data = elm_list_item_data_get(event_info);
zoom++;
elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_MANUAL);
- if (zoom >= 0 && zoom <= 18) elm_map_zoom_set(map, zoom);
+ if ((zoom >= 0) && (zoom <= 18)) elm_map_zoom_set(map, zoom);
}
static void
evas_object_smart_callback_add(ph, "drag,stop",
drag_stop_cb, NULL);
- if(n == 2 || n == 3) {
+ if((n == 2) || (n == 3)) {
elm_photo_fill_inside_set(ph, EINA_TRUE);
elm_object_style_set(ph, "shadow");
}
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
zoom = elm_photocam_zoom_get(photocam);
- if (ev->z>0 && zoom == 1) return;
+ if ((ev->z>0) && (zoom == 1)) return;
if (ev->z > 0)
zoom /= 2;
else if (from_params) p = from_params;
else return;
- if (p->is_save_set && p->is_save)
+ if ((p->is_save_set) && (p->is_save))
elm_fileselector_is_save_set(obj, p->is_save);
if (p->folder_only_set)
elm_fileselector_folder_only_set(obj, p->folder_only);
static Eina_Bool external_notify_param_set(void *data __UNUSED__,
Evas_Object *obj, const Edje_External_Param *param)
{
- if (!strcmp(param->name, "content")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ if ((!strcmp(param->name, "content"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
{
Evas_Object *content = external_common_param_edje_object_get(obj, param);
if ((strcmp(param->s, "")) && (!content))
elm_notify_content_set(obj, content);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "repeat_events")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if ((!strcmp(param->name, "repeat_events"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
{
elm_notify_repeat_events_set(obj, param->i);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "timeout")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ else if ((!strcmp(param->name, "timeout"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
{
elm_notify_timeout_set(obj, param->d);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "orient")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ else if ((!strcmp(param->name, "orient"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE))
{
Elm_Notify_Orient set = _orient_get(param->s);
if (set == ELM_NOTIFY_ORIENT_LAST) return EINA_FALSE;
/* not easy to get content name back from live object */
return EINA_FALSE;
}
- else if (!strcmp(param->name, "repeat_events")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if ((!strcmp(param->name, "repeat_events"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
{
param->i = elm_notify_repeat_events_get(obj);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "timeout")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ else if ((!strcmp(param->name, "timeout"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
{
param->d = elm_notify_timeout_get(obj);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "orient")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+ else if ((!strcmp(param->name, "orient"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE))
{
Elm_Notify_Orient set = elm_notify_orient_get(obj);
if (set == ELM_NOTIFY_ORIENT_LAST) return EINA_FALSE;
static Eina_Bool external_panes_param_set(void *data __UNUSED__,
Evas_Object *obj, const Edje_External_Param *param)
{
- if (!strcmp(param->name, "content left")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ if ((!strcmp(param->name, "content left"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
{
Evas_Object *content = external_common_param_edje_object_get(obj, param);
if ((strcmp(param->s, "")) && (!content))
elm_panes_content_left_set(obj, content);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "content right")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+ else if ((!strcmp(param->name, "content right"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
{
Evas_Object *content = external_common_param_edje_object_get(obj, param);
if ((strcmp(param->s, "")) && (!content))
elm_panes_content_right_set(obj, content);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "horizontal")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if ((!strcmp(param->name, "horizontal"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
{
elm_panes_horizontal_set(obj, param->i);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "left size")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ else if ((!strcmp(param->name, "left size"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
{
elm_panes_content_left_size_set(obj, param->d);
return EINA_TRUE;
/* not easy to get content name back from live object */
return EINA_FALSE;
}
- else if (!strcmp(param->name, "horizontal")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ else if ((!strcmp(param->name, "horizontal"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL))
{
param->i = elm_panes_horizontal_get(obj);
return EINA_TRUE;
}
- else if (!strcmp(param->name, "left size")
- && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ else if ((!strcmp(param->name, "left size"))
+ && (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE))
{
param->d = elm_panes_content_left_size_get(obj);
return EINA_TRUE;
static Evas_Object *
_parent_win_get(Evas_Object *obj)
{
- while (obj && strcmp(elm_widget_type_get(obj), "win"))
+ while ((obj) && (strcmp(elm_widget_type_get(obj), "win")))
obj = elm_object_parent_widget_get(obj);
return obj;
Widget_Data *wd;
wd = elm_widget_data_get(obj);
- if (!wd || !parent)
+ if ((!wd) || (!parent))
return;
elm_hover_parent_set(wd->hover, parent);
Widget_Data *wd;
wd = elm_widget_data_get(obj);
- if (!wd || !wd->items)
+ if ((!wd) || (!wd->items))
return;
EINA_LIST_FREE(wd->items, item)
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *edje;
- if (!wd || !icon) return;
+ if ((!wd) || (!icon)) return;
if (wd->icon == icon) return;
if (wd->icon) evas_object_del(wd->icon);
wd->icon = icon;
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->icon) return;
+ if ((!wd) || (!wd->icon)) return;
if (setting)
evas_object_hide(wd->icon);
else
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *edje;
- if (!wd || !end) return;
+ if ((!wd) || (!end)) return;
if (wd->end == end) return;
if (wd->end) evas_object_del(wd->end);
wd->end = end;
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->end) return;
+ if ((!wd) || (!wd->end)) return;
if (setting)
evas_object_hide(wd->end);
else
{
Transition_Animation_Data *tad;
Elm_Box_Transition *box_data = data;
- if (box_data->start.free_data && box_data->start.data)
+ if ((box_data->start.free_data) && (box_data->start.data))
box_data->start.free_data(box_data->start.data);
- if (box_data->end.free_data && box_data->end.data)
+ if ((box_data->end.free_data) && (box_data->end.data))
box_data->end.free_data(box_data->end.data);
EINA_LIST_FREE(box_data->objs, tad)
free(tad);
if (!wd) return EINA_FALSE;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if (strcmp(ev->keyname, "Return") && strcmp(ev->keyname, "space"))
+ if ((strcmp(ev->keyname, "Return")) && (strcmp(ev->keyname, "space")))
return EINA_FALSE;
_activate(obj);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
edje_object_message_signal_process(wd->btn);
edje_object_scale_set(wd->btn, elm_widget_scale_get(obj) * _elm_config->scale);
str = edje_object_data_get(wd->btn, "focus_highlight");
- if (str && !strcmp(str, "on"))
+ if ((str) && (!strcmp(str, "on")))
elm_widget_highlight_in_theme_set(obj, EINA_TRUE);
else
elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
- if (wd->autorepeat && !wd->repeating)
+ if ((wd->autorepeat) && (!wd->repeating))
{
if (wd->ar_threshold <= 0.0)
_autorepeat_initial_send(data); /* call immediately */
if (wd->ar_interval == t) return;
wd->ar_interval = t;
- if (wd->repeating && wd->timer) ecore_timer_interval_set(wd->timer, t);
+ if ((wd->repeating) && (wd->timer)) ecore_timer_interval_set(wd->timer, t);
}
month = time->tm_mon;
year = time->tm_year + 1900;
- return _days_in_month[(!(year % 4) && (!(year % 400) || (year % 100)))]
+ return _days_in_month[((!(year % 4)) && ((!(year % 400)) || (year % 100)))]
[month];
}
wd->selected_it = i;
}
- if (day && (day <= maxdays))
+ if ((day) && (day <= maxdays))
snprintf(day_s, sizeof(day_s), "%d", day++);
else
day_s[0] = 0;
Evas_Event_Key_Down *ev = event_info;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if (strcmp(ev->keyname, "Return") && strcmp(ev->keyname, "space"))
+ if ((strcmp(ev->keyname, "Return")) && (strcmp(ev->keyname, "space")))
return EINA_FALSE;
_activate(obj);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
_elm_theme_object_set(obj, wd->digit[i], "clock", "flipdigit", style);
edje_object_scale_set(wd->digit[i], elm_widget_scale_get(obj) *
_elm_config->scale);
- if (wd->edit && (wd->digedit & (1 << i)))
+ if ((wd->edit) && (wd->digedit & (1 << i)))
edje_object_signal_emit(wd->digit[i], "elm,state,edit,on", "elm");
edje_object_signal_callback_add(wd->digit[i], "elm,action,up,start",
"", _signal_clock_val_up_start, obj);
wd->edit = edit;
if (!edit)
_timediff_set(wd);
- if (edit && (wd->digedit == ELM_CLOCK_NONE))
+ if ((edit) && (wd->digedit == ELM_CLOCK_NONE))
elm_clock_digit_edit_set(obj, ELM_CLOCK_ALL);
else
_time_update(obj);
if ((unsigned int)selection >= (unsigned int)ELM_SEL_MAX) return EINA_FALSE;
if (!_elm_cnp_init_count) _elm_cnp_init();
- if (!selbuf && format != ELM_SEL_FORMAT_IMAGE)
+ if ((!selbuf) && (format != ELM_SEL_FORMAT_IMAGE))
return elm_selection_clear(selection, widget);
sel = selections + selection;
sel = selections + selection;
/* No longer this selection: Consider it gone! */
- if (!sel->active || sel->widget != widget) return EINA_TRUE;
+ if ((!sel->active) || (sel->widget != widget)) return EINA_TRUE;
sel->active = 0;
sel->widget = NULL;
if (!(atoms[j].formats & sel->requestformat)) continue;
for (i = 0 ; i < targets->data.length ; i ++)
{
- if (atoms[j].atom == atomlist[i] && atoms[j].notify)
+ if ((atoms[j].atom == atomlist[i]) && (atoms[j].notify))
{
cnp_debug("Atom %s matches\n",atoms[j].name);
goto done;
if (!(atoms[j].formats & sel->requestformat)) continue;
for (i = 0 ; i < targets->data.length ; i ++)
{
- if (atoms[j].atom == atomlist[i] && atoms[j].response){
+ if ((atoms[j].atom == atomlist[i]) && (atoms[j].response)){
/* Found a match: Use it */
goto found;
}
else
p += strlen("file://");
- if (!strstr(p,".png") && !strstr(p,".jpg"))
+ if ((!strstr(p,".png")) && (!strstr(p,".jpg")))
{
cnp_debug("No png, ignoring\n");
if (savedtypes.textreq) savedtypes.textreq = 0;
{
*data_ret = remove_tags(sel->selbuf, size_ret);
}
- else if (sel->format == ELM_SEL_FORMAT_TEXT ||
- sel->format == ELM_SEL_FORMAT_HTML)
+ else if ((sel->format == ELM_SEL_FORMAT_TEXT) ||
+ (sel->format == ELM_SEL_FORMAT_HTML))
{
*data_ret = strdup(sel->selbuf);
*size_ret = strlen(sel->selbuf);
if (!entry) return false;
type = elm_widget_type_get(entry);
printf("type is %s\n",type);
- if (!type || strcmp(type,"entry") != 0) return false;
+ if ((!type) || (strcmp(type,"entry") != 0)) return false;
v = evas_object_data_get(entry, PROVIDER_SET);
if (!v)
while (*p)
{
- if (*p != '<' && *p != '&'){
+ if ((*p != '<') && (*p != '&')){
*q ++ = *p ++;
} else if (*p == '<') {
- if (p[1] == 'b' && p[2] == 'r' &&
- (p[3] == ' ' || p[3] == '/' || p[3] == '>'))
+ if ((p[1] == 'b') && (p[2] == 'r') &&
+ ((p[3] == ' ') || (p[3] == '/') || (p[3] == '>')))
*q++ = '\n';
- while (*p && *p != '>') p ++;
+ while ((*p) && (*p != '>')) p ++;
p ++;
} else if (*p == '&') {
p ++;
if (inlen >= 0)
endp = start + inlen;
/* First pass: Count characters */
- for (l = 0, p = start ; (!endp || (p < endp)) && *p ; p ++)
+ for (l = 0, p = start ; ((!endp) || (p < endp)) && (*p) ; p ++)
{
for (i = 0 ; i < N_ESCAPES ; i ++)
{
int i;
/* Skip it */
- if (!enter || !enter->num_types || !enter->types) return EINA_TRUE;
+ if ((!enter) || (!enter->num_types) || (!enter->types)) return EINA_TRUE;
cnp_debug("Types\n");
savedtypes.ntypes = enter->num_types;
break;
}
/* didn't find a window */
- if (l == NULL)
+ if (!l)
return true;
{
dropable = l->data;
evas_object_geometry_get(dropable->obj, &x, &y, &w, &h);
- if (savedtypes.x >= x && savedtypes.y >= y &&
- savedtypes.x < x + w && savedtypes.y < y + h)
+ if ((savedtypes.x >= x) && (savedtypes.y >= y) &&
+ (savedtypes.x < x + w) && (savedtypes.y < y + h))
break; /* found! */
}
if (!_elm_cnp_init_count) _elm_cnp_init();
/* Is this the first? */
- first = (drops == NULL) ? 1 : 0;
+ first = (!drops) ? 1 : 0;
drop = calloc(1,sizeof(struct dropable));
if (!drop) return false;
(Evas_Object_Event_Cb)elm_drop_target_del);
free(drop);
/* If still drops there: All fine.. continue */
- if (drops != NULL) return true;
+ if (drops) return true;
cnp_debug("Disabling DND\n");
xwin = (Ecore_X_Window)ecore_evas_window_get(ecore_evas_ecore_evas_get(
return EINA_TRUE;
}
- if (!strcmp(ev->keyname, "Left") || !strcmp(ev->keyname, "KP_Left") ||
- !strcmp(ev->keyname, "Up") || !strcmp(ev->keyname, "KP_Up"))
+ if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")) ||
+ (!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
{
l = wd->selected_item->node->prev;
- if (!l && wd->round)
+ if ((!l) && (wd->round))
l = eina_list_last(wd->items);
}
- else if (!strcmp(ev->keyname, "Right") || !strcmp(ev->keyname, "KP_Right") ||
- !strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")) ||
+ (!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
{
l = wd->selected_item->node->next;
- if (!l && wd->round)
+ if ((!l) && (wd->round))
l = wd->items;
}
else if (!strcmp(ev->keyname, "Home"))
if (code == '\0')
return length; // null string
- else if ((code >= 65 && code <= 90) || (code >= 97 && code <= 122))
+ else if (((code >= 65) && (code <= 90)) || ((code >= 97) && (code <= 122)))
return length; // alphabet
- else if (48 <= code && code < 58)
+ else if ((48 <= code) && (code < 58))
return length; // number
- else if ((33 <= code && code < 47) || (58 <= code && code < 64)
- || (91 <= code && code < 96) || (123 <= code && code < 126))
+ else if (((33 <= code) && (code < 47)) || ((58 <= code) && (code < 64))
+ || ((91 <= code) && (code < 96)) || ((123 <= code) && (code < 126)))
return length; // special letter
return length - 1;
}
int len;
evas_object_geometry_get(it->base.view, &x, NULL, &w, NULL);
/* item not visible */
- if (x + w <= ox || x >= ox + ow)
+ if ((x + w <= ox) || (x >= ox + ow))
continue;
len = eina_stringshare_strlen(it->label);
evas_object_hide(wd->left_blank);
elm_box_unpack(wd->main_box, wd->right_blank);
evas_object_hide(wd->right_blank);
- if (wd->items == NULL)
+ if (!wd->items)
return;
_round_items_add(wd);
ELM_CHECK_WIDTYPE(obj, widtype);
Elm_Smart_Scroller_Policy s_policy_h, s_policy_v;
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->scroller) return;
+ if ((!wd) || (!wd->scroller)) return;
elm_smart_scroller_policy_get(wd->scroller, &s_policy_h, &s_policy_v);
*policy_h = (Elm_Scroller_Policy) s_policy_h;
*policy_v = (Elm_Scroller_Policy) s_policy_v;
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
Evas_Coord resw, resh;
if (!wd) return;
- if (wd->linewrap || wd->char_linewrap)
+ if ((wd->linewrap) || (wd->char_linewrap))
{
evas_object_geometry_get(wd->ent, NULL, NULL, &resw, &resh);
if ((resw == wd->lastw) && (!wd->changed)) return;
{
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
- if (wd->linewrap || wd->char_linewrap)
+ if ((wd->linewrap) || (wd->char_linewrap))
{
_sizing_eval(data);
}
}
esc_start = esc_end = NULL;
}
- else if (*p == 0 && s)
+ else if ((*p == 0) && (s))
{
ts = malloc(p - s + 1);
if (ts)
}
if (*p == '<')
{
- if (s && !esc_start)
+ if ((s) && (!esc_start))
{
tag_start = p;
tag_end = NULL;
}
else if (*p == '&')
{
- if (s && !tag_start)
+ if ((s) && (!tag_start))
{
esc_start = p;
esc_end = NULL;
Widget_Data *wd = elm_widget_data_get(data);
Ecore_X_Event_Selection_Notify *ev = event;
if (!wd) return ECORE_CALLBACK_PASS_ON;
- if (!wd->selection_asked && !wd->drag_selection_asked)
+ if ((!wd->selection_asked) && (!wd->drag_selection_asked))
return ECORE_CALLBACK_PASS_ON;
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
Eina_Bool goes_in;
int read_idx, last_read_idx = 0, read_char;
- if (!as || (!as->accepted && !as->rejected))
+ if ((!as) || ((!as->accepted) && (!as->rejected)))
return;
if (as->accepted)
if (elm_widget_disabled_get(obj))
return EINA_FALSE;
- if (!strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
is_up = EINA_FALSE;
- else if (strcmp(ev->keyname, "Up") && strcmp(ev->keyname, "KP_Up"))
+ else if ((strcmp(ev->keyname, "Up")) && (strcmp(ev->keyname, "KP_Up")))
return EINA_FALSE;
if (wd->spin) ecore_timer_del(wd->spin);
Eina_List *l;
wd = elm_widget_data_get(item->base.widget);
- if (!wd || !wd->items)
+ if ((!wd) || (!wd->items))
return NULL;
EINA_LIST_FOREACH(wd->items, l, _item)
Widget_Data *wd;
Eina_List *l;
- if (!item || !label)
+ if ((!item) || (!label))
return;
wd = elm_widget_data_get(item->base.widget);
- if (!wd || !wd->items)
+ if ((!wd) || (!wd->items))
return;
l = eina_list_data_find_list(wd->items, item);
Eina_List *l;
wd = elm_widget_data_get(item->base.widget);
- if (!wd || !wd->items)
+ if ((!wd) || (!wd->items))
return NULL;
EINA_LIST_FOREACH(wd->items, l, _item)
Eina_List *l;
wd = elm_widget_data_get(item->base.widget);
- if (!wd || !wd->items)
+ if ((!wd) || (!wd->items))
return NULL;
EINA_LIST_FOREACH(wd->items, l, _item)
elm_smart_scroller_page_size_get(wd->scr, &page_x, &page_y);
elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
- if (!strcmp(ev->keyname, "Left") || !strcmp(ev->keyname, "KP_Left"))
+ if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
{
- if ((evas_key_modifier_is_set(ev->modifiers, "Shift") &&
- _item_multi_select_left(wd))
- || _item_single_select_left(wd))
+ if (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
+ (_item_multi_select_left(wd)))
+ || (_item_single_select_left(wd)))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
else
x -= step_x;
}
- else if (!strcmp(ev->keyname, "Right") || !strcmp(ev->keyname, "KP_Right"))
+ else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
{
- if ((evas_key_modifier_is_set(ev->modifiers, "Shift") &&
- _item_multi_select_right(wd))
- || _item_single_select_right(wd))
+ if (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
+ (_item_multi_select_right(wd)))
+ || (_item_single_select_right(wd)))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
else
x += step_x;
}
- else if (!strcmp(ev->keyname, "Up") || !strcmp(ev->keyname, "KP_Up"))
+ else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
{
- if ((evas_key_modifier_is_set(ev->modifiers, "Shift") &&
- _item_multi_select_up(wd))
- || _item_single_select_up(wd))
+ if (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
+ (_item_multi_select_up(wd)))
+ || (_item_single_select_up(wd)))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
else
y -= step_y;
}
- else if (!strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
{
- if ((evas_key_modifier_is_set(ev->modifiers, "Shift") &&
- _item_multi_select_down(wd))
- || _item_single_select_down(wd))
+ if (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
+ (_item_multi_select_down(wd)))
+ || (_item_single_select_down(wd)))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
if (!wd->selected) return EINA_FALSE;
- for (i = 0; r && i < wd->nmax; i++)
+ for (i = 0; (r) && (i < wd->nmax); i++)
r &= _item_multi_select_left(wd);
return r;
if (!wd->selected) return EINA_FALSE;
- for (i = 0; r && i < wd->nmax; i++)
+ for (i = 0; (r) && (i < wd->nmax); i++)
r &= _item_multi_select_right(wd);
return r;
{
edje_object_signal_emit(wd->self, "elm,action,focus", "elm");
evas_object_focus_set(wd->self, EINA_TRUE);
- if (wd->selected && !wd->last_selected_item)
+ if ((wd->selected) && (!wd->last_selected_item))
wd->last_selected_item = eina_list_data_get(wd->selected);
}
else
{
if (item->want_unrealize) _item_unrealize(item);
}
- if ((item->disabled) || dragged) return;
+ if ((item->disabled) || (dragged)) return;
if (item->wd->multi)
{
if (!item->selected)
EAPI void
elm_gengrid_item_tooltip_unset(Elm_Gengrid_Item *item)
{
- if (item->base.view && item->tooltip.content_cb)
+ if ((item->base.view) && (item->tooltip.content_cb))
elm_widget_item_tooltip_unset(item);
if (item->tooltip.del_cb)
elm_smart_scroller_page_size_get(wd->scr, &page_x, &page_y);
elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
- if (!strcmp(ev->keyname, "Left") || !strcmp(ev->keyname, "KP_Left"))
+ if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
{
x -= step_x;
}
- else if (!strcmp(ev->keyname, "Right") || !strcmp(ev->keyname, "KP_Right"))
+ else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
{
x += step_x;
}
- else if (!strcmp(ev->keyname, "Up") || !strcmp(ev->keyname, "KP_Up"))
+ else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
{
- if ((evas_key_modifier_is_set(ev->modifiers, "Shift") &&
- _item_multi_select_up(wd))
- || _item_single_select_up(wd))
+ if (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
+ (_item_multi_select_up(wd)))
+ || (_item_single_select_up(wd)))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
else
y -= step_y;
}
- else if (!strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
{
- if ((evas_key_modifier_is_set(ev->modifiers, "Shift") &&
- _item_multi_select_down(wd))
- || _item_single_select_down(wd))
+ if (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
+ (_item_multi_select_down(wd)))
+ || (_item_single_select_down(wd)))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
else
y += page_y;
}
- else if((!strcmp(ev->keyname, "Return") || !strcmp(ev->keyname, "space"))
- && !wd->multi && wd->selected)
+ else if(((!strcmp(ev->keyname, "Return")) || (!strcmp(ev->keyname, "space")))
+ && (!wd->multi) && (wd->selected))
{
Elm_Genlist_Item *it = elm_genlist_selected_item_get(obj);
elm_genlist_item_expanded_set(it,
{
edje_object_signal_emit(wd->obj, "elm,action,focus", "elm");
evas_object_focus_set(wd->obj, EINA_TRUE);
- if (wd->selected && !wd->last_selected_item)
+ if ((wd->selected) && (!wd->last_selected_item))
wd->last_selected_item = eina_list_data_get(wd->selected);
}
else
edje_object_signal_emit(it->base.view, "elm,state,expanded", "elm");
}
- if (calc && it->wd->homogeneous && it->wd->item_width)
+ if ((calc) && (it->wd->homogeneous) && (it->wd->item_width))
{
/* homogenous genlist shortcut */
if (!it->mincalcd)
it->h = it->minh = mh;
it->mincalcd = EINA_TRUE;
- if (in == 0 && it->wd->homogeneous)
+ if ((in == 0) && (it->wd->homogeneous))
{
it->wd->item_width = mw;
it->wd->item_height = mh;
itb->h = itb->minh;
y += itb->h;
in += itb->count;
- if (showme && wd->show_item)
+ if ((showme) && (wd->show_item))
{
wd->show_item->showme = 0;
if (wd->bring_in)
EAPI void
elm_genlist_item_tooltip_unset(Elm_Genlist_Item *item)
{
- if (item->base.view && item->tooltip.content_cb)
+ if ((item->base.view) && (item->tooltip.content_cb))
elm_widget_item_tooltip_unset(item);
if (item->tooltip.del_cb)
_els_smart_icon_size_get(wd->img, &w, &h);
#ifdef ELM_EFREET
- if (wd->freedesktop.use && !((w - wd->freedesktop.requested_size) % 16))
+ if ((wd->freedesktop.use) && (!((w - wd->freedesktop.requested_size) % 16)))
{
/* This icon has been set to a freedesktop icon, and the requested
appears to have a different size than the requested size, so try to
static const char *themes[] = {
"default", "highcolor", "hicolor", "gnome", "Human", "oxygen", NULL
};
- for (itr = themes; !path && *itr; itr++)
+ for (itr = themes; (!path) && (*itr); itr++)
path = efreet_icon_path_find(*itr, name, size);
}
wd->freedesktop.use = !!path;
maxh = minh;
evas_object_size_hint_max_set(obj, maxw, maxh);
- if (wd->ellipsis && _is_width_over(obj) == 1)
+ if ((wd->ellipsis) && (_is_width_over(obj) == 1))
_ellipsis_label_to_width(obj);
}
}
break;
} while (strlen(srcstring) > 1);
- if (starttag && endtag && tagtxtlen > key_len)
+ if ((starttag) && (endtag) && (tagtxtlen > key_len))
{
repbuf = eina_strbuf_new();
diffbuf = eina_strbuf_new();
evas_object_geometry_get (obj, &vx,&vy,&vw,&vh);
- if (x >= 0 && y >= 0) return 0;
+ if ((x >= 0) && (y >= 0)) return 0;
- if (ellen < wd->wrap_w && w > wd->wrap_w) return 1;
+ if ((ellen < wd->wrap_w) && (w > wd->wrap_w)) return 1;
return 0;
}
deffont = edje_object_data_get(wd->lbl, "default_font_size");
if (deffont) cur_fontsize = atoi(deffont);
else cur_fontsize = 1;
- if (minfontsize == maxfontsize || cur_fontsize == 1) return; // theme is not ready for ellipsis
+ if ((minfontsize == maxfontsize) || (cur_fontsize == 1)) return; // theme is not ready for ellipsis
if (eina_stringshare_strlen(wd->label) <= 0) return;
if (_get_value_in_key_string(wd->label, "font_size", &kvalue) == 0)
elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
/* TODO: fix logic for horizontal mode */
- if (!strcmp(ev->keyname, "Left") || !strcmp(ev->keyname, "KP_Left"))
+ if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
{
x -= step_x;
}
- else if (!strcmp(ev->keyname, "Right") || !strcmp(ev->keyname, "KP_Right"))
+ else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
{
x += step_x;
}
- else if (!strcmp(ev->keyname, "Up") || !strcmp(ev->keyname, "KP_Up"))
+ else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
{
- if ((evas_key_modifier_is_set(ev->modifiers, "Shift") &&
- _item_multi_select_up(wd))
- || _item_single_select_up(wd))
+ if (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
+ (_item_multi_select_up(wd)))
+ || (_item_single_select_up(wd)))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
else
y -= step_y;
}
- else if (!strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
{
- if ((evas_key_modifier_is_set(ev->modifiers, "Shift") &&
- _item_multi_select_down(wd))
- || _item_single_select_down(wd))
+ if (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
+ (_item_multi_select_down(wd)))
+ || (_item_single_select_down(wd)))
{
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
if (wd->scr_minh) h = vmh + minh;
evas_object_size_hint_max_get(obj, &maxw, &maxh);
- if (maxw > 0 && w > maxw)
+ if ((maxw > 0) && (w > maxw))
w = maxw;
- if (maxh > 0 && h > maxh)
+ if ((maxh > 0) && (h > maxh))
h = maxh;
evas_object_size_hint_min_set(obj, w, h);
// edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
edj = elm_smart_scroller_edje_object_get(wd->scr);
str = edje_object_data_get(edj, "focus_highlight");
- if (str && !strcmp(str, "on"))
+ if ((str) && (!strcmp(str, "on")))
elm_widget_highlight_in_theme_set(obj, EINA_TRUE);
else
elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
edje_object_signal_emit(wd->self, "elm,action,focus", "elm");
evas_object_focus_set(wd->self, EINA_TRUE);
- if (wd->selected && !wd->last_selected_item)
+ if ((wd->selected) && (!wd->last_selected_item))
wd->last_selected_item = eina_list_data_get(wd->selected);
}
else
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
if (it->icon == icon) return;
- if (it->dummy_icon && !icon) return;
+ if ((it->dummy_icon) && (!icon)) return;
if (it->dummy_icon)
{
evas_object_del(it->icon);
{
ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
if (it->end == end) return;
- if (it->dummy_end && !end) return;
+ if ((it->dummy_end) && (!end)) return;
if (it->dummy_end)
{
evas_object_del(it->end);
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
Elm_Smart_Scroller_Policy s_policy_h, s_policy_v;
- if (!wd || !wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
elm_smart_scroller_policy_get(wd->scr, &s_policy_h, &s_policy_v);
*policy_h = (Elm_Scroller_Policy) s_policy_h;
*policy_v = (Elm_Scroller_Policy) s_policy_v;
EAPI Eina_Bool
elm_object_focus_allow_get(const Evas_Object *obj)
{
- return elm_widget_can_focus_get(obj) || elm_widget_child_can_focus_get(obj);
+ return (elm_widget_can_focus_get(obj)) || (elm_widget_child_can_focus_get(obj));
}
/**
gw = wd->size.w;
gh = wd->size.h;
- if (ww == gw && hh == gh) return;
+ if ((ww == gw) && (hh == gh)) return;
if (ow > gw) ax = (ow - gw) / 2;
if (oh > gh) ay = (oh - gh) / 2;
}
wd->marker_zoom = wd->zoom;
- if (wd->paused_markers
- && (wd->size.nw != wd->size.w || wd->size.nh != wd->size.h) )
+ if ((wd->paused_markers)
+ && ((wd->size.nw != wd->size.w) || (wd->size.nh != wd->size.h)) )
return;
g_xx = wd->pan_x / wd->tsize;
EINA_LIST_FREE(wd->cells_displayed, cell)
{
eina_matrixsparse_cell_position_get(cell, (unsigned long *)&y, (unsigned long *)&x);
- if (y < g_yy || y > g_yy + g_hh || x < g_xx || x > g_xx + g_ww)
+ if ((y < g_yy) || (y > g_yy + g_hh) || (x < g_xx) || (x > g_xx + g_ww))
{
EINA_LIST_FOREACH(eina_matrixsparse_cell_data_get(cell), l, group)
{
hh = (((long long)gh * (ty + hh)) / g->h) - yy;
}
- if (!group->clas->hide
- && xx-px+ax+ox >= ox && xx-px+ax+ox<= ox+ow
- && yy-py+ay+oy >= oy && yy-py+ay+oy<= oy+oh)
+ if ((!group->clas->hide)
+ && (xx-px+ax+ox >= ox) && (xx-px+ax+ox<= ox+ow)
+ && (yy-py+ay+oy >= oy) && (yy-py+ay+oy<= oy+oh))
{
if (!group->obj) _group_object_create(group);
evas_object_move(group->obj,
xx - px + ax + ox - ww/2,
yy - py + ay + oy - hh/2);
- if (!wd->paused_markers || group->update_resize)
+ if ((!wd->paused_markers) || (group->update_resize))
{
group->update_resize = EINA_FALSE;
evas_object_resize(group->obj, ww, hh);
gi->job = NULL;
DBG("DOWNLOAD done %s", gi->file);
- if (gi->want && !status) _tile_update(gi);
+ if ((gi->want) && (!status)) _tile_update(gi);
if (status)
{
eina_matrixsparse_data_idx_set(g->grid, y, x, gi);
}
- if (!gi->have && !gi->download)
+ if ((!gi->have) && (!gi->download))
{
char buf[PATH_MAX], buf2[PATH_MAX];
char *source;
eina_stringshare_replace(&gi->file, buf2);
- if (ecore_file_exists(buf2) || g == eina_list_data_get(wd->grids))
+ if ((ecore_file_exists(buf2)) || (g == eina_list_data_get(wd->grids)))
{
gi->download = EINA_TRUE;
wd->preload_num++;
Evas_Object *icon = NULL;
if (group->obj) return;
- if (!group->clas->priv.objs_notused || eina_list_count(group->markers) == 1)
+ if ((!group->clas->priv.objs_notused) || (eina_list_count(group->markers) == 1))
{
//set icon and style
if (eina_list_count(group->markers) == 1)
EINA_LIST_FOREACH(group->markers, l, marker)
{
if (i >= group->wd->markers_max_num) break;
- if (!marker->content && marker->clas->func.get)
+ if ((!marker->content) && (marker->clas->func.get))
marker->content = marker->clas->func.get(group->wd->obj, marker, marker->data);
else if (marker->content)
elm_box_unpack(group->bx, marker->content);
if (!group->sc) return;
EINA_LIST_FOREACH(group->markers, l, marker)
{
- if (marker->content && marker->clas->func.del)
+ if ((marker->content) && (marker->clas->func.del))
marker->clas->func.del(group->wd->obj, marker, marker->data, marker->content);
else if (marker->content)
evas_object_del(marker->content);
Evas_Coord xx, yy, ww, hh;
const char *s;
- if (!group->bubble || !group->obj) return;
+ if ((!group->bubble) || (!group->obj)) return;
evas_object_geometry_get(group->obj, &x, &y, &w, NULL);
edje_object_size_min_calc(group->bubble, NULL, &hh);
if (marker->groups[i]->h > marker->groups[i]->clas->priv.edje_max_h)
marker->groups[i]->h = marker->groups[i]->clas->priv.edje_max_h;
}
- if (marker->groups[i]->obj && eina_list_count(marker->groups[i]->markers) == 1)
+ if ((marker->groups[i]->obj) && (eina_list_count(marker->groups[i]->markers) == 1))
{
_group_object_free(marker->groups[i]);
_group_object_create(marker->groups[i]);
}
}
- if (marker->content && marker->clas->func.del)
+ if ((marker->content) && (marker->clas->func.del))
marker->clas->func.del(marker->wd->obj, marker, marker->data, marker->content);
else if (marker->content)
evas_object_del(marker->content);
{
wd = marker->wd;
- if (!m_min_lon || marker->longitude < m_min_lon->longitude)
+ if ((!m_min_lon) || (marker->longitude < m_min_lon->longitude))
m_min_lon = marker;
- if (!m_max_lon || marker->longitude > m_max_lon->longitude)
+ if ((!m_max_lon) || (marker->longitude > m_max_lon->longitude))
m_max_lon = marker;
- if (!m_min_lat || marker->latitude > m_min_lat->latitude)
+ if ((!m_min_lat) || (marker->latitude > m_min_lat->latitude))
m_min_lat = marker;
- if (!m_max_lat || marker->latitude < m_max_lat->latitude)
+ if ((!m_max_lat) || (marker->latitude < m_max_lat->latitude))
m_max_lat = marker;
}
Evas_Coord size = pow(2.0, zoom)*wd->tsize;
elm_map_utils_convert_geo_into_coord(lon, lat, size, &xc, &yc);
- if (m_min_lon->x[zoom] - wd->marker_max_w >= xc-rw/2
- && m_min_lat->y[zoom] - wd->marker_max_h >= yc-rh/2
- && m_max_lon->x[zoom] + wd->marker_max_w <= xc+rw/2
- && m_max_lat->y[zoom] + wd->marker_max_h <= yc+rh/2)
+ if ((m_min_lon->x[zoom] - wd->marker_max_w >= xc-rw/2)
+ && (m_min_lat->y[zoom] - wd->marker_max_h >= yc-rh/2)
+ && (m_max_lon->x[zoom] + wd->marker_max_w <= xc+rw/2)
+ && (m_max_lat->y[zoom] + wd->marker_max_h <= yc+rh/2))
break;
}
EAPI void
elm_map_source_custom_api_set(Elm_Map_Sources source, const char *name, int zoom_min, int zoom_max, ElmMapSourceURLFunc url_cb)
{
- if (!name || !url_cb) return;
+ if ((!name) || (!url_cb)) return;
map_sources_tab[source].name = name;
map_sources_tab[source].zoom_min = zoom_min;
map_sources_tab[source].zoom_max = zoom_max;
{
char icon_tmp[512];
if (!item) return;
- if (!icon || !*icon) return;
- if (item->icon_str && !strcmp(item->icon_str, icon)) return;
- if (snprintf(icon_tmp, sizeof(icon_tmp), "menu/%s", icon) > 0 &&
- elm_icon_standard_set(item->icon, icon_tmp))
+ if ((!icon) || (!*icon)) return;
+ if ((item->icon_str) && (!strcmp(item->icon_str, icon))) return;
+ if ((snprintf(icon_tmp, sizeof(icon_tmp), "menu/%s", icon) > 0) &&
+ (elm_icon_standard_set(item->icon, icon_tmp)))
{
eina_stringshare_replace(&item->icon_str, icon);
edje_object_signal_emit(item->base.view, "elm,state,icon,visible", "elm");
ecore_timer_del(wd->timer);
wd->timer = NULL;
}
- if (evas_object_visible_get(obj) && (wd->timeout > 0.0))
+ if ((evas_object_visible_get(obj)) && (wd->timeout > 0.0))
wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
}
// edje_object_scale_set(wd->scr, scale);
edj = elm_smart_scroller_edje_object_get(wd->scr);
str = edje_object_data_get(edj, "focus_highlight");
- if (str && !strcmp(str, "on"))
+ if ((str) && (!strcmp(str, "on")))
elm_widget_highlight_in_theme_set(obj, EINA_TRUE);
else
elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
- if (strcmp(ev->keyname, "Return") && strcmp(ev->keyname, "space"))
+ if ((strcmp(ev->keyname, "Return")) && (strcmp(ev->keyname, "space")))
return EINA_FALSE;
_toggle_panel(obj, NULL, "elm,action,panel,toggle", "*");
double w, h;
edje_object_part_drag_value_get(wd->panes, "elm.bar", &w, &h);
- if ((wd->horizontal && ( h == 0.0 )) || ((!wd->horizontal) && ( w == 0.0 )))
+ if (((wd->horizontal) && ( h == 0.0 )) || ((!wd->horizontal) && ( w == 0.0 )))
return elm_widget_focus_next_get(wd->contents.right, dir, next);
Evas_Object *chain[2];
{
Widget_Data *wd = elm_widget_data_get(data);
- if (wd && wd->longtimer)
+ if ((wd) && (wd->longtimer))
{
ecore_timer_del(wd->longtimer);
wd->longtimer = NULL;
if (wd->pulse_state)
edje_object_signal_emit(wd->progressbar, "elm,state,pulse,start", "elm");
- if (wd->units && !wd->pulse)
+ if ((wd->units) && (!wd->pulse))
edje_object_signal_emit(wd->progressbar, "elm,state,units,visible", "elm");
if (wd->horizontal)
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
state = !!state;
- if (!wd->pulse && wd->pulse_state == state) return;
+ if ((!wd->pulse) && (wd->pulse_state == state)) return;
wd->pulse_state = state;
if (wd->pulse_state)
edje_object_signal_emit(wd->progressbar, "elm,state,pulse,start", "elm");
Evas_Event_Key_Down *ev = event_info;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if (strcmp(ev->keyname, "Return") && strcmp(ev->keyname, "space"))
+ if ((strcmp(ev->keyname, "Return")) && (strcmp(ev->keyname, "space")))
return EINA_FALSE;
_activate(obj);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
else _state_set(child, 0);
}
- if (disabled && selected) _state_set(selected, 1);
+ if ((disabled) && (selected)) _state_set(selected, 1);
}
static void
elm_smart_scroller_child_viewport_size_get(wd->scr, &v_w, &v_h);
elm_scroller_child_size_get(obj, &max_x, &max_y);
- if (!strcmp(ev->keyname, "Left") || !strcmp(ev->keyname, "KP_Left"))
+ if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
{
x -= step_x;
}
- else if (!strcmp(ev->keyname, "Right") || !strcmp(ev->keyname, "KP_Right"))
+ else if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
{
x += step_x;
}
- else if (!strcmp(ev->keyname, "Up") || !strcmp(ev->keyname, "KP_Up"))
+ else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
{
y -= step_y;
}
- else if (!strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
{
y += step_y;
}
// edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
edj = elm_smart_scroller_edje_object_get(wd->scr);
str = edje_object_data_get(edj, "focus_highlight");
- if (str && !strcmp(str, "on"))
+ if ((str) && (!strcmp(str, "on")))
elm_widget_highlight_in_theme_set(obj, EINA_TRUE);
else
elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
cur = wd->content;
/* Try Focus cycle in subitem */
- if (elm_widget_can_focus_get(cur) || elm_widget_child_can_focus_get(cur))
+ if ((elm_widget_can_focus_get(cur)) || (elm_widget_child_can_focus_get(cur)))
return elm_widget_focus_next_get(cur, dir, next);
/* Return */
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
}
ELM_SMART_SCROLLER_POLICY_ON,
ELM_SMART_SCROLLER_POLICY_OFF
};
- if (!wd || !wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
if ((policy_h >= 3) || (policy_v >= 3)) return;
elm_smart_scroller_policy_set(wd->scr, map[policy_h], map[policy_v]);
}
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
Elm_Smart_Scroller_Policy s_policy_h, s_policy_v;
- if (!wd || !wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
elm_smart_scroller_policy_get(wd->scr, &s_policy_h, &s_policy_v);
*policy_h = (Elm_Scroller_Policy) s_policy_h;
*policy_v = (Elm_Scroller_Policy) s_policy_v;
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
if ((x) && (y)) elm_smart_scroller_child_pos_get(wd->scr, x, y);
if ((w) && (h)) elm_smart_scroller_child_viewport_size_get(wd->scr, w, h);
}
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
}
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd || !wd->scr) return;
+ if ((!wd) || (!wd->scr)) return;
elm_smart_scroller_region_bring_in(wd->scr, x, y, w, h);
}
if (!wd) return EINA_FALSE;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if (!strcmp(ev->keyname, "Left")
- || !strcmp(ev->keyname, "KP_Left"))
+ if ((!strcmp(ev->keyname, "Left"))
+ || (!strcmp(ev->keyname, "KP_Left")))
{
if (!wd->horizontal) return EINA_FALSE;
_drag_up(obj, NULL, NULL, NULL);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if (!strcmp(ev->keyname, "Right")
- || !strcmp(ev->keyname, "KP_Right"))
+ else if ((!strcmp(ev->keyname, "Right"))
+ || (!strcmp(ev->keyname, "KP_Right")))
{
if (!wd->horizontal) return EINA_FALSE;
_drag_down(obj, NULL, NULL, NULL);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if (!strcmp(ev->keyname, "Up") || !strcmp(ev->keyname, "KP_Up"))
+ else if ((!strcmp(ev->keyname, "Up")) || (!strcmp(ev->keyname, "KP_Up")))
{
if (wd->horizontal) return EINA_FALSE;
_drag_up(obj, NULL, NULL, NULL);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- else if (!strcmp(ev->keyname, "Down") || !strcmp(ev->keyname, "KP_Down"))
+ else if ((!strcmp(ev->keyname, "Down")) || (!strcmp(ev->keyname, "KP_Down")))
{
if (wd->horizontal) return EINA_FALSE;
_drag_down(obj, NULL, NULL, NULL);
if (!wd) return EINA_FALSE;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if (!strcmp(ev->keyname, "Left") || !strcmp(ev->keyname, "KP_Left"))
+ if ((!strcmp(ev->keyname, "Left")) || (!strcmp(ev->keyname, "KP_Left")))
{
elm_slideshow_previous(obj);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- if (!strcmp(ev->keyname, "Right") || !strcmp(ev->keyname, "KP_Right"))
+ if ((!strcmp(ev->keyname, "Right")) || (!strcmp(ev->keyname, "KP_Right")))
{
elm_slideshow_next(obj);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
return EINA_TRUE;
}
- if (!strcmp(ev->keyname, "Return") || !strcmp(ev->keyname, "space"))
+ if ((!strcmp(ev->keyname, "Return")) || (!strcmp(ev->keyname, "space")))
{
if (wd->timeout)
elm_slideshow_timeout_set(obj, 0);
{
Widget_Data *wd = elm_widget_data_get(item->base.widget);
Elm_Slideshow_Item* prev = eina_list_data_get(eina_list_prev(item->l));
- if(!prev && wd->loop)
+ if((!prev) && (wd->loop))
prev = eina_list_data_get(eina_list_last(item->l));
return prev;
}
{
Widget_Data *wd = elm_widget_data_get(item->base.widget);
Elm_Slideshow_Item* next = eina_list_data_get(eina_list_next(item->l));
- if(!next && wd->loop)
+ if((!next) && (wd->loop))
next = eina_list_data_get(wd->items);
return next;
}
item = wd->current;
- if (!item || !item->base.view) return;
+ if ((!item) || (!item->base.view)) return;
_item_realize(item);
edje_object_part_unswallow(NULL, item->base.view);
if (wd->current)
next = _item_next_get(wd->current);
- if (!next || next == wd->current) return;
+ if ((!next) || (next == wd->current)) return;
_end(obj, obj, NULL, NULL);
if (wd->current)
prev = _item_prev_get(wd->current);
- if (!prev || prev == wd->current) return;
+ if ((!prev) || (prev == wd->current)) return;
_end(obj, obj, NULL, NULL);
wd->items = eina_list_remove_list(wd->items, item->l);
wd->items_built = eina_list_remove_list(wd->items_built, item->l_built);
- if (item->base.view && item->itc->func.del)
+ if ((item->base.view) && (item->itc->func.del))
item->itc->func.del((void*)item->base.data, item->base.view);
if (item->base.view)
evas_object_del(item->base.view);
if ((f[0] == '/') || ((f[0] == '.') && (f[1] == '/')) ||
((f[0] == '.') && (f[1] == '.') && (f[2] == '/')) ||
- (isalpha(f[0]) && f[1] == ':'))
+ ((isalpha(f[0])) && (f[1] == ':')))
return _elm_theme_find_try(th, f, group);
else if (((f[0] == '~') && (f[1] == '/')))
{
if ((f[0] == '/') || ((f[0] == '.') && (f[1] == '/')) ||
((f[0] == '.') && (f[1] == '.') && (f[2] == '/')) ||
- (isalpha(f[0]) && f[1] == ':'))
+ ((isalpha(f[0])) && (f[1] == ':')))
{
if (in_search_path) *in_search_path = EINA_FALSE;
return strdup(f);
eina_stringshare_replace(&(wd->thumb.key), NULL);
#ifdef HAVE_ELEMENTARY_ETHUMB
- if ((file_replaced || key_replaced) && evas_object_visible_get(obj))
+ if (((file_replaced) || (key_replaced)) && (evas_object_visible_get(obj)))
_thumb_show(wd);
#endif
}
if (!wd) return EINA_FALSE;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
if (elm_widget_disabled_get(obj)) return EINA_FALSE;
- if (strcmp(ev->keyname, "Return") && strcmp(ev->keyname, "space"))
+ if ((strcmp(ev->keyname, "Return")) && (strcmp(ev->keyname, "space")))
return EINA_FALSE;
elm_toggle_state_set(obj, !wd->state);
evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
{
char icon_str[512];
- if (!type || !*type) goto end;
- if (!icon || !*icon) return EINA_FALSE;
- if (snprintf(icon_str, sizeof(icon_str), "%s%s", type, icon) > 0
- && elm_icon_standard_set(icon_obj, icon_str))
+ if ((!type) || (!*type)) goto end;
+ if ((!icon) || (!*icon)) return EINA_FALSE;
+ if ((snprintf(icon_str, sizeof(icon_str), "%s%s", type, icon) > 0)
+ && (elm_icon_standard_set(icon_obj, icon_str)))
return EINA_TRUE;
end:
if (elm_icon_standard_set(icon_obj, icon))
if (!wd) return;
wd->shrink_mode = shrink_mode;
- bounce = _elm_config->thumbscroll_bounce_enable &&
+ bounce = (_elm_config->thumbscroll_bounce_enable) &&
(shrink_mode == ELM_TOOLBAR_SHRINK_SCROLL);
elm_smart_scroller_bounce_allow_set(wd->scr, bounce, EINA_FALSE);
_is_focusable(Evas_Object *obj)
{
API_ENTRY return EINA_FALSE;
- return sd->can_focus || sd->child_can_focus;
+ return sd->can_focus || (sd->child_can_focus);
}
static void
break;
}
- if (event_flags && ((*event_flags) & EVAS_EVENT_FLAG_ON_HOLD))
+ if ((event_flags) && ((*event_flags) & EVAS_EVENT_FLAG_ON_HOLD))
return;
- if (sd->event_func && sd->event_func(obj, obj, type, event_info))
+ if ((sd->event_func) && (sd->event_func(obj, obj, type, event_info)))
return;
elm_widget_parent_event_propagate(obj, type, event_info, event_flags);
/* we don't want to bump a common widget ancestor's
focus_order *twice* while parent focusing */
- if (!ret || !i || i != focus_order)
+ if (!ret || (!i) || (i != focus_order))
_parent_focus(o);
}
return;
elm_widget_sub_object_del(sd2->parent_obj, sobj);
sd2->parent_obj = obj;
- if (!sd->child_can_focus && _is_focusable(sobj))
+ if (!sd->child_can_focus && (_is_focusable(sobj)))
sd->child_can_focus = EINA_TRUE;
}
}
sd = evas_object_smart_data_get(parent);
if ((!sd) || (!_elm_widget_is(obj)))
return EINA_FALSE; //Not Elm Widget
- if (sd->event_func && sd->event_func(parent, obj, type, event_info))
+ if (sd->event_func && (sd->event_func(parent, obj, type, event_info)))
return EINA_TRUE;
parent = sd->parent_obj;
}
API_ENTRY return EINA_FALSE;
/* Ignore if disabled */
- if ((!evas_object_visible_get(obj)) || elm_widget_disabled_get(obj))
+ if ((!evas_object_visible_get(obj)) || (elm_widget_disabled_get(obj)))
return EINA_FALSE;
/* Try use hook */
*next = tmp;
return EINA_TRUE;
}
- else if (tmp && (!to_focus))
+ else if ((tmp) && (!to_focus))
to_focus = tmp;
}
if (!visible)
fprintf(output, ", fontcolor=gray28");
- if (disabled || (!visible))
+ if ((disabled) || (!visible))
fprintf(output, ", color=gray");
* Cast and ensure the given pointer is an Elm_Widget_Item or return NULL.
*/
#define ELM_WIDGET_ITEM(item) \
- ((item && EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC)) ? \
+ (((item) && (EINA_MAGIC_CHECK(item, ELM_WIDGET_ITEM_MAGIC))) ? \
((Elm_Widget_Item *)(item)) : NULL)
#define ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, ...) \
visible_changed = (win->focus_highlight.cur.visible !=
win->focus_highlight.prev.visible);
- if ((target == previous) && !visible_changed &&
- !win->focus_highlight.geometry_changed)
+ if ((target == previous) && (!visible_changed) &&
+ (!win->focus_highlight.geometry_changed))
return;
- if (previous && win->focus_highlight.prev.handled)
+ if ((previous) && (win->focus_highlight.prev.handled))
elm_widget_signal_emit(previous, "elm,action,focus_highlight,hide", "elm");
if (!target)
if (sig)
elm_widget_signal_emit(target, sig, "elm");
- if (!target || !common_visible || win->focus_highlight.cur.handled)
+ if ((!target) || (!common_visible) || (win->focus_highlight.cur.handled))
goto the_end;
if (win->focus_highlight.changed_theme)
if (_elm_config->focus_highlight_animate)
{
str = edje_object_data_get(win->focus_highlight.top, "animate");
- win->focus_highlight.top_animate = (str && !strcmp(str, "on"));
+ win->focus_highlight.top_animate = ((str) && (!strcmp(str, "on")));
}
}
- if (win->focus_highlight.top_animate && previous &&
- !win->focus_highlight.prev.handled)
+ if ((win->focus_highlight.top_animate) && (previous) &&
+ (!win->focus_highlight.prev.handled))
_elm_win_focus_highlight_anim_setup(win, top);
else
_elm_win_focus_highlight_simple_setup(win, top);
return;
- if (strcmp(ev->keyname, "F12") ||
+ if ((strcmp(ev->keyname, "F12")) ||
(!evas_key_modifier_is_set(ev->modifiers, "Control")))
return;
cur->visible = EINA_FALSE;
sobj_parent = evas_object_data_get(cur->eventarea, "elm-parent");
- while (sobj_parent != NULL)
+ while (sobj_parent)
{
pcur = evas_object_data_get((sobj_parent), _cursor_key);
if ((pcur) && (pcur->visible)) break;
sd = data;
ev = event_info;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return ;
- if (evas_key_modifier_is_set(ev->modifiers, "Control") ||
- evas_key_modifier_is_set(ev->modifiers, "Alt") ||
- evas_key_modifier_is_set(ev->modifiers, "Shift") ||
- evas_key_modifier_is_set(ev->modifiers, "Meta") ||
- evas_key_modifier_is_set(ev->modifiers, "Hyper") ||
- evas_key_modifier_is_set(ev->modifiers, "Super"))
+ if ((evas_key_modifier_is_set(ev->modifiers, "Control")) ||
+ (evas_key_modifier_is_set(ev->modifiers, "Alt")) ||
+ (evas_key_modifier_is_set(ev->modifiers, "Shift")) ||
+ (evas_key_modifier_is_set(ev->modifiers, "Meta")) ||
+ (evas_key_modifier_is_set(ev->modifiers, "Hyper")) ||
+ (evas_key_modifier_is_set(ev->modifiers, "Super")))
return;
elm_smart_scroller_child_pos_get(sd->smart_obj, &x, &y);
if ((sd->down.bounce_x_animator) || (sd->down.bounce_y_animator) ||
}
#define FDIF(a, b) (fabs((a) - (b)) > 0.0001)
- if (FDIF(rel_x, tt->rel_pos.x) || FDIF(rel_y, tt->rel_pos.y))
+ if ((FDIF(rel_x, tt->rel_pos.x)) || (FDIF(rel_y, tt->rel_pos.y)))
{
Edje_Message_Float_Set *msg;