How to solve this error .
 GtkWarning: Attempting to add a widget with type GtkButton to a
GtkWindow, but as a GtkBin subclass a GtkWindow can only contain one
widget at a time; it already contains a widget of type GtkLabel
I have a idle with a windows and label .
I want to add news widgets

Regards

This is the source code :

#!/usr/bin/python
import gtk

def visibility_handler(window):
 visible = window.get_property("visible")

 if visible:
  window.hide()
 else:
  window.show()

def activate_callback(icon, window):
 visibility_handler(window)

def delete_callback(window, event):
 visibility_handler(window)



window = gtk.Window()
window.connect("delete-event", delete_callback)


label = gtk.Label("Some text")
label.show()
window.add(label)

button = gtk.Button("Quit")
button.show()
window.add(button)
button = gtk.Button("Set")
button.show
window.add(button)


icon = gtk.StatusIcon()
icon.set_from_stock(gtk.STOCK_YES)
icon.connect("activate", activate_callback, window)
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to