Switch to PyXDG.IconTheme for icons lookup#24
Conversation
Use PyXDG.IconTheme to lookup the application icons instead of pyGTK; this has some advantages: - we are already using PyXDG, so it does not add new requirements - the icon lookup follows the icon theme specs a little bit closer - the icon lookup does not require an X/graphical session - there is no implicit 'adwaita' or 'gnome' icon theme used in lookup there are also few disadvantages: - there is no concept of "default icon theme", so "hicolor" is hardcoded for now; note that, when using pyGTK, the "default icon theme" was the GTK one, not any other configured in other ways - it seems the lookup logic for hicolor returns the smallest icon available in case the current size is not available: for example a 16px PNG is returned instead of a 48px for a requested and not found 64px size
Add a --icon-theme command line option to specify in XDG icon theme search for icons; defaults to 'hicolor'.
It is no more used, so drop any leftovers of it.
|
I'm sorry, but detecting the icon theme is very important functionality that should not be removed. Having to specify the icon theme is too cumbersome, I don't want to do that. |
|
The problem I see is that the "current icon theme" in reality is the GTK icon theme, which follows the GTK configuration. There is nothing that says it is the same for non-GTK applications. |
|
That's not a problem in my opinion. In my experience at least, most people that use a WM such as the ones supported by xdgmenumaker, mostly use GTK apps. |
|
Fetching current icon theme is not so hard to achieve: |
|
BTW, is it possible to add the |
Use PyXDG.IconTheme to lookup the application icons instead of pyGTK; this has some advantages:
adwaitaorgnomeicon theme used in lookupthere are also few disadvantages:
hicoloris the default theme; a new--icon-themeoption is added to select which theme to use