Logo Search packages:      
Sourcecode: samba-gtk version File versions  Download package

def sambagtk::dialogs::RegValueEditDialog::on_binary_data_ascii_text_view_move_cursor (   self,
  textview,
  step_size,
  count,
  extend_selection 
)
This function handles cursor movement. For now it only responds to text selection

Definition at line 1763 of file dialogs.py.

                                                                                                      :
        """This function handles cursor movement. For now it only responds to text selection"""
        print "ext_sel", extend_selection
        #The following doesn't work... even if extend_selection is true, get_selection_bounds() still returns nothing
#        if (not extend_selection) or (self.disable_signals):
#            return
#        self.disable_signals = True
#        
#        #get stuff we need
#        ascii_buffer = textview.get_buffer()
#        (start, end) = ascii_buffer.get_selection_bounds() #This function returns 2 iterators
#        hex_buffer = self.binary_data_hex_text_view.get_buffer()
#        
#        hex_start = int(start.get_offset() * 3) #because each ascii character is 2 hex characters, plus a space
#        hex_start -= (hex_start/25) * 2 #because '\n' counts as a character, but it doesn't take up 3 spaces in the hex string.
#        hex_end = int(end.get_offset() * 3)
#        hex_end -= (hex_end/25) * 2
#        hex_buffer.select_range(hex_buffer.get_iter_at_offset(hex_start), hex_buffer.get_iter_at_offset(hex_end))
#            
#        self.disable_signals = False
        

Generated by  Doxygen 1.6.0   Back to index