NextTracker indexSee it online !

(1/22) 1679396 - Add cool MacOSX-style drawers for dockables (optional)

This patch adds the option to have the dockables behave like drawers as in MacOSX. This looks nice and is really useful because a drawer extends to the outside and does not make your central edit pane smaller when opening a dockable.

There are two new options for the View (global options):
- enable drawers (by default off which resembles the old style)
- use drawers only for left and right (popping them up at the top or bottom is usualy not very helpful since there is probably no space left between jedit's window and the screen border on typical screens today)

The implementation uses JDrawer [1] of the iSQL application and is released under the MPL. I have added some modifications to the code (bug fix and new option). The code was taken from koders [2]. JDrawer is completely based on Swing and thus works on any OS supported by Java/Swing.

[1] http://isqlviewer.com/dev/javadoc/org/isqlviewer/swing/JDrawer.html
[2] http://www.koders.com/java/fid16F7297F9AA3E7F56446C08C7F26D2228DFF08EF.aspx?s=cdef%3Atree

Submitted aklimets - 2007-03-12 - 23:10:57z Assigned nobody
Priority 6 Category general
Status Open Group None
Resolution None Visibility No

Comments

2007-03-12 - 23:22:13z
aklimets
Logged In: YES
user_id=578876
Originator: YES

File Added: jedit-with-drawers.png
2007-03-13 - 02:48:57z
vanza
Logged In: YES
user_id=75113
Originator: NO

What's the possibility of integrating MPL code into a GPL application? For this to be even possible, we'd need:

- MPL to be GPL-compatible, or allow redistribution under a different license.

or

- permission from the original author to release the code under GPL.

Before anyone tries to apply the patch, someone with more understanding of these licenses probably should comment...
2007-03-13 - 17:57:27z
aklimets
Logged In: YES
user_id=578876
Originator: YES

The MPL is normally not GPL compatible, because it states that you name the originator whereas the GPL states that everything it touches must state exactly the GPL and nothing else :-(

The copyright statement of that file not only cites the MPL but also:
* Portions created by Mark A. Kobold are Copyright (C) Copyright (C) 2000 Mark A. Kobold. All Rights Reserved.
* Contributor(s): Mark A. Kobold <mkobold@sprintpcs.com>.

I think it is necessary to contact the author and give permissions to release it under the GPL. If you want, I will do that.
2007-05-16 - 10:27:22z
aklimets
Logged In: YES
user_id=578876
Originator: YES

FYI: I just sent a mail to Mark A. Kobold <mkobold@sprintpcs.com> and asked him for a GPL-relicensing. (In order to get this patch done ;-)
2007-05-16 - 11:52:35z
mkobold
Logged In: YES
user_id=67341
Originator: NO

I would be happy to provide my JDrawer code to the public under the GPL. I actually do not use it at this time in my current 3.0 branch as I got somewhat of a mixed reaction from my usage of it and i never got the whole 'full-screen' working. The full-screen problem is what should the drawer do when the parent window is maximized? Maybe the jEdit group will figure it out and i will have to ask for it back ^^.

So if i need to provide a copy of it with the license change I can do so; otherwise if this notice is enough then there is nothing more i need to do correct? I would be curious to see some screenshots of this in action within jEdit.

Thanks

Mark.
2007-06-01 - 10:02:07z
aklimets
Logged In: YES
user_id=578876
Originator: YES

There is still an annoying problem with the patch: the size of the drawer often depends on the size of the contents, so if you open a docker with a long text label for example, the drawer window will be very wide. This is a problem when the drawer goes beyond the end of the screen. Resizing is only possible when you move the jedit window to the far left (if drawer on the right) in order to get the drawer's right border (resize handle) back into the screen. There can be situations where you are unable to get this done.

Once the size is too large, it won't get smaller for smaller contents, so it is only "increasing".

Attachments

2007-03-12 - 23:10:57z
aklimets
add-drawer.patch

Full patch for adding drawers, including options (against svn rev 9131)

2007-03-12 - 23:22:12z
aklimets
jedit-with-drawers.png

Screenshot of the drawers in action (under MacOSX)