Changeset 67

Show
Ignore:
Timestamp:
Thu Jul 14 03:54:34 2005
Author:
fredrikc
Message:

fixed Ticket #10 (Target TextControl? bug)

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/transolution/xliffeditor/xliffsegment.py

    r2 r67  
    14 14  
    15 15 class RootNodeEmptyException(XliffError):pass  
      16 class RootNodeIsNone(XliffError):pass  
    16 17  
    17 18 class XliffSegment(ModelInterface):  
     
    81 82         '''  
    82 83         return a tuple (node_index,sub_index_of_that_node)'''  
    83           if str_i < 0:raise ValueError('Negative text index not supported')  
      84         if str_i < 0:               raise ValueError('Negative text index not supported')  
      85         if self.rootnode is None:   raise RootNodeIsNone('Root node is None')  
    84 86         # make sure root node is not empty  
    85           if not self.rootnode.hasChildNodes():  
    86               self.rootnode.appendChild(self.rootnode.ownerDocument.createTextNode(''))  
      87         self.assureRootNotEmpty()  
    87 88  
    88 89         chi = 0  
  • trunk/transolution/xliffeditor/gtk_tagedit.py

    r65 r67  
    35 35             except IndexError,e:  
    36 36                 node,subpos = self.model.getLast()  
      37             except XliffError,e:  
      38                 print "Error",e  
      39                 self.interactive = org  
      40                 return  
      41                  
    37 42             if self.model.isTag(node) and subpos:  
    38 43                 # Jump to start or end of locked node