- Reinstated the graphical about screen.
This commit is contained in:
parent
3b79e325dc
commit
5d0b15e292
@ -5,6 +5,7 @@
|
|||||||
""" Import externals """
|
""" Import externals """
|
||||||
import wx
|
import wx
|
||||||
import wx.html
|
import wx.html
|
||||||
|
import os.path
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -12,15 +13,19 @@ import wx.html
|
|||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
""" Globals """
|
||||||
|
|
||||||
|
basedir = ""
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
class AboutScyther(wx.Dialog):
|
class AboutScyther(wx.Dialog):
|
||||||
text = '''
|
def __init__(self,parent,mybasedir=None):
|
||||||
|
self.text = '''
|
||||||
<html>
|
<html>
|
||||||
<body bgcolor="#ffffff">
|
<body bgcolor="#ffffff">
|
||||||
<center>
|
<img src="$SPLASH">
|
||||||
<h1>Scyther</h1>
|
<p align="right"><b>Scyther : $VERSION</b></p>
|
||||||
Version 1.0-beta 6
|
|
||||||
</center>
|
|
||||||
<hr>
|
|
||||||
<p>
|
<p>
|
||||||
<b>Scyther</b> is an automatic tool for the verification and
|
<b>Scyther</b> is an automatic tool for the verification and
|
||||||
falsification of security protocols.
|
falsification of security protocols.
|
||||||
@ -31,28 +36,39 @@ class AboutScyther(wx.Dialog):
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
For news and updates visit the Scyther pages at
|
For news and updates visit the Scyther pages at
|
||||||
http://people.inf.ethz.ch/cremersc/scyther/index.html
|
<a target="_blank" href="http://people.inf.ethz.ch/cremersc/scyther/index.html">
|
||||||
|
http://people.inf.ethz.ch/cremersc/scyther/index.html</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Credits: Cas Cremers (Scyther theory, backend, and main GUI
|
Credits: Cas Cremers (Scyther theory, backend, and main GUI
|
||||||
code), Gijs Hollestelle (Python wrapper for Scyther XML output).
|
code), Gijs Hollestelle (Python parser for Scyther XML output).
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self,parent):
|
if mybasedir:
|
||||||
|
basedir = mybasedir
|
||||||
|
|
||||||
|
splashdir = os.path.join(basedir,"Images")
|
||||||
|
splashimage = os.path.join(splashdir,"scyther-splash.png")
|
||||||
|
self.text = self.text.replace("$SPLASH",splashimage)
|
||||||
|
|
||||||
|
# version information
|
||||||
|
self.text = self.text.replace("$VERSION", "1.0-beta6")
|
||||||
|
|
||||||
wx.Dialog.__init__(self, parent, -1, 'About Scyther',
|
wx.Dialog.__init__(self, parent, -1, 'About Scyther',
|
||||||
size=(400,300))
|
size=(660,620))
|
||||||
html = wx.html.HtmlWindow(self)
|
html = wx.html.HtmlWindow(self)
|
||||||
if "gtk2" in wx.PlatformInfo:
|
#if "gtk2" in wx.PlatformInfo:
|
||||||
html.SetStandardFonts()
|
# html.SetStandardFonts()
|
||||||
|
html.SetBorders(10)
|
||||||
html.SetPage(self.text)
|
html.SetPage(self.text)
|
||||||
button = wx.Button(self, wx.ID_OK, "Okay")
|
button = wx.Button(self, wx.ID_OK, "Close window")
|
||||||
|
|
||||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||||
sizer.Add(html, 1, wx.EXPAND|wx.ALL,5)
|
sizer.Add(html, 1, wx.EXPAND|wx.ALL,0)
|
||||||
sizer.Add(button,0,wx.ALIGN_CENTER|wx.ALL,5)
|
sizer.Add(button,0,wx.ALIGN_CENTER|wx.ALL,5)
|
||||||
|
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
self.Layout()
|
self.Layout()
|
||||||
|
|
||||||
|
# vim: set ts=4 sw=4 et list lcs=tab\:>-:
|
||||||
|
BIN
gui/Images/scyther-splash.png
Normal file
BIN
gui/Images/scyther-splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
@ -127,7 +127,7 @@ class ScytherApp(wx.App):
|
|||||||
self.mainWindow.Show()
|
self.mainWindow.Show()
|
||||||
|
|
||||||
if isSplashNeeded(opts):
|
if isSplashNeeded(opts):
|
||||||
dlg = About.AboutScyther(self.mainWindow)
|
dlg = About.AboutScyther(self.mainWindow,basedir)
|
||||||
dlg.ShowModal()
|
dlg.ShowModal()
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
|
|
||||||
@ -144,4 +144,4 @@ if __name__ == '__main__':
|
|||||||
scythergui = ScytherApp()
|
scythergui = ScytherApp()
|
||||||
scythergui.MainLoop()
|
scythergui.MainLoop()
|
||||||
|
|
||||||
|
# vim: set ts=4 sw=4 et list lcs=tab\:>-:
|
||||||
|
Loading…
Reference in New Issue
Block a user