formatting + space cleanups

SVN revision: 48266
This commit is contained in:
Hannes Janetzek 2010-04-24 00:54:12 +00:00
parent da0e1fb856
commit 55ba16a896
14 changed files with 276 additions and 287 deletions

View File

@ -61,7 +61,7 @@ typedef struct _Plugin_Setting Plugin_Setting;
#define PLUGIN(_p, _plugin) Plugin *_p = (Plugin*) _plugin #define PLUGIN(_p, _plugin) Plugin *_p = (Plugin*) _plugin
#define VIEW(_v, _view) View *_v = (View*) _view #define VIEW(_v, _view) View *_v = (View*) _view
#define EVRY_PLUGIN_ITEMS_CLEAR(_p) \ #define EVRY_PLUGIN_ITEMS_CLEAR(_p) \
if (EVRY_PLUGIN(_p)->items) \ if (EVRY_PLUGIN(_p)->items) \
eina_list_free(EVRY_PLUGIN(_p)->items); \ eina_list_free(EVRY_PLUGIN(_p)->items); \
EVRY_PLUGIN(_p)->items = NULL; EVRY_PLUGIN(_p)->items = NULL;

View File

@ -604,5 +604,3 @@ evry_view_unregister(Evry_View *view)
{ {
evry_conf->views = eina_list_remove(evry_conf->views, view); evry_conf->views = eina_list_remove(evry_conf->views, view);
} }

View File

@ -2085,17 +2085,16 @@ _evry_cb_selection_notify(void *data, int type, void *event)
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) || if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
(ev->selection == ECORE_X_SELECTION_PRIMARY)) (ev->selection == ECORE_X_SELECTION_PRIMARY))
{ {
if (strcmp(ev->target, ECORE_X_SELECTION_TARGET_UTF8_STRING) == 0) if (strcmp(ev->target, ECORE_X_SELECTION_TARGET_UTF8_STRING) == 0)
{ {
Ecore_X_Selection_Data_Text *text_data; Ecore_X_Selection_Data_Text *text_data;
text_data = ev->data; text_data = ev->data;
strncat(s->input, text_data->text, (INPUTLEN - strlen(s->input)) - 1); strncat(s->input, text_data->text, (INPUTLEN - strlen(s->input)) - 1);
_evry_update(selector, 1); _evry_update(selector, 1);
} }
} }
return 1; return 1;
} }

View File

@ -345,4 +345,3 @@ evry_history_item_usage_set(Eina_Hash *hist, Evry_Item *it, const char *input, c
return 0; return 0;
} }

View File

@ -47,4 +47,3 @@ evry_plug_clipboard_shutdown(void)
ecore_x_window_free(clipboard_win); ecore_x_window_free(clipboard_win);
evry_action_free(act); evry_action_free(act);
} }

View File

@ -64,5 +64,3 @@ evry_plug_text_shutdown(void)
EVRY_PLUGIN_FREE(p1); EVRY_PLUGIN_FREE(p1);
EVRY_PLUGIN_FREE(p2); EVRY_PLUGIN_FREE(p2);
} }

View File

@ -137,4 +137,3 @@ view_help_shutdown(void)
evry_view_unregister(view); evry_view_unregister(view);
E_FREE(view); E_FREE(view);
} }

View File

@ -241,20 +241,20 @@ _e_smart_reconfigure_do(void *data)
mw = mh = 0; mw = mh = 0;
EINA_LIST_FOREACH(sd->items, l, it) EINA_LIST_FOREACH(sd->items, l, it)
{ {
if (x > (sd->w - ww)) if (x > (sd->w - ww))
{ {
x = 0; x = 0;
y += hh; y += hh;
} }
it->x = x; it->x = x;
it->y = y; it->y = y;
it->w = ww; it->w = ww;
it->h = hh; it->h = hh;
if ((x + ww) > mw) mw = x + ww; if ((x + ww) > mw) mw = x + ww;
if ((y + hh) > mh) mh = y + hh; if ((y + hh) > mh) mh = y + hh;
x += ww; x += ww;
} }
if (sd->view->mode == VIEW_MODE_LIST || if (sd->view->mode == VIEW_MODE_LIST ||
@ -263,36 +263,36 @@ _e_smart_reconfigure_do(void *data)
if ((mw != sd->cw) || (mh != sd->ch)) if ((mw != sd->cw) || (mh != sd->ch))
{ {
sd->cw = mw; sd->cw = mw;
sd->ch = mh; sd->ch = mh;
if (sd->cx > (sd->cw - sd->w)) if (sd->cx > (sd->cw - sd->w))
{ {
sd->cx = sd->cw - sd->w; sd->cx = sd->cw - sd->w;
redo = 1; redo = 1;
} }
if (sd->cy > (sd->ch - sd->h)) if (sd->cy > (sd->ch - sd->h))
{ {
sd->cy = sd->ch - sd->h; sd->cy = sd->ch - sd->h;
redo = 1; redo = 1;
} }
if (sd->cx < 0) if (sd->cx < 0)
{ {
sd->cx = 0; sd->cx = 0;
redo = 1; redo = 1;
} }
if (sd->cy < 0) if (sd->cy < 0)
{ {
sd->cy = 0; sd->cy = 0;
redo = 1; redo = 1;
} }
/* if (redo) /* if (redo)
* { * {
* recursion = 1; * recursion = 1;
* _e_smart_reconfigure_do(obj); * _e_smart_reconfigure_do(obj);
* recursion = 0; * recursion = 0;
* } */ * } */
changed = 1; changed = 1;
} }
if (sd->view->mode == VIEW_MODE_THUMB) if (sd->view->mode == VIEW_MODE_THUMB)
@ -327,12 +327,12 @@ _e_smart_reconfigure_do(void *data)
EINA_LIST_FOREACH(sd->items, l, it) EINA_LIST_FOREACH(sd->items, l, it)
{ {
xx = sd->x - sd->cx + it->x + ox; xx = sd->x - sd->cx + it->x + ox;
yy = sd->y - sd->cy + it->y + oy; yy = sd->y - sd->cy + it->y + oy;
if (E_INTERSECTS(xx, yy, it->w, it->h, 0, sd->y - (it->h*4), if (E_INTERSECTS(xx, yy, it->w, it->h, 0, sd->y - (it->h*4),
sd->x + sd->w, sd->y + sd->h + it->h*8)) sd->x + sd->w, sd->y + sd->h + it->h*8))
{ {
if (!it->visible) if (!it->visible)
{ {
if (!it->frame) if (!it->frame)
@ -380,8 +380,8 @@ _e_smart_reconfigure_do(void *data)
evas_object_move(it->frame, xx, yy); evas_object_move(it->frame, xx, yy);
evas_object_resize(it->frame, it->w, it->h); evas_object_resize(it->frame, it->w, it->h);
} }
else if (it->visible) else if (it->visible)
{ {
sd->queue = eina_list_remove(sd->queue, it); sd->queue = eina_list_remove(sd->queue, it);
if (it->do_thumb) e_thumb_icon_end(it->thumb); if (it->do_thumb) e_thumb_icon_end(it->thumb);
@ -451,11 +451,11 @@ _e_smart_del(Evas_Object *obj)
EINA_LIST_FREE(sd->items, it) EINA_LIST_FREE(sd->items, it)
{ {
if (it->do_thumb) e_thumb_icon_end(it->thumb); if (it->do_thumb) e_thumb_icon_end(it->thumb);
if (it->thumb) evas_object_del(it->thumb); if (it->thumb) evas_object_del(it->thumb);
if (it->frame) evas_object_del(it->frame); if (it->frame) evas_object_del(it->frame);
if (it->image) evas_object_del(it->image); if (it->image) evas_object_del(it->image);
evry_item_free(it->item); evry_item_free(it->item);
free(it); free(it);
} }
free(sd); free(sd);
evas_object_smart_data_set(obj, NULL); evas_object_smart_data_set(obj, NULL);
@ -551,13 +551,13 @@ _pan_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
Smart_Data *sd = evas_object_smart_data_get(obj); Smart_Data *sd = evas_object_smart_data_get(obj);
if (x) if (x)
{ {
if (sd->w < sd->cw) *x = sd->cw - sd->w; if (sd->w < sd->cw) *x = sd->cw - sd->w;
else *x = 0; else *x = 0;
} }
if (y) if (y)
{ {
if (sd->h < sd->ch) *y = sd->ch - sd->h; if (sd->h < sd->ch) *y = sd->ch - sd->h;
else *y = 0; else *y = 0;
} }
} }
@ -1348,7 +1348,7 @@ _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
v->bg = edje_object_add(v->evas); v->bg = edje_object_add(v->evas);
e_theme_edje_object_set(v->bg, "base/theme/widgets", e_theme_edje_object_set(v->bg, "base/theme/widgets",
"e/modules/everything/thumbview/main/window"); "e/modules/everything/thumbview/main/window");
// scrolled thumbs // scrolled thumbs
v->span = _pan_add(v->evas); v->span = _pan_add(v->evas);
_pan_view_set(v->span, v); _pan_view_set(v->span, v);
@ -1356,10 +1356,10 @@ _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
// the scrollframe holding the scrolled thumbs // the scrollframe holding the scrolled thumbs
v->sframe = e_scrollframe_add(v->evas); v->sframe = e_scrollframe_add(v->evas);
e_scrollframe_custom_theme_set(v->sframe, "base/theme/widgets", e_scrollframe_custom_theme_set(v->sframe, "base/theme/widgets",
"e/modules/everything/thumbview/main/scrollframe"); "e/modules/everything/thumbview/main/scrollframe");
e_scrollframe_extern_pan_set(v->sframe, v->span, e_scrollframe_extern_pan_set(v->sframe, v->span,
_pan_set, _pan_get, _pan_max_get, _pan_set, _pan_get, _pan_max_get,
_pan_child_size_get); _pan_child_size_get);
edje_object_part_swallow(v->bg, "e.swallow.list", v->sframe); edje_object_part_swallow(v->bg, "e.swallow.list", v->sframe);
evas_object_show(v->sframe); evas_object_show(v->sframe);
@ -1428,4 +1428,3 @@ view_thumb_shutdown(void)
evry_view_unregister(EVRY_VIEW(view)); evry_view_unregister(EVRY_VIEW(view));
E_FREE(view); E_FREE(view);
} }

View File

@ -603,15 +603,15 @@ evry_util_url_escape(const char *string, int inlength)
/* encode it */ /* encode it */
newlen += 2; /* the size grows with two, since this'll become a %XX */ newlen += 2; /* the size grows with two, since this'll become a %XX */
if(newlen > alloc) { if(newlen > alloc) {
alloc *= 2; alloc *= 2;
testing_ptr = realloc(ns, alloc); testing_ptr = realloc(ns, alloc);
if(!testing_ptr) { if(!testing_ptr) {
free( ns ); free( ns );
return NULL; return NULL;
} }
else { else {
ns = testing_ptr; ns = testing_ptr;
} }
} }
snprintf(&ns[strindex], 4, "%%%02X", in); snprintf(&ns[strindex], 4, "%%%02X", in);
@ -623,5 +623,3 @@ evry_util_url_escape(const char *string, int inlength)
ns[strindex]=0; /* terminate it */ ns[strindex]=0; /* terminate it */
return ns; return ns;
} }