[pyar] Fwd: Hola mundo!!!
Daniel Coca
daniel.uremix en gmail.com
Jue Oct 18 02:00:34 ART 2012
---------- Forwarded message ----------
From: Daniel Coca <daniel.uremix en gmail.com>
Date: 2012/10/18
Subject: Hola mundo!!!
To: pyar en python.org.ar
Hola PyAr, aquí está mi hola mundo xD
#----------------------------------------------------------------------------------
from gi.repository import Gtk
from gi.repository import AppIndicator3 as appindicator
def response(signal):
win = Gtk.Window()
win.set_title("Hola PyAr")
win.set_default_size(200,50)
win.connect("destroy",Gtk.main_quit)
but = Gtk.Button("Cerrar")
but.connect('clicked', Gtk.main_quit)
win.add(but)
win.show_all()
if __name__ == "__main__":
ind = appindicator.Indicator.new (
"Hello PyAr",
"indicator-messages-new",
appindicator.IndicatorCategory.APPLICATION_STATUS)
ind.set_status (appindicator.IndicatorStatus.ACTIVE)
ind.set_attention_icon ("indicator-messages-new")
menu = Gtk.Menu()
item_click = Gtk.MenuItem('Click aqui!!')
item_click.connect("activate",response)
item_close = Gtk.MenuItem('Salir')
item_close.connect("activate",Gtk.main_quit)
menu.append(item_click)
menu.append(item_close)
menu.show_all()
ind.set_menu(menu)
Gtk.main()
#-----------------------------------------------------------------------------
--
Lorem Lacedaemonii
--
Lorem Lacedaemonii
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20121018/29c8d6e9/attachment.html>
More information about the pyar
mailing list