Some shelf fixes.

- Use -1 during a call to evas_list_sort rather than evas_list_count. -1
will sort the whole list anyway, and we avoid the extra call to list_count.
- Don't sort shelves during every add. They are sorted when e_shelf_list is
called anyway.
- Fix shelf numbering in the shelf list dialog.


SVN revision: 33054
This commit is contained in:
Christopher Michael 2007-12-08 23:40:57 +00:00
parent 552cd506a5
commit 27b2feab69
1 changed files with 6 additions and 5 deletions

View File

@ -72,16 +72,18 @@ e_shelf_config_init(void)
cf_es = l->data;
if (cf_es->id <= 0) cf_es->id = id + 1;
zone = e_util_container_zone_id_get(cf_es->container, cf_es->zone);
id = cf_es->id;
if (zone) e_shelf_config_new(zone, cf_es);
if (zone)
{
id = cf_es->id;
e_shelf_config_new(zone, cf_es);
}
}
}
EAPI Evas_List *
e_shelf_list(void)
{
shelves = evas_list_sort(shelves, evas_list_count(shelves),
_e_shelf_cb_id_sort);
shelves = evas_list_sort(shelves, -1, _e_shelf_cb_id_sort);
return shelves;
}
@ -183,7 +185,6 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i
_e_shelf_cb_menu_items_append, es);
shelves = evas_list_append(shelves, es);
shelves = evas_list_sort(shelves, -1, _e_shelf_cb_id_sort);
es->hidden = 0;
es->hide_step = 0;