SPARK-1242 refixed problems with renaming groups

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12283 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Holger Bergunde
2011-04-26 16:38:38 +00:00
committed by holger.bergunde
parent 567cc46566
commit ee94b88171

View File

@ -1472,8 +1472,8 @@ public final class ContactList extends JPanel implements ActionListener,
}
});
rename.addActionListener(new ActionListener() {
rename.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String newName = JOptionPane.showInputDialog(group, Res.getString("label.rename.to") + ":", Res.getString("title.rename.roster.group"), JOptionPane.QUESTION_MESSAGE);
if (!ModelUtil.hasLength(newName)) {
@ -1485,13 +1485,15 @@ public final class ContactList extends JPanel implements ActionListener,
RosterGroup rosterGroup = roster.getGroup(groupName);
//Do not remove ContactGroup if the name entered was the same
if (rosterGroup != null && !groupName.equals(newName)) {
removeContactGroup(group);
removeContactGroup(group);
rosterGroup.setName(newName);
addContactGroup(newName);
toggleGroupVisibility(newName, true);
getContactGroup(newName).setCollapsed( group.isCollapsed());
}
}
});
expand.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Collection<ContactGroup> groups = getContactGroups();