passwordField.getPassword());\r
if (!StringUtils.isEmpty(originalName) && !originalName.equals(reg.name)) {\r
// delete old registration\r
+ registrations.remove(originalName);\r
try {\r
StoredConfig config = getConfig();\r
config.unsetSection("servers", originalName);\r
if (list.size() > maxRecentCount) {\r
list = list.subList(0, maxRecentCount);\r
}\r
- for (final GitblitRegistration reg : list) {\r
+ for (int i = 0; i < list.size(); i++) {\r
+ final GitblitRegistration reg = list.get(i);\r
JMenuItem item = new JMenuItem(reg.name, icon);\r
+ item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1 + i, KeyEvent.CTRL_DOWN_MASK,\r
+ false));\r
item.addActionListener(new ActionListener() {\r
public void actionPerformed(ActionEvent e) {\r
login(reg);\r
StoredConfig config = getConfig();\r
for (GitblitRegistration reg : list) {\r
config.unsetSection("servers", reg.name);\r
+ registrations.remove(reg.name);\r
}\r
config.save();\r
success = true;\r