Example #1
0
 def on_cell_modified(self, renderer, path, newText, data=None):
     model, curIter = self.abbrList.get_selection().get_selected()
     oldText = model.get_value(curIter, 0) or ""
     if EMPTY_FIELD_REGEX.match(newText) and EMPTY_FIELD_REGEX.match(oldText):
         self.on_removeButton_clicked(renderer)
     else:
         model.set(curIter, 0, newText)      
Example #2
0
    def get_abbrs(self):
        ret = []
        model = self.abbrList.get_model()
        i = iter(model)

        try:
            while True:
                text = model.get_value(i.next().iter, 0)
                ret.append(text.decode("utf-8"))
        except StopIteration:
            pass

        return list(set(ret))
Example #3
0
 def get_abbrs(self):
     ret = []
     model = self.abbrList.get_model()
     i = iter(model)
     
     try:
         while True:
             text = model.get_value(i.next().iter, 0)
             ret.append(text.decode("utf-8"))
     except StopIteration:
         pass
         
     return list(set(ret))
Example #4
0
 def on_cell_editing_cancelled(self, renderer, data=None):
     model, curIter = self.abbrList.get_selection().get_selected()
     oldText = model.get_value(curIter, 0) or ""
     self.on_cell_modified(renderer, None, oldText)
Example #5
0
 def on_cell_editing_cancelled(self, renderer, data=None):
     model, curIter = self.abbrList.get_selection().get_selected()
     oldText = model.get_value(curIter, 0) or ""
     self.on_cell_modified(renderer, None, oldText)