dont display groupchatname if in groupchat, display name of participant instead

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12445 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Wolf Posdorfer
2011-06-01 12:56:45 +00:00
committed by wolf.posdorfer
parent 637d80b18b
commit 9938a3e61a
4 changed files with 14 additions and 3 deletions

Binary file not shown.

View File

@ -843,7 +843,7 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
/**
* Returns the <code>Message.Type</code> specific to this
* chat room.
* GroupChat is Message.Type.GROUP_CHAT
* GroupChat is Message.Type.groupchat
* Normal Chat is Message.TYPE.NORMAL
*
* @return the ChatRooms Message.TYPE

View File

@ -10,6 +10,7 @@ import javax.swing.ImageIcon;
import org.jivesoftware.resource.SparkRes;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.spark.SparkManager;
import org.jivesoftware.spark.roar.RoarProperties;
import org.jivesoftware.spark.roar.RoarResources;
@ -74,7 +75,12 @@ public class BottomRight implements RoarDisplayType {
ImageIcon icon = SparkRes.getImageIcon(SparkRes.SPARK_IMAGE_32x32);
String nickname = room.getTabTitle();
String nickname = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom());
if(room.getChatType() == Message.Type.groupchat)
{
nickname = StringUtils.parseResource(nickname);
}
RoarPanel.popupWindow(this, icon, nickname, message.getBody(),
_lastusedXpos, _lastusedYpos, props.getDuration(),

View File

@ -11,6 +11,7 @@ import javax.swing.ImageIcon;
import org.jivesoftware.resource.SparkRes;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.spark.SparkManager;
import org.jivesoftware.spark.roar.RoarProperties;
import org.jivesoftware.spark.roar.RoarResources;
@ -67,7 +68,11 @@ public class TopRight implements RoarDisplayType {
ImageIcon icon = SparkRes.getImageIcon(SparkRes.SPARK_IMAGE_32x32);
String nickname = room.getTabTitle();
String nickname = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom());
if(room.getChatType() == Message.Type.groupchat)
{
nickname = StringUtils.parseResource(nickname);
}
RoarPanel.popupWindow(this, icon, nickname, message.getBody(),
_lastusedXpos, _lastusedYpos, props.getDuration(),