Icon name search should try exact match in all themes before trying similar icon names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Application Indicators |
Confirmed
|
Wishlist
|
Unassigned | ||
libappindicator (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm trying to load stock icon by name (appointment-soon [orange clock from gnome theme] and appointment-missed [orange clock with red "!" from gnome theme]) but AI loads another icon with similar name: appointment or appointment-new [gray clock with green "+"]. Tested with Ubuntu-Mono-Light icon theme. Lucid+updates. Here is the code:
import gobject
import gtk
import appindicator
def menuitem_
ind.set_status (appindicator.
if __name__ == "__main__":
ind = appindicator.
"appointment-
appindicator
ind.set_status (appindicator.
ind.set_
menu = gtk.Menu()
buf = "Attention!"
menu_items = gtk.MenuItem(buf)
menu.append(
menu_items.
menu_items.show()
gtk.main()
description: | updated |
description: | updated |
summary: |
- Wrong icon loaded + Appindicators should prepend app specific icon paths instead of append |
Changed in indicator-application: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
This happens because the app-indicator searches for an icon named 'appointment-soon' and if that's not in the current theme it then searches for 'appointment' before it goes to the next Theme.
The call is g_themed_ icon_new_ with_default_ fallbacks followed by gtk_icon_ theme_lookup_ by_gicon.
It seems like it should search all the themes before falling back.
PS. This basically stops any app that wants to include its own icons using app_indicator_ new_with_ path since the path is appended as a last Theme if they say 'myapp-idle', but the default theme has an icon called 'myapp' it will always use 'myapp'.