If the icon was hard coded into the Icon field of the .desktop file,

then we ignore the FDO theme and search algo.


SVN revision: 26218
This commit is contained in:
David Walter Seikel 2006-09-29 12:27:02 +00:00
parent 5f41757cf5
commit d97e242d0f
2 changed files with 9 additions and 0 deletions

View File

@ -1312,6 +1312,7 @@ e_app_fields_fill(E_App *a, const char *path)
a->icon_time = desktop->icon_time;
a->startup_notify = desktop->startup;
a->wait_exit = desktop->wait_exit;
a->hard_icon = desktop->hard_icon;
a->dirty_icon = 0;
a->filled = 1;
@ -1466,6 +1467,7 @@ e_app_fields_save(E_App *a)
desktop->window_title = (char *) a->win_title;
desktop->window_role = (char *) a->win_role;
desktop->icon_time = a->icon_time;
desktop->hard_icon = a->hard_icon;
desktop->startup = a->startup_notify;
desktop->wait_exit = a->wait_exit;
@ -1666,6 +1668,7 @@ e_app_fields_empty(E_App *a)
a->win_title = NULL;
a->win_role = NULL;
a->dirty_icon = 0;
a->hard_icon = 0;
a->filled = 0;
}
@ -1840,6 +1843,10 @@ printf("e_app_icon_add(%s) %s %s %s\n", a->path, a->icon_class, e_config->
else if ((e_config->icon_theme == NULL) && (a->icon_theme == NULL))
theme_match = 1;
/* If the icon was hard coded into the .desktop files Icon field, then theming doesn't matter. */
if (a->hard_icon)
theme_match = 1;
/* Then check if we already know the icon path. */
if ((theme_match) && (a->icon_path) && (a->icon_path[0] != 0))
o = _e_app_icon_path_add(evas, a);
@ -2506,6 +2513,7 @@ _e_app_copy(E_App *dst, E_App *src)
dst->starting = src->starting;
dst->scanned = src->scanned;
dst->dirty_icon = src->dirty_icon;
dst->hard_icon = src->hard_icon;
dst->filled = src->filled;
return 1;

View File

@ -71,6 +71,7 @@ struct _E_App
unsigned char filled : 1; /* this app has had its data filled in */
unsigned char no_icon : 1; /* this app's icon has not been found in the current theme, future searhes should give up early . */
unsigned char dirty_icon : 1; /* this app's icon has been found, and the on disk cache needs to be updated. */
unsigned char hard_icon : 1; /* this app's icon was hard coded into the .desktop files Icon field. */
/* Actually calling this st_mtime causes compile issues, must be some strange macros at work. */
time_t mtime; /* For checking if the cache is valid. */