forked from enlightenment/efl
parent
1a93e760bd
commit
4672a51b0c
|
@ -74,7 +74,7 @@ main(int argc, char **argv)
|
|||
exe = NULL;
|
||||
for (;;)
|
||||
{
|
||||
if ((*p == ':') || (*p == 0))
|
||||
if ((*p == ':') || (!*p))
|
||||
{
|
||||
unsigned int len;
|
||||
|
||||
|
@ -84,19 +84,19 @@ main(int argc, char **argv)
|
|||
strncpy(buf, pp, len);
|
||||
strcpy(buf + len, "/");
|
||||
strcpy(buf + len + 1, argv[0]);
|
||||
if (access(buf, R_OK | X_OK) == 0)
|
||||
if (!access(buf, R_OK | X_OK))
|
||||
{
|
||||
exe = buf;
|
||||
break;
|
||||
}
|
||||
if (*p == 0) break;
|
||||
if (!*p) break;
|
||||
p++;
|
||||
pp = p;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*p == 0) break;
|
||||
if (!*p) break;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
if (exe)
|
||||
{
|
||||
if (lstat(exe, &st) == 0)
|
||||
if (!lstat(exe, &st))
|
||||
{
|
||||
if (S_ISLNK(st.st_mode))
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ static void
|
|||
_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")))
|
||||
type = elm_object_widget_type_get(event_info);
|
||||
printf("Evas_Object focus in: %p %s\n", event_info, type);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ static void
|
|||
_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")))
|
||||
type = elm_object_widget_type_get(event_info);
|
||||
printf("Evas_Object focus out: %p %s\n", event_info, type);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ _focus_obj(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
|||
{
|
||||
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")))
|
||||
type = elm_object_widget_type_get(newfocus);
|
||||
printf("elm_object_focus(%p) %s\n", newfocus, type);
|
||||
elm_object_focus(newfocus);
|
||||
|
|
|
@ -521,7 +521,7 @@ Evas_Object *gl2_icon_get(void *data, Evas_Object *obj, const char *part)
|
|||
Evas_Object *ic = elm_icon_add(obj);
|
||||
if (!strcmp(part, "elm.swallow.icon"))
|
||||
{
|
||||
if ((tit->mode & 0x3) == 0)
|
||||
if (!(tit->mode & 0x3))
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
||||
else if ((tit->mode & 0x3) == 1)
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
|
||||
|
@ -533,7 +533,7 @@ Evas_Object *gl2_icon_get(void *data, Evas_Object *obj, const char *part)
|
|||
}
|
||||
else if (!strcmp(part, "elm.swallow.end"))
|
||||
{
|
||||
if ((tit->mode & 0x3) == 0)
|
||||
if (!(tit->mode & 0x3))
|
||||
snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
|
||||
else if ((tit->mode & 0x3) == 1)
|
||||
snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
|
||||
|
|
|
@ -77,7 +77,7 @@ test_index(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
|||
(void *)(long)j/* item data */,
|
||||
NULL/* parent */, ELM_GENLIST_ITEM_NONE,
|
||||
NULL/* func */, NULL/* func data */);
|
||||
if ((j & 0xf) == 0)
|
||||
if (!(j & 0xf))
|
||||
{
|
||||
char buf[32];
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ _zoom_mode_get(const char *map_src)
|
|||
ELM_MAP_ZOOM_MODE_LAST + 1);
|
||||
|
||||
for (i = 0; i < sizeof(zoom_choices); i++)
|
||||
if (strcmp(map_src, zoom_choices[i]) == 0) return i;
|
||||
if (!strcmp(map_src, zoom_choices[i])) return i;
|
||||
|
||||
return ELM_MAP_ZOOM_MODE_LAST;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ _map_source_get(const char *map_src)
|
|||
ELM_MAP_SOURCE_LAST);
|
||||
|
||||
for (i = 0; i < sizeof(source_choices); i++)
|
||||
if (strcmp(map_src, source_choices[i]) == 0) return i;
|
||||
if (!strcmp(map_src, source_choices[i])) return i;
|
||||
|
||||
return ELM_MAP_SOURCE_LAST;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ static Elm_Notify_Orient _orient_get(const char *orient)
|
|||
ELM_NOTIFY_ORIENT_LAST + 1);
|
||||
|
||||
for (i = 0; i < sizeof(orients); i++)
|
||||
if (strcmp(orient, orients[i]) == 0) return i;
|
||||
if (!strcmp(orient, orients[i])) return i;
|
||||
|
||||
return ELM_NOTIFY_ORIENT_LAST;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ _anim_setting_get(const char *anim_str)
|
|||
|
||||
for (i = 0; i < sizeof(choices); i++)
|
||||
{
|
||||
if (strcmp(anim_str, choices[i]) == 0)
|
||||
if (!strcmp(anim_str, choices[i]))
|
||||
return i;
|
||||
}
|
||||
return ELM_THUMB_ANIMATION_LAST;
|
||||
|
|
|
@ -156,7 +156,7 @@ _save_markup_utf8(const char *file, const char *text)
|
|||
{
|
||||
FILE *f;
|
||||
|
||||
if ((!text) || (text[0] == 0))
|
||||
if ((!text) || (!text[0]))
|
||||
{
|
||||
ecore_file_unlink(file);
|
||||
return;
|
||||
|
|
|
@ -101,7 +101,7 @@ _animator_animate_cb(void *data)
|
|||
//Reverse?
|
||||
if (animator->auto_reverse)
|
||||
{
|
||||
if ((animator->cur_repeat_cnt % 2) == 0)
|
||||
if (!(animator->cur_repeat_cnt % 2))
|
||||
frame = 1 - frame;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ _animator_animate_cb(void *data)
|
|||
return ECORE_CALLBACK_RENEW;
|
||||
|
||||
//Repeat and reverse and time done!
|
||||
if (animator->cur_repeat_cnt == 0)
|
||||
if (!animator->cur_repeat_cnt)
|
||||
{
|
||||
animator->on_animating = EINA_FALSE;
|
||||
_delete_animator(animator);
|
||||
|
|
|
@ -432,7 +432,7 @@ _time_update(Evas_Object *obj)
|
|||
if (hrs > 12) hrs -= 12;
|
||||
ampm = 1;
|
||||
}
|
||||
else if (hrs == 0) hrs = 12;
|
||||
else if (!hrs) hrs = 12;
|
||||
}
|
||||
d1 = hrs / 10;
|
||||
d2 = hrs % 10;
|
||||
|
|
|
@ -505,7 +505,7 @@ selection_notify(void *udata __UNUSED__, int type __UNUSED__, void *event){
|
|||
|
||||
for (i = 0 ; i < CNP_N_ATOMS ; i ++)
|
||||
{
|
||||
if (strcmp(ev->target, atoms[i].name) == 0)
|
||||
if (!strcmp(ev->target, atoms[i].name))
|
||||
{
|
||||
if (atoms[i].notify){
|
||||
cnp_debug("Found something: %s\n", atoms[i].name);
|
||||
|
@ -706,7 +706,7 @@ notify_handler_uri(struct _elm_cnp_selection *sel,
|
|||
return 0;
|
||||
}
|
||||
cnp_debug("Got %s\n",p);
|
||||
if (strncmp(p,"file://",7) != 0)
|
||||
if (strncmp(p, "file://", 7))
|
||||
{
|
||||
/* Try and continue if it looks sane */
|
||||
if (*p != '/') return 0;
|
||||
|
@ -962,7 +962,7 @@ image_provider(void *images __UNUSED__, Evas_Object *entry, const char *item)
|
|||
EINA_LIST_FOREACH(pastedimages, l, pi)
|
||||
{
|
||||
cnp_debug("is it %s?\n",pi->tag);
|
||||
if (strcmp(pi->tag,item) == 0){
|
||||
if (!strcmp(pi->tag, item)){
|
||||
/* Found it */
|
||||
Evas_Object *o;
|
||||
o = evas_object_image_filled_add(evas_object_evas_get(entry));
|
||||
|
@ -1024,7 +1024,7 @@ pasteimage_provider_set(Evas_Object *entry)
|
|||
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"))) return false;
|
||||
|
||||
v = evas_object_data_get(entry, PROVIDER_SET);
|
||||
if (!v)
|
||||
|
@ -1260,7 +1260,7 @@ _dnd_drop(void *data __UNUSED__, int etype __UNUSED__, void *ev)
|
|||
{
|
||||
for (j = 0 ; j < savedtypes.ntypes ; j ++)
|
||||
{
|
||||
if (strcmp(savedtypes.types[j], atoms[i].name) == 0)
|
||||
if (!strcmp(savedtypes.types[j], atoms[i].name))
|
||||
{
|
||||
goto found;
|
||||
}
|
||||
|
|
|
@ -214,7 +214,7 @@ _hsl_to_rgb(void *data)
|
|||
v = (_l <= 0.5) ? (_l * (1.0 + _s)) : (_l + _s - (_l * _s));
|
||||
p = _l + _l - v;
|
||||
|
||||
if (v != 0) sv = (v - p) / v;
|
||||
if (v) sv = (v - p) / v;
|
||||
else sv = 0;
|
||||
|
||||
i = (int)_h;
|
||||
|
@ -502,7 +502,7 @@ _left_button_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__
|
|||
"left_button");
|
||||
edje_object_part_drag_value_get(cp->colorbar, "elm.arrow", &x, &y);
|
||||
|
||||
if (cp->colorpicker_num == 0) x -= 1.0 / HUE_STEP;
|
||||
if (!cp->colorpicker_num) x -= 1.0 / HUE_STEP;
|
||||
else if (cp->colorpicker_num == 1) x -= 1.0 / SAT_STEP;
|
||||
else if (cp->colorpicker_num == 2) x -= 1.0 / LIG_STEP;
|
||||
else if (cp->colorpicker_num == 3) x -= 1.0 / ALP_STEP;
|
||||
|
@ -528,7 +528,7 @@ _right_button_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_
|
|||
"right_button");
|
||||
edje_object_part_drag_value_get(cp->colorbar, "elm.arrow", &x, &y);
|
||||
|
||||
if (cp->colorpicker_num == 0) x += 1.0 / HUE_STEP;
|
||||
if (!cp->colorpicker_num) x += 1.0 / HUE_STEP;
|
||||
else if (cp->colorpicker_num == 1) x += 1.0 / SAT_STEP;
|
||||
else if (cp->colorpicker_num == 2) x += 1.0 / LIG_STEP;
|
||||
else if (cp->colorpicker_num == 3) x += 1.0 / ALP_STEP;
|
||||
|
|
|
@ -573,7 +573,7 @@ _env_get(void)
|
|||
pp = p;
|
||||
for (;;)
|
||||
{
|
||||
if ((*p == ':') || (*p == 0))
|
||||
if ((*p == ':') || (!*p))
|
||||
{
|
||||
int len;
|
||||
|
||||
|
@ -583,13 +583,13 @@ _env_get(void)
|
|||
_elm_config->font_dirs =
|
||||
eina_list_append(_elm_config->font_dirs,
|
||||
eina_stringshare_add(buf2));
|
||||
if (*p == 0) break;
|
||||
if (!*p) break;
|
||||
p++;
|
||||
pp = p;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*p == 0) break;
|
||||
if (!*p) break;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1018,7 +1018,7 @@ elm_diskpicker_item_del(Elm_Diskpicker_Item * it)
|
|||
|
||||
if (wd->round)
|
||||
{
|
||||
if (wd->item_count == 0)
|
||||
if (!wd->item_count)
|
||||
{
|
||||
evas_object_hide(wd->first->base.view);
|
||||
evas_object_hide(wd->second->base.view);
|
||||
|
|
|
@ -807,7 +807,7 @@ _mkup_to_text(const char *mkup)
|
|||
s = p;
|
||||
for (;;)
|
||||
{
|
||||
if ((*p == 0) ||
|
||||
if ((!*p) ||
|
||||
(tag_end) || (esc_end) ||
|
||||
(tag_start) || (esc_start))
|
||||
{
|
||||
|
@ -851,7 +851,7 @@ _mkup_to_text(const char *mkup)
|
|||
}
|
||||
esc_start = esc_end = NULL;
|
||||
}
|
||||
else if ((*p == 0) && (s))
|
||||
else if ((!*p) && (s))
|
||||
{
|
||||
ts = malloc(p - s + 1);
|
||||
if (ts)
|
||||
|
|
|
@ -122,7 +122,7 @@ _del_hook(Evas_Object *obj)
|
|||
if (!wd)
|
||||
return;
|
||||
|
||||
if (wd->walking != 0)
|
||||
if (wd->walking)
|
||||
ERR("flippicker deleted while walking.\n");
|
||||
|
||||
EINA_LIST_FREE(wd->items, item)
|
||||
|
|
|
@ -1044,12 +1044,12 @@ call:
|
|||
evas_object_smart_callback_call(item->wd->self, "selected", item);
|
||||
item->walking--;
|
||||
item->wd->walking--;
|
||||
if ((item->wd->clear_me) && (item->wd->walking == 0))
|
||||
if ((item->wd->clear_me) && (!item->wd->walking))
|
||||
elm_gengrid_clear(item->base.widget);
|
||||
else
|
||||
{
|
||||
if ((item->walking == 0) && (item->delete_me))
|
||||
if (item->relcount == 0) _item_del(item);
|
||||
if ((!item->walking) && (item->delete_me))
|
||||
if (!item->relcount) _item_del(item);
|
||||
}
|
||||
item->wd->last_selected_item = item;
|
||||
}
|
||||
|
|
|
@ -788,13 +788,13 @@ _item_select(Elm_Genlist_Item *it)
|
|||
evas_object_smart_callback_call(it->base.widget, "selected", it);
|
||||
it->walking--;
|
||||
it->wd->walking--;
|
||||
if ((it->wd->clear_me) && (it->wd->walking == 0))
|
||||
if ((it->wd->clear_me) && (!it->wd->walking))
|
||||
elm_genlist_clear(it->base.widget);
|
||||
else
|
||||
{
|
||||
if ((it->walking == 0) && (it->delete_me))
|
||||
if ((!it->walking) && (it->delete_me))
|
||||
{
|
||||
if (it->relcount == 0) _item_del(it);
|
||||
if (!it->relcount) _item_del(it);
|
||||
}
|
||||
}
|
||||
it->wd->last_selected_item = it;
|
||||
|
@ -1257,7 +1257,7 @@ _item_realize(Elm_Genlist_Item *it, int in, int calc)
|
|||
it->h = it->minh = mh;
|
||||
it->mincalcd = EINA_TRUE;
|
||||
|
||||
if ((in == 0) && (it->wd->homogeneous))
|
||||
if ((!in) && (it->wd->homogeneous))
|
||||
{
|
||||
it->wd->item_width = mw;
|
||||
it->wd->item_height = mh;
|
||||
|
@ -2027,7 +2027,7 @@ newblock:
|
|||
if (it->rel)
|
||||
{
|
||||
it->rel->relcount--;
|
||||
if ((it->rel->delete_me) && (it->rel->relcount == 0))
|
||||
if ((it->rel->delete_me) && (!it->rel->relcount))
|
||||
_item_del(it->rel);
|
||||
it->rel = NULL;
|
||||
}
|
||||
|
|
|
@ -332,7 +332,7 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
|
|||
dist = x;
|
||||
}
|
||||
}
|
||||
if ((i == 0) && (wd->level == 0))
|
||||
if ((!i) && (!wd->level))
|
||||
edje_object_part_drag_value_set(wd->base, "elm.dragable.index.1",
|
||||
cdv, cdv);
|
||||
if (it_closest) it_closest->selected = 1;
|
||||
|
@ -455,7 +455,7 @@ _mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *eve
|
|||
{
|
||||
if (adx > minw)
|
||||
{
|
||||
if (wd->level == 0)
|
||||
if (!wd->level)
|
||||
{
|
||||
wd->level = 1;
|
||||
snprintf(buf, sizeof(buf), "elm,state,level,%i", wd->level);
|
||||
|
|
|
@ -174,7 +174,7 @@ _get_value_in_key_string(const char *oldstring, const char *key, char **value)
|
|||
if (!endtag) break;
|
||||
}
|
||||
|
||||
if ((foundflag != 0) && (*starttag == '<') && (*endtag == '>'))
|
||||
if ((foundflag) && (*starttag == '<') && (*endtag == '>'))
|
||||
foundflag = 1;
|
||||
else
|
||||
foundflag = 0;
|
||||
|
@ -347,7 +347,7 @@ _ellipsis_label_to_width(Evas_Object *obj)
|
|||
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)
|
||||
if (!_get_value_in_key_string(wd->label, "font_size", &kvalue))
|
||||
{
|
||||
if (kvalue) cur_fontsize = atoi((char *)kvalue);
|
||||
}
|
||||
|
@ -588,10 +588,10 @@ elm_label_fontsize_set(Evas_Object *obj, int fontsize)
|
|||
if (len <= 0) return;
|
||||
sprintf(fontvalue, "%i", fontsize);
|
||||
|
||||
if (_stringshare_key_value_replace(&wd->label, "font_size", fontvalue, 0) == 0)
|
||||
if (!_stringshare_key_value_replace(&wd->label, "font_size", fontvalue, 0))
|
||||
edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
|
||||
|
||||
if (fontsize == 0) // remove fontsize tag
|
||||
if (!fontsize) // remove fontsize tag
|
||||
_stringshare_key_value_replace(&wd->label, "font_size", fontvalue, 1);
|
||||
|
||||
wd->changed = 1;
|
||||
|
@ -623,7 +623,7 @@ elm_label_text_align_set(Evas_Object *obj, const char *alignmode)
|
|||
len = strlen(wd->label);
|
||||
if (len <= 0) return;
|
||||
|
||||
if (_stringshare_key_value_replace(&wd->label, "align", alignmode, 0) == 0)
|
||||
if (!_stringshare_key_value_replace(&wd->label, "align", alignmode, 0))
|
||||
edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
|
||||
|
||||
wd->changed = 1;
|
||||
|
@ -659,7 +659,7 @@ elm_label_text_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsig
|
|||
if (len <= 0) return;
|
||||
sprintf(colorstring, "#%02x%02x%02x%02x", r, g, b, a);
|
||||
|
||||
if (_stringshare_key_value_replace(&wd->label, "color", colorstring, 0) == 0)
|
||||
if (!_stringshare_key_value_replace(&wd->label, "color", colorstring, 0))
|
||||
{
|
||||
edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
|
||||
wd->changed = 1;
|
||||
|
|
|
@ -175,7 +175,7 @@ _parts_cursors_find(Widget_Data *wd, const char *part)
|
|||
Part_Cursor *pc;
|
||||
EINA_LIST_FOREACH(wd->parts_cursors, l, pc)
|
||||
{
|
||||
if (strcmp(pc->part, part) == 0)
|
||||
if (!strcmp(pc->part, part))
|
||||
return pc;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -936,7 +936,7 @@ elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name)
|
|||
|
||||
EINA_LIST_FOREACH(wd->parts_cursors, l, pc)
|
||||
{
|
||||
if (strcmp(part_name, pc->part) == 0)
|
||||
if (!strcmp(part_name, pc->part))
|
||||
{
|
||||
if (pc->obj) elm_object_cursor_unset(pc->obj);
|
||||
_part_cursor_free(pc);
|
||||
|
|
|
@ -351,7 +351,7 @@ _del_hook(Evas_Object *obj)
|
|||
Eina_List *n;
|
||||
|
||||
if (!wd) return;
|
||||
if (wd->walking != 0)
|
||||
if (wd->walking)
|
||||
ERR("ERROR: list deleted while walking.\n");
|
||||
|
||||
_elm_list_walk(wd);
|
||||
|
|
|
@ -238,7 +238,7 @@ _icon_animation(void *data)
|
|||
"elm.swallow.icon", new_position, 0.5);
|
||||
if (flag_finish_animation)
|
||||
{
|
||||
if ((wd->final_position == 0) &&
|
||||
if ((!wd->final_position) &&
|
||||
(wd->enabled_position & ELM_MAGNETSLIDER_LEFT))
|
||||
evas_object_smart_callback_call(data, SIG_SELECTED,
|
||||
(void *)wd->text_left);
|
||||
|
|
|
@ -367,7 +367,7 @@ EAPI void
|
|||
elm_need_e_dbus(void)
|
||||
{
|
||||
#ifdef ELM_EDBUS
|
||||
if (_elm_need_e_dbus ++ != 0) return;
|
||||
if (_elm_need_e_dbus++) return;
|
||||
e_dbus_init();
|
||||
e_hal_init();
|
||||
#endif
|
||||
|
@ -377,7 +377,7 @@ static void
|
|||
_elm_unneed_e_dbus(void)
|
||||
{
|
||||
#ifdef ELM_EDBUS
|
||||
if (-- _elm_need_e_dbus != 0) return;
|
||||
if (--_elm_need_e_dbus) return;
|
||||
|
||||
_elm_need_e_dbus = 0;
|
||||
e_hal_shutdown();
|
||||
|
@ -392,7 +392,7 @@ EAPI void
|
|||
elm_need_efreet(void)
|
||||
{
|
||||
#ifdef ELM_EFREET
|
||||
if (_elm_need_efreet ++ != 0) return;
|
||||
if (_elm_need_efreet++) return;
|
||||
efreet_init();
|
||||
efreet_mime_init();
|
||||
efreet_trash_init();
|
||||
|
@ -417,7 +417,7 @@ static void
|
|||
_elm_unneed_efreet(void)
|
||||
{
|
||||
#ifdef ELM_EFREET
|
||||
if (-- _elm_need_efreet != 0) return;
|
||||
if (--_elm_need_efreet) return;
|
||||
|
||||
_elm_need_efreet = 0;
|
||||
efreet_trash_shutdown();
|
||||
|
@ -452,7 +452,7 @@ elm_quicklaunch_init(int argc, char **argv)
|
|||
ecore_app_args_set(argc, (const char **)argv);
|
||||
|
||||
memset(_elm_policies, 0, sizeof(_elm_policies));
|
||||
if (ELM_EVENT_POLICY_CHANGED == 0)
|
||||
if (!ELM_EVENT_POLICY_CHANGED)
|
||||
ELM_EVENT_POLICY_CHANGED = ecore_event_type_new();
|
||||
|
||||
ecore_file_init();
|
||||
|
@ -709,7 +709,7 @@ elm_quicklaunch_prepare(int argc __UNUSED__, char **argv)
|
|||
strcat(p, "../lib/");
|
||||
strcat(p, exename);
|
||||
strcat(p, ".so");
|
||||
if (access(exe2, R_OK | X_OK) == 0)
|
||||
if (!access(exe2, R_OK | X_OK))
|
||||
{
|
||||
free(exe);
|
||||
exe = exe2;
|
||||
|
@ -908,7 +908,7 @@ elm_quicklaunch_exe_path_get(const char *exe)
|
|||
pp = p;
|
||||
for (;;)
|
||||
{
|
||||
if ((*p == ':') || (*p == 0))
|
||||
if ((*p == ':') || (!*p))
|
||||
{
|
||||
int len;
|
||||
|
||||
|
@ -916,13 +916,13 @@ elm_quicklaunch_exe_path_get(const char *exe)
|
|||
strncpy(buf2, pp, len);
|
||||
buf2[len] = 0;
|
||||
pathlist = eina_list_append(pathlist, eina_stringshare_add(buf2));
|
||||
if (*p == 0) break;
|
||||
if (!*p) break;
|
||||
p++;
|
||||
pp = p;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*p == 0) break;
|
||||
if (!*p) break;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
@ -930,7 +930,7 @@ elm_quicklaunch_exe_path_get(const char *exe)
|
|||
EINA_LIST_FOREACH(pathlist, l, pathitr)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/%s", pathitr, exe);
|
||||
if (access(buf, R_OK | X_OK) == 0) return strdup(buf);
|
||||
if (!access(buf, R_OK | X_OK)) return strdup(buf);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -564,7 +564,7 @@ grid_clear(Evas_Object *obj, Grid *g)
|
|||
{
|
||||
gi->want = EINA_FALSE;
|
||||
wd->preload_num--;
|
||||
if (wd->preload_num == 0)
|
||||
if (!wd->preload_num)
|
||||
{
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
|
||||
"elm,state,busy,stop", "elm");
|
||||
|
@ -607,7 +607,7 @@ _tile_update(Grid_Item *gi)
|
|||
|
||||
gi->have = EINA_TRUE;
|
||||
gi->wd->preload_num--;
|
||||
if (gi->wd->preload_num == 0)
|
||||
if (!gi->wd->preload_num)
|
||||
{
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(gi->wd->scr),
|
||||
"elm,state,busy,stop", "elm");
|
||||
|
@ -718,7 +718,7 @@ grid_load(Evas_Object *obj, Grid *g)
|
|||
if (gi->want)
|
||||
{
|
||||
wd->preload_num--;
|
||||
if (wd->preload_num == 0)
|
||||
if (!wd->preload_num)
|
||||
{
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
|
||||
"elm,state,busy,stop", "elm");
|
||||
|
@ -888,7 +888,7 @@ _smooth_update(Evas_Object *obj)
|
|||
EINA_ITERATOR_FOREACH(it, cell)
|
||||
{
|
||||
Grid_Item *gi = eina_matrixsparse_cell_data_get(cell);
|
||||
evas_object_image_smooth_scale_set(gi->img, (wd->nosmooth == 0));
|
||||
evas_object_image_smooth_scale_set(gi->img, (!wd->nosmooth));
|
||||
}
|
||||
eina_iterator_free(it);
|
||||
}
|
||||
|
@ -918,7 +918,7 @@ _scr_timeout(void *data)
|
|||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
if (!wd) return ECORE_CALLBACK_CANCEL;
|
||||
wd->nosmooth--;
|
||||
if (wd->nosmooth == 0) _smooth_update(data);
|
||||
if (!wd->nosmooth) _smooth_update(data);
|
||||
wd->scr_timer = NULL;
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
@ -1005,7 +1005,7 @@ _zoom_anim(void *data)
|
|||
if (!go)
|
||||
{
|
||||
wd->nosmooth--;
|
||||
if (wd->nosmooth == 0) _smooth_update(data);
|
||||
if (!wd->nosmooth) _smooth_update(data);
|
||||
wd->zoom_animator = NULL;
|
||||
evas_object_smart_callback_call(obj, SIG_ZOOM_STOP, NULL);
|
||||
}
|
||||
|
@ -2064,7 +2064,7 @@ elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat)
|
|||
if (wd->zoom_animator)
|
||||
{
|
||||
wd->nosmooth--;
|
||||
if (wd->nosmooth == 0) _smooth_update(obj);
|
||||
if (!wd->nosmooth) _smooth_update(obj);
|
||||
ecore_animator_del(wd->zoom_animator);
|
||||
wd->zoom_animator = NULL;
|
||||
zoom_do(obj, 1.0);
|
||||
|
@ -2492,7 +2492,7 @@ elm_map_marker_remove(Elm_Map_Marker *marker)
|
|||
for (i = 0; i <= ZOOM_MAX; i++)
|
||||
{
|
||||
marker->groups[i]->markers = eina_list_remove(marker->groups[i]->markers, marker);
|
||||
if (eina_list_count(marker->groups[i]->markers) == 0)
|
||||
if (!eina_list_count(marker->groups[i]->markers))
|
||||
{
|
||||
groups = eina_matrixsparse_cell_data_get(marker->groups[i]->cell);
|
||||
groups = eina_list_remove(groups, marker->groups[i]);
|
||||
|
|
|
@ -60,7 +60,7 @@ _elm_module_parse(const char *s)
|
|||
pe = p;
|
||||
for (;;)
|
||||
{
|
||||
if ((*pe == ':') || (*pe == 0))
|
||||
if ((*pe == ':') || (!*pe))
|
||||
{ // p -> pe == 'name:'
|
||||
if (pe > p)
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ _elm_module_parse(const char *s)
|
|||
free(n);
|
||||
}
|
||||
}
|
||||
if (*pe == 0) break;
|
||||
if (!*pe) break;
|
||||
p = pe + 1;
|
||||
pe = p;
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ grid_clear(Evas_Object *obj, Grid *g)
|
|||
if (g->grid[tn].want)
|
||||
{
|
||||
wd->preload_num--;
|
||||
if (wd->preload_num == 0)
|
||||
if (!wd->preload_num)
|
||||
{
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
|
||||
"elm,state,busy,stop", "elm");
|
||||
|
@ -270,7 +270,7 @@ _tile_preloaded(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void
|
|||
evas_object_show(git->img);
|
||||
git->have = 1;
|
||||
git->wd->preload_num--;
|
||||
if (git->wd->preload_num == 0)
|
||||
if (!git->wd->preload_num)
|
||||
{
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(git->wd->scr),
|
||||
"elm,state,busy,stop", "elm");
|
||||
|
@ -420,7 +420,7 @@ grid_load(Evas_Object *obj, Grid *g)
|
|||
else if ((g->grid[tn].want) && (!visible))
|
||||
{
|
||||
wd->preload_num--;
|
||||
if (wd->preload_num == 0)
|
||||
if (!wd->preload_num)
|
||||
{
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
|
||||
"elm,state,busy,stop", "elm");
|
||||
|
@ -472,11 +472,11 @@ _smooth_update(Evas_Object *obj)
|
|||
int tn;
|
||||
|
||||
tn = (y * g->gw) + x;
|
||||
evas_object_image_smooth_scale_set(g->grid[tn].img, (wd->nosmooth == 0));
|
||||
evas_object_image_smooth_scale_set(g->grid[tn].img, (!wd->nosmooth));
|
||||
}
|
||||
}
|
||||
}
|
||||
evas_object_image_smooth_scale_set(wd->img, (wd->nosmooth == 0));
|
||||
evas_object_image_smooth_scale_set(wd->img, (!wd->nosmooth));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -502,7 +502,7 @@ _scr_timeout(void *data)
|
|||
Widget_Data *wd = elm_widget_data_get(data);
|
||||
if (!wd) return ECORE_CALLBACK_CANCEL;
|
||||
wd->nosmooth--;
|
||||
if (wd->nosmooth == 0) _smooth_update(data);
|
||||
if (!wd->nosmooth) _smooth_update(data);
|
||||
wd->scr_timer = NULL;
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ _main_preloaded(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void
|
|||
wd->calc_job = ecore_job_add(_calc_job, wd);
|
||||
evas_object_smart_callback_call(data, "loaded", NULL);
|
||||
wd->preload_num--;
|
||||
if (wd->preload_num == 0)
|
||||
if (!wd->preload_num)
|
||||
{
|
||||
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
|
||||
"elm,state,busy,stop", "elm");
|
||||
|
@ -613,7 +613,7 @@ _zoom_anim(void *data)
|
|||
if (!go)
|
||||
{
|
||||
wd->nosmooth--;
|
||||
if (wd->nosmooth == 0) _smooth_update(data);
|
||||
if (!wd->nosmooth) _smooth_update(data);
|
||||
wd->zoom_animator = NULL;
|
||||
evas_object_smart_callback_call(obj, "zoom,stop", NULL);
|
||||
}
|
||||
|
@ -1564,7 +1564,7 @@ elm_photocam_image_region_bring_in(Evas_Object *obj, int x, int y, int w, int h
|
|||
if (wd->zoom_animator)
|
||||
{
|
||||
wd->nosmooth--;
|
||||
if (wd->nosmooth == 0) _smooth_update(obj);
|
||||
if (!wd->nosmooth) _smooth_update(obj);
|
||||
ecore_animator_del(wd->zoom_animator);
|
||||
wd->zoom_animator = NULL;
|
||||
zoom_do(obj, 1.0);
|
||||
|
|
|
@ -190,7 +190,7 @@ _elm_theme_parse(Elm_Theme *th, const char *theme)
|
|||
pe = p;
|
||||
for (;;)
|
||||
{
|
||||
if ((*pe == ':') || (*pe == 0))
|
||||
if ((*pe == ':') || (!*pe))
|
||||
{ // p -> pe == 'name:'
|
||||
if (pe > p)
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ _elm_theme_parse(Elm_Theme *th, const char *theme)
|
|||
free(n);
|
||||
}
|
||||
}
|
||||
if (*pe == 0) break;
|
||||
if (!*pe) break;
|
||||
p = pe + 1;
|
||||
pe = p;
|
||||
}
|
||||
|
|
|
@ -369,7 +369,7 @@ void
|
|||
_elm_unneed_ethumb(void)
|
||||
{
|
||||
#ifdef ELM_ETHUMB
|
||||
if (-- _elm_need_ethumb != 0) return;
|
||||
if (--_elm_need_ethumb) return;
|
||||
|
||||
ethumb_client_disconnect(_elm_ethumb_client);
|
||||
_elm_ethumb_client = NULL;
|
||||
|
@ -396,7 +396,7 @@ EAPI void
|
|||
elm_need_ethumb(void)
|
||||
{
|
||||
#ifdef ELM_ETHUMB
|
||||
if (_elm_need_ethumb ++ != 0) return;
|
||||
if (_elm_need_ethumb++) return;
|
||||
ELM_ECORE_EVENT_ETHUMB_CONNECT = ecore_event_type_new();
|
||||
ethumb_client_init();
|
||||
_elm_ethumb_client = ethumb_client_connect(_connect_cb, NULL, NULL);
|
||||
|
|
|
@ -1645,7 +1645,7 @@ elm_widget_scroll_hold_pop(Evas_Object *obj)
|
|||
API_ENTRY return;
|
||||
sd->scroll_hold--;
|
||||
if (sd->scroll_hold < 0) sd->scroll_hold = 0;
|
||||
if (sd->scroll_hold == 0)
|
||||
if (!sd->scroll_hold)
|
||||
evas_object_smart_callback_call(obj, "scroll-hold-off", obj);
|
||||
if (sd->parent_obj) elm_widget_scroll_hold_pop(sd->parent_obj);
|
||||
}
|
||||
|
@ -1674,7 +1674,7 @@ elm_widget_scroll_freeze_pop(Evas_Object *obj)
|
|||
API_ENTRY return;
|
||||
sd->scroll_freeze--;
|
||||
if (sd->scroll_freeze < 0) sd->scroll_freeze = 0;
|
||||
if (sd->scroll_freeze == 0)
|
||||
if (!sd->scroll_freeze)
|
||||
evas_object_smart_callback_call(obj, "scroll-freeze-off", obj);
|
||||
if (sd->parent_obj) elm_widget_scroll_freeze_pop(sd->parent_obj);
|
||||
}
|
||||
|
@ -1863,10 +1863,10 @@ elm_widget_type_check(const Evas_Object *obj, const char *type)
|
|||
provided = elm_widget_type_get(obj);
|
||||
if (EINA_LIKELY(provided == type)) return EINA_TRUE;
|
||||
if (type) expected = type;
|
||||
if ((!provided) || (provided[0] == 0))
|
||||
if ((!provided) || (!provided[0]))
|
||||
{
|
||||
provided = evas_object_type_get(obj);
|
||||
if ((!provided) || (provided[0] == 0))
|
||||
if ((!provided) || (!provided[0]))
|
||||
provided = "(unknown)";
|
||||
}
|
||||
ERR("Passing Object: %p, of type: '%s' when expecting type: '%s'", obj, provided, expected);
|
||||
|
@ -1895,7 +1895,7 @@ elm_widget_stringlist_get(const char *str)
|
|||
if (!str) return NULL;
|
||||
for (b = s = str; 1; s++)
|
||||
{
|
||||
if ((*s == ' ') || (*s == 0))
|
||||
if ((*s == ' ') || (!*s))
|
||||
{
|
||||
char *t = malloc(s - b + 1);
|
||||
if (t)
|
||||
|
@ -1907,7 +1907,7 @@ elm_widget_stringlist_get(const char *str)
|
|||
}
|
||||
b = s + 1;
|
||||
}
|
||||
if (*s == 0) break;
|
||||
if (!*s) break;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -1060,7 +1060,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
|
|||
evas_font_cache_set(win->evas, (_elm_config->font_cache * 1024));
|
||||
EINA_LIST_FOREACH(_elm_config->font_dirs, l, fontpath)
|
||||
evas_font_path_append(win->evas, fontpath);
|
||||
if (_elm_config->font_hinting == 0)
|
||||
if (!_elm_config->font_hinting)
|
||||
evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_NONE);
|
||||
else if (_elm_config->font_hinting == 1)
|
||||
evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_AUTO);
|
||||
|
|
|
@ -86,7 +86,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, int horizontal, int
|
|||
if (wy > 0.0) expand++;
|
||||
}
|
||||
}
|
||||
if (expand == 0)
|
||||
if (!expand)
|
||||
{
|
||||
evas_object_size_hint_align_get(o, &ax, &ay);
|
||||
if (horizontal)
|
||||
|
|
|
@ -419,8 +419,8 @@ _smart_scrollto_y(Smart_Data *sd, double t_in, Evas_Coord pos_y)
|
|||
static Eina_Bool
|
||||
_smart_do_page(Smart_Data *sd)
|
||||
{
|
||||
if ((sd->pagerel_h == 0.0) && (sd->pagesize_h == 0) &&
|
||||
(sd->pagerel_v == 0.0) && (sd->pagesize_v == 0))
|
||||
if ((sd->pagerel_h == 0.0) && (!sd->pagesize_h) &&
|
||||
(sd->pagerel_v == 0.0) && (!sd->pagesize_v))
|
||||
return EINA_FALSE;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -797,14 +797,14 @@ elm_smart_scroller_child_pos_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
|||
}
|
||||
if ((x != px)/* && (!sd->bouncemex)*/)
|
||||
{
|
||||
if (x == 0)
|
||||
if (!x)
|
||||
evas_object_smart_callback_call(obj, "edge,left", NULL);
|
||||
if (x == mx)
|
||||
evas_object_smart_callback_call(obj, "edge,right", NULL);
|
||||
}
|
||||
if ((y != py)/* && (!sd->bouncemey)*/)
|
||||
{
|
||||
if (y == 0)
|
||||
if (!y)
|
||||
evas_object_smart_callback_call(obj, "edge,top", NULL);
|
||||
if (y == my)
|
||||
evas_object_smart_callback_call(obj, "edge,bottom", NULL);
|
||||
|
@ -1311,7 +1311,7 @@ _smart_event_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
|
|||
sd->down.bounce_y_animator = NULL;
|
||||
sd->bouncemey = 0;
|
||||
}
|
||||
if (ev->direction == 0)
|
||||
if (!ev->direction)
|
||||
y += ev->z * sd->step.y;
|
||||
else if (ev->direction == 1)
|
||||
x += ev->z * sd->step.x;
|
||||
|
@ -1961,7 +1961,7 @@ _smart_scrollbar_reset(Smart_Data *sd)
|
|||
}
|
||||
sd->pan_func.get(sd->pan_obj, &px, &py);
|
||||
sd->pan_func.set(sd->pan_obj, 0, 0);
|
||||
if ((px != 0) || (py != 0))
|
||||
if ((px) || (py))
|
||||
edje_object_signal_emit(sd->edje_obj, "elm,action,scroll", "elm");
|
||||
}
|
||||
|
||||
|
@ -2178,7 +2178,7 @@ _smart_scrollbar_size_adjust(Smart_Data *sd)
|
|||
edje_object_part_drag_size_set(sd->edje_obj, "elm.dragable.hbar", 1.0, 1.0);
|
||||
sd->pan_func.get(sd->pan_obj, &px, &py);
|
||||
sd->pan_func.set(sd->pan_obj, 0, 0);
|
||||
if ((px != 0) || (py != 0))
|
||||
if ((px) || (py))
|
||||
edje_object_signal_emit(sd->edje_obj, "elm,action,scroll", "elm");
|
||||
}
|
||||
_smart_scrollbar_bar_visibility_adjust(sd);
|
||||
|
|
Loading…
Reference in New Issue