import gtk
+import re
+import string
+import os
import vte
import BreakpointsFrame
vbox = gtk.VBox(False, 5)
self.add(vbox)
+ hbox = gtk.HBox(False, 5)
+ vbox.pack_start(hbox, False, False)
+
+ self.viewBtn = gtk.Button("View")
+ self.viewBtn.connect("clicked", self.viewBtnClicked)
+ hbox.pack_start(self.viewBtn, False, False)
self.status = gtk.Label("Not Running")
- vbox.pack_start(self.status, False, False)
+ hbox.pack_start(self.status, False, False)
+
self.paned1 = gtk.VPaned()
vbox.add(self.paned1)
f.updateValues(pos)
+ def viewBtnClicked(self, btn):
+
+ status = self.status.get_label().strip()
+ rx = re.compile("\S+:\d+")
+
+ #It is a path
+ if rx.search(status):
+ try:
+ [file,lineno] = string.split(status,":")
+ lineno = int(lineno)
+
+ os.system('gvim -R -c ":%d" %s' % (lineno,file))
+
+ except OSError:
+ pass
+
+
+