[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Temporary tools
From: |
Bernhard Herzog |
Subject: |
Re: Temporary tools |
Date: |
Sun, 18 Dec 2005 03:00:39 +0100 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/22.0.50 (gnu/linux) |
Valentin Ungureanu <address@hidden> writes:
>> http://savannah.nongnu.org/patch/?func=detailitem&item_id=4695
>
> Two small problems:
> 1. Starting Skencil, choosing File, New and then closing the editor
> window gives an AttributeError.
>
> 2. Start Skencil and press some tool buttons; they remain depressed.
I've commited the patch now together with fixes for these two issues.
I've solved 2. a bit differently than per-editor-tools2.diff, though.
See the code.
>> > We could subscribe the tool buttons to the context. This way each
>> > button can adjust its sensitivity and set itself as active or not
>> > when the context changes. So even if the toolbox doesn't go away it
>> > would always reflect the tool of the current editor.
>>
>> That's basically the way it was already implemented even without the
>> new patch. Whether a button is active or not is effectively a view
>> (in MFC sense) on the current tool.
> ^^^ freudian slip? :)
Maybe. I never did any MFC programming, though.
> If there is no editor active then there is no model to have a view for,
> so maybe the toolbox should be insensitive when this is the case.
This is the case now in CVS.
> I also started a patch about two weeks ago.
> The most notable differences where that context.tool was a property (and
> assigning to context.tool called context.SetTool)
Well, Context is a classic class, and for those properties don'r work
properly. __get__ is called, but not __set__ IIRC.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/