- Misc fixes.
This commit is contained in:
parent
bd675cfcf5
commit
59b72052d4
@ -47,9 +47,6 @@ class AttackDisplay(wx.ScrolledWindow):
|
|||||||
else:
|
else:
|
||||||
print "Unknown file type %s." % (self.filetype)
|
print "Unknown file type %s." % (self.filetype)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# TODO self.Bind(wxSizeEvent
|
# TODO self.Bind(wxSizeEvent
|
||||||
@ -157,7 +154,6 @@ class AttackWindow(wx.Frame):
|
|||||||
def CreateExteriorWindowComponents(self):
|
def CreateExteriorWindowComponents(self):
|
||||||
''' Create "exterior" window components, such as menu and status
|
''' Create "exterior" window components, such as menu and status
|
||||||
bars '''
|
bars '''
|
||||||
self.CreateStatusBar()
|
|
||||||
self.SetupToolBar()
|
self.SetupToolBar()
|
||||||
|
|
||||||
def SetupToolBar(self):
|
def SetupToolBar(self):
|
||||||
|
@ -88,7 +88,6 @@ class MainWindow(wx.Frame):
|
|||||||
''' Create "exterior" window components, such as menu and status
|
''' Create "exterior" window components, such as menu and status
|
||||||
bar. '''
|
bar. '''
|
||||||
self.CreateMenus()
|
self.CreateMenus()
|
||||||
self.CreateStatusBar()
|
|
||||||
self.SetupToolBar()
|
self.SetupToolBar()
|
||||||
self.SetTitle()
|
self.SetTitle()
|
||||||
|
|
||||||
@ -102,13 +101,16 @@ class MainWindow(wx.Frame):
|
|||||||
|
|
||||||
#print "Default toolbar tool size: %s\n" % tb.GetToolBitmapSize()
|
#print "Default toolbar tool size: %s\n" % tb.GetToolBitmapSize()
|
||||||
|
|
||||||
tsize = (64,64)
|
|
||||||
|
|
||||||
bmpverify = wx.Bitmap("images/verify-button.png",wx.BITMAP_TYPE_PNG)
|
def getBmp(name):
|
||||||
bmpcharacterize = wx.Bitmap("images/characterize-button.png",wx.BITMAP_TYPE_PNG)
|
bmp = wx.Bitmap(os.path.join("images","%s.png" % name),wx.BITMAP_TYPE_PNG)
|
||||||
#bmp = wx.ArtProvider_GetBitmap(wx.ART_EXECUTABLE_FILE,wx.ART_TOOLBAR,tsize)
|
if not bmp.Ok():
|
||||||
#if not bmp.Ok():
|
tsize = (32,32)
|
||||||
# bmp = wx.EmptyBitmap(tsize)
|
bmp = wx.EmptyBitmap(tsize)
|
||||||
|
return bmp
|
||||||
|
|
||||||
|
bmpverify = getBmp("verify-button")
|
||||||
|
bmpcharacterize = getBmp("characterize-button")
|
||||||
|
|
||||||
# add the actual tools
|
# add the actual tools
|
||||||
tb.AddSimpleTool(ID_VERIFY, bmpverify,"Verify","Verify claims")
|
tb.AddSimpleTool(ID_VERIFY, bmpverify,"Verify","Verify claims")
|
||||||
|
@ -28,6 +28,7 @@ import Claim
|
|||||||
import Preference
|
import Preference
|
||||||
import Scyther
|
import Scyther
|
||||||
import Attackwindow
|
import Attackwindow
|
||||||
|
import Icon
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -179,16 +180,16 @@ class ResultWindow(wx.Frame):
|
|||||||
style=wx.DEFAULT_DIALOG_STYLE
|
style=wx.DEFAULT_DIALOG_STYLE
|
||||||
):
|
):
|
||||||
|
|
||||||
self.parent = parent
|
|
||||||
|
|
||||||
wx.Frame.__init__(self,parentwindow,-1,title,pos,size,style)
|
wx.Frame.__init__(self,parentwindow,-1,title,pos,size,style)
|
||||||
|
Icon.ScytherIcon(self)
|
||||||
|
|
||||||
|
self.parent = parent
|
||||||
self.thread = None
|
self.thread = None
|
||||||
self.Bind(wx.EVT_CLOSE, self.onCloseWindow)
|
self.Bind(wx.EVT_CLOSE, self.onCloseWindow)
|
||||||
|
|
||||||
|
self.CreateStatusBar()
|
||||||
self.BuildTable()
|
self.BuildTable()
|
||||||
|
|
||||||
|
|
||||||
def onViewButton(self,evt):
|
def onViewButton(self,evt):
|
||||||
btn = evt.GetEventObject()
|
btn = evt.GetEventObject()
|
||||||
w = Attackwindow.AttackWindow(btn.claim)
|
w = Attackwindow.AttackWindow(btn.claim)
|
||||||
|
Loading…
Reference in New Issue
Block a user