[pygtk] Stock Icons with no Image

Marco Antonio Islas Cruz markuz at islascruz.org
Wed Nov 4 04:23:19 WST 2009


Actually it is not a problem, developers wanted to behave like that.

On Tue, 2009-11-03 at 22:08 +0200, Timothy Ulusoy wrote:
> Thank you Marco,
> 
> Now at least I know that it is a general problem, and it is not only
> my system that fails. :)
> 
> 
> 
> On Tue, Nov 3, 2009 at 9:56 PM, Marco Antonio Islas Cruz
> <markuz at islascruz.org> wrote:
>         On karmic, I can't remember if it is because of Gtk+ or GNOME
>         there are
>         no icons in stock buttons. You must use a custom button (with
>         a hbox for
>         example) with a gtk.Image and a gtk.Label.
>         
>         
>         
>         On Tue, 2009-11-03 at 21:03 +0200, Timothy Ulusoy wrote:
>         > Hello,
>         >
>         > I have a problem with stock items. When I try to show a
>         button with
>         > stock icon, I only see the text. For example, the following
>         code from
>         > Zetcode website only gives me the texts of the buttons (no
>         images):
>         >
>         > import gtk
>         >
>         > class PyApp(gtk.Window):
>         >     def __init__(self):
>         >         super(PyApp, self).__init__()
>         >
>         >         self.set_title("Buttons")
>         >         self.set_size_request(250, 200)
>         >
>         >         self.set_position(gtk.WIN_POS_CENTER)
>         >
>         >         btn1 = gtk.Button("Button")
>         >         btn1.set_sensitive(False)
>         >         btn2 = gtk.Button("Button")
>         >         btn3 = gtk.Button(stock=gtk.STOCK_CLOSE)
>         >
>         >         btn4 = gtk.Button("Button")
>         >         btn4.set_size_request(80, 40)
>         >
>         >         fixed = gtk.Fixed()
>         >
>         >         fixed.put(btn1, 20, 30)
>         >         fixed.put(btn2, 100, 30)
>         >         fixed.put(btn3, 20, 80)
>         >
>         >         fixed.put(btn4, 100, 80)
>         >
>         >         self.connect("destroy", gtk.main_quit)
>         >
>         >         self.add(fixed)
>         >         self.show_all()
>         >
>         >
>         > PyApp()
>         > gtk.main()
>         >
>         > I'm running Ubuntu Karmic Koala. Thinking that this may be
>         related to
>         > the GTK theme I use (Human theme), I tried the other themes,
>         but to no
>         > avail. Any comments will be much appreciated.
>         >
>         > Thanks.
>         > Timothy
>         
>         > _______________________________________________
>         > pygtk mailing list   pygtk at daa.com.au
>         > http://www.daa.com.au/mailman/listinfo/pygtk
>         > Read the PyGTK FAQ: http://faq.pygtk.org/
>         
>         
>         --
>         <--Linux... Because I'm Free-->
>         Marco Antonio Islas Cruz
>         "Markuz"
>         Linux User #280229
>         markuz at islascruz.org
>         markuz at unixmexico.org
>         markuz at linuxpozarica.com
>         marco.islas at gmail.com
>         islacruz at yahoo.com
>         http://www.islascruz.org
>         http://wwww.christine-project.org
>         http://www.linuxpozarica.com
> 


-- 
<--Linux... Because I'm Free-->
Marco Antonio Islas Cruz
"Markuz"
Linux User #280229
markuz at islascruz.org
markuz at unixmexico.org
markuz at linuxpozarica.com
marco.islas at gmail.com
islacruz at yahoo.com
http://www.islascruz.org
http://wwww.christine-project.org
http://www.linuxpozarica.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20091103/ce85b664/attachment.pgp 


More information about the pygtk mailing list