SPARK-1235

CTRL-F,E and T all done

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12207 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Wolf Posdorfer
2011-03-29 11:04:04 +00:00
committed by wolf.posdorfer
parent d0fdc38f5f
commit 472a0b650a
4 changed files with 18 additions and 0 deletions

View File

@ -428,6 +428,7 @@ public class UserManager {
contactField.setSelectetIndex(e);
ContactItem item = contactField.getSelectedContactItem();
MouseEvent exx = new MouseEvent((Component) e.getSource(),e.getID(), e.getWhen(),e.getModifiers(),e.getX()+20, e.getY(), e.getClickCount(), false);
SparkManager.getContactList().setSelectedUser(item.getJID());
SparkManager.getContactList().showPopup(contactField.getPopup(),exx,item);
}

View File

@ -2143,6 +2143,21 @@ public final class ContactList extends JPanel implements ActionListener,
}
return list;
}
/**
* Selects the first user found with specified jid
* @param jid, the Users JID
*/
public void setSelectedUser(String jid) {
for (ContactGroup group : getContactGroups()) {
if (group.getContactItemByJID(jid) != null) {
ContactItem item = group.getContactItemByJID(jid);
group.getList().setSelectedValue(item, false);
return;
}
}
}
private void checkGroup(final ContactGroup group) {
try {

View File

@ -116,6 +116,7 @@ public class ConversationHistoryPlugin implements Plugin {
.getSelectedValue());
ContactItem contact = SparkManager.getContactList()
.getContactItemByJID(user);
SparkManager.getContactList().setSelectedUser(contact.getJID());
SparkManager.getContactList().showPopup(contacts, e,
contact);
}

View File

@ -102,6 +102,7 @@ public class FrequentContactsPlugin implements Plugin {
.getSelectedValue());
ContactItem contact = SparkManager.getContactList()
.getContactItemByJID(user);
SparkManager.getContactList().setSelectedUser(contact.getJID());
SparkManager.getContactList().showPopup(contacts, e,
contact);
}