Don't store the complete path in the name element.

SVN revision: 30152
This commit is contained in:
Sebastian Dransfeld 2007-05-29 20:18:21 +00:00
parent 5e3a40da08
commit ab766b0398
1 changed files with 10 additions and 1 deletions

View File

@ -838,7 +838,16 @@ efreet_icon_new(const char *path)
efreet_icon_populate(icon, ico_path);
}
if (!icon->name) icon->name = strdup(path);
if (!icon->name)
{
char *file;
file = ecore_file_get_file(icon->path);
p = strrchr(icon->path, '.');
if (p) *p = '\0';
icon->name = strdup(file);
if (p) *p = '.';
}
return icon;
}