- Misc improved again.

This commit is contained in:
ccremers 2006-08-09 12:08:53 +00:00
parent 7b79402d43
commit 663aa10dc7
2 changed files with 16 additions and 8 deletions

View File

@ -285,7 +285,7 @@ class ResultWindow(wx.Frame):
views += self.BuildClaim(grid,claims[index],index+1)
if views > 0:
titlebar(7,"View",1)
titlebar(7,"Classes",1)
self.SetSizer(grid)
self.Fit()

View File

@ -4,6 +4,20 @@
import Term
def stateDescription(okay,n=1,caps=False):
if okay:
s = "trace class"
if n != 1:
s += "es"
else:
s = "attack"
if n != 1:
s += "s"
if caps:
s = s[0].upper() + s[1:]
return s
class Claim(object):
def __init__(self):
self.id = None # a unique id string, consisting of 'protocol,label'
@ -55,13 +69,7 @@ class Claim(object):
self.okay = (not self.okay)
def stateName(self,count=1):
if self.state:
s = "state"
else:
s = "attack"
if count != 1:
s += "s"
return s
return stateDescription(self.state,count)
def __str__(self):
s = "claim id [%s]" % (self.id)