Fixes status change problems in chat window. Includes fixes for multiple

status messages and status icon incorrect changes reported by Richard
Karmazín.
cusax-fix
yanas 13 years ago
parent a9c65e9cd3
commit 972d72fcfb

@ -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

@ -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);
}
}
}

@ -6,6 +6,8 @@
*/
package net.java.sip.communicator.impl.gui.main.chat;
import javax.swing.*;
/**
* The <tt>ChatSessionRenderer</tt> is the connector between the
* <tt>ChatSession</tt> and the <tt>ChatPanel</tt>, 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);
}

@ -202,6 +202,10 @@ public void actionPerformed(ActionEvent e)
chatTransport,
(ImageIcon) menuItem.getIcon());
chatSession.getChatSessionRenderer()
.setChatIcon(new ImageIcon(
Constants.getStatusIcon(chatTransport.getStatus())));
return;
}
}

@ -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();
}

Loading…
Cancel
Save