Merge commit 'carl/master'

This commit is contained in:
Matt Turnbull
2009-03-09 22:28:47 +00:00
17 changed files with 1186 additions and 616 deletions
+11 -4
View File
@@ -46,9 +46,15 @@ class GuiGraphViewer (threading.Thread):
return self.mainHBox
#end def get_vbox
def clearGraphData(self):
self.fig.clf()
if self.canvas is not None:
self.canvas.destroy()
self.canvas = FigureCanvas(self.fig) # a gtk.DrawingArea
def generateGraph(self, widget, data):
try: self.canvas.destroy()
except AttributeError: pass
self.clearGraphData()
sitenos = []
playerids = []
@@ -72,7 +78,6 @@ class GuiGraphViewer (threading.Thread):
print "No player ids found"
return
self.fig = Figure(figsize=(5,4), dpi=100)
#Set graph properties
self.ax = self.fig.add_subplot(111)
@@ -104,7 +109,6 @@ class GuiGraphViewer (threading.Thread):
#Draw plot
self.ax.plot(line,)
self.canvas = FigureCanvas(self.fig) # a gtk.DrawingArea
self.graphBox.add(self.canvas)
self.canvas.show()
#end of def showClicked
@@ -376,6 +380,9 @@ class GuiGraphViewer (threading.Thread):
self.leftPanelBox.show()
self.graphBox.show()
self.fig = Figure(figsize=(5,4), dpi=100)
self.canvas = None
#################################
#
# self.db.cursor.execute("""select UNIX_TIMESTAMP(handStart) as time, id from Hands ORDER BY time""")