- Misc improved again.
This commit is contained in:
parent
7b79402d43
commit
663aa10dc7
@ -285,7 +285,7 @@ class ResultWindow(wx.Frame):
|
|||||||
views += self.BuildClaim(grid,claims[index],index+1)
|
views += self.BuildClaim(grid,claims[index],index+1)
|
||||||
|
|
||||||
if views > 0:
|
if views > 0:
|
||||||
titlebar(7,"View",1)
|
titlebar(7,"Classes",1)
|
||||||
|
|
||||||
self.SetSizer(grid)
|
self.SetSizer(grid)
|
||||||
self.Fit()
|
self.Fit()
|
||||||
|
@ -4,6 +4,20 @@
|
|||||||
|
|
||||||
import Term
|
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):
|
class Claim(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.id = None # a unique id string, consisting of 'protocol,label'
|
self.id = None # a unique id string, consisting of 'protocol,label'
|
||||||
@ -55,13 +69,7 @@ class Claim(object):
|
|||||||
self.okay = (not self.okay)
|
self.okay = (not self.okay)
|
||||||
|
|
||||||
def stateName(self,count=1):
|
def stateName(self,count=1):
|
||||||
if self.state:
|
return stateDescription(self.state,count)
|
||||||
s = "state"
|
|
||||||
else:
|
|
||||||
s = "attack"
|
|
||||||
if count != 1:
|
|
||||||
s += "s"
|
|
||||||
return s
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
s = "claim id [%s]" % (self.id)
|
s = "claim id [%s]" % (self.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user