Comment 7 for bug 140411

Revision history for this message
buzzdee (sebastia) wrote :

I scanned the tktray manual page, and I found this:

      tktray::icon pathName ?options?
          ...
              -image image to show in the system tray. Since tktray 1.3, image
                     type "photo" is not mandatory anymore. Icon will be
                     automatically redrawn on any image modifications. For Tk,
                     deleting an image and creating an image with the same
                     name later is a kind of image modification, and tktray
                     follows this convention. Photo image operations that
                     modify existing image content are another example of
                     events triggering redisplay. Requested size for icon is
                     set according to the image's width and height, but obey-
                     ing (or disobeying) this request is left for the tray.

       pathName balloon message ?msec_timeout?
              Post a message that any decent tray implementation would show
              alongside the icon (or a place allocated for it). The message
              will disappear automatically after $msec_timeout milliseconds.
              Unfortunately, there is absolutely no way to know if the tray
              supports this feature, so don't rely on it for any critical
              information to be delivered. When no timeout or zero timeout is
              given, the message should not be hidden without user action
              (usually a mouse click). The return value is an integer, a mes-
              sage handle that may be used for cancelling the message before
              timeout expiration, or zero if there is currently no system tray
              to handle the request.

       pathName configure ?options?
              Modify icon's options after it was created.

So we could potentially do the following:
 * have two icon images, which can be explicitly changed via pathName configure...
 * instead of changing the tray icon, a balloon message could be shown

Therefore reading this, I don't know how to handle the multi frame PNG file or an animated GIF, but it should be easy to exchangethe icon with the configure option.

Reading the initial report, there seem to be balloon messages already? If I understand correctly, they do not have a timeout, which should be easy to add.

Sander, in case of going the "animated" image route, which one would you prefer, the color changing, or the one with the flapping wings?