Logo Search packages:      
Sourcecode: accerciser version File versions

def interface_view::_SectionText::_onTextViewPressed (   self,
  widget,
  event 
) [private]

Update spin button in the case that the textview was clicked.
Once the spin button's value changes, it's own callback fires which
re-populates the attribute view.

@param widget: The widget that recived the click event, 
typically the text view.
@type widget: gtk.Widget
@param event: The click event.
@type event: gtk.gdk.Event

Definition at line 1439 of file interface_view.py.

01439                                              :
    '''
    Update spin button in the case that the textview was clicked.
    Once the spin button's value changes, it's own callback fires which
    re-populates the attribute view.
    
    @param widget: The widget that recived the click event, 
    typically the text view.
    @type widget: gtk.Widget
    @param event: The click event.
    @type event: gtk.gdk.Event
    '''
    if event.button != 1:
      return

    x, y = event.get_coords()
    x, y = self.text_view.window_to_buffer_coords(gtk.TEXT_WINDOW_WIDGET,
                                                   int(x), int(y))
    iter = self.text_view.get_iter_at_location(x, y)
     
    self.offset_spin.set_value(iter.get_offset())

  def _onTextCursorMove(self, text_buffer, param_spec):


Generated by  Doxygen 1.6.0   Back to index