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

List:       koffice-devel
Subject:    Disabling of tools
From:       Cyrille Berger <cberger () cberger ! net>
Date:       2008-10-11 16:57:04
Message-ID: 200810111857.05208.cberger () cberger ! net
[Download RAW message or body]

Hi,

I am trying to solve the issue in Krita that (some) tools need to be disabled 
when the active layer is either not visible or locked. We want two things to 
happen:
* the tools to be disabled in the toolbox
* prevent the tools to do change the current layer

I think karbon has the same need. But I will let Jan comment on this ;)

The quick and dirty solution is to disable the toolbox widget and to prevent 
the tool manager to redirect events to the active tool. This has the 
infortunate effect of being dirty (especially the access to the toolbox 
widget part) and of disabling all tools even those that are allways usefull 
like zoom/pan.

So I have an other idea (but since I don't know enough about flake, I want 
some opinions/advices before jumping in), which basically is based on adding 
an "enabled" property to the tools:
* it would be up to the tool to know when to eneabled/disabled themselves
* then the tool manager would refuse to send events to a disabled tool (still 
needed if the user select as active layer a locked layer with, for instance, 
the paint tool)
* the main difficulty is that the tool button are associated to different tool 
instance, for the different input devices, I don't see a reason why the tool 
would be enabled or not depending on the input device, yet to me the best 
solution would be for the tool button to be enabled or disabled depending on 
wether the tool instance for the current input device is enabled or disabled

Any thoughts ? Better idea ?

-- 
Cyrille Berger
_______________________________________________
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