powered by Jive Software

Tweak Spark to disable closing of chat window

Hey everyone. I’m trying to get my office in to jabber. Openfire and Spark work quite well, except for one issue - when you close a chat room, you leave it. I think the simplest solution is to disable closing at all.

Like when Spark get a “close” event it should minimize the window instead of closing it.

Has anyone done this? Any help appreciated.

p.s. I’m not a coder, cant do it myself.

Hi Dmitriy!

This feels familiar! The issue of the easily dismissable chat window was also the biggest challenge out-of-the-box when I made our company start using Spark/Openfire.

I agree there are some functions missing that would have Spark work even better in a corporate enviroment! Two things that would be nice would be::

  • user option to make minimize chatwindow on close, or display a confirmation prompt, or close normally (=default)

  • if you have conferences marked as join on startup (or if it’s set on server-side) it would be nice to select if any of those conferences should not be closable by users (forcings user to persist in those rooms)

Its trivial to just map the close button to minimize chat window instead of closing it if you are able to compile Spark from source. To map the close button to minimize window, you could change to method windowClosing in src/java/org/jivesoftware/spark/ui/ChatContainer.java:

public void windowClosing(WindowEvent windowEvent) {
    chatFrame.saveLayout();
    chatFrame.setState(Frame.ICONIFIED); // = minimize to task bar
/* The line below from trunk is removed/commented out, since it closes the chatwindow
   SparkManager.getChatManager().getChatContainer()
                                  .closeAllChatRooms();  */
    ...

If anyone is interested, my workscenario which makes these changes desirable is like this:

We have set up internal chat rooms so the departments can chat among themselves, and also a couple of lobby chatrooms which users from any deparment can join as needed, to quickly get in contact with a different deparment (without butting in to that deparments internal chatroom or chatting up someone from another department directly)

We have set up the chat rooms so each department employee automatically joins his deparment’s internal chatroom upon login. Some employees are additionally designated to monitor their deparment’s lobby, in case some colleague from another deparment needs a question answered.

Whats really important in our situation is that all our users persist in their designated deparment chatrooms, and also that they still can exit from any optional department chat rooms (like a chitcat room), i.e they should be able to close some group tabs, but not others.

Sorry I couldn’t help you directly here Dmitriy, but I think we can agree that these scenarios must be pretty common when you use Spark/Openfire as a corporate chat tool. It would indeed be nice improve Spark in this regard!

/

1 Like

Thanks a lot! That sure is a huge answer :slight_smile: I agree that this needs improvement and adding the option you’ve mentioned would be awesome.