From: Enlightenment S. <no-...@en...> - 2009-06-21 23:25:42
|
Log: 'everything' module: mo icons Author: jeffdameth Date: 2009-06-21 16:25:39 -0700 (Sun, 21 Jun 2009) New Revision: 41153 Modified: trunk/e/src/modules/everything/evry_plug_apps.c trunk/e/src/modules/everything/evry_plug_dir_browse.c trunk/e/src/modules/everything/evry_plug_tracker.c Modified: trunk/e/src/modules/everything/evry_plug_apps.c =================================================================== --- trunk/e/src/modules/everything/evry_plug_apps.c 2009-06-21 22:53:51 UTC (rev 41152) +++ trunk/e/src/modules/everything/evry_plug_apps.c 2009-06-21 23:25:39 UTC (rev 41153) @@ -370,6 +370,13 @@ if (app->desktop) it->o_icon = e_util_desktop_icon_add(app->desktop, 24, e); + + if (!it->o_icon) + { + it->o_icon = edje_object_add(e); + /* e_util_icon_theme_set(it->o_icon, "system-run") */ + e_theme_edje_object_set(it->o_icon, "base/theme/fileman", "e/icons/system-run"); + } } static int Modified: trunk/e/src/modules/everything/evry_plug_dir_browse.c =================================================================== --- trunk/e/src/modules/everything/evry_plug_dir_browse.c 2009-06-21 22:53:51 UTC (rev 41152) +++ trunk/e/src/modules/everything/evry_plug_dir_browse.c 2009-06-21 23:25:39 UTC (rev 41153) @@ -155,8 +155,15 @@ free(file); } - - return 1; + + if (eina_list_count(p->items) > 0) + { + p->items = eina_list_sort(p->items, eina_list_count(p->items), + _cb_sort); + return 1; + } + + return 0; } /* based on directory-watcher from drawer module */ @@ -170,11 +177,9 @@ it = E_NEW(Evry_Item, 1); snprintf(buf, sizeof(buf), "%s/%s", directory, file); - - it->uri = eina_stringshare_add(buf); - if ((e_util_glob_case_match(buf, "*.desktop")) || - (e_util_glob_case_match(buf, "*.directory"))) + if ((e_util_glob_case_match(file, "*.desktop")) || + (e_util_glob_case_match(file, "*.directory"))) { Efreet_Desktop *desktop; @@ -188,21 +193,28 @@ file_path = eina_stringshare_add(buf); - mime = e_fm_mime_filename_get(file_path); + it->uri = file_path; + + mime = efreet_mime_globs_type_get(file_path); if (mime) { it->mime = eina_stringshare_add(mime); - it->priority = 2; + it->priority = 0; } else if (ecore_file_is_dir(file_path)) { it->mime = eina_stringshare_add("Folder"); it->priority = 1; } - else + else if ((mime = efreet_mime_type_get(file_path))) { + it->mime = eina_stringshare_add(mime); + it->priority = 0; + } + else + { it->mime = eina_stringshare_add("None"); - it->priority = 2; + it->priority = 0; } return it; @@ -226,6 +238,11 @@ if (item_path) it->o_icon = e_util_icon_add(item_path, e); + else + { + it->o_icon = edje_object_add(e); + e_theme_edje_object_set(it->o_icon, "base/theme/fileman", "e/icons/fileman/file"); + } } } @@ -237,5 +254,5 @@ it1 = data1; it2 = data2; - return (it1->priority - it2->priority); + return (it2->priority - it1->priority); } Modified: trunk/e/src/modules/everything/evry_plug_tracker.c =================================================================== --- trunk/e/src/modules/everything/evry_plug_tracker.c 2009-06-21 22:53:51 UTC (rev 41152) +++ trunk/e/src/modules/everything/evry_plug_tracker.c 2009-06-21 23:25:39 UTC (rev 41153) @@ -145,8 +145,8 @@ if (!strcmp(it->mime, "Folder")) { it->o_icon = edje_object_add(e); - e_theme_edje_object_set(it->o_icon, "base/theme/fileman", - "e/icons/fileman/folder"); + /* e_util_icon_theme_set(it->o_icon, "folder"); */ + e_theme_edje_object_set(it->o_icon, "base/theme/fileman", "e/icons/folder"); } else { @@ -154,6 +154,12 @@ if (item_path) it->o_icon = e_util_icon_add(item_path, e); + else + { + it->o_icon = edje_object_add(e); + /* e_util_icon_theme_set(it->o_icon, "file"); */ + e_theme_edje_object_set(it->o_icon, "base/theme/fileman", "e/icons/fileman/file"); + } } } |