diff --git a/gui/Gui/Scytherthread.py b/gui/Gui/Scytherthread.py index 8555a57..0c26e6b 100644 --- a/gui/Gui/Scytherthread.py +++ b/gui/Gui/Scytherthread.py @@ -395,16 +395,22 @@ class ResultWindow(wx.Frame): grid.Add(bmpfield,(ypos,xpos),(1,1),wx.ALIGN_CENTER_VERTICAL|wx.ALL,10) else: # new style text control Ok/Fail - def makeTC(txt,colour): - txt = wx.StaticText(self,-1,txt) + def makeTC(colour): + txt = wx.StaticText(self,-1,cl.getOkay()) font = wx.Font(11,wx.NORMAL,wx.NORMAL,wx.BOLD) txt.SetFont(font) txt.SetForegroundColour(colour) grid.Add(txt,(ypos,xpos),(1,1),wx.ALL,10) if cl.okay: - makeTC("Ok","forest green") + if cl.getVerified(): + makeTC("forest green") + else: + makeTC("dark green") else: - makeTC("Fail","red") + if cl.getVerified(): + makeTC("red") + else: + makeTC("dark red") xpos += 1 # verified? diff --git a/gui/Scyther/Claim.py b/gui/Scyther/Claim.py index 2d9c031..b0fcaa3 100644 --- a/gui/Scyther/Claim.py +++ b/gui/Scyther/Claim.py @@ -94,6 +94,15 @@ class Claim(object): remark = "Exactly %i %s" % (n,atxt) return remark + "." + def getOkay(self): + """ + returns "Ok" or "Fail" + """ + if self.okay: + return "Ok" + else: + return "Fail" + def getVerified(self): """ returns an element of [None,'Verified','Falsified'] @@ -119,25 +128,16 @@ class Claim(object): """ Resulting string """ - s = "claim id [%s]" % (self.id) - s+= " " + str(self.claimtype) + s = "claim id [%s], %s" % (self.id,self.claimtype) if self.parameter: - s+= " " + str(self.parameter) + s+= " %s" % self.parameter # determine status - s+= " : " - if self.okay: - s+= "[Ok] " - else: - s+= "[Fail] " - - s+= " %i " % (self.failed) - s+= self.stateName(self.failed) - + s+= " : %s status : %i %s" % (self.getOkay(),self.failed,self.stateName(self.failed)) vt = self.getVerified() if vt: - s+= " (%s)" % vt - s+= " [%s]" % self.getComment() + s+= ", and thus the claim is %s" % vt + s+= ". %s" % self.getComment() return s