PreviousNextTracker indexSee it online !

(12/22) 3134759 - Sessions: toolbar in jEdit main toolbar

This patch is a workaround for the problem mentioned in bug 2114751, where the Sessions plugin's toolbar doesn't work when placed in jEdit's main toolbar - it's usually not even visible, but even in the situation where it is, cannot be used.

While the underlying problem has now been fixed in jEdit trunk (rev#19121), this adds a bit of code to the plugin to make it also work on those versions of jEdit that has the problem (since rev#12604, which includes jEdit 4.4).

What it does is check if the main toolbar is a JPanel; if it is, it looks through the direct children until it finds a JToolBar, and uses that instead (if one exists).
If it isn't a JPanel, or doesn't directly contain a JToolBar, the sessions toolbar is added directly to the main toolbar as before, so should still work on versions without the problem.

Submitted edorfaus - 2010-12-11 - 03:28:55z Assigned sjakob
Priority 5 Category None
Status Open Group None
Resolution None Visibility No



2010-12-11 - 03:28:55z

Workaround for adding the SessionSwitcher to the main toolbar