- Fixed many windows issues (including the redraw speed)

This commit is contained in:
ccremers 2006-08-08 15:00:20 +00:00
parent 341bbfeb0c
commit 89acf05fe1
3 changed files with 10 additions and 12 deletions

View File

@ -52,7 +52,7 @@ class Preferences(dict):
key = line[:split].strip() key = line[:split].strip()
data = line[(split+1):] data = line[(split+1):]
self[key] = data.decode("string_escape") self[key] = data.decode("string_escape")
print "Read %s=%s" % (key,self[key]) #print "Read %s=%s" % (key,self[key])
def load(self,file=""): def load(self,file=""):
if file == None: if file == None:
@ -110,13 +110,13 @@ def init():
sp = wx.StandardPaths.Get() sp = wx.StandardPaths.Get()
confdir = sp.GetConfigDir() confdir = sp.GetConfigDir()
confdir += "/scyther" confdir += "/scyther"
print confdir #print confdir
userconfdir = sp.GetUserConfigDir() userconfdir = sp.GetUserConfigDir()
userconfdir += "/" userconfdir += "/"
if sys.platform.startswith("lin"): if sys.platform.startswith("lin"):
userconfdir += "." userconfdir += "."
userconfdir += "scyther" userconfdir += "scyther"
print userconfdir #print userconfdir
preflocs = [confdir,userconfdir] preflocs = [confdir,userconfdir]

View File

@ -256,7 +256,6 @@ class ResultWindow(wx.Frame):
def BuildTable(self): def BuildTable(self):
# Now continue with the normal construction of the dialog # Now continue with the normal construction of the dialog
# contents # contents
sizer = wx.BoxSizer(wx.VERTICAL)
# For these claims... # For these claims...
claims = self.parent.claims claims = self.parent.claims
@ -283,10 +282,8 @@ class ResultWindow(wx.Frame):
for index in range(0,len(claims)): for index in range(0,len(claims)):
self.BuildClaim(grid,claims[index],index+1) self.BuildClaim(grid,claims[index],index+1)
sizer.Add(grid, 0,wx.ALIGN_CENTER|wx.ALL,5) self.SetSizer(grid)
self.Fit()
self.SetSizer(sizer)
sizer.Fit(self)
def BuildClaim(self,grid,cl,ypos): def BuildClaim(self,grid,cl,ypos):
# a support function # a support function
@ -392,7 +389,6 @@ class ScytherRun(object):
# Great, we verified stuff, progress to the claim report # Great, we verified stuff, progress to the claim report
title = "Scyther results : %s" % mode title = "Scyther results : %s" % mode
self.resultwin = resultwin = ResultWindow(self,mainwin,title) self.resultwin = resultwin = ResultWindow(self,mainwin,title)
resultwin.Show(True)
def attackDone(attack,total,done): def attackDone(attack,total,done):
if done < total: if done < total:
@ -405,14 +401,16 @@ class ScytherRun(object):
def claimDone(claim): def claimDone(claim):
if claim.button and len(claim.attacks) > 0: if claim.button and len(claim.attacks) > 0:
claim.button.Enable() claim.button.Enable()
resultwin.Refresh() #resultwin.Refresh()
resultwin.Center()
resultwin.Show(True)
wx.Yield()
t = AttackThread(self,resultwin,claimDone,attackDone) t = AttackThread(self,resultwin,claimDone,attackDone)
t.start() t.start()
resultwin.thread = t resultwin.thread = t
resultwin.Center()
resultwin.Show(True)
else: else:
# Darn, some errors. report. # Darn, some errors. report.

Binary file not shown.