views:

212

answers:

1

Hello All,

This is my first question in StackOverflow, so I would try to explain my self the best I can.

I made an small app trying to emularte the windows Procastination Killer Application, using pygtk and pygame for the sound alerts.

Here is a video of my little app running http://www.youtube.com/watch?v=FmE-QPA9p-8

My Issue is that I want to get a widget in the tray icon area, and not jus the plain Icon. Something like an Icon and a Label, to made a counter, or at least extend the icon size to put more information in the status icon.

So my Questions would be:

  1. How can I resize the status icon? for example to show a icon 44x22 pixels
  2. How can I add a Widget, Region, or something else instead the status icon

Here is the code that use to get the status icon.

self.status_icon = gtk.StatusIcon()
self.status_icon.set_from_file(STATUS_ICON_FILE)

self.status_icon.set_tooltip("Switch, a procastination killer app")
self.status_icon.connect("activate", self.on_toggle_status_trayicon)
self.status_icon.connect("popup-menu", lambda i, b, a: self.status_menu.popup(
None, None, gtk.status_icon_position_menu, b, a, self.status_icon))

I am packaging the app for ubuntu soon as I find a name :), that maybe would be me third question.

3: How do I name my app?

+2  A: 

GTK+ doesn't support arbitrary widgets in the notification area, because these don't work well in Windows. You probably want to write a panel applet instead -- here's a tutorial for panel applets in PyGTK.

John Millikin
in Gnome it's called the notification area, which lives on (in?) the panel, so it should be 'panel applet'.
kaizer.se
I would learn how to create an applet, It's the best for my need. Thanks
Mario César