elm: Fixed formatting. Added a space after 'if/while/for'

SVN revision: 69744
This commit is contained in:
Daniel Juyung Seo 2012-03-29 11:09:45 +00:00
parent 4801d7f5c1
commit 8c17d99712
33 changed files with 64 additions and 64 deletions

View File

@ -39,7 +39,7 @@ static void
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
if(!eina_list_count(items))
if (!eina_list_count(items))
return;
/* use elm_box_children_get() to get list of children */
@ -51,7 +51,7 @@ set_api_state(api_data *api)
break;
case BOX_PACK_BEFORE:
if(eina_list_count(items) > 1)
if (eina_list_count(items) > 1)
{ /* Put last item before the one preceeding it */
elm_box_unpack(api->box, eina_list_data_get(eina_list_last(items)));
elm_box_pack_before(api->box,
@ -61,7 +61,7 @@ set_api_state(api_data *api)
break;
case BOX_PACK_AFTER:
if(eina_list_count(items) > 1)
if (eina_list_count(items) > 1)
{ /* Put item before last to last */
elm_box_unpack(api->box, eina_list_nth(items,
eina_list_count(items)-2));

View File

@ -32,7 +32,7 @@ static void
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
if(!eina_list_count(items))
if (!eina_list_count(items))
return;
switch(api->state)

View File

@ -26,7 +26,7 @@ set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
static Elm_Calendar_Mark *m = NULL;
if(!eina_list_count(items))
if (!eina_list_count(items))
return;
switch(api->state)

View File

@ -29,7 +29,7 @@ set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
Evas_Object *ck = eina_list_nth(items, 0);
if(!eina_list_count(items))
if (!eina_list_count(items))
return;
/* use elm_box_children_get() to get list of children */

View File

@ -36,7 +36,7 @@ static void
set_api_state(api_data *api)
{
const Eina_List *disks = elm_box_children_get(api->box);
if(!eina_list_count(disks))
if (!eina_list_count(disks))
return;
switch(api->state)

View File

@ -1743,7 +1743,7 @@ item_provider(void *images __UNUSED__, Evas_Object *en, const char *item)
Evas_Object *o = NULL;;
char buf[1024];
if(!strcmp(item, "itemprovider"))
if (!strcmp(item, "itemprovider"))
{
snprintf(buf, sizeof(buf), "%s/images/icon_00.png",
elm_app_data_dir_get());
@ -1760,7 +1760,7 @@ prepend_item_provider(void *images __UNUSED__, Evas_Object *en, const char *item
Evas_Object *o = NULL;;
char buf[1024];
if(!strcmp(item, "itemprovider"))
if (!strcmp(item, "itemprovider"))
{
snprintf(buf, sizeof(buf), "%s/images/icon_10.png",
elm_app_data_dir_get());

View File

@ -24,7 +24,7 @@ static void
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
if(!eina_list_count(items))
if (!eina_list_count(items))
return;
/* Get first item of list of vbox children */

View File

@ -24,7 +24,7 @@ static void
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
if(!eina_list_count(items))
if (!eina_list_count(items))
return;
/* Get first item of list of vbox children */

View File

@ -412,7 +412,7 @@ cursor_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
for ((item = elm_gengrid_first_item_get(grid)); item;
(item = elm_gengrid_item_next_get(item)))
{
if(!elm_check_state_get(obj))
if (!elm_check_state_get(obj))
{
elm_gengrid_item_cursor_unset(item);
continue;

View File

@ -30,7 +30,7 @@ static void
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
if(!eina_list_count(items))
if (!eina_list_count(items))
return;
Evas_Object *gl = eina_list_nth(items, 0); /* Genlist is the first item */

View File

@ -27,7 +27,7 @@ static void
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
if(!eina_list_count(items))
if (!eina_list_count(items))
return;
/* use elm_box_children_get() to get list of children */

View File

@ -68,7 +68,7 @@ set_api_state(api_data *api)
case INDEX_ITEM_FIND:
{
Elm_Object_Item *i = elm_index_item_find(d->id, d->item);
if(i)
if (i)
{
printf("Item Find - Found Item.\n");
elm_object_item_del(i);

View File

@ -79,7 +79,7 @@ Scroll to end
case ITEM_INSERT_BEFORE: /* 1 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_list_item_insert_before(li,
eina_list_nth(items, eina_list_count(items)-1),
@ -93,7 +93,7 @@ Scroll to end
case ITEM_INSERT_AFTER: /* 2 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_list_item_insert_after(li,
eina_list_nth(items, eina_list_count(items)-2),
@ -107,7 +107,7 @@ Scroll to end
case ITEM_SEPARATOR_SET: /* 3 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_list_item_separator_set(eina_list_nth(items, eina_list_count(items)-3), EINA_TRUE);
elm_list_item_bring_in(eina_list_nth(items, eina_list_count(items)-3));
@ -119,7 +119,7 @@ Scroll to end
case LIST_ITEM_DEL: /* 4 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_object_item_del(eina_list_data_get(eina_list_last(items)));
}
@ -138,7 +138,7 @@ Scroll to end
case TOOLTIP_TEXT_SET: /* 7 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_object_item_tooltip_text_set(eina_list_data_get(eina_list_last(items)), "Tooltip set from API");
}
@ -149,7 +149,7 @@ Scroll to end
case TOOLTIP_UNSET: /* 8 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_object_item_tooltip_unset(eina_list_data_get(eina_list_last(items)));
}
@ -159,7 +159,7 @@ Scroll to end
case ITEM_CURSOR_SET: /* 9 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_object_item_cursor_set(eina_list_data_get(eina_list_last(items)), ELM_CURSOR_HAND2);
}
@ -169,7 +169,7 @@ Scroll to end
case ITEM_CURSOR_STYLE_SET: /* 10 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_object_item_cursor_style_set(eina_list_data_get(eina_list_last(items)), "transparent");
}
@ -179,7 +179,7 @@ Scroll to end
case DISABLED_SET: /* 11 */
{
const Eina_List *items = elm_list_items_get(li);
if(eina_list_count(items))
if (eina_list_count(items))
{
elm_object_item_disabled_set(eina_list_data_get(eina_list_last(items)), EINA_TRUE);
}

View File

@ -42,11 +42,11 @@ external_signal(void *data __UNUSED__, Evas_Object *obj, const char *sig, const
char *p = _signal;
Evas_Object *content;
while((*p!='\0') && (*p!=']'))
while ((*p!='\0') && (*p!=']'))
p++;
if((*p=='\0') || (*(p+1)!=':'))
if ((*p=='\0') || (*(p+1)!=':'))
{
ERR("Invalid External Signal received: '%s' '%s'\n", sig, source);
free(_signal);
@ -67,7 +67,7 @@ external_signal(void *data __UNUSED__, Evas_Object *obj, const char *sig, const
content = type->content_get(type->data, obj, _signal);
free(_signal);
if(content)
if (content)
edje_object_signal_emit(content, sig + (p - _signal), source);
}

View File

@ -129,7 +129,7 @@ external_calendar_params_parse(void *data __UNUSED__,
if (!strcmp(param->name, "year_min"))
mem->year_min = param->i;
else if(!strcmp(param->name, "year_max"))
else if (!strcmp(param->name, "year_max"))
mem->year_max = param->i;
else if (!strcmp(param->name, "sel_enable"))

View File

@ -122,7 +122,7 @@ external_entry_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ext
}
else if (!strcmp(param->name, "single line"))
{
if(param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
{
elm_entry_single_line_set(obj, param->i);
return EINA_TRUE;
@ -130,7 +130,7 @@ external_entry_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ext
}
else if (!strcmp(param->name, "password"))
{
if(param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
{
elm_entry_password_set(obj, param->i);
return EINA_TRUE;

View File

@ -129,7 +129,7 @@ external_photocam_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_
return EINA_TRUE;
}
}
else if(!strcmp(param->name, "paused"))
else if (!strcmp(param->name, "paused"))
{
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
{

View File

@ -71,14 +71,14 @@ _print_items(void *data, Evas_Object *obj, void *event_info)
static void
_rm_items(void *data, Evas_Object *obj, void *event_info)
{
if(!elm_hoversel_expanded_get(obj))
if (!elm_hoversel_expanded_get(obj))
elm_hoversel_clear(obj);
}
static void
_sel(void *data, Evas_Object *obj, void *event_info)
{
if(!elm_hoversel_expanded_get(obj) && event_info != data)
if (!elm_hoversel_expanded_get(obj) && event_info != data)
elm_object_item_del(event_info);
}

View File

@ -289,7 +289,7 @@ _content_set_hook(Evas_Object *obj, const char *item, Evas_Object *content)
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd || !content) return;
if (item && !strcmp(item, "default")) return;
if(strcmp(elm_object_widget_type_get(content), "check")) return;
if (strcmp(elm_object_widget_type_get(content), "check")) return;
EINA_LIST_FOREACH(wd->items, l, it)
{

View File

@ -240,7 +240,7 @@ _item_text_set_hook(Elm_Object_Item *it,
if (!part || !strcmp(part, "default"))
snprintf(buf, sizeof(buf), "elm.text.title");
else if(!strcmp("subtitle", part))
else if (!strcmp("subtitle", part))
snprintf(buf, sizeof(buf), "elm.text.subtitle");
else
snprintf(buf, sizeof(buf), "%s", part);
@ -284,7 +284,7 @@ _item_text_get_hook(const Elm_Object_Item *it, const char *part)
if (!part || !strcmp(part, "default"))
snprintf(buf, sizeof(buf), "elm.text.title");
else if(!strcmp("subtitle", part))
else if (!strcmp("subtitle", part))
snprintf(buf, sizeof(buf), "elm.text.subtitle");
else
snprintf(buf, sizeof(buf), "%s", part);
@ -1326,7 +1326,7 @@ elm_naviframe_item_pop_to(Elm_Object_Item *it)
l = wd->stack->last->prev;
while(l)
while (l)
{
if (EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item) ==
((Elm_Naviframe_Item *)it)) break;

View File

@ -168,7 +168,7 @@ _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
if (!part || !strcmp(part, "default"))
_content_set(obj, content);
else if(!strcmp(part, "icon"))
else if (!strcmp(part, "icon"))
_icon_set(obj, content);
}
@ -180,7 +180,7 @@ _content_get_hook(const Evas_Object *obj, const char *part)
if (!wd) return NULL;
if (!part || !strcmp(part, "default"))
return wd->content;
else if(!strcmp(part, "icon"))
else if (!strcmp(part, "icon"))
return wd->icon;
return NULL;
}
@ -193,7 +193,7 @@ _content_unset_hook(Evas_Object *obj, const char *part)
if (!wd) return NULL;
if (!part || !strcmp(part, "default"))
return _content_unset(obj);
else if(!strcmp(part, "icon"))
else if (!strcmp(part, "icon"))
return _icon_unset(obj);
return NULL;
}
@ -353,7 +353,7 @@ elm_bubble_pos_set(Evas_Object *obj, Elm_Bubble_Pos pos)
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if(pos<ELM_BUBBLE_POS_TOP_LEFT || pos>ELM_BUBBLE_POS_BOTTOM_RIGHT) return;
if (pos<ELM_BUBBLE_POS_TOP_LEFT || pos>ELM_BUBBLE_POS_BOTTOM_RIGHT) return;
wd->pos = pos;
_theme_hook(obj);
}

View File

@ -715,7 +715,7 @@ notify_handler_targets(Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notif
if ((j == CNP_ATOM_text_uri) ||
(j == CNP_ATOM_text_urilist))
{
if(!is_uri_type_data(sel, notify)) continue;
if (!is_uri_type_data(sel, notify)) continue;
}
cnp_debug("Atom %s matches\n",atoms[j].name);
goto done;

View File

@ -1189,10 +1189,10 @@ elm_colorselector_palette_item_color_get(const Elm_Object_Item *it, int *r __UNU
item = (Elm_Color_Item *) it;
if (item)
{
if(r) *r = item->color->r;
if(g) *g = item->color->g;
if(b) *b = item->color->b;
if(a) *a = item->color->a;
if (r) *r = item->color->r;
if (g) *g = item->color->g;
if (b) *b = item->color->b;
if (a) *a = item->color->a;
}
}

View File

@ -1234,8 +1234,8 @@ _config_update(void)
#define IFCFG(v) if ((_elm_config->config_version & 0xffff) < (v)) {
#define IFCFGELSE } else {
#define IFCFGEND }
#define COPYVAL(x) do {_elm_config->x = tcfg->x; } while(0)
#define COPYPTR(x) do {_elm_config->x = tcfg->x; tcfg->x = NULL; } while(0)
#define COPYVAL(x) do {_elm_config->x = tcfg->x; } while (0)
#define COPYPTR(x) do {_elm_config->x = tcfg->x; tcfg->x = NULL; } while (0)
#define COPYSTR(x) COPYPTR(x)
/* we also need to update for property changes in the root window

View File

@ -347,7 +347,7 @@ _max_days_get(int year, int month)
localtime_r(&t, &time1);
time1.tm_year = year;
time1.tm_mon = month;
for(day = MIN_DAYS_IN_MONTH; day <= mapping[ELM_DATETIME_DATE].def_max; day++)
for (day = MIN_DAYS_IN_MONTH; day <= mapping[ELM_DATETIME_DATE].def_max; day++)
{
time1.tm_mday = day;
mktime(&time1);

View File

@ -966,7 +966,7 @@ _check_identical_item(Elm_Diskselector_Item *it, Evas_Object *icon)
idx - ic + (2 * ac));
}
if(dit) _item_icon_set(dit, icon);
if (dit) _item_icon_set(dit, icon);
_sizing_eval(wd->self);
}
}

View File

@ -39,7 +39,7 @@
return; \
} \
} \
while(0)
while (0)
typedef struct _Item_Block Item_Block;
typedef struct _Item_Cache Item_Cache;

View File

@ -408,7 +408,7 @@ consume_event(Widget_Data *wd, void *event_info,
{ /* Mark EVAS_EVENT_FLAG_ON_HOLD on events that are used by gesture layer */
/* ev_flags != EVAS_EVENT_FLAG_NONE means target used event and g-layer */
/* should not refeed this event. */
if(!event_info)
if (!event_info)
return; /* This happens when restarting gestures */
if ((ev_flags) || (!wd->repeat_events))
@ -1400,7 +1400,7 @@ static void
_compute_taps_center(Long_Tap_Type *st,
Evas_Coord *x_out, Evas_Coord *y_out, Pointer_Event *pe)
{
if(!eina_list_count(st->touched))
if (!eina_list_count(st->touched))
return;
Eina_List *l;
@ -1524,7 +1524,7 @@ _n_long_tap_test(Evas_Object *obj, Pointer_Event *pe,
case EVAS_CALLBACK_MULTI_MOVE:
case EVAS_CALLBACK_MOUSE_MOVE:
if(st->info.n &&
if (st->info.n &&
((gesture->state == ELM_GESTURE_STATE_START) ||
(gesture->state == ELM_GESTURE_STATE_MOVE)))
{ /* Report MOVE only if STARTED */
@ -2663,7 +2663,7 @@ _zoom_test(Evas_Object *obj, Pointer_Event *pe, void *event_info,
Eina_List *l;
Pointer_Event *p;
if(eina_list_count(wd->touched) > 2)
if (eina_list_count(wd->touched) > 2)
{ /* Process zoom only when 2 fingers on surface */
ev_flag = _set_state(gesture_zoom,
ELM_GESTURE_STATE_ABORT, &st->info, EINA_FALSE);
@ -2888,7 +2888,7 @@ _rotate_test(Evas_Object *obj, Pointer_Event *pe, void *event_info,
Eina_List *l;
Pointer_Event *p;
if(eina_list_count(wd->touched) > 2)
if (eina_list_count(wd->touched) > 2)
{ /* Process rotate only when 2 fingers on surface */
ev_flag = _set_state(gesture,
ELM_GESTURE_STATE_ABORT, &st->info, EINA_FALSE);
@ -3182,10 +3182,10 @@ _event_process(void *data, Evas_Object *obj __UNUSED__,
int i;
Gesture_Info *g;
printf("Gesture | State | is tested\n");
for(i = ELM_GESTURE_N_TAPS; i < ELM_GESTURE_LAST; i++)
for (i = ELM_GESTURE_N_TAPS; i < ELM_GESTURE_LAST; i++)
{
g = wd->gesture[i];
if(g)
if (g)
printf(" %d %d %d\n", i, g->state, g->test);
}
#endif

View File

@ -1078,9 +1078,9 @@ _track_place(Widget_Data *wd)
_region_to_coord_convert(wd, lon_min, lat_max, size, &xmin, &ymin);
_region_to_coord_convert(wd, lon_max, lat_min, size, &xmax, &ymax);
if( !(xmin < px && xmax < px) && !(xmin > px+ow && xmax > px+ow))
if ( !(xmin < px && xmax < px) && !(xmin > px+ow && xmax > px+ow))
{
if( !(ymin < py && ymax < py) && !(ymin > py+oh && ymax > py+oh))
if ( !(ymin < py && ymax < py) && !(ymin > py+oh && ymax > py+oh))
{
//display the route
evas_object_move(route, xmin - px, ymin - py);

View File

@ -272,7 +272,7 @@ _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
if (part && (!strncmp(part, "elm.swallow.", 12))) part += 12;
if (!part || !strcmp(part, "left"))
_content_left_set(obj, content);
else if(!strcmp(part, "right"))
else if (!strcmp(part, "right"))
_content_right_set(obj, content);
}

View File

@ -268,7 +268,7 @@ _del_pre_hook(Evas_Object *obj)
if (!wd) return;
it = ELM_TOOLBAR_ITEM_FROM_INLIST(wd->items);
while(it)
while (it)
{
next = ELM_TOOLBAR_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
_item_del(it);

View File

@ -148,7 +148,7 @@ _remove_obj_from_list(Elm_Transit *transit, Evas_Object *obj)
{
//Remove duplicated objects
//TODO: Need to consider about optimizing here
while(1)
while (1)
{
if (!eina_list_data_find_list(transit->objs, obj))
break;

View File

@ -3392,7 +3392,7 @@ elm_win_socket_listen(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bo
if (!win) return EINA_FALSE;
if (!win->ee) return EINA_FALSE;
if(!ecore_evas_extn_socket_listen(win->ee, svcname, svcnum, svcsys))
if (!ecore_evas_extn_socket_listen(win->ee, svcname, svcnum, svcsys))
return EINA_FALSE;
return EINA_TRUE;