[kupfer] ui: Check event type when text entry is cleared
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] ui: Check event type when text entry is cleared
- Date: Tue, 19 Jan 2010 15:07:09 +0000 (UTC)
commit 624b733004d5ceebe2d76079dc852207b09126f9
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Jan 18 19:48:18 2010 +0100
ui: Check event type when text entry is cleared
We must check event type before we check the (possible) key value of
an event.
kupfer/ui/browser.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index 1048273..0880542 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -1360,8 +1360,9 @@ class Interface (gobject.GObject):
self.data_controller.cancel_search()
# See if it was a deleting key press
curev = gtk.get_current_event()
- if curev and curev.keyval in (self.key_book["Delete"],
- self.key_book["BackSpace"]):
+ if (curev and curev.type == gtk.gdk.KEY_PRESS and
+ curev.keyval in (self.key_book["Delete"],
+ self.key_book["BackSpace"])):
self._backspace_key_press()
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]