try to fix focus problems in the chat window

cusax-fix
Yana Stamcheva 20 years ago
parent 5e8d7f0e6d
commit 34db0c230e

@ -64,24 +64,33 @@ public void openChat(ChatPanel chatPanel, boolean setSelected)
if(chatWindow.isVisible())
{
if ((ConfigurationManager.isAutoPopupNewMessage()
&& chatWindow.getExtendedState() != JFrame.ICONIFIED)
|| setSelected)
if(chatWindow.getExtendedState() != JFrame.ICONIFIED)
{
if(chatWindow.getState() == JFrame.ICONIFIED)
chatWindow.setExtendedState(JFrame.NORMAL);
chatWindow.toFront();
chatWindow.setCurrentChatPanel(chatPanel);
if(ConfigurationManager.isAutoPopupNewMessage()
|| setSelected)
chatWindow.toFront();
}
else
{
if (chatWindow.getState() == JFrame.ICONIFIED
&& !chatWindow.getTitle().startsWith("*"))
if(setSelected)
{
chatWindow.setTitle(
"*" + chatWindow.getTitle());
chatWindow.setExtendedState(JFrame.NORMAL);
chatWindow.toFront();
}
if(!chatWindow.getTitle().startsWith("*"))
chatWindow.setTitle(
"*" + chatWindow.getTitle());
}
if(setSelected)
{
chatWindow.setCurrentChatPanel(chatPanel);
}
else if(!chatWindow.getCurrentChatPanel().equals(chatPanel)
&& chatWindow.getChatTabCount() > 0)
{
chatPanel.getChatWindow().highlightTab(chatPanel);
}
}
else
@ -92,12 +101,6 @@ public void openChat(ChatPanel chatPanel, boolean setSelected)
}
chatPanel.setCaretToEnd();
if(!chatWindow.getCurrentChatPanel().equals(chatPanel)
&& chatWindow.getChatTabCount() > 0)
{
chatPanel.getChatWindow().highlightTab(chatPanel);
}
}
}

Loading…
Cancel
Save