diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-07-31 10:01:04 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-07-31 10:01:04 +0000 |
commit | de3361a81bffb357ca37a0cfd1ec6ae131dc88c9 (patch) | |
tree | 1abe8963713d55e7746d016a2985134404abfcdc /src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java | |
parent | c77d776784884a225a40801154b0d3f9c1b4b8ce (diff) | |
download | jitsi-de3361a81bffb357ca37a0cfd1ec6ae131dc88c9.zip jitsi-de3361a81bffb357ca37a0cfd1ec6ae131dc88c9.tar.gz jitsi-de3361a81bffb357ca37a0cfd1ec6ae131dc88c9.tar.bz2 |
Fixes the contact list to switch the tooltips of contacts event when the contacts have one and the same display name.
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java index a96d748..00b4d25 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java @@ -181,29 +181,35 @@ public class DefaultContactList Object element = getModel().getElementAt(index); + /* + * As stated above, the returned tooltip isn't actually displayed and we + * just have to be sure to return different string values for the + * different list elements. But the displayName property value doesn't + * cut it because it isn't unique across the elements. + */ if (element instanceof MetaContact) { MetaContact metaContact = (MetaContact) element; - return metaContact.getDisplayName(); + return metaContact.getMetaUID(); } else if (element instanceof MetaContactGroup) { MetaContactGroup metaGroup = (MetaContactGroup) element; - return metaGroup.getGroupName(); + return metaGroup.getMetaUID(); } else if (element instanceof ChatContact) { ChatContact chatContact = (ChatContact) element; - return chatContact.getName(); + return chatContact.getUID(); } return null; } - /** + /** * Returns the next list element that starts with a prefix. * * @param prefix the string to test for a match |