def applyConfiguration(self, conf):
for b in conf.breakpoints:
self.addBreakpoint(b["file"], b["lineno"], b["cond"])
+ self.updateValues(None)
def fillConfiguration(self, conf):
iter = self.model.get_iter_first()
def addBreakpointToList(self, no, file, lineno, cond=None):
- iter = self.model.append()
- self.model.set(iter, 0, no)
if cond==None:
- self.model.set(iter, 1, "%s:%s" % (str(file), str(lineno)))
+ expr = "%s:%s" % (str(file), str(lineno))
else:
- self.model.set(iter, 1, "%s:%s if %s" % (str(file), str(lineno), str(cond)))
+ expr = "%s:%s if %s" % (str(file), str(lineno), str(cond))
+
+ iter = self.model.get_iter_first()
+ while iter != None:
+ newiter = self.model.iter_next(iter)
+ #Found a expression which is the same --> remove the breakpoint
+ if (expr,) == self.model.get(iter,1):
+ no, = self.model.get(iter,0)
+ self.debugger.delBreakpoint(no)
+ return
+ iter = newiter
+
+ #Add the entry to the breakpoint list
+ iter = self.model.append()
+ self.model.set(iter, 0, no)
+ self.model.set(iter, 1, expr)
def addBtnClicked(self, btn):