Logo Search packages:      
Sourcecode: accerciser version File versions

def event_monitor::EventMonitor::_onLinkKeyPress (   self,
  textview,
  event 
) [private]

Callback for a keypress in the text view. If the keypress is enter or 
space, and the cursor is above a link, follow it.

@param textview: Textview that was pressed.
@type textview: gtk.TextView
@param event: Event object.
@type event: gtk.gdk.Event

Definition at line 394 of file event_monitor.py.

00394                                             :
    '''
    Callback for a keypress in the text view. If the keypress is enter or 
    space, and the cursor is above a link, follow it.
    
    @param textview: Textview that was pressed.
    @type textview: gtk.TextView
    @param event: Event object.
    @type event: gtk.gdk.Event
    '''
    if event.keyval in (gtk.keysyms.Return, 
                        gtk.keysyms.KP_Enter,
                        gtk.keysyms.space):
      buffer = textview.get_buffer()
      iter = buffer.get_iter_at_mark(buffer.get_insert())
      acc = None
      for tag in iter.get_tags():
        acc = tag.get_data('acc')
        if acc:
          self.node.update(acc)
          break

  def _onLinkMotion(self, textview, event):


Generated by  Doxygen 1.6.0   Back to index