- Misc fixes.

This commit is contained in:
ccremers 2006-08-09 11:54:37 +00:00
parent a660a0a1f7
commit 7b79402d43
5 changed files with 18 additions and 13 deletions

View File

@ -250,10 +250,9 @@ class SettingsWindow(wx.Panel):
self.match = int(Preference.get('match','0'))
claimoptions = ['typed matching','find basic type flaws','find all type flaws']
r2 = wx.StaticText(self,-1,"Matching type")
#l2 = wx.RadioBox(self, -1, "", wx.DefaultPosition,wx.DefaultSize,claimoptions,1,wx.RA_SPECIFY_COLS)
l2 = self.ch = wx.Choice(self,-1,choices=claimoptions)
l2.SetSelection(self.match)
self.Bind(wx.EVT_RADIOBOX,self.EvtMatch,l2)
self.Bind(wx.EVT_CHOICE,self.EvtMatch,l2)
### MISC expert stuff

View File

@ -64,11 +64,12 @@ class ScytherThread(threading.Thread):
"""
self.parent.scyther = scyther = Scyther.Scyther()
scyther.options = self.parent.options
scyther.setInput(self.parent.spdl)
# verification start
self.parent.claims = scyther.verify()
self.parent.summary = str(scyther)
#---------------------------------------------------------------------------

View File

@ -29,6 +29,11 @@ def setBinDir(dir):
bindir = dir
def getBinDir():
global bindir
return bindir
#---------------------------------------------------------------------------
class Scyther(object):
@ -36,15 +41,16 @@ class Scyther(object):
global bindir
# Where is my executable?
prefix = os.path.abspath(bindir)
if sys.platform.startswith('win'):
""" Windows """
# TODO hardcoded for now, bad
self.program = os.path.join(bindir,"Scyther.exe")
self.program = os.path.join(prefix,"Scyther.exe")
if not os.path.isfile(self.program):
print "I can't find the Scyther executable at %s" % (self.program)
else:
""" Non-windows (linux) """
self.program = os.path.join(bindir,"scyther")
self.program = os.path.join(prefix,"scyther")
# Init
self.spdl = None

View File

@ -33,6 +33,10 @@ def parseArgs():
parser.add_option("-c","--check",dest="command",default=None,action="store_const",const="check",
help="Immediately check protocol (requires input file)")
# no-splash
parser.add_option("-N","--no-splash",dest="splashscreen",default=True,action="store_const",const=False,
help="Do not show the splash screen")
# misc debug etc (not shown in the --help output)
parser.add_option("","--test",dest="test",default=False,action="store_true",
help=SUPPRESS_HELP)
@ -83,7 +87,7 @@ class ScytherApp(wx.App):
Preference.init()
# Init Scyther libs from preferences
bindir = Preference.get("bindir",os.path.join(basedir,"Scyther"))
bindir = Preference.get("bindir",Scyther.getBinDir())
Scyther.setBinDir(bindir)
"""
@ -94,7 +98,7 @@ class ScytherApp(wx.App):
by a setting in the preferences file.
"""
if not opts.command:
if not (Preference.get('splashscreen') in ['false','off','disable','0']):
if opts.splashscreen and not (Preference.get('splashscreen') in ['false','off','disable','0']):
splash = MySplashScreen()
splash.Show()

View File

@ -1,11 +1,6 @@
URGENT
- Splash screen image is not located correctly (after dir move), causing
the windows version to break.
TO BE DONE
- Verify buttons need redesign and must be smaller (or maybe simply move
to text)
- Windows buttons are not visible now.
WOULD LIKE TO HAVE
- Attacks are not kept centered well.