accerciser r562 - in trunk: . plugins



Author: bgmerrell
Date: Tue Apr 22 19:46:39 2008
New Revision: 562
URL: http://svn.gnome.org/viewvc/accerciser?rev=562&view=rev

Log:
* plugins/ipython_view.py:  modified the code to check for different
modifiers (CONTROL, SHIFT, and MOD1/ALT) and correct the behavior of
the 'Home' key to perform as the user would expect (bug #431882).



Modified:
   trunk/ChangeLog
   trunk/plugins/ipython_view.py

Modified: trunk/plugins/ipython_view.py
==============================================================================
--- trunk/plugins/ipython_view.py	(original)
+++ trunk/plugins/ipython_view.py	Tue Apr 22 19:46:39 2008
@@ -394,12 +394,14 @@
     selection_iter = self.text_buffer.get_iter_at_mark(selection_mark)
     start_iter = self.text_buffer.get_iter_at_mark(self.line_start)
     if event.keyval == gtk.keysyms.Home:
-      if event.state == 0: 
-        self.text_buffer.place_cursor(start_iter)
-        return True
-      elif event.state == gtk.gdk.SHIFT_MASK:
+      if event.state & gtk.gdk.CONTROL_MASK or event.state & gtk.gdk.MOD1_MASK:
+        pass
+      elif event.state & gtk.gdk.SHIFT_MASK:
         self.text_buffer.move_mark(insert_mark, start_iter)
         return True
+      else:
+        self.text_buffer.place_cursor(start_iter)
+        return True
     elif event.keyval == gtk.keysyms.Left:
       insert_iter.backward_cursor_position()
       if not insert_iter.editable(True):



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