diff options
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java | 30 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java | 3 |
2 files changed, 2 insertions, 31 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java index bf325c6..a4f50c5 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java @@ -64,7 +64,6 @@ public class ChatPanel ChatRoomLocalUserRoleListener, ChatRoomMemberPropertyChangeListener, FileTransferStatusListener, - KeyEventDispatcher, Skinnable { /** @@ -229,9 +228,6 @@ public class ChatPanel } this.addComponentListener(new TabSelectionComponentListener()); - - KeyboardFocusManager.getCurrentKeyboardFocusManager() - .addKeyEventDispatcher(this); } /** @@ -449,9 +445,6 @@ public class ChatPanel */ public void dispose() { - KeyboardFocusManager.getCurrentKeyboardFocusManager() - .removeKeyEventDispatcher(this); - writeMessagePanel.dispose(); chatSession.dispose(); conversationPanel.dispose(); @@ -3122,27 +3115,4 @@ public class ChatPanel chatConferencesDialog.setCreatePanelEnabled(!available); chatConferencesDialog.setEndConferenceButtonEnabled(available); } - - /** - * Dispatches key events and process those that were generated when - * conversationPanel ChatTextPane is focused and they were targeting the - * write message panel. - * @param e the <tt>KeyEvent</tt> to dispatch. - * @return <tt>true</tt> if the KeyboardFocusManager should take no - * further action with regard to the KeyEvent; <tt>false</tt> - * otherwise. - */ - public boolean dispatchKeyEvent(KeyEvent e) - { - if(e.getSource() != conversationPanel.getChatTextPane() - || writeMessagePanel.getEditorPane().isFocusOwner()) - return false; - - writeMessagePanel.getEditorPane().requestFocusInWindow(); - - KeyboardFocusManager.getCurrentKeyboardFocusManager() - .redispatchEvent(writeMessagePanel.getEditorPane(), e); - - return true; - } } diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java index f2e1725..ac0fea7 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java @@ -1288,7 +1288,8 @@ public class ChatWindow // Don't re-dispatch any events if the menu is active. Fixes the // navigation in the menu. - if (menuBar.isSelected()) + if (menuBar.getSelectedMenu() != null + && menuBar.getSelectedMenu().isPopupMenuVisible()) { return false; } |