[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Disabling of tools
From: Thomas Zander <zander () kde ! org>
Date: 2008-10-11 21:32:53
Message-ID: 200810112332.53444.zander () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Saturday 11. October 2008 23:08:12 Cyrille Berger wrote:
> > A tool can already decide to be not active. It just has to emit done()
> > when the tool manager attempts to activate the tool. So it can check if
> > all its preconditions are met and refuse to be activated if anything is
> > missing. Of course i don't know if that is enough for your use cases.
>
> What about an allready active tool, should it emit "done" when the
> preconditions changed ?
While it technically can, it would not really be a good solution to have
each and every tool detect a change like that and disable itself.
I'd rather have it done more high level so a tool can't cheat.
We already do this for selection changes, in my other email on this thread I
suggested we should do this for current-layer changes too.
> And will it be reenable if the condition becomes
> good again ? And that doesn't disable the tool button.
No, it can't do that. If a tool is done then the toolmanager will give
control back to the tool that started it temporarily, or otherwise the
default tool.
Read the api docs for KoTool::activate for details.
--
Thomas Zander
["signature.asc" (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic