Bug 152127

Summary: tray flashes irrespective of Enable events for active chat windows setting
Product: [Unmaintained] kopete Reporter: Will Stephenson <wstephenson>
Component: Main ApplicationAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version First Reported In: 0.40.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Will Stephenson 2007-11-10 18:54:12 UTC
Version:           0.40.0 (using KDE Devel)
Installed from:    Compiled sources

The system tray flashes on all new messages, even if there is already an active chat window.  This should be controlled by the "Enable events for active chat windows" setting.  I've looked at the code in kopetesystemtray.cpp and I don't see how to get the state "is there an active chat window" from the KopeteMessageEvent.  

In 3.5 this worked but was apparently due to a check on the number of balloon events vs tray events, which seems like it is happening at the wrong level, and anyway we don't have the balloon in 4.0.
Comment 1 Jan Ritzerfeld 2007-11-12 18:22:28 UTC
> In 3.5 this worked but was apparently due to a check on the number of
> balloon events vs tray events,

IIRC this is not 100% correct. In r463970 I added the check comparing these 
events while implementing the balloon timeout feature. Before, there was no 
comparison, just a simple startBlink call.

However, AFAIK the "Enable events for active chat windows" setting does not 
affect message queueing/stacking (that is, neither the balloon nor the tray 
flash) even in 3.5!

> which seems like it is happening at the 
> wrong level, and anyway we don't have the balloon in 4.0.

In 3.5, the decision whether to queue/stack a message or not is somewhat 
hardcoded in KopeteViewManager::messageAppended. Actually, there are 
several checks: is a chat window already there? if so, is it active? if so, 
is the chat view in the active chat window active?
Comment 2 Roman Jarosz 2007-12-22 18:37:05 UTC

*** This bug has been marked as a duplicate of 153964 ***