diff --git a/client/src/org/compiere/apps/AEnv.java b/client/src/org/compiere/apps/AEnv.java index 6425e96470..5411e78858 100644 --- a/client/src/org/compiere/apps/AEnv.java +++ b/client/src/org/compiere/apps/AEnv.java @@ -257,7 +257,7 @@ public final class AEnv if (iconName == null) iconName = actionName; String text = Msg.getMsg(Env.getCtx(), actionName); - ImageIcon icon = Env.getMenuImageIcon(iconName + "16"); + ImageIcon icon = Env.getImageIcon2(iconName + "16"); CMenuItem mi = new CMenuItem(text, icon); mi.setActionCommand(actionName); if (ks != null) diff --git a/client/src/org/compiere/apps/APanel.java b/client/src/org/compiere/apps/APanel.java index 03dbf8438c..30521484c9 100644 --- a/client/src/org/compiere/apps/APanel.java +++ b/client/src/org/compiere/apps/APanel.java @@ -162,7 +162,7 @@ public final class APanel extends CPanel /** Private Lock Button */ public AppsAction aLock; // Local (added to toolbar) - private AppsAction aReport, aEnd, aHome, aHelp, aProduct, + private AppsAction aReport, aEnd, aHome, aHelp, aProduct, aLogout, aAccount, aCalculator, aCalendar, aEditor, aPreference, aScript, aOnline, aMailSupport, aAbout, aPrintScr, aScrShot, aExit, aBPartner, aDeleteSelection; @@ -186,6 +186,7 @@ public final class APanel extends CPanel aPrint = addAction("Print", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), false); mFile.addSeparator(); aEnd = addAction("End", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), false); + aLogout = addAction("Logout", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.SHIFT_MASK+Event.ALT_MASK), false); aExit = addAction("Exit", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), false); // Edit JMenu mEdit = AEnv.getMenu("Edit"); @@ -1248,6 +1249,8 @@ public final class APanel extends CPanel else if (cmd.equals(aHelp.getName())) cmd_help(); // General Commands (Environment) + else if (cmd.equals(aLogout.getName())) + cmd_logout(); else if (!AEnv.actionPerformed (e.getActionCommand(), m_curWindowNo, this)) log.log(Level.SEVERE, "No action for: " + cmd); } @@ -1265,6 +1268,15 @@ public final class APanel extends CPanel setBusy(false, true); } // actionPerformed + private void cmd_logout() { + JFrame top = Env.getWindow(0); + if (top instanceof AMenu) { + ((AMenu)top).logout(); + } + + } + + /** * Create New Record * @param copy true if current record is to be copied diff --git a/client/src/org/compiere/apps/AppsAction.java b/client/src/org/compiere/apps/AppsAction.java index 9cfa91383d..6f9c06ddf8 100644 --- a/client/src/org/compiere/apps/AppsAction.java +++ b/client/src/org/compiere/apps/AppsAction.java @@ -159,8 +159,8 @@ public final class AppsAction extends AbstractAction */ private ImageIcon getIcon(String name, boolean small) { - String fullName = name + (small ? "16.gif" : "24.gif"); - return Env.getImageIcon(fullName); + String fullName = name + (small ? "16" : "24"); + return Env.getImageIcon2(fullName); } // getIcon /** diff --git a/client/src/org/compiere/images/Logout24.png b/client/src/org/compiere/images/Logout24.png new file mode 100644 index 0000000000..393598b9f3 Binary files /dev/null and b/client/src/org/compiere/images/Logout24.png differ