Formatting, Whitespace Removal, Remove redundency in e_configure_del

because deleting of the object handles the same thing.


SVN revision: 40274
This commit is contained in:
Christopher Michael 2009-04-21 18:05:30 +00:00
parent 2206f3134c
commit 2045dc8dc7
1 changed files with 49 additions and 67 deletions

View File

@ -35,14 +35,12 @@ struct _E_Configure_Category
{
E_Configure *eco;
const char *label;
Eina_List *items;
};
struct _E_Configure_Item
{
E_Configure_CB *cb;
const char *label;
const char *icon;
};
@ -99,8 +97,7 @@ e_configure_show(E_Container *con)
man = e_manager_current_get();
if (!man) return;
con = e_container_current_get(man);
if (!con)
con = e_container_number_get(man, 0);
if (!con) con = e_container_number_get(man, 0);
if (!con) return;
}
@ -176,7 +173,6 @@ e_configure_show(E_Container *con)
e_widget_min_size_get(eco->close, &mw, &mh);
edje_extern_object_min_size_set(eco->close, mw, mh);
edje_object_part_swallow(eco->edje, "e.swallow.button", eco->close);
edje_object_size_min_calc(eco->edje, &ew, &eh);
e_win_size_min_set(eco->win, ew, eh);
e_util_win_auto_resize_fill(eco->win);
@ -205,9 +201,6 @@ e_configure_del(void)
{
if (_e_configure)
{
if (_e_configure->mod_hdl)
ecore_event_handler_del(_e_configure->mod_hdl);
_e_configure->mod_hdl = NULL;
e_object_del(E_OBJECT(_e_configure));
_e_configure = NULL;
}
@ -224,25 +217,19 @@ _e_configure_free(E_Configure *eco)
{
E_Configure_Category *cat;
cat = eco->cats->data;
if (!cat) continue;
if (cat->label)
eina_stringshare_del(cat->label);
if (!(cat = eco->cats->data)) return;
if (cat->label) eina_stringshare_del(cat->label);
while (cat->items)
{
E_Configure_Item *ci;
ci = cat->items->data;
if (!ci) continue;
if (ci->label)
eina_stringshare_del(ci->label);
if (ci->icon)
eina_stringshare_del(ci->icon);
if (!(ci = cat->items->data)) continue;
if (ci->label) eina_stringshare_del(ci->label);
if (ci->icon) eina_stringshare_del(ci->icon);
if (ci->cb)
{
if (ci->cb->path)
eina_stringshare_del(ci->cb->path);
if (ci->cb->path) eina_stringshare_del(ci->cb->path);
free(ci->cb);
}
cat->items = eina_list_remove_list(cat->items, cat->items);
@ -265,8 +252,7 @@ _e_configure_cb_del_req(E_Win *win)
{
E_Configure *eco;
eco = win->data;
if (!eco) return;
if (!(eco = win->data)) return;
e_object_del(E_OBJECT(eco));
}
@ -276,8 +262,7 @@ _e_configure_cb_resize(E_Win *win)
E_Configure *eco;
Evas_Coord w, h;
eco = win->data;
if (!eco) return;
if (!(eco = win->data)) return;
ecore_evas_geometry_get(win->ecore_evas, NULL, NULL, &w, &h);
evas_object_resize(eco->edje, w, h);
}
@ -287,8 +272,7 @@ _e_configure_cb_close(void *data, void *data2)
{
E_Configure *eco;
eco = data;
if (!eco) return;
if (!(eco = data)) return;
e_util_defer_object_del(E_OBJECT(eco));
}
@ -315,7 +299,8 @@ _e_configure_category_add(E_Configure *eco, const char *label, const char *icon)
}
eco->cats = eina_list_append(eco->cats, cat);
e_widget_toolbar_item_append(eco->cat_list, o, label, _e_configure_category_cb, cat, NULL);
e_widget_toolbar_item_append(eco->cat_list, o, label,
_e_configure_category_cb, cat, NULL);
return cat;
}
@ -327,8 +312,7 @@ _e_configure_category_cb(void *data, void *data2)
Eina_List *l;
Evas_Coord w, h;
cat = data;
if (!cat) return;
if (!(cat = data)) return;
eco = cat->eco;
evas_event_freeze(evas_object_evas_get(eco->item_list));
@ -341,8 +325,7 @@ _e_configure_category_cb(void *data, void *data2)
E_Configure_Item *ci;
Evas_Object *o = NULL;
ci = l->data;
if (!ci) continue;
if (!(ci = l->data)) continue;
if (ci->icon)
{
o = e_icon_add(eco->evas);
@ -352,7 +335,8 @@ _e_configure_category_cb(void *data, void *data2)
o = e_util_icon_add(ci->icon, eco->evas);
}
}
e_widget_ilist_append(eco->item_list, o, ci->label, _e_configure_item_cb, ci, NULL);
e_widget_ilist_append(eco->item_list, o, ci->label,
_e_configure_item_cb, ci, NULL);
}
e_widget_ilist_go(eco->item_list);
e_widget_min_size_get(eco->item_list, &w, &h);
@ -386,8 +370,7 @@ _e_configure_item_cb(void *data)
E_Configure_Item *ci;
E_Configure_CB *cb;
ci = data;
if (!ci) return;
if (!(ci = data)) return;
cb = ci->cb;
if (cb->path) e_configure_registry_call(cb->path, cb->eco->con, NULL);
}
@ -399,8 +382,7 @@ _e_configure_focus_cb(void *data, Evas_Object *obj)
E_Configure *eco;
win = data;
eco = win->data;
if (!eco) return;
if (!(eco = win->data)) return;
if (obj == eco->close)
{
e_widget_focused_object_clear(eco->item_list);
@ -465,8 +447,7 @@ _e_configure_keydown_cb(void *data, Evas *e, Evas_Object *obj, void *event)
if (o)
{
o = e_widget_focused_object_get(o);
if (!o) return;
if (!(o = e_widget_focused_object_get(o))) return;
e_widget_activate(o);
}
}
@ -480,8 +461,7 @@ _e_configure_fill_cat_list(void *data)
E_Configure_Category *cat;
Eina_List *l;
eco = data;
if (!eco) return;
if (!(eco = data)) return;
evas_event_freeze(evas_object_evas_get(eco->cat_list));
edje_freeze();
@ -503,8 +483,10 @@ _e_configure_fill_cat_list(void *data)
eci = ll->data;
if (eci->pri >= 0)
{
snprintf(buf, sizeof(buf), "%s/%s", ecat->cat, eci->item);
_e_configure_item_add(cat, _(eci->label), eci->icon, buf);
snprintf(buf, sizeof(buf), "%s/%s", ecat->cat,
eci->item);
_e_configure_item_add(cat, _(eci->label),
eci->icon, buf);
}
}
}