Author: mkrueger
Date: 2008-01-23 12:48:06 -0500 (Wed, 23 Jan 2008)
New Revision: 93678

Modified:
   trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
   
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
Log:
* Mono.TextEditor/TextEditor.cs: Worked on code completion.


Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-01-23 
17:47:44 UTC (rev 93677)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-01-23 
17:48:06 UTC (rev 93678)
@@ -1,3 +1,11 @@
+2008-01-23  Mike Krüger <[EMAIL PROTECTED]> 
+
+       * Mono.TextEditor/TextEditor.cs: Worked on code completion.
+
+2008-01-23  Mike Krüger <[EMAIL PROTECTED]> 
+
+       * Mono.TextEditor/TextEditor.cs: Worked on code completion.
+
 2008-01-22  Mike Krüger <[EMAIL PROTECTED]> 
 
        * Mono.TextEditor.Highlighting/SyntaxModeService.cs: Worked on style 
panel.

Modified: 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs 
    2008-01-23 17:47:44 UTC (rev 93677)
+++ 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs 
    2008-01-23 17:48:06 UTC (rev 93678)
@@ -316,9 +316,9 @@
                }
                bool caretBlink = true;
                
-               protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
+               public void SimulateKeyPress (Gdk.Key key, Gdk.ModifierType 
modifier)
                {
-                       int keyCode = GetKeyCode (evnt.Key, evnt.State);
+                       int keyCode = GetKeyCode (key, modifier);
                        if (keyBindings.ContainsKey (keyCode)) {
                                try {
                                        keyBindings[keyCode].Run 
(this.textEditorData);
@@ -326,18 +326,22 @@
                                        Console.WriteLine ("Error while 
executing " + keyBindings[keyCode] + " :" + e);
                                }
                                
-                       } else if (evnt.KeyValue < 65000) {
+                       } else if (((ulong)key) < 65000) {
                                this.textEditorData.DeleteSelectedText ();
-                               char ch = (char)evnt.KeyValue;
+                               char ch = (char)key;
                                if (!char.IsControl (ch)) {
                                        Buffer.Insert (Caret.Offset, new 
StringBuilder (ch.ToString()));
                                        Caret.Column++;
                                }
                        }
+               }
+               
+               protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
+               {
+                       SimulateKeyPress (evnt.Key, evnt.State);
                        return true;
                }
                
-               
                bool mousePressed = false;
                uint lastTime;
                protected override bool OnButtonPressEvent (Gdk.EventButton e)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to