forked from enlightenment/enlightenment
"detailed" mimetype fallback now available... :)
SVN revision: 4453
This commit is contained in:
parent
d7057ba6a8
commit
3afd37d998
Binary file not shown.
22
src/view.c
22
src/view.c
|
@ -586,6 +586,27 @@ e_view_handle_fs(EfsdEvent *ev)
|
||||||
icon->info.mime.base,
|
icon->info.mime.base,
|
||||||
icon->info.mime.type);
|
icon->info.mime.type);
|
||||||
if (!e_file_exists(m1))
|
if (!e_file_exists(m1))
|
||||||
|
{
|
||||||
|
int found;
|
||||||
|
|
||||||
|
printf("fallback 0\n");
|
||||||
|
strcpy(m2, icon->info.mime.type);
|
||||||
|
p = strrchr(m2, '-');
|
||||||
|
found = 0;
|
||||||
|
while (p)
|
||||||
|
{
|
||||||
|
p[0] = 0;
|
||||||
|
sprintf(m1, "%s/data/icons/%s/%s.db",PACKAGE_DATA_DIR,
|
||||||
|
icon->info.mime.base, m2);
|
||||||
|
printf("try %s\n", m1);
|
||||||
|
if (e_file_exists(m1))
|
||||||
|
{
|
||||||
|
found = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
p = strrchr(m2, '-');
|
||||||
|
}
|
||||||
|
if (!found)
|
||||||
{
|
{
|
||||||
printf("fallback 1\n");
|
printf("fallback 1\n");
|
||||||
sprintf(m1, "%s/data/icons/%s/default.db",PACKAGE_DATA_DIR,
|
sprintf(m1, "%s/data/icons/%s/default.db",PACKAGE_DATA_DIR,
|
||||||
|
@ -601,6 +622,7 @@ e_view_handle_fs(EfsdEvent *ev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
IF_FREE(icon->info.icon.normal);
|
IF_FREE(icon->info.icon.normal);
|
||||||
IF_FREE(icon->info.icon.selected);
|
IF_FREE(icon->info.icon.selected);
|
||||||
IF_FREE(icon->info.icon.clicked);
|
IF_FREE(icon->info.icon.clicked);
|
||||||
|
|
Loading…
Reference in New Issue