(MenuCommand c, VirtualList d)
| 104 | } |
| 105 | |
| 106 | public void menuAction(MenuCommand c, VirtualList d) { |
| 107 | if (c == cmdQuit) { |
| 108 | destroyView(); |
| 109 | BombusMod.getInstance().notifyDestroyed(); |
| 110 | return; |
| 111 | } |
| 112 | if (c == cmdConfig) { |
| 113 | new ConfigForm(); |
| 114 | } |
| 115 | if (c == cmdLogin) { |
| 116 | switchAccount(true); |
| 117 | } |
| 118 | if (c == cmdSelect) { |
| 119 | canBack = true; |
| 120 | switchAccount(false); |
| 121 | } |
| 122 | if (c == cmdEdit) { |
| 123 | new AccountForm(this, ((AccountItem) getFocusedObject())); |
| 124 | } |
| 125 | if (c == cmdAdd) { |
| 126 | new AccountForm(this, null); |
| 127 | } |
| 128 | if (c == cmdDel) { |
| 129 | if (cursor == cf.accountIndex && StaticData.getInstance().roster.isLoggedIn()) { |
| 130 | return; |
| 131 | } |
| 132 | //if (((Account)getFocusedObject()).equals(StaticData.getInstance().account)) return; |
| 133 | |
| 134 | new AlertBox(SR.MS_DELETE, getFocusedObject().toString()) { |
| 135 | |
| 136 | public void yes() { |
| 137 | delAccount(); |
| 138 | } |
| 139 | |
| 140 | public void no() { |
| 141 | } |
| 142 | }; |
| 143 | } |
| 144 | super.menuAction(c, d); |
| 145 | } |
| 146 | |
| 147 | public void destroyView() { |
| 148 | if (itemsList.size() > 0) { |
nothing calls this directly
no test coverage detected