1) chat window resize problem fixed

2) the asterisk, which was a mark for a received message is now moved at the beginnning of the title
cusax-fix
Yana Stamcheva 20 years ago
parent f8b72a1e67
commit 86ca679256

@ -183,10 +183,10 @@ public void run()
ChatWindow msgWindow = (ChatWindow) contactMsgWindows
.get(this.contactItem);
if (msgWindow.getExtendedState() == JFrame.ICONIFIED)
msgWindow.setExtendedState(JFrame.NORMAL);
msgWindow.setVisible(true);
if (msgWindow.isVisible())
msgWindow.toFront();
else
msgWindow.setVisible(true);
}
else {
/*
@ -245,10 +245,10 @@ public void windowClosing(WindowEvent e)
.setSelectedContactTab(this.contactItem);
}
if (tabbedChatWindow.getExtendedState() == JFrame.ICONIFIED)
tabbedChatWindow.setExtendedState(JFrame.NORMAL);
tabbedChatWindow.setVisible(true);
if (tabbedChatWindow.isVisible())
tabbedChatWindow.toFront();
else
tabbedChatWindow.setVisible(true);
tabbedChatWindow.getCurrentChatPanel()
.requestFocusInWriteArea();
@ -260,10 +260,10 @@ public void windowClosing(WindowEvent e)
.setSelectedContactTab(this.contactItem);
}
if (tabbedChatWindow.getExtendedState() == JFrame.ICONIFIED)
tabbedChatWindow.setExtendedState(JFrame.NORMAL);
tabbedChatWindow.setVisible(true);
if (tabbedChatWindow.isVisible())
tabbedChatWindow.toFront();
else
tabbedChatWindow.setVisible(true);
tabbedChatWindow.getCurrentChatPanel()
.requestFocusInWriteArea();
@ -309,11 +309,14 @@ public void messageReceived(MessageReceivedEvent evt)
Constants.INCOMING_MESSAGE, message.getContent());
if (msgWindow.getState() == JFrame.ICONIFIED) {
msgWindow.setTitle(msgWindow.getTitle() + "*");
msgWindow.setTitle("*" + msgWindow.getTitle());
}
if (Constants.AUTO_POPUP_NEW_MESSAGE) {
msgWindow.setVisible(true);
if(msgWindow.isVisible())
msgWindow.toFront();
else
msgWindow.setVisible(true);
}
}
else {
@ -356,7 +359,7 @@ public void windowClosing(WindowEvent e)
}
});
}
Hashtable contactTabsTable = tabbedChatWindow
.getContactChatsTable();
@ -374,7 +377,10 @@ public void windowClosing(WindowEvent e)
if (Constants.AUTO_POPUP_NEW_MESSAGE) {
tabbedChatWindow.addChatTab(chatPanel);
tabbedChatWindow.setVisible(true);
if(tabbedChatWindow.isVisible())
tabbedChatWindow.toFront();
else
tabbedChatWindow.setVisible(true);
chatPanel.setCaretToEnd();
@ -397,17 +403,20 @@ public void windowClosing(WindowEvent e)
tabbedChatWindow.setSelectedContactTab(metaContact);
}
if (!tabbedChatWindow.getTitle().endsWith("*")) {
tabbedChatWindow.setTitle(tabbedChatWindow.getTitle()
+ "*");
if (!tabbedChatWindow.getTitle().startsWith("*")) {
tabbedChatWindow.setTitle(
"*" + tabbedChatWindow.getTitle());
}
}
else {
if (tabbedChatWindow.getTabCount() > 1) {
tabbedChatWindow.highlightTab(metaContact);
}
tabbedChatWindow.setVisible(true);
if(tabbedChatWindow.isVisible())
tabbedChatWindow.toFront();
else
tabbedChatWindow.setVisible(true);
}
}
}

@ -338,8 +338,7 @@ public void setSelectedContactTab(int index)
this.setCurrentChatPanel(chatPanel);
this.chatTabbedPane.setSelectedIndex(index);
this.setTitle(chatPanel.getMetaContact().getDisplayName());
this.setVisible(true);
this.setTitle(chatPanel.getMetaContact().getDisplayName());
chatPanel.requestFocusInWriteArea();
}
@ -653,8 +652,8 @@ public void windowDeiconified(WindowEvent e)
{
String title = getTitle();
if (title.endsWith("*")) {
setTitle(title.substring(0, title.length() - 1));
if (title.startsWith("*")) {
setTitle(title.substring(1, title.length()));
}
}

Loading…
Cancel
Save