Browse Source

fixes issue 1116: Paste context menu item is stripping CRLFs

git-svn-id: http://svn.dmdirc.com/trunk@3854 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Gregory Holmes 16 years ago
parent
commit
5c213b9484
1 changed files with 6 additions and 7 deletions
  1. 6
    7
      src/com/dmdirc/ui/swing/components/InputTextFrame.java

+ 6
- 7
src/com/dmdirc/ui/swing/components/InputTextFrame.java View File

@@ -65,9 +65,8 @@ import javax.swing.JSeparator;
65 65
 import javax.swing.KeyStroke;
66 66
 import javax.swing.event.InternalFrameEvent;
67 67
 import javax.swing.event.InternalFrameListener;
68
-import net.miginfocom.layout.PlatformDefaults;
69 68
 
70
-import net.miginfocom.swing.MigLayout;
69
+import net.miginfocom.layout.PlatformDefaults;
71 70
 
72 71
 /**
73 72
  * Frame with an input field.
@@ -190,12 +189,12 @@ public abstract class InputTextFrame extends TextFrame implements InputWindow,
190 189
     private void initInputField() {
191 190
         UIUtilities.addUndoManager(getInputField().getTextField());
192 191
 
193
-        getInputField().getTextField().getActionMap().put("PasteAction",
192
+        getInputField().getActionMap().put("paste",
194 193
                 new InputTextFramePasteAction(this));
195
-        getInputField().getTextField().getInputMap(WHEN_FOCUSED).put(KeyStroke.getKeyStroke("shift INSERT"),
196
-                "PasteAction");
197
-        getInputField().getTextField().getInputMap(WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ctrl V"),
198
-                "PasteAction");
194
+        getInputField().getInputMap(WHEN_FOCUSED).put(KeyStroke.getKeyStroke("shift INSERT"),
195
+                "paste");
196
+        getInputField().getInputMap(WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ctrl V"),
197
+                "paste");
199 198
     }
200 199
 
201 200
     /**

Loading…
Cancel
Save