[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    Re: [Kopete-devel] Re: kdenonbeta/kopete/kopete
From:       Carsten Pfeiffer <carpdjih () mailbox ! tu-berlin ! de>
Date:       2003-02-05 19:24:13
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----

On Wednesday 05 February 2003 19:55, Nick Betcher wrote:

> So far I've heard more cries for the hide-on-close than
> kopete-blocks-KDE-from-shutting-down. I need a more viable solution.
> Carsten's suggestion of just shutting this "feature" (if that's what you
> want to call it) is more like a workaround, not a solution. Solutions
> people, solutions :)

The problem is that session management will close all KMainWindows during 
logout. If any window rejects this close-event (i.e. with ev->ignore()), then 
logout will be aborted. That's certainly not what we want.

If you could accept the close-event only if it comes from session management 
and reject it otherwise, everything would be fine. The problem is: how to 
detect that. I didn't find a solution so far. Ok, I think I found one.

You can reimplement KApplication::commitData() like that:

virtual void KopeteApplication::commitData( QSessionManager& sm )
{
	m_isShuttingDown = true;
	KApplication::commitData( sm );
}

and checking this boolean in KopeteWindow::closeEvent(). From there you should 
probably also reset it to false again, because some other client may have 
aborted the shutdown sequence.

Another possible solution might be to disable WDestructiveClose for 
KopeteWindow -- it won't be destroyed then, upon close-events, just hidden.

Cheers
Carsten Pfeiffer
-----BEGIN PGP SIGNATURE-----

iQEVAwUBPkFk3aWgYMJuwmZtAQFziAgAiuD9c3FWfvDCIM1gz3v3+iRnzpwjPY9c
ECvBf7GyVAPkIb1UTq/xZPSuA/k/8lGchWKVVzqSjF9HJKojwDTpdrSDne4b2fa3
ob6rMwxDhsYiCsOP7QZx52x2NLjL1df/pa+ID1l8l1fsnqwYQSSAZx57ydNBc1NL
KI+uzHTnX8qmTQ3uAcxqQX+qL/F+7Of882jJW83XL932fvGvm6GAHO0jh8ZkI6xy
NPF6Zs66i8bgGwQCQmH8gct1LP9CLWS5xkVkcM8O542EUy2YuaY9u64AKhubV6Lp
pMeI3jnlxGf+ByyxL87Xfj9hjALitVL1mlYIaBt5qtmHD7Fvqq1Seg==
=5UUc
-----END PGP SIGNATURE-----
_______________________________________________
Kopete-devel mailing list
Kopete-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic