System Tray animation and notification

Bug #140411 reported by Yohnson1111
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Coccinella
In Progress
Wishlist
Mats

Bug Description

It would be great if the notification near the system tray icon would go
away after a few seconds, instead of forcing the user to close the
notification.

Also animation much like that of PSI for the system tray icon would be
great, making it an option for the method of incoming chat notification.
In the case of a ladybug, having the wings flap or something would be a
nice touch.

Animation of the user's icon who started the chat in the roster window
would also be another preference enhancement.

These suggestions are UI improvements that make the application more
desirable and configurable based on user's preferences.

Cheers to the application creator!

Revision history for this message
sander (s-devrieze) wrote :

"Animation of the user's icon who started the chat in the roster window
would also be another preference enhancement."

-1: it would make the roster look like a xmas tree. Also, there are people that are not able to look at such animations.

0: neutral for the other ideas

Changed in coccinella:
assignee: nobody → matsben
importance: Medium → Wishlist
sander (s-devrieze)
Changed in coccinella:
milestone: next-release-example → none
Revision history for this message
v_2e (v-2e) wrote :

>Also animation much like that of PSI for the system tray icon would be
>great, making it an option for the method of incoming chat notification.
>In the case of a ladybug, having the wings flap or something would be a
>nice touch.

>Animation of the user's icon who started the chat in the roster window
>would also be another preference enhancement.

  I agree - all these features would be nice to see. I also think they must be optional - for those who don't need them could disable them.
  I can say even more! As soon as I began using Coccinella a thought about its wings flapping indicating an unread incoming message fell into my mind. :) It really would be nice!

Revision history for this message
v_2e (v-2e) wrote :

  Hello, everyone!
  I have made an attempt to animate Coccinella tray icon. It is quite simple at the moment, but still it provides some idea on how could this animated image look like.
  I'm not sure if you like it, but I repeat - this is a very first try.
  It would be nice to hear you comments and suggestions.

  P.S. Since MNG support is very poor nowadays, I post this icon in GIF format.

  Oh, and one more thing. I was interested in how other applications make their tray icons blink, turn, jump, etc. and here is what I found out: they store a set of frames in a regular PNG file, and their application just switch between those frames if needed. In such approach there is no need in MNG (or any other true animation format) support by the desktop environment. So I thought that this could be a solution to us too. But if we decide to do so, we will have to ask Coccinella developers to add the necessary functions which will switch between the consecutive frames in PNG file when a message arrives (or maybe any other important event happens).

buzzdee (sebastia)
Changed in coccinella:
milestone: none → 0.96.20
Revision history for this message
sander (s-devrieze) wrote :

Instead of moving things in the icon, I would prefer an icon in which only the color of the wings changes, temporary or until the user sees the notification, I don't know which of the 2 is the best. If this is implemented well, probably this can become the default without the need to have a configuration option for it.

Revision history for this message
v_2e (v-2e) wrote :

Well, it seems to me that "moving wings" and "changing the wings colour" are the same task. Both approaches require to change a tray icon by switching between few different images.
  These images may contain coccinella with different wing positions (which I prefer, and by the way, I have read about "flapping wings" request in somebody else's post, so I'm not the only one :) ), or coccinella with different wings colour. Making such images is simple enough, so this isn't a problem. Still, I do not know how difficult it is from the programmer's point of view.

  In one word, I suggest to make coccinella flapping wings or to make it optional (for example, to provide a possibility to check from different sets of icons - a kind of "icon themes"). I think so because I do not like the idea of changing the wings colour at all (nothing personal :) ). I would like to see coccinella always with red wings. :)
  But if there is a possibility to change the animation by simple replacing the corresponding PNG file - it would suit my needs too.
  And maybe the idea of "icon themes" isn't bad at all in such case?
  What do you think?

Revision history for this message
v_2e (v-2e) wrote :

  Hello again!
  Please excuse me for posting a lot of messages here (is there a mailing list or an IRC channel for such things?), but I would like to know what you (the developers) have decided about this question. I'm asking, because I could start working on "coccinella flapping wings tray icon" or "coccinella changing colour" icon or something else.
  For example, suggested to use a PNG file, in which there would be a row of square icons, each depicting one "frame". And the program would switch from one icon to the next one in a row making it look like the icon was animated. What do you thing about it? Is it possible to implement?

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?

Revision history for this message
v_2e (v-2e) wrote :

  Hello again!
  What I was speaking about is the third way, I believe. I suggest using a single file with a number of icons set in a row. Just like on the image I attached.

Revision history for this message
buzzdee (sebastia) wrote :

but reading the tktray manual page, I don't see how I can flip between the right and left icon. But any hint would be appreciated.

http://sw4me.com/wiki/Tktray (a little bit outdated)

easier shold be to switch between two icon files.

Revision history for this message
v_2e (v-2e) wrote :

  Oh! Now I see.
  So, it is easier to have a set of separate files rather than separate icons within one file. Well, it is also easier to create a set of files instead of one big file. But I'm not sure it would be nice to have a set of files for one icon. Still, if you decide to do so, I can prepare the images.
  And like I have said earlier, I can make both "coccinella flapping wings" and "coccinella changing colour" icon sets. Then you could leave it up to user to decide which icon theme to use. I think, it would be convenient.

Revision history for this message
buzzdee (sebastia) wrote :

I think the situation is even worse. The taskbar stuff exists as a component in components/taskbar/Taskbar.tcl.

    switch -- [tk windowingsystem] {
        win32 {
            if {[catch {package require Winico}]} {
                return
            }
        }
        x11 {
            if {[catch {package require tktray}]} {
                return
            }
        }
        default { return }

so on Windows it uses Winico, on Unix like systems it uses tktray, and on MAC I don't know????
maybe its worth trying whether tktray works on windows too? At least as far as I can see, grepping the ./configure script of tktray for win32 actually shows sth. regarding mingw and friends. On OpenBSD I have the latest release here, tktray 1.3.8. The binary for Linux that comes with coccinella is the rather old 1.1 version, probably with that version.

Sander do you can build the tktray-1.3.8 on a Windows box, and maybe also on a MAC?

Revision history for this message
sander (s-devrieze) wrote :

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

Probably it's best to try out different solutions and then decide about the default.

Revision history for this message
sander (s-devrieze) wrote :

"Sander do you can build the tktray-1.3.8 on a Windows box, and maybe also on a MAC?"

As discovered Windows does not support the freedesktop standards and does not include X11 which is needed for tktray. Mac OS X can support X11, but this is not the default. So, it is better to not use tktray in Mac.

For Linux, I build the latest version on my 32 bit box (see attachment).

buzzdee (sebastia)
Changed in coccinella:
status: New → In Progress
Revision history for this message
buzzdee (sebastia) wrote :

Regarding the initial report, right now I am wondering what kind of notifications show up next to the tray icon? Do they show up actually with tktray? Or is that maybe only on Windows?

Further, I don't know how/when PSI shows animates its tray icon.

I think we could add an option to the "Contact Actions" dialog tabs, like "animate tray icon".
When the user checks this, the animation is started.

For the tray, there is a 32x32 pixels icon used.
As far as I can see from the code, its the themes/Oxygen/icons/32x32/coccinella.png icon. So we would need a second icon with the wings open. v_2e could you create one?

Revision history for this message
v_2e (v-2e) wrote :

  Hello!
  Here is an 32x32 PNG icon.

Revision history for this message
sander (s-devrieze) wrote :

@buzzdee: "Or is that maybe only on Windows?" --> Yes, it is a Windows only feature. Maybe that feature simply should be removed and then replaced by Growl support (which is already available on the Mac OS X version of Coccinella): http://www.growlforwindows.com/gfw/about.aspx Note that it is still on my long term TODO list to replace the Growl support in Coccinella because it is based on an obsolete Growl plugin (nowadays there exists a better script).

"I don't know how/when PSI shows animates its tray icon."-->AFAIR it shows an envelope icon when a message is received.

"Contact Actions" --> -1, this is an application wide option which belongs in the preferences dialog.

@v_2e: the icon in your attachment is 128x128. Can you create a new icon based on the SVG version of the 32x32 icon? Simply downsizing the 128x128 will be ugly because that version contains too much details.

Revision history for this message
v_2e (v-2e) wrote :

  Hello!
  I'm sorry. I hav really put a wrong icon into the attachment.
  I can try making a new icon using SVG source, but I have no SVG image of coccinella. If you give me the source SVG image, I will work on it if necessary.
  Until then take a look at the 32x32 PNG icon obtained by downsizing with interpolation. As for me, it is not so ugly. :)

Revision history for this message
sander (s-devrieze) wrote :

Indeed, it seems there exists no SVG version of the icon. Maybe you should make it ;)

Revision history for this message
v_2e (v-2e) wrote :

  :D
  I must say, it would be very difficult or even nearly impossible for me. I can do some work in Inkscape, but I'm definitely not an artist. :)
  If there is no SVG image and if it is REALLY necessary to have one, I could take the PNG image and try to create its SVG copy step by step. But it would not be soon anyway.

  By the way, who created these icons? Maybe their author has their SVG variants?

Revision history for this message
buzzdee (sebastia) wrote :

A collegue of mine used potrace http://potrace.sourceforge.net
Its an InkScape plugin to vectorize bitmaps, maybe you can try that.

However, just for playing around with the code in the meantime, I can take any icons, doesn't matter ;)

Revision history for this message
sander (s-devrieze) wrote :

I don't believe there exists an SVG version of this icon. If you want to vectorize it with potrace, I suggest you to download the 256x256 version of the icon at http://everaldo.com/crystal/

Revision history for this message
v_2e (v-2e) wrote :

  I must say that vectorizing the raster images often gives huge files. It is sometimes even impossible to work with such files having about only 1GB of free RAM.
  Creating a copy by hand usually gives much better quality and a very very smaller size.
  That is why I suggest using a downsized icon until I (or somebody else) create an SVG copy by hand. But I'll do my best. :)

Revision history for this message
buzzdee (sebastia) wrote :

after the whole discussion, summarizing, what actually should be done code wise:
 * animate the tray icon on any incoming chat messages, but only in following cases:
    * whole coccinella is minimized
    * actual chat window where the chat belongs to is minimized
 * make it configurable via the preferences in Jabber/Customization, where the other tray related stuff is configured
 * not touching the "Contact Actions dialog"

regarding the animation:
 * animate for some seconds, e.g. 3 or 5
 * keep the wings open, until coccinella becomes the active application or receives a click

If that all works, maybe then later someone can open another wishlist, regarding showing the contacts icon who started the thread
Is that something we could agree?

Revision history for this message
sander (s-devrieze) wrote :

Seems ok.

Revision history for this message
v_2e (v-2e) wrote :

  Hello!
  I definitely agree that "Contact Actions" should not be used for this.
  But as of the other points, I personally prefer everything to be customizable: when to animate the icon (minimized coccinella or not, minimized chat or not), the animation time and whether to keep the wings open or to just continue flapping. But this is my personal point of view. I do also believe that many users wish to see as simple interface as possible, so they probably won't like too many options in the settings dialogs.
  I'm not sure about what way do you usually go (simpler interface vs. more customizable program).

  Finally, the preferred settings for me would be:
  - the animation starts when an incoming message of any type (chat or a normal message) is received and when I do not see the chat window (the window is inactive and is hidden behind some other windows; the window is on inactive workspace; the window is minimized; etc.).
 - the animation ends only when I see the chat window, not by some kind of a timeout (but keeping the wings opened without flapping after some time of flapping is a nice option too);

Revision history for this message
sander (s-devrieze) wrote :

"I personally prefer everything to be customizable: when to animate the icon (minimized coccinella or not, minimized chat or not), the animation time and whether to keep the wings open or to just continue flapping."

There exists a config file for such detailed things; it does not belong in the interface.

buzzdee (sebastia)
Changed in coccinella:
milestone: 0.96.20 → 0.96.22
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.