X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=PositionFrame.py;h=4403932e3fc7c950d4fe31d00d99cf2b23fe17a3;hb=3c94180482e4ccd256f087ff182278f083a94276;hp=ce82619bc1ed37e1906e6cdbdeec05116fe94e88;hpb=b7f4eaf787ec9c54f36cce00bb294a8be2a862c3;p=pygdb.git diff --git a/PositionFrame.py b/PositionFrame.py index ce82619..4403932 100644 --- a/PositionFrame.py +++ b/PositionFrame.py @@ -69,12 +69,22 @@ class PositionFrame (StatusFrame.StatusFrame): def updateValues(self, status, param): + + #Create new text buffer for source view + buf = gtk.TextBuffer() if status == "break": self.file, self.lineno = param self.positionLabel.set_label("%s:%d" % (self.file, self.lineno)) + + #Get some code + code = self.debugger.listCodeSnippet() + buf.set_text(code) + + else: self.file, self.lineno = None, None + code = "" if status == "exited": self.positionLabel.set_label("Exited with code %d." % param) @@ -85,6 +95,12 @@ class PositionFrame (StatusFrame.StatusFrame): else: self.positionLabel.set_label(status) + + #Set the buffer + self.srcview.set_buffer(buf) + + + def applyConfiguration(self, conf): pass