Formatting & Whitespace removal

SVN revision: 40417
This commit is contained in:
Christopher Michael 2009-04-27 15:42:43 +00:00
parent b455d7316a
commit 022e23f4cb
1 changed files with 196 additions and 190 deletions

View File

@ -99,7 +99,6 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i
es = E_OBJECT_ALLOC(E_Shelf, E_SHELF_TYPE, _e_shelf_free);
if (!es) return NULL;
es->id = id;
es->x = 0;
es->y = 0;
es->w = 32;
@ -180,8 +179,10 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i
e_gadcon_shelf_set(es->gadcon, es);
if (popup)
{
if (!winid_shelves) winid_shelves = eina_hash_string_superfast_new(NULL);
eina_hash_add(winid_shelves, e_util_winid_str_get(es->popup->evas_win), es);
if (!winid_shelves)
winid_shelves = eina_hash_string_superfast_new(NULL);
eina_hash_add(winid_shelves,
e_util_winid_str_get(es->popup->evas_win), es);
e_drop_xdnd_register_set(es->popup->evas_win, 1);
e_gadcon_xdnd_window_set(es->gadcon, es->popup->evas_win);
e_gadcon_dnd_window_set(es->gadcon, es->popup->evas_win);
@ -305,7 +306,9 @@ e_shelf_toggle(E_Shelf *es, int show)
if (es->instant_delay >= 0.0)
{
_e_shelf_cb_instant_hide_timer(es);
es->hide_timer = ecore_timer_add(es->cfg->hide_timeout, _e_shelf_cb_hide_urgent_timer, es);
es->hide_timer =
ecore_timer_add(es->cfg->hide_timeout,
_e_shelf_cb_hide_urgent_timer, es);
}
else
{
@ -315,10 +318,12 @@ e_shelf_toggle(E_Shelf *es, int show)
es->hide_timer = NULL;
}
if (!es->hide_animator)
es->hide_animator = ecore_animator_add(_e_shelf_cb_hide_animator, es);
es->hide_animator =
ecore_animator_add(_e_shelf_cb_hide_animator, es);
}
}
else if ((!show) && (!es->hidden) && (!es->gadcon->editing) && (es->cfg->autohide))
else if ((!show) && (!es->hidden) && (!es->gadcon->editing) &&
(es->cfg->autohide))
{
edje_object_signal_emit(es->o_base, "e,state,hidden", "e");
if (es->instant_delay >= 0.0)
@ -330,7 +335,9 @@ e_shelf_toggle(E_Shelf *es, int show)
}
es->hidden = 1;
if (!es->instant_timer)
es->instant_timer = ecore_timer_add(es->instant_delay, _e_shelf_cb_instant_hide_timer, es);
es->instant_timer =
ecore_timer_add(es->instant_delay,
_e_shelf_cb_instant_hide_timer, es);
}
else
{
@ -341,7 +348,9 @@ e_shelf_toggle(E_Shelf *es, int show)
}
es->hidden = 1;
if (es->hide_timer) ecore_timer_del(es->hide_timer);
es->hide_timer = ecore_timer_add(es->cfg->hide_timeout, _e_shelf_cb_hide_animator_timer, es);
es->hide_timer =
ecore_timer_add(es->cfg->hide_timeout,
_e_shelf_cb_hide_animator_timer, es);
}
}
}
@ -376,8 +385,7 @@ e_shelf_resize(E_Shelf *es, int w, int h)
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
es->w = w;
es->h = h;
if (es->popup)
e_popup_resize(es->popup, es->w, es->h);
if (es->popup) e_popup_resize(es->popup, es->w, es->h);
evas_object_resize(es->o_event, es->w, es->h);
evas_object_resize(es->o_base, es->w, es->h);
}
@ -471,11 +479,13 @@ EAPI void
e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient)
{
char buf[PATH_MAX];
E_OBJECT_CHECK(es);
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
e_gadcon_orient(es->gadcon, orient);
snprintf(buf, sizeof(buf), "e,state,orientation,%s", _e_shelf_orient_string_get(es));
snprintf(buf, sizeof(buf), "e,state,orientation,%s",
_e_shelf_orient_string_get(es));
edje_object_signal_emit(es->o_base, buf, "e");
edje_object_message_signal_process(es->o_base);
e_zone_useful_geometry_dirty(es->zone);
@ -607,9 +617,7 @@ e_shelf_style_set(E_Shelf *es, const char *style)
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
if (!es->o_base) return;
if (es->style)
eina_stringshare_del(es->style);
if (es->style) eina_stringshare_del(es->style);
es->style = eina_stringshare_add(style);
if (style)
@ -764,7 +772,8 @@ _e_shelf_free(E_Shelf *es)
if (es->popup)
{
e_drop_xdnd_register_set(es->popup->evas_win, 0);
eina_hash_del(winid_shelves, e_util_winid_str_get(es->popup->evas_win), es);
eina_hash_del(winid_shelves,
e_util_winid_str_get(es->popup->evas_win), es);
if (!eina_hash_population(winid_shelves))
{
eina_hash_free(winid_shelves);
@ -1029,7 +1038,8 @@ _e_shelf_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *styl
return NULL;
}
}
snprintf(buf, sizeof(buf), "e,state,orientation,%s", _e_shelf_orient_string_get(es));
snprintf(buf, sizeof(buf), "e,state,orientation,%s",
_e_shelf_orient_string_get(es));
edje_object_signal_emit(es->o_base, buf, "e");
edje_object_message_signal_process(o);
return o;
@ -1040,7 +1050,7 @@ _e_shelf_toggle_border_fix(E_Shelf *es)
{
Eina_List *l;
if (es->cfg->overlap || !e_config->border_fix_on_shelf_toggle)
if ((es->cfg->overlap) || (!e_config->border_fix_on_shelf_toggle))
return;
for (l = e_border_client_list(); l; l = l->next)
@ -1050,12 +1060,10 @@ _e_shelf_toggle_border_fix(E_Shelf *es)
bd = l->data;
if ((bd->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_NONE)
{
if (bd->lock_client_location)
continue;
if (bd->lock_client_location) continue;
if (es->hidden)
{
if (!bd->shelf_fix.modified)
continue;
if (!bd->shelf_fix.modified) continue;
if (!--bd->shelf_fix.modified)
{
e_border_move(bd, bd->shelf_fix.x, bd->shelf_fix.y);
@ -1107,6 +1115,7 @@ _e_shelf_toggle_border_fix(E_Shelf *es)
else
{
E_Maximize max;
max = bd->maximized;
e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
e_border_maximize(bd, max);
@ -1117,7 +1126,9 @@ _e_shelf_toggle_border_fix(E_Shelf *es)
static void
_e_shelf_menu_item_free(void *data)
{
E_Shelf *es = e_object_data_get(data);
E_Shelf *es;
es = e_object_data_get(data);
e_shelf_locked_set(es, 0);
}
@ -1205,8 +1216,7 @@ _e_shelf_cb_menu_contents(void *data, E_Menu *m, E_Menu_Item *mi)
E_Shelf *es;
es = data;
if (!es->gadcon->config_dialog)
e_int_gadcon_config_shelf(es->gadcon);
if (!es->gadcon->config_dialog) e_int_gadcon_config_shelf(es->gadcon);
}
static void
@ -1244,7 +1254,6 @@ _e_shelf_cb_menu_delete(void *data, E_Menu *m, E_Menu_Item *mi)
E_Config_Shelf *cfg;
es = data;
if (e_config->cnfmdlg_disabled)
{
cfg = es->cfg;
@ -1332,47 +1341,59 @@ _e_shelf_cb_mouse_in(void *data, int type, void *event)
switch (es->gadcon->orient)
{
case E_GADCON_ORIENT_LEFT:
if ((ev->edge == E_ZONE_EDGE_LEFT) && (ev->y >= es->y) && (ev->y <= (es->y + es->h)))
if ((ev->edge == E_ZONE_EDGE_LEFT) && (ev->y >= es->y) &&
(ev->y <= (es->y + es->h)))
show = 1;
break;
case E_GADCON_ORIENT_RIGHT:
if ((ev->edge == E_ZONE_EDGE_RIGHT) && (ev->y >= es->y) && (ev->y <= (es->y + es->h)))
if ((ev->edge == E_ZONE_EDGE_RIGHT) && (ev->y >= es->y) &&
(ev->y <= (es->y + es->h)))
show = 1;
break;
case E_GADCON_ORIENT_TOP:
if ((ev->edge == E_ZONE_EDGE_TOP) && (ev->x >= es->x) && (ev->x <= (es->x + es->w)))
if ((ev->edge == E_ZONE_EDGE_TOP) && (ev->x >= es->x) &&
(ev->x <= (es->x + es->w)))
show = 1;
break;
case E_GADCON_ORIENT_BOTTOM:
if ((ev->edge == E_ZONE_EDGE_BOTTOM) && (ev->x >= es->x) && (ev->x <= (es->x + es->w)))
if ((ev->edge == E_ZONE_EDGE_BOTTOM) && (ev->x >= es->x) &&
(ev->x <= (es->x + es->w)))
show = 1;
break;
case E_GADCON_ORIENT_CORNER_TL:
case E_GADCON_ORIENT_CORNER_LT:
if ((ev->edge == E_ZONE_EDGE_TOP) && (ev->x >= es->x) && (ev->x <= (es->x + es->w)))
if ((ev->edge == E_ZONE_EDGE_TOP) && (ev->x >= es->x) &&
(ev->x <= (es->x + es->w)))
show = 1;
else if ((ev->edge == E_ZONE_EDGE_LEFT) && (ev->y >= es->y) && (ev->y <= (es->y + es->h)))
else if ((ev->edge == E_ZONE_EDGE_LEFT) && (ev->y >= es->y) &&
(ev->y <= (es->y + es->h)))
show = 1;
break;
case E_GADCON_ORIENT_CORNER_TR:
case E_GADCON_ORIENT_CORNER_RT:
if ((ev->edge == E_ZONE_EDGE_TOP) && (ev->x >= es->x) && (ev->x <= (es->x + es->w)))
if ((ev->edge == E_ZONE_EDGE_TOP) && (ev->x >= es->x) &&
(ev->x <= (es->x + es->w)))
show = 1;
else if ((ev->edge == E_ZONE_EDGE_RIGHT) && (ev->y >= es->y) && (ev->y <= (es->y + es->h)))
else if ((ev->edge == E_ZONE_EDGE_RIGHT) && (ev->y >= es->y) &&
(ev->y <= (es->y + es->h)))
show = 1;
break;
case E_GADCON_ORIENT_CORNER_BL:
case E_GADCON_ORIENT_CORNER_LB:
if ((ev->edge == E_ZONE_EDGE_BOTTOM) && (ev->x >= es->x) && (ev->x <= (es->x + es->w)))
if ((ev->edge == E_ZONE_EDGE_BOTTOM) && (ev->x >= es->x) &&
(ev->x <= (es->x + es->w)))
show = 1;
else if ((ev->edge == E_ZONE_EDGE_LEFT) && (ev->y >= es->y) && (ev->y <= (es->y + es->h)))
else if ((ev->edge == E_ZONE_EDGE_LEFT) && (ev->y >= es->y) &&
(ev->y <= (es->y + es->h)))
show = 1;
break;
case E_GADCON_ORIENT_CORNER_BR:
case E_GADCON_ORIENT_CORNER_RB:
if ((ev->edge == E_ZONE_EDGE_BOTTOM) && (ev->x >= es->x) && (ev->x <= (es->x + es->w)))
if ((ev->edge == E_ZONE_EDGE_BOTTOM) && (ev->x >= es->x) &&
(ev->x <= (es->x + es->w)))
show = 1;
else if ((ev->edge == E_ZONE_EDGE_RIGHT) && (ev->y >= es->y) && (ev->y <= (es->y + es->h)))
else if ((ev->edge == E_ZONE_EDGE_RIGHT) && (ev->y >= es->y) &&
(ev->y <= (es->y + es->h)))
show = 1;
break;
default:
@ -1449,9 +1470,7 @@ _e_shelf_cb_mouse_out(void *data, int type, void *event)
break;
default:
break;
}
if (!show) e_shelf_toggle(es, 0);
}
else if (type == ECORE_X_EVENT_MOUSE_OUT)
@ -1499,7 +1518,6 @@ _e_shelf_cb_hide_animator(void *data)
int step, hide_max;
es = data;
switch (es->gadcon->orient)
{
case E_GADCON_ORIENT_TOP:
@ -1509,8 +1527,7 @@ _e_shelf_cb_hide_animator(void *data)
case E_GADCON_ORIENT_CORNER_BL:
case E_GADCON_ORIENT_CORNER_BR:
hide_max = es->h - es->hidden_state_size;
if (es->hide_origin == -1)
es->hide_origin = es->y;
if (es->hide_origin == -1) es->hide_origin = es->y;
break;
case E_GADCON_ORIENT_LEFT:
case E_GADCON_ORIENT_CORNER_LB:
@ -1519,8 +1536,7 @@ _e_shelf_cb_hide_animator(void *data)
case E_GADCON_ORIENT_CORNER_RB:
case E_GADCON_ORIENT_CORNER_RT:
hide_max = es->w - es->hidden_state_size;
if (es->hide_origin == -1)
es->hide_origin = es->x;
if (es->hide_origin == -1) es->hide_origin = es->x;
break;
}
@ -1532,14 +1548,10 @@ _e_shelf_cb_hide_animator(void *data)
if (es->hide_step < hide_max)
{
if (es->hide_step + step > hide_max)
{
es->hide_step = hide_max;
}
else
{
es->hide_step += step;
}
}
else goto end;
}
else
@ -1547,14 +1559,10 @@ _e_shelf_cb_hide_animator(void *data)
if (es->hide_step > 0)
{
if (es->hide_step < step)
{
es->hide_step = 0;
}
else
{
es->hide_step -= step;
}
}
else goto end;
}
@ -1584,7 +1592,7 @@ _e_shelf_cb_hide_animator(void *data)
return 1;
end:
end:
es->hide_animator = NULL;
if (es->interrupted > -1)
e_shelf_toggle(es, es->interrupted);
@ -1614,8 +1622,7 @@ _e_shelf_cb_hide_urgent_timer(void *data)
es = data;
es->hide_timer = NULL;
if (es->urgent_show)
e_shelf_toggle(es, 0);
if (es->urgent_show) e_shelf_toggle(es, 0);
return 0;
}
@ -1625,7 +1632,6 @@ _e_shelf_cb_instant_hide_timer(void *data)
E_Shelf *es;
es = data;
switch (es->gadcon->orient)
{
case E_GADCON_ORIENT_TOP: