I would like to make a gnome panel applet. I
discovered a tutorial, but it's a bit outdated:
http://www.onlamp.com/pub/a/python/2000/07/25/gnome_applet.html
I created the applet and fixed it so it would compile:
---------snip
# Import the GNOME applet routines:
import gnome.applet
# Import the Gtk+ routines:
import gtk
# The main() function:
def main():
# Create an instance of the AppletWidget class:
#myapplet = gnome.applet.Applet("Simple Applet")
myapplet = gnome.applet.Applet()
# Create a label to be shown inside the applet:
label = gtk.Label("Neato")
# Create a frame:
frame = gtk.Frame()
# Add the label to the frame:
frame.add(label)
# Show the label:
label.show()
# Show the frame:
frame.show()
# Add the frame to the applet:
myapplet.add(frame)
# Set the tooltip text for the applet:
#myapplet.set_tooltip("This is a very simple panel
applet.")
# Show the applet:
myapplet.show_all()
# Get into the Gtk main-loop:
gtk.mainloop()
# This is plain old Python, so you should understand
this:
if __name__ == '__main__': main()
--------snip
However, it displays no applet. Any pointers?
Thanks,
John
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/