[gedit-plugins] Direct access to union attributes.



commit c406a994a2f3e543c01515d7ccb061a8c1ece5f9
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Mar 2 15:31:21 2011 +0100

    Direct access to union attributes.
    
    We needed to access .key due to a pygobject bug that it is now fixed.

 plugins/smartspaces/smartspaces.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/smartspaces/smartspaces.py b/plugins/smartspaces/smartspaces.py
index 08e712f..34ddc34 100644
--- a/plugins/smartspaces/smartspaces.py
+++ b/plugins/smartspaces/smartspaces.py
@@ -69,8 +69,8 @@ class SmartSpacesPlugin(GObject.Object, Gedit.ViewActivatable):
         # Only take care of backspace and shift+backspace
         mods = Gtk.accelerator_get_default_mod_mask()
 
-        if event.key.keyval != Gdk.KEY_BackSpace or \
-           event.key.state & mods != 0 and event.key.state & mods != Gdk.ModifierType.SHIFT_MASK:
+        if event.keyval != Gdk.KEY_BackSpace or \
+           event.state & mods != 0 and event.state & mods != Gdk.ModifierType.SHIFT_MASK:
             return False
 
         doc = view.get_buffer()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]