powered by Jive Software

SparkTabbedPane (Externalizing Tabs)

Hi Guys,

I’ve added a function to externalize tabs (drag and drop).

Here is the Patch.

Would be nice, if it will be tested by some users and reporting the bugs here.



EDIT: newest version added to attachment
TabbedPane_NEWEST_VERSION.patch (108574 Bytes)


i’ve optimized this patch and now there is an option to open externalized chatrooms directly…

Does noone want to test this patch ???

By the way, the History saving is also optimized in this patch. Now the history is saved on every received or sent message.

No history gets lost.



EDIT: newest version added to attachment
TabbedPane_NEWEST_VERSION.patch (108574 Bytes)

I want! I just didnt notice your message before. How can i try your patch? I already has a svn copy and i can compile it with NetBeans. How can i apply your patch to this source code?

As about history. Maybe it’s worth splitting this functionalities? Personally i have never experienced history loss, but i know others are complaining often. And there is still two separate JIRA issues for tabs and history

Hi wroot,

before history saving wasn’t advantageous…

When spark crashed or was closed unproperly and chatrooms were opened, the history got lost.

If you’re using eclipse, patching is very easy. Just rightclick the spark project and then team —> Apply Patch…

and i think the rest you’ll understand on your own =)


I’ve found the way to apply your patch in Netbeans (didnt have a luck to run this project in Eclipse…). So i’m testing it now. Externalizing (hm, should be a better name for that) is working. The great thing is to see actual presence of a user in a taskbar window. I was asking for that for a tabbed window http://www.igniterealtime.org/issues/browse/SPARK-935 . Probably i could close that issue if your changes will be submitted to a Spark release.

Now issues and requests.

Maybe you can add an “Externalize” button to a tabbed chat window so one could easily move chat window to a stack and out of it.

When in a externalized mode chat window is not flashing in the taskbar upon message receiving. Also it jumps in the front, though i havent selected Bring to the front option.

As for a history. I see no difference. It still doesnt save the new message if i kill the Spark right after receiving it. On a normal exit it saves the history with the old source code and with your patch.

Maybe the history wasnt saving because i was killing the batch file which is launching the source build.

attaching the modified spark.jar which should be copied to a Spark installation dir (e.g. Windows - C:\Program Files\Spark\lib)

old patched spark.jar deleted, new one uploaded on the next page**

I was thinking. What about making the option to externalize the tab always available (via a button on the chat window toolbar). And the same with the button letting to put a separate tab to a stack. And the option in the preferences will only turn on the separate windows for the new chats.

This is because maybe one prefer to use tabbed view, but occasionally wants one tab to be a separate one. To do this with the current approach one would need to change the preference twice.

And about the naming. Daniel in http://www.igniterealtime.org/issues/browse/SPARK-893 is suggesting Detaching and reattaching. This sounds better, imho. Externalize button - “Detach this tab to a separate window”, Internalize button - “Reattach this window to a tab stack”. Option in the preferences - “New chats open in the separate windows”. Just a suggestion.


I’m implement this solution, but don’t have window alert or warning (flashes).How can enable this feature?


Rodrigo Marx

Hi guys!

nice ideas, wroot! I’ll do my best to fix the problems and add these features soon.

When it’s done, i’ll post the new patch.


Niklas Schäfer

fgrsa wrote:

I’m implement this solution, but don’t have window alert or warning (flashes).How can enable this feature?

You dont see alerts and flashing because message window jump in the front of other windows. When the chat window is in the front it doesnt show alerts and the window doesnt flash. This issue should be fixed in the next patch.

Niklas, great. Thanx for you work

Hi wroot,

You said that the option in the preferences should only turn on the separate windows for the new chats, but this is what it already does.

Detaching the tabs is always on and in detached tabs, there is always a green arrow, which reattaches the window to a tab stack.



n1ck wrote:

You said that the option in the preferences should only turn on the separate windows for the new chats, but this is what it already does.

Yes. I was just saying that this option should work as it is. But one shouldn’t have to leave that turned on just to be able to detach and attach tabs. I mean i still want new chats to be opened in tabs and i only want some of them to detach. Then i will leave that option turned off. But there still should be “detach” and “attach” buttons visible and working in the chat window.

I don’t really understand what you mean…

If the option is turned off and you open new chats, then they will open in the tab stack. Then, if you want to detach the tabs, you can detach them using the mouse (drag and drop). There is no need for a detach button…


this is the newest SparkTabbedPane Patch.

Now the history should be saved after every message.

A Performance Problem when sending many emoticons is fixed and the Alerts should work now with the detached tabs.


Edit: another bug was fixed and the attachment was updated =)

EDIT: sorry, code was optimized again!
TabbedPane_NEWEST_VERSION.patch (108574 Bytes)


You can create the file .jar and put here for download ?


Rodrigo Marx

Niklas, everything is fine, in essene we were talking about the same. I agree with the current approach. Drag and drop is a nice thing to have too. Though, maybe this won’t be very intuitive for novice users. I dont think additional button would harm anyone We can try releasing this feature this way (without the additional Detach button) and wait for a feedback from the users.

fgrsa, i can attach new compiled spark.jar a bit later (4-5 hours).

ahhh ok, wroot!

you thought it would be nice to have a detach button additionally…

hmm, if it is wanted, i would have nothing against it and i could easily add it.

I was applying this patch to the 2008.11.15 trunk. Issues i’ve found:

  • Message popups are now appearing, but the detached window is not flashing in the taskbar. I think it should.

  • Also clicking on such message popup doesnt do anything in detached mode. Normally it brings the chat window in to the front.

  • Another issue is that if i already has some user in a tab and this user sends me a message, then an additional detached chat window is opened. I think it should check if a chat is already open with that contact and just flash the already open chat widnow with a tab. This is happening because the option “Open new chats in separate windows” is turned on. But if a tab is already open, this should count as an old chat.

Drag and drop is a bit tricky. There is no visual effect while you are dragging the tab. So it takes some time to get used to it. You can only drag the tab out of the tabs stack when dragging upwards or downwards. Dragging to the sides doesnt do anything. Not a big problem. But i think we should definitely have a Detach button. Because attaching is done only with a button. Functionality should be the same for the detaching. And drag and drop could be just as a bonus option

History is indeed saving even after killing the Spark process.

Rodrigo, i’m attaching the newest patched spark.jar, but this is still for the testing purposes. It still has some little issues.
spark.jar (3200206 Bytes)