Re: [pygtk] How to use gtk.stock_add()

2012-04-08 Thread Giuseppe Penone
Hi, ICONPATH = "/usr/share/pixmaps/gksu.png" factory = Gtk.IconFactory() pixbuf = GdkPixbuf.Pixbuf.new_from_file(ICONPATH) iconset = Gtk.IconSet.new_from_pixbuf(pixbuf) factory.add("gksu", iconset) factory.add_default() Cheers, G. 2012/4/8 Lion Chen > Hello all, > i want to add my own

[pygtk] How to use gtk.stock_add()

2012-04-08 Thread Lion Chen
Hello all, i want to add my own stock item, so i try the following: import pygtk pygtk.require('2.0') import gtk gtk.stock_add(["STOCK_1", "1", 0, 49, "gtk20") # just a test, 49 is the value of "1", i don't want to use any GDK Modifier Constants . . . # i want to press "1" to quit , but it doesn'