Indicator not shown in fallback mode when a subdir/file with the same name of icon exists in current work dir

Bug #1363277 reported by Giovanni Panozzo
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Solaar
Fix Released
Unknown
libappindicator
New
Undecided
Unassigned
libappindicator (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Take the attached python script and execute it in a non-unity desktop which does not support appindicators but can show gtk_status_icon (see at the end of the post under the "Tested on" paragraph).

The attached script will fallback correctly to the old gtk_status_icon and will show the "battery-good" indicator icon on the system tray.

Now exit from the script (with ^C).
In your current directory create a subdir named "battery-good".
Do not change directory and relaunch the script.

The fallback mechanism will be unable to find the icon, and now the indicator will not be shown.

The problem could be in app-indicator.c, near line 1641

if (g_file_test(icon_name, G_FILE_TEST_EXISTS)) {
   gtk_status_icon_set_from_file(icon, icon_name);
}

This code will find the subdir "battery-good" you created, and it will try to load it as a icon. But if it fails, as it does, it will never load an icon for your indicator.

Tested on xubuntu 14.04.1 64bit without indicator panel element and with indicator application removed from autostart. Tested also on Fedora 20 64bit with XFCE.

Revision history for this message
Giovanni Panozzo (giox069) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libappindicator (Ubuntu):
status: New → Confirmed
Changed in solaar-unifying:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.