How do I get the strings I can insert instead of 'gtk-execute'?
#!/usr/bin/python
import gobject
import gtk
import appindicator
if __name__ == "__main__":
ind = appindicator.Indicator("example-simple-client", "gtk-execute",
appindicator.CATEGORY_APPLICATION_STATUS)
ind.set_status (appindicator.STATUS_ACTIVE)
menu = gtk.Menu()
for i in range(3):
buf = "Test-undermenu - %d" % i
menu_items = gtk.MenuItem(buf)
menu.append(menu_items)
menu_items.connect("activate", gtk.main_quit)
menu_items.show()
ind.set_menu(menu)
gtk.main()
My answer below pretty much does it. Still it would be nice to have some python code that puts out all available icons.
Best Answer
Simple:
The output of which is a tuple of all the icon names:
See also: gtk.IconTheme.list_icons in the pygtk docs
If you'd like to get your icon as a GtkPixbuf, you can use the
load_icon
method:If you want a filename instead, you can use the
lookup_icon
method:Where
48
is the size of the desired icon (see also:get_icon_sizes
).