Ticket #18 (assigned TODO)

Opened 3 months ago

Last modified 3 months ago

EFM mime type icons

Reported by: Toma Owned by: mekius
Priority: Minor Milestone: Enlightenment 0.17
Component: enlightenment Keywords: efm mime icon
Cc: Blocking:
Blocked By:

Description

The EFM mime type icons should come from the 'Icon Theme' selector rather than the e17 theme. I understand the poor quality of linux icons, but if we stick to the spec, we would be doing a good thing to influence others to stick to the spec when designing aswell.

http://freedesktop.org/wiki/Specifications/icon-naming-spec

Change History

follow-up: ↓ 2   Changed 3 months ago by mekius

I agree and plan on implementing this soon. It is already available in Efreet so just a matter of adding a few lines of code to EFM. I'm also thinking of adding magic checks since it would improve the mimetype detection quite a bit or at the very least make sure that all files have a mimetype even if it's a basic binary/text type. Could make it so this is only checked if the current dir is on the same parition as the user's home dir to make sure it's not done on external devices.

in reply to: ↑ 1   Changed 3 months ago by ptomaine

Replying to mekius:

I'm also thinking of adding magic checks since it would improve the mimetype detection quite a bit or at the very least make sure that all files have a mimetype even if it's a basic binary/text type.

All these things are already in efreet_mime_type_get().

Could make it so this is only checked if the current dir is on the same parition as the user's home dir to make sure it's not done on external devices.

Could be easily done with efreet. Just use efreet_mime_globs_type_get() when on external device and efreet_mime_type_get() otherwise.

follow-up: ↓ 4   Changed 3 months ago by ptomaine

Ok, I look over the code. Here how it works now (this is not the entire algo, just an overview):

Is custom info is set, use it. Otherwise:

  • If it's a directory, get 'fileman/folder' from theme.
  • Else:
    • If there is thumbnailing is set in custom info, create thumbnail.
    • Make a check based on mime (For mimetype 'text/plain', general is 'text' and full is 'text/plain'):
      • Look if thumbnail is set in E config.
      • Look for full.edj, full.svg, full.png, general.edj, general.svg, general.png in ~/.e/e/icons.
      • Look for 'fileman/mime/full' and 'fileman/mime/general' in theme.
      • Look for full.edj, full.svg, full.png, general.edj, general.svg, general.png in $PREFIX/share/enlightenment/data/icons.
      • Special case for .edj and .imc
      • Fallback to 'fileman/file' in theme.

This looks too complicated for me, I'd prefer just have it this way:

  • Look in theme.
  • Look for icon as specified in FDO, using efreet.
  • Fallback to default icon.

And allow user to swap first two using E's config.

in reply to: ↑ 3   Changed 3 months ago by mekius

  • keywords efm mime icon added
  • owner set to mekius
  • status changed from new to assigned
  • milestone set to Enlightenment 0.17

Replying to ptomaine: I made the efreet mime code btw, so I'm well aware of what's there ;)

Ok, I look over the code. Here how it works now (this is not the entire algo, just an overview): Is custom info is set, use it. Otherwise: * If it's a directory, get 'fileman/folder' from theme.

Yep, and as a fallback I'd have it look for an inode/directory icon in the icon theme.

* Else: * If there is thumbnailing is set in custom info, create thumbnail. * Make a check based on mime (For mimetype 'text/plain', general is 'text' and full is 'text/plain'): * Look if thumbnail is set in E config. * Look for full.edj, full.svg, full.png, general.edj, general.svg, general.png in ~/.e/e/icons. * Look for 'fileman/mime/full' and 'fileman/mime/general' in theme. * Look for full.edj, full.svg, full.png, general.edj, general.svg, general.png in $PREFIX/share/enlightenment/data/icons. * Special case for .edj and .imc * Fallback to 'fileman/file' in theme. This looks too complicated for me, I'd prefer just have it this way: * Look in theme. * Look for icon as specified in FDO, using efreet. * Fallback to default icon.

I agree, this would work well. Any good icon theme will have a general icon to use and if the E theme does not have one we will use that one. So I'd expand the default icon fallback to first look in the E theme and then in the icon theme.

And allow user to swap first two using E's config.

Yep

Note: See TracTickets for help on using tickets.