[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Toolbar progress 2004-09-05
From: |
Quentin Mathé |
Subject: |
Toolbar progress 2004-09-05 |
Date: |
Sun, 5 Sep 2004 21:06:55 +0200 |
Hi everybody,
Just some words about the current toolbar code state…
For the next release and later, I have deactivated the delegate
synchronisation between the toolbars because it could create
segmentation faults and exceptions with Cocoa applications directly
ported to GNUstep. The fact the delegate was synchronised between the
toolbars forced the developer to check that the toolbar delegate is not
used by some other toolbars with the same identifier when you decide to
release it. With my last modification, you need now to specify a
delegate for each new toolbar instantiated similarly to Cocoa (but when
you create a new toolbar, its content is still based on some already
created toolbar with the same identifier when it is possible).
Example :
myToolbar = [[NSToolbar alloc] initWithIdentifier: @"myIdentifier"];
[myToolbar setDelegate: whatever]; <-- this line was optional before
when a toolbar with the identifier "myIdentifier" has been already
created in the past, it is not the case anymore.
[myWindow setToolbar: myWindow];
… otherwise I have added the toolbar items rearranging possibility. To
use it, just press the command key and click on a toolbar element to
move it. You need to have specified a command key (GSFirstCommandKey)
in the GNUstep defaults. When an item is moved, the move is reflected
in the other toolbars with the same identifier.
The drag image is drawn empty or poorly complete when you move a
toolbar item, because I need to add features which permits to draw
directly in an NSImage to improve that.
Now a question, we should probably document somewhere what the modifier
key to use when you want to move a toolbar item… but where ? I don't
know… What is the best place ?
In the future, I need to fix the fact some parts of the code which are
still called redundantly and rewrite the NSWindow+Toolbar.m in a
cleaner way which would be 100 % Cocoa compatible, it should now be
possible thanks to the window decorations support by Alexander
Malmberg.
After that only I will add the very awaited possibility to customise
the toolbar. :-)
Quentin.
--
Quentin Mathé
qmathe@club-internet.fr
- Toolbar progress 2004-09-05,
Quentin Mathé <=