diff --git a/resources/styles/defaultStyle.css b/resources/styles/defaultStyle.css index 80814fa5e..13a2197e6 100644 --- a/resources/styles/defaultStyle.css +++ b/resources/styles/defaultStyle.css @@ -24,9 +24,9 @@ h3 h4 { margin: 0px; - font-size: 100%; - font-weight: bold; - color: #FFC875; + font-size: 8px; + font-weight: normal; + color: #8F8F8F; } h5 diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java index 4e7f1a5f9..4ac7257e4 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java @@ -1989,6 +1989,9 @@ public void run() writeMessagePanel.updateChatTransportStatus(chatTransport); + if (!chatTransport.equals(chatSession.getCurrentChatTransport())) + return; + if(ConfigurationUtils.isShowStatusChangedInChat()) { // Show a status message to the user. @@ -2002,13 +2005,22 @@ public void run() "text/plain"); } + setChatIcon(new ImageIcon( + Constants.getStatusIcon(chatTransport.getStatus()))); + } + + /** + * Sets the chat icon. + * + * @param icon the chat icon to set + */ + public void setChatIcon(Icon icon) + { if(ConfigurationUtils.isMultiChatWindowEnabled()) { if (getChatContainer().getChatCount() > 0) { - getChatContainer().setChatIcon(this, - new ImageIcon( - Constants.getStatusIcon(chatTransport.getStatus()))); + getChatContainer().setChatIcon(this, icon); } } } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatSessionRenderer.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatSessionRenderer.java index 8d563b5b3..bf25ebce4 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatSessionRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatSessionRenderer.java @@ -6,6 +6,8 @@ */ package net.java.sip.communicator.impl.gui.main.chat; +import javax.swing.*; + /** * The ChatSessionRenderer is the connector between the * ChatSession and the ChatPanel, which represents the UI @@ -85,4 +87,11 @@ public void updateChatContactStatus(ChatContact chatContact, * @param subject the new subject to set. */ public void setChatSubject(String subject); + + /** + * Sets the chat icon. + * + * @param icon the chat icon to set + */ + public void setChatIcon(Icon icon); } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatTransportSelectorBox.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatTransportSelectorBox.java index 036550840..1e2ea70e7 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatTransportSelectorBox.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatTransportSelectorBox.java @@ -202,6 +202,10 @@ public void actionPerformed(ActionEvent e) chatTransport, (ImageIcon) menuItem.getIcon()); + chatSession.getChatSessionRenderer() + .setChatIcon(new ImageIcon( + Constants.getStatusIcon(chatTransport.getStatus()))); + return; } } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java b/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java index e7f93dbaf..d08eb47ef 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java @@ -686,7 +686,10 @@ public void contactPresenceStatusChanged( ContactPresenceStatusChangeEvent evt) { if (evt.getSourceContact().equals(contact) - && !evt.getOldStatus().equals(evt.getNewStatus())) + && !evt.getOldStatus().equals(evt.getNewStatus()) + && contactResource == null) // If the contact source is set then the + // status will be updated from the + // MetaContactChatSession. { this.updateContactStatus(); }