Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid GTK Icon Cache [$15] #915

Closed
cldx opened this issue Jun 14, 2014 · 19 comments
Closed

Invalid GTK Icon Cache [$15] #915

cldx opened this issue Jun 14, 2014 · 19 comments

Comments

@cldx
Copy link
Contributor

cldx commented Jun 14, 2014

We believe this is triggered in the same way than in this bug:

snwh/moka-icon-theme#94

Uncertain if we will approach the same solution.

Did you help close this issue? Go claim the $15 bounty on Bountysource.

@Foggalong Foggalong added the bug label Jun 14, 2014
@crazybyte
Copy link

Hi,

The cause of the issue is the existence of white space (blank) chars in several icons names. When this is fixed the cache is regenerated properly.
I noticed that this problem reappearing from time to time.
I made a commit where this issue is fixed (at list from now). You can find it here: crazybyte@2a2a2c5

@cldx
Copy link
Contributor Author

cldx commented Jun 16, 2014

@crazybyte Cool, and this won't break the Icon Linkage?

@shehi
Copy link

shehi commented Oct 28, 2014

Anyone planning to fix this issue please?!

@Foggalong
Copy link
Contributor

We can't apply the fix @crazybyte suggested because it means the six icons with spaces in their names won't work properly. From what I can tell, this is an issue with the program that generates the icon caches not correctly escaping spaces :/

@shehi
Copy link

shehi commented Oct 28, 2014

@Foggalong Are you suggesting that it's impossible to rename those files so that they don't have spaces in their names? Maybe to some name with hyphens/dashes or underscores in them? I am not familiar with icon nomenclature, so please forgive me at this point - maybe that naming convention is a rule in gnome-icon-cache, but if this was the case, then other icon packs would have the same problem as well, am I wrong?

@Foggalong
Copy link
Contributor

The problem is that the original icon names we were given don't have hyphens, dashes, or underscores in them - it was just a space. This means that the program using this icon will be looking in icon packs for the name with with spaces, not any other character. Whether or not it's possible to somehow escape the space (something like %20 in URLs perhaps) I don't know, but I've not found anything yet that suggests we can.

Other icon themes will in theory have this problem too, but because most are much smaller than Numix in size they're less likely to run into the problem. The only other theme I'm aware of that's ran into this is Moka, and it was dealt with there by just ignoring that the icons with spaces existed.

@Foggalong
Copy link
Contributor

There's now a $5 bounty placed on this issue. If you're developing a fix, remember: the fix must be applied in such a way that apps which uses spaces in their icon names can still be themed.

@snwh
Copy link

snwh commented Nov 7, 2014

Just remove the icons. They're no longer used.

@snwh
Copy link

snwh commented Nov 7, 2014

Also, the cache can be generated upon installation (using packaging), it needn't be included in a theme.

@Foggalong
Copy link
Contributor

The names I can find are

  • Google Calendar-google.com.svg
  • Yahoo Mail-mail.yahoo.com.svg
  • Amazon Cloud Reader-read.amazon.com.svg
  • Google News-news.google.com.svg
  • Angry Birds-chrome.angrybirds.com.svg
  • Google docs-docs.google.com.svg

which program was it that used to use them?

@satya164
Copy link
Contributor

satya164 commented Nov 8, 2014

Unity webapps?

@Foggalong
Copy link
Contributor

I'm guessing it's some DEs webapp system, but as far as I know Unity has always used unit-webapps-$WEBAPP for it's icon names

@emariz
Copy link

emariz commented Feb 5, 2015

Just for the record, these are the icons which currently generate the issue

$ find /usr/share/icons/Numix-Circle/ -type f -name "* *"
/usr/share/icons/Numix-Circle/48x48/apps/56B4_Battle.net Launcher.0.svg
/usr/share/icons/Numix-Circle/48x48/apps/5C12_World of Warcraft Launcher.0.svg
/usr/share/icons/Numix-Circle/48x48/apps/Yahoo Mail-mail.yahoo.com.svg

$ find /usr/share/icons/Numix-Circle/ -type l -name "* *"
/usr/share/icons/Numix-Circle/48x48/apps/Google News-news.google.com.svg
/usr/share/icons/Numix-Circle/48x48/apps/Amazon Cloud Reader-read.amazon.com.svg
/usr/share/icons/Numix-Circle/48x48/apps/Google Calendar-google.com.svg
/usr/share/icons/Numix-Circle/48x48/apps/Angry Birds-chrome.angrybirds.com.svg
/usr/share/icons/Numix-Circle/48x48/apps/Google docs-docs.google.com.svg

Because I do not use those applications, I simply replaced the spaces with underscores in their file names and the GTK Icon Cache built without problems.

su -c 'gtk-update-icon-cache /usr/share/icons/Numix-Circle'
gtk-update-icon-cache: Cache file created successfully.

Granted, this only shows the issue and leaves it unsolved, but other users might want to identify such icons and rename (or delete) them to generate a valid icon cache.

@Foggalong Foggalong changed the title Invalid GTK Icon Cache Invalid GTK Icon Cache [$5] Feb 21, 2015
@Foggalong Foggalong changed the title Invalid GTK Icon Cache [$5] Invalid GTK Icon Cache [$15] Mar 12, 2015
@ismaelgv
Copy link
Contributor

From GTK documentation:

Hence, theme names are case sensitive, and are limited to ASCII characters. Theme names may also not contain comma or space.

It seems that there is no direct solution to this, unless code is changed upstream or the icons are removed. Maybe a workaround can be done in the packaging changing names before gtk-update-icon-theme is executed and restoring them after that, at least in AUR can be done.

@snwh
Copy link

snwh commented Mar 14, 2015

Correct. It can't be fixed. (Regardless of the bounty placed on it.)

@ismaelgv
Copy link
Contributor

@Foggalong maybe you could use this bounty on other issues as Calligra one.

@Foggalong
Copy link
Contributor

@ChuckDaniels87 good thinking, I'll do that :) Thanks for your input on this @snwh it's much appreciated.

@Foggalong
Copy link
Contributor

Wrote a bit in the wiki to cover it. Just have to work it into the main readme now and delete the relevant icons :)

@ismaelgv
Copy link
Contributor

Nice 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

8 participants