Miranda NG Official Community Forum

Forum for English speaking Miranda NG users => Support/Help => Topic started by: Ducados on 05 12 2013, 01:26:28

Title: Popup plus + scriver: lost options in dialogs
Post by: Ducados on 05 12 2013, 01:26:28
Hi.

After upgrading from Miranda IM and using it a bit, I've found that I have a popup every time I get a message, even when the window that gets the message is open and focused.

I'm using Scriver as the message window manager and have NewEventNotify installed and activated. Both, as does Popup Plus, use the same settings that I had in Miranda IM. I've double checked this by comparing the databased side by side and going through the options dialogs.

In IM, I had the whole thing configured so that the message popup only shows if the message window of a particular contact is not open (because the blinking taskbar icon is enough to notice it in such case). I seem to remember that this was done (in MIM) unticking and option called "Process Clist events" which was right over the "Reorder popus" tick box under the group "Miscellaneous" in the "General" tab under main "Popups" branch in the options tree. It is missing now.

AFAIK, it controls Popup > EnableHookClistEvents in the DB. The entry is there, but it doesn't seems to have any effect. It may be a leftover from my upgrade.

Digging through the options, I've found one that looks like the thing I'm searching for. It is a tickbox called "Don't show Popup when Message-Dialog is already open" in the group "Message-Event only" in Popups > Eventy notify. Sadly, I can't see any changes when it is enabled (it was after the upgrade, BTW).

So, it is possible to avoid showing popups when the message window is already open when using Scriver + Popup Plus + NewEventNotify?

TIA and best regards.
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: watcher on 05 12 2013, 08:16:28
"Process Clist events" checkbox was removed entirely with its code long time ago, so it can't have any effect. But i'm not so sure about NewEventNotify proper work.
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: Ducados on 05 12 2013, 08:36:59
Hi, watcher.
"Process Clist events" checkbox was removed entirely with its code long time ago, so it can't have any effect.

Ok. Good to know.
 
But i'm not so sure about NewEventNotify proper work.


At least "Don't show Popup when Message-Dialog is already open" doesnt work. Is this plugin development active?
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: watcher on 05 12 2013, 16:47:55
Is this plugin development active?

Not that i'm aware of.... but it can be looked at.
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: Ducados on 06 12 2013, 01:17:35
 Well, I have no idea about programming, but I've looked at the source code of NewEventNotify and found this at http://svn.miranda-ng.org/main/trunk/plugins/NewEventNotify/src/main.cpp (http://svn.miranda-ng.org/main/trunk/plugins/NewEventNotify/src/main.cpp):

Code: [Select]
//which status do we have, are we allowed to post popups?
//UNDER CONSTRUCTION!!!
CallService(MS_CLIST_GETSTATUSMODE, 0, 0); /// TODO: JK: ????

if (dbe.eventType == EVENTTYPE_MESSAGE && (pluginOptions.bMsgWindowCheck && hContact && CheckMsgWnd(hContact)))
return 0;

bMsgWindowCheck is the option set by the "Don't show Popup when Message-Dialog is already open" tick box. Looks like it is incomplete code. This might explain why the option does nothing.

Also, at the end of the file there is this:

Code: [Select]
//---Check Window Message function

// Took this snippet of code from "EventNotify" by micron-x, thx *g*
// checks if the message-dialog window is already opened
// return values:
// 0 - No window found
// 1 - Split-mode window found
// 2 - Single-mode window found

int CheckMsgWnd(HANDLE hContact)
{
if (g_IsSrmmWindowAPI) {
MessageWindowData mwd;
MessageWindowInputData mwid;
mwid.cbSize = sizeof(MessageWindowInputData);
mwid.hContact = hContact;
mwid.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
mwd.cbSize = sizeof(MessageWindowData);
mwd.hContact = hContact;
if (!CallService(MS_MSG_GETWINDOWDATA, (WPARAM) &mwid, (LPARAM) &mwd))
if (mwd.hwndWindow != NULL && (mwd.uState & MSG_WINDOW_STATE_EXISTS))
return 1;
}

return 0;
}

It seems that the developer borrowed the code to detect if the message window is already opened from another plugin. This may have happened ages ago. This code must be more than outdated.
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: ghazan on 06 12 2013, 08:18:51
this option does precisely what needed: it filters out unneeded events using SRMM API. There's nothing incomplete or undone here
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: watcher on 06 12 2013, 08:23:52
Showed plugin to main miranda developer - he said that there is nothing wrong with this particular peace of code. Problem is - NewEventNotify still doesn't work properly in some places (like opening dialog window when you left click on popup, or removing popup on right click), code is outdated, problem is that most devs and users use TabSRMM and it has perfectly normal working event notifier built-in.

Post Merge: 06 12 2013, 09:19:09
I was surprised to see that dismiss by right click is working now. Maybe was fixed and i haven't noticed. Your issue i confirm -  even on a fresh new profile when checked not to notify when dialog is already open - it still notifies with popups.
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: Wishmaster on 06 12 2013, 09:51:11
Ducados, I fixed the bug. Try with the next version.

The code in NewEventNotify which you quoted is perfectly fine, nothing is outdated there. The bug was in Scriver itsself.
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: watcher on 06 12 2013, 14:14:33
Wishmaster, I compiled it and it works, thanks!

Ducados, fox will arrive in tomorrow's nightly build.
Title: Re: Popup plus + scriver: lost options in dialogs
Post by: Ducados on 06 12 2013, 23:37:55
Hi. I'm off home and on mobile and I absolutely hate it. Just logged in to say thank you.