Project

General

Profile

Halt window closing

Added by Daniel Kempton about 1 year ago

I don't want really want to enable the confirm window closure. However I would like to halt the closure of custom windows. I have two custom windows that open for each connection for a whois and aka script I run. I would like to stop those windows closing.


Replies (7)

RE: Halt window closing - Added by Per Amundsen about 1 year ago

How are you closing them?

RE: Halt window closing - Added by Daniel Kempton about 1 year ago

I am clicking on the red-x. I have tried using the ON ^*:CLOSE:@: looking only for custom windows, and while I can catch the event, I can't stop it. I had hoped using ^ would allow me to interrupt the close, but neither halt, nor haltdef worked. There are a couple of custom windows I want to keep open, and if closed simply minimize.

RE: Halt window closing - Added by Per Amundsen about 1 year ago

You cannot control closing of windows from msl. Is there any reason why you don't just click the minimize button instead?

RE: Halt window closing - Added by Per Amundsen about 1 year ago

I see. I do think training the user to click the right button is the right solution in most cases, but I will think about something for a future version.

RE: Halt window closing - Added by Daniel Kempton about 1 year ago

Is there an "on minimize" event listener. I had, what I thought would be a wonderful solution. That was to tell adiIrc to minimize when clicking the 'x' and then put specific code code in the "on *:close: " listener. However, if set to minimize on the 'x' is enabled, the on close is never called. Probably by far the simplest solution, and one that certainly fit my needs, would be an "on minimize" event listener. From there I can check to see if certain conditions are met, and handle accordingly including closing the window, using /window -c.

RE: Halt window closing - Added by Per Amundsen about 1 year ago

on CLOSING was added in the latest beta.

    (1-7/7)