kvirc / KVIrc

The KVIrc IRC Client
http://www.kvirc.net/
GNU General Public License v2.0
238 stars 75 forks source link

Tray icon state frozen #1941

Closed wodim closed 8 years ago

wodim commented 8 years ago

I wrote this script, to be used just after I connect to clear highlights from all windows:

foreach (%w, $window.list(all, all)) {
    window.highlight 0 %w
}

And when I use it the tray icon gets stuck forever in this state:

2016-04-17_16-01-37

un1versal commented 8 years ago

This report reminds me of that joke, A guy goes to the doctor's and says "Doctor it hurts when I move my arm" The Doctor replies, "Then stop moving your arm".

wodim commented 8 years ago

As discussed on IRC: even though all entries in the window list are dehighlighted by that script, it looks like the tray icon keeps a separate record of the highlight level of each window, and so the way to fix the tray icon is to switch to all channels, one by one.

un1versal commented 8 years ago

Cant you script that also in that for loop?

wodim commented 8 years ago

What?

wodim commented 8 years ago

Ah, no. The tray icon and the highlight level of each window must always be in sync. Therefore there isn't even is a scripting function to edit the highlight level of a window on the tray icon.

un1versal commented 8 years ago

you can disable the tray icon anyway before running that for loop... if you do and minimize kvirc, the icon tray is automatically re-enabled.

wodim commented 8 years ago

I know. I can also use mIRC.

un1versal commented 8 years ago

that was a genuine workaround suggestion, but if you want to use mirc instead, go ahead.

un1versal commented 8 years ago

This 100% works

foreach (%w, $window.list(all, all)) {
    trayicon.hide
    window.highlight 0 %w
    trayicon.show
}
wodim commented 8 years ago

Not a bug.