Update PhoneManager.

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@7780 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro
2007-03-29 17:20:52 +00:00
committed by derek
parent 552921d2f9
commit b896b8d398

View File

@ -145,11 +145,7 @@ public class PhoneManager implements ChatRoomListener, ContextMenuListener {
public void finished() {
// Handle actions.
if (actions.size() == 1) {
final Action action = actions.get(0);
action.actionPerformed(null);
}
else if (actions.size() > 1) {
if (actions.size() > 0) {
// Display PopupMenu
final JPopupMenu menu = new JPopupMenu();
for (Action action : actions) {
@ -196,13 +192,8 @@ public class PhoneManager implements ChatRoomListener, ContextMenuListener {
}
}
if (actions.size() == 1) {
Action action = actions.get(0);
action.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.DIAL_PHONE_IMAGE_16x16));
action.putValue(Action.NAME, "Dial");
popup.insert(action, 2);
}
else if (actions.size() > 1) {
if (actions.size() > 0) {
final JMenu dialMenu = new JMenu("Dial");
dialMenu.setIcon(SparkRes.getImageIcon(SparkRes.DIAL_PHONE_IMAGE_16x16));