[Python-es] y hasta ahora me entero-- tkinter no dispone de función systray ?

mauricio rodriguez rodriguez.mauricio55 en gmail.com
Sab Jun 9 01:23:49 CEST 2012


 si eso había leído... voy a ver lo que me recomiendas.. y a seguir
investigando

muchas gracias por responder

2012/6/8 Alexandro Colorado <jza en oooes.org>

> Que no el systray depende del window manager?
> En fin, existe esto:
> http://tk-happy.sourceforge.net/
>
> On Fri, Jun 8, 2012 at 5:35 PM, mauricio rodriguez <
> rodriguez.mauricio55 en gmail.com> wrote:
>
>> Hola a tod en s
>>
>> Eso estoy en pleno proceso de codificación de un proyecto y me
>> entero que tkinter no dispone de
>> una función para minimizar la app en la bandeja del sistema ( systray)
>> Grrrrrrrrrrrrr
>>
>> Re-factorizar mmm no,  alguien conoce algún hack para hacer esto......
>>
>>
>> Buscando llegue a esto pero no entiendo ni J XDD
>>
>> http://standards.freedesktop.org/systemtray-spec/systemtray-spec-latest.html
>> http://wiki.tcl.tk/4090
>>
>> lo que preciso es algo similar a esto pero en tkinter
>>
>>
>> *import pygtk*
>>  *pygtk.require('2.0')*
>> *import gtk*
>> *class HelloTray:*
>> *  def __init__(self):*
>> *    self.statusIcon = gtk.StatusIcon()*
>> *    self.statusIcon.set_from_stock(gtk.STOCK_ABOUT)*
>> *    self.statusIcon.set_visible(True)*
>> *    self.statusIcon.set_tooltip("Hello World")*
>> *    self.menu = gtk.Menu()*
>> *    self.menuItem = gtk.ImageMenuItem(gtk.STOCK_EXECUTE)*
>> *    self.menuItem.connect('activate', self.execute_cb, self.statusIcon)*
>> *    self.menu.append(self.menuItem)*
>> *    self.menuItem = gtk.ImageMenuItem(gtk.STOCK_QUIT)*
>> *    self.menuItem.connect('activate', self.quit_cb, self.statusIcon)*
>> *    self.menu.append(self.menuItem)*
>> *    self.statusIcon.connect('popup-menu', self.popup_menu_cb, self.menu)
>> *
>> *    self.statusIcon.set_visible(1)*
>> *
>> *
>> *    gtk.main()*
>> *
>> *
>> *  def execute_cb(self, widget, event, data = None):*
>> *    window = gtk.Window(gtk.WINDOW_TOPLEVEL)*
>> *    window.set_border_width(10)*
>> *    button = gtk.Button("Hello World")*
>> *    button.connect_object("clicked", gtk.Widget.destroy, window)*
>> *    window.add(button)*
>> *    button.show()*
>> *    window.show()*
>> *
>> *
>> *  def quit_cb(self, widget, data = None):*
>> *    gtk.main_quit()*
>> *
>> *
>> *  def popup_menu_cb(self, widget, button, time, data = None):*
>> *    if button == 3:*
>> *      if data:*
>> *        data.show_all()*
>> *        data.popup(None, None, gtk.status_icon_position_menu,*
>> *                   3, time, self.statusIcon)*
>> *
>> *
>> *if __name__ == "__main__":*
>> *  helloWord = HelloTray()*
>> *
>> *
>> *
>> *
>> Se agradece .....
>>
>> _______________________________________________
>> Python-es mailing list
>> Python-es en python.org
>> http://mail.python.org/mailman/listinfo/python-es
>> FAQ: http://python-es-faq.wikidot.com/
>>
>>
>
> _______________________________________________
> Python-es mailing list
> Python-es en python.org
> http://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://mail.python.org/pipermail/python-es/attachments/20120608/b01b7c7b/attachment.html>


Más información sobre la lista de distribución Python-es