Comment 0 for bug 603057

Revision history for this message
Evgeny Kolesnikov (evgenyz) wrote : Wrong icon loaded

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_response(widget, buf):
 ind.set_status (appindicator.STATUS_ATTENTION)

if __name__ == "__main__":
 ind = appindicator.Indicator ("example-simple-client",
  "appointment-soon",
   appindicator.CATEGORY_APPLICATION_STATUS)
 ind.set_status (appindicator.STATUS_ACTIVE)
 ind.set_attention_icon ("appointment-missed")

 menu = gtk.Menu()
 buf = "Attention!"
 menu_items = gtk.MenuItem(buf)
 menu.append(menu_items)
 menu_items.connect("activate", menuitem_response, buf)
 menu_items.show()

 ind.set_menu(menu)

 gtk.main()