[longomatch] Don't forward key pressed from entries
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Don't forward key pressed from entries
- Date: Tue, 28 Oct 2014 09:51:18 +0000 (UTC)
commit 873eff69faf9ef14af04036e3acdcb7e20098ba3
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Oct 22 01:47:13 2014 +0200
Don't forward key pressed from entries
This prevent arrows ans space bar to change the player state
LongoMatch.GUI/Gui/MainWindow.cs | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index 4874768..a8ee73c 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -162,8 +162,14 @@ namespace LongoMatch.Gui
protected override bool OnKeyPressEvent (EventKey evnt)
{
- Config.EventsBroker.EmitKeyPressed(this, (int)evnt.Key, (int)evnt.State);
- return base.OnKeyPressEvent (evnt);
+ bool ret = base.OnKeyPressEvent (evnt);
+ Console.WriteLine (Focus);
+ if (Focus is Entry) {
+ return ret;
+ } else {
+ Config.EventsBroker.EmitKeyPressed(this, (int)evnt.Key, (int)evnt.State);
+ return true;
+ }
}
MenuItem ImportProjectActionMenu {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]