* Make ecore_desktop handle trash files (same fdo format)

SVN revision: 24637
This commit is contained in:
chaos 2006-08-13 08:36:15 +00:00 committed by chaos
parent 7f41aeb177
commit 86ba91031a
2 changed files with 10 additions and 1 deletions

View File

@ -33,6 +33,8 @@ struct _Ecore_Desktop
char *exec;
char *icon;
char *icon_path;
char* path;
char* deletiondate;
char *startup;
char *window_class;
int allocated; /* FIXME: NoDisplay, Hidden */

View File

@ -147,7 +147,14 @@ ecore_desktop_parse_file(char *file)
value = (char *)ecore_hash_get(result->group, "StartupNotify");
if (value)
result->startup = (!strcmp(value, "true")) ? "1" : "0";
}
} else {
/*Maybe it's a 'trash' file - which also follows the Desktop FDO spec*/
result->group = (Ecore_Hash *) ecore_hash_get(result->data, "Trash Info");
if (result->group) {
result->path = (char *)ecore_hash_get(result->group, "Path");
result->deletiondate = (char *)ecore_hash_get(result->group, "DeletionDate");
}
}
ecore_hash_set(desktop_cache, strdup(file), result);
}