+ expr = "%s:%s" % (str(file), str(lineno))
+ else:
+ 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):
+ 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):
+
+ if not self.debugger.isActive():
+ return
+
+
+ bpspec = self.bpEntry.get_text()
+ bpspec = bpspec.strip()
+ rx = re.compile("^[\w/\._\-]+:\d+(\s+if\s+\S+.*)?$")
+
+ #Check if format is correct
+ if not rx.search(bpspec):
+ dialog = gtk.MessageDialog(None, \
+ gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, \
+ gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, \
+ "Invalid format!")
+ dialog.run()
+ dialog.destroy()
+ return
+
+
+ ifsplit = string.split(bpspec, " if ")
+
+ if len(ifsplit)>1:
+ cond = ifsplit[1].strip()