diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-08-02 13:43:31 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-08-02 13:43:31 +0400 |
commit | 6f1c7dc203baf6d9fac931dcab8edfec943b1dd8 (patch) | |
tree | 4bc1c3c2d192730bf3ff1c856b20672b002d8be5 /main | |
parent | 507eb11141d324d7e56b0c5092340c2f4534dec9 (diff) |
Fixed 'Bug 66 - Keyboard not working in text editor quick
navigation.'.
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs index ce38588b1e..1c0069648c 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs @@ -47,7 +47,7 @@ namespace MonoDevelop.Components this.TransientFor = MonoDevelop.Ide.IdeApp.Workbench.RootWindow; this.TypeHint = Gdk.WindowTypeHint.Menu; this.BorderWidth = 1; - + this.Events |= Gdk.EventMask.KeyPressMask; hBox = new HBox (); list = new ListWidget (this); list.SelectItem += delegate { @@ -200,6 +200,12 @@ namespace MonoDevelop.Components return base.OnButtonPressEvent (evnt); } + protected override bool OnKeyPressEvent (Gdk.EventKey evnt) + { + ProcessKey (evnt.Key, evnt.State); + return base.OnKeyPressEvent (evnt); + } + internal class ListWidget: Gtk.DrawingArea { int margin = 0; @@ -220,7 +226,7 @@ namespace MonoDevelop.Components public ListWidget (DropDownBoxListWindow win) { this.win = win; - this.Events = Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask | Gdk.EventMask.LeaveNotifyMask | Gdk.EventMask.KeyPressMask; + this.Events = Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask | Gdk.EventMask.LeaveNotifyMask; layout = new Pango.Layout (this.PangoContext); CalcRowHeight (); } @@ -233,13 +239,6 @@ namespace MonoDevelop.Components rowHeight += padding; } - protected override bool OnKeyPressEvent (Gdk.EventKey evnt) - { - if (win.ProcessKey (evnt.Key, evnt.State)) - return true; - return base.OnKeyPressEvent (evnt); - } - protected override bool OnLeaveNotifyEvent (Gdk.EventCrossing evnt) { selection = -1; |