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

ui: do not override theme path when setting up AppIndicator #2176

Closed
wants to merge 1 commit into from

Conversation

mbiebl
Copy link

@mbiebl mbiebl commented Nov 17, 2023

Using /usr/share/solaar/icons as theme path will break the lookup of the icons within the AppIndicator based tray, resulting in:

Okt 10 14:54:08 pluto ubuntu-appindicators@ubuntu.com[2156]: indicator-solaar, Impossible to lookup icon for 'battery-good' in /usr/share/solaar/icons

Fix that by using the default theme path.

Fixes: #2156

Using /usr/share/solaar/icons as theme path will break the lookup of the
icons within the AppIndicator based tray, resulting in:
```
Okt 10 14:54:08 pluto ubuntu-appindicators@ubuntu.com[2156]: indicator-solaar, Impossible to lookup icon for 'battery-good' in /usr/share/solaar/icons
```
Fix that by using the default theme path.

Fixes: pwr-Solaar#2156
@pfps
Copy link
Collaborator

pfps commented Nov 17, 2023

Some appindicators use a specified theme path as the first place to look and then use the regular places but it appears that some only look in the theme path thus the need for this change.

Note that the default theme path is a list of paths, not a single path, but the new_with_path interface takes a string.

One thing to try is to see whether a string with a comma- or colon-separated list of paths will work on your system - i.e., use ','.join(theme_path) instead of theme_path[0]. As the appindicator I have on my system looks in the usual places after trying the custom path I can't do this test.

@mbiebl
Copy link
Author

mbiebl commented Nov 17, 2023

I think a better idea is to install the solar icon system wide, so you don't need to fiddle with the theme paths?
But it seems you already do that, no?

$ dpkg -L solaar | grep solaar.svg
/usr/share/icons/hicolor/scalable/apps/solaar.svg
/usr/share/solaar/icons/solaar.svg

@pfps
Copy link
Collaborator

pfps commented Nov 17, 2023

The situation may be even more complex that I had originally thought. It appears that appindicator somehow picks up icons that have been used even if they are not in the search path. So with this PR what I see is that the usual Solaar icon shows up, because it is in the Solaar main window, but the other Solaar icons do not. These other icons show up rarely so it is hard to test for them. What needs to be done is to force the -init icon to show up by commenting out the _hide and _show logic at the end of tray.py, start Solaar, and then disconnect or turn off all Logitech devices. The tray icon for Solaar should then show up as a grey icon.

@mbiebl
Copy link
Author

mbiebl commented Nov 17, 2023

I tested the patch under three different environments:
KDE/Plasma
GNOME/AppIndicator extension
OpenBox/wmdocker

Worked fine with all of them.

@pfps
Copy link
Collaborator

pfps commented Nov 19, 2023

This has been incorporated into PR #2177

@pfps
Copy link
Collaborator

pfps commented Nov 28, 2023

Superseded by #2177

@pfps pfps closed this Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing tray icon in GNOME
2 participants