Use the ecore_desktop instrumentation at useful points.

SVN revision: 26023
This commit is contained in:
David Walter Seikel 2006-09-22 10:12:32 +00:00
parent f3f7909803
commit f13f782689
3 changed files with 8 additions and 0 deletions

View File

@ -127,12 +127,14 @@ e_app_init(void)
_e_apps_repositories = evas_list_append(_e_apps_repositories, evas_stringshare_add(buf));
_e_apps_exit_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, _e_apps_cb_exit, NULL);
_e_apps_border_add_handler = ecore_event_handler_add(E_EVENT_BORDER_ADD, _e_app_cb_event_border_add, NULL);
ecore_desktop_instrumentation_reset();
_e_apps_all = e_app_new(buf, 1);
#if NO_APP_LIST
/* The list already exists, and it doesn't care what order it is in. */
if (_e_apps_all)
_e_apps_list = _e_apps_all->subapps;
#endif
ecore_desktop_instrumentation_print();
return 1;
}

View File

@ -32,18 +32,21 @@ e_fdo_menu_to_order(void)
{
char dir[PATH_MAX];
ecore_desktop_instrumentation_reset();
/* Nuke the old menus. */
snprintf(dir, sizeof(dir), "%s/.e/e/applications/menu/all/", ecore_desktop_home_get());
ecore_file_recursive_rm(dir);
menu_count = 0;
item_count = 0;
ecore_desktop_menu_for_each(_e_fdo_menu_to_order_make_apps);
ecore_desktop_instrumentation_print();
/* This is a hueristic to guess if there are not enough apps. Feel free to tweak it. */
if ((item_count < 50) || (menu_count > (item_count * 3)))
{
struct category_data cat_data;
// FIXME: search out all .desktop files and generate menus ala e17genmenu.
ecore_desktop_instrumentation_reset();
cat_data.menus = ecore_hash_new(ecore_str_hash, ecore_str_compare);
if (cat_data.menus)
{
@ -52,6 +55,7 @@ e_fdo_menu_to_order(void)
ecore_desktop_paths_for_each(ECORE_DESKTOP_PATHS_DESKTOPS, _e_fdo_menu_to_order_cb_desktop_dir_foreach, &cat_data);
ecore_hash_for_each_node(cat_data.menus, _e_fdo_menu_to_order_dump_each_hash_node2, &cat_data);
}
ecore_desktop_instrumentation_print();
}
}

View File

@ -457,6 +457,7 @@ _e_int_menus_apps_scan(E_Menu *m)
Evas_List *l;
int app_count = 0;
ecore_desktop_instrumentation_reset();
a = e_object_data_get(E_OBJECT(m));
if (a)
{
@ -510,6 +511,7 @@ _e_int_menus_apps_scan(E_Menu *m)
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("(No Applications)"));
}
ecore_desktop_instrumentation_print();
}
static void