Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#88 Sessions: toolbar in jEdit main toolbar

open
Steve Jakob
None
5
2012-03-12
2010-12-11
EdorFaus
No

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.

Discussion

  • EdorFaus
    EdorFaus
    2010-12-11

    Workaround for adding the SessionSwitcher to the main toolbar

     
    Attachments
  • Alan Ezust
    Alan Ezust
    2012-03-12

    • assigned_to: nobody --> sjakob