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

Icon-picker search picks up invalid icons #62

Closed
smurphos opened this issue Nov 18, 2018 · 4 comments
Closed

Icon-picker search picks up invalid icons #62

smurphos opened this issue Nov 18, 2018 · 4 comments

Comments

@smurphos
Copy link

Hi,

Using 1.4.1 icon-picker on 4.0.1 in Manjaro testing.

Manjaro for reasons unknown have a few different Manjaro logo icons sat in the root of /usr/share/icons/ outside of a specific icon theme.

Using the icon picker to change the menu icon and searching by name returns these icons and allows them to be selected but they fail to apply. Following a Cinnamon restart the menu is without a icon. The icon does show as selected when the icon picker is reopened to try and fix the issue.

I think the search by name function needs to specifically exclude icons that are just sat in the root of /usr/share/icons/ as these icons do not appear to be technically in the system icon path.

Users can still successfully apply them via the file-system browse.

@collinss
Copy link
Member

Are you getting any errors in the logs? I doubt this is an issue with the icon chooser as it's using the same mechanism to list the icon names as the menu applet uses to display them (gtk icon theme). If the icon is picked up by Gtk, it should also be able to show in the menu applet.

@smurphos
Copy link
Author

Hi,

This works fine as expected and writes the full path to the menu applets settings json

screenshot-window-2018-11-18-120624

This writes the icon file name only to the menu applets settings json and for this particular icon which exists only in the root of /usr/share/icons/ it fails to actually apply to the menu itself.

screenshot-window-2018-11-18-120703

There's no specific xsession-errors entry on picking the icon and I've just tried restarting cinnamon after trying the first method and again the second - there's no difference in the reload messages.

Not sure if this might be relevant but it appears on both restarts.

Cjs-Message: 12:21:00.331: JS WARNING: [/usr/share/cinnamon/js/misc/fileUtils.js line 210 > Function 514]: reference to undefined property "iconTheme"

@mtwebster
Copy link
Member

I'm not sure why the icon picker is displaying this icon, as it's not in a valid spot. the 'hicolor' folder is the place for these sort of package-specific icons. If I move manjaro-shiny.png to hicolor/64x64/apps and regenerate the icon cache (sudo gtk-update-icon-cache /usr/share/icons/hicolor) then it works.

I'm wondering if this icon is falling thru the cracks of gtk's icon fallback handling somehow, and is being picked up by the code that the icon chooser uses to sift thru icons, but not by icon name users. I can reproduce this same issue using xapp's xapp-gtk-window test script (so the problem is not cinnamon-specific either)

For a bit of additional info what I'm talking about: https://developer.gnome.org/gtk3/stable/GtkIconTheme.html#gtk-icon-theme-set-search-path

@smurphos
Copy link
Author

Cheers that makes sense, it's seems that the icon picker and the menu config GUI are using the fallback search to find the icon successfully, but Cinnamon isn't using the fallback search to actually display it on the panel.

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

No branches or pull requests

3 participants