mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
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:
committed by
holger.bergunde
parent
567cc46566
commit
ee94b88171
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user