mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Fixed pending icon issue missing.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@7467 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -26,13 +26,6 @@ import org.jivesoftware.spark.util.ModelUtil;
|
||||
import org.jivesoftware.spark.util.log.Log;
|
||||
import org.jivesoftware.sparkimpl.profile.VCardManager;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.GridBagConstraints;
|
||||
@ -43,6 +36,13 @@ import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
/**
|
||||
* Represent a single contact within the <code>ContactList</code>.
|
||||
*/
|
||||
@ -376,35 +376,6 @@ public class ContactItem extends JPanel {
|
||||
getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11));
|
||||
getNicknameLabel().setForeground((Color)UIManager.get("ContactItemOffline.color"));
|
||||
|
||||
RosterEntry entry = SparkManager.getConnection().getRoster().getEntry(getJID());
|
||||
if (entry != null && (entry.getType() == RosterPacket.ItemType.none || entry.getType() == RosterPacket.ItemType.from)
|
||||
&& RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus()) {
|
||||
// Do not move out of group.
|
||||
getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11));
|
||||
setStatusText("Pending");
|
||||
}
|
||||
else {
|
||||
setIcon(null);
|
||||
setFont(new Font("Dialog", Font.PLAIN, 11));
|
||||
getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11));
|
||||
setAvailable(false);
|
||||
|
||||
String itemStatus = presence.getStatus();
|
||||
if (itemStatus == null) {
|
||||
setStatusText("");
|
||||
}
|
||||
else {
|
||||
setStatusText(itemStatus);
|
||||
}
|
||||
}
|
||||
|
||||
setAvailable(false);
|
||||
return;
|
||||
}
|
||||
else if (!presence.isAvailable()) {
|
||||
getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11));
|
||||
getNicknameLabel().setForeground((Color)UIManager.get("ContactItemOffline.color"));
|
||||
|
||||
RosterEntry entry = SparkManager.getConnection().getRoster().getEntry(getJID());
|
||||
if (entry != null && (entry.getType() == RosterPacket.ItemType.none || entry.getType() == RosterPacket.ItemType.from)
|
||||
&& RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == entry.getStatus()) {
|
||||
|
||||
Reference in New Issue
Block a user