- Misc fixes.

This commit is contained in:
ccremers 2006-08-06 18:06:26 +00:00
parent bd675cfcf5
commit 59b72052d4
3 changed files with 13 additions and 14 deletions

View File

@ -47,9 +47,6 @@ class AttackDisplay(wx.ScrolledWindow):
else:
print "Unknown file type %s." % (self.filetype)
self.update()
# TODO self.Bind(wxSizeEvent
@ -157,7 +154,6 @@ class AttackWindow(wx.Frame):
def CreateExteriorWindowComponents(self):
''' Create "exterior" window components, such as menu and status
bars '''
self.CreateStatusBar()
self.SetupToolBar()
def SetupToolBar(self):

View File

@ -88,7 +88,6 @@ class MainWindow(wx.Frame):
''' Create "exterior" window components, such as menu and status
bar. '''
self.CreateMenus()
self.CreateStatusBar()
self.SetupToolBar()
self.SetTitle()
@ -102,13 +101,16 @@ class MainWindow(wx.Frame):
#print "Default toolbar tool size: %s\n" % tb.GetToolBitmapSize()
tsize = (64,64)
bmpverify = wx.Bitmap("images/verify-button.png",wx.BITMAP_TYPE_PNG)
bmpcharacterize = wx.Bitmap("images/characterize-button.png",wx.BITMAP_TYPE_PNG)
#bmp = wx.ArtProvider_GetBitmap(wx.ART_EXECUTABLE_FILE,wx.ART_TOOLBAR,tsize)
#if not bmp.Ok():
# bmp = wx.EmptyBitmap(tsize)
def getBmp(name):
bmp = wx.Bitmap(os.path.join("images","%s.png" % name),wx.BITMAP_TYPE_PNG)
if not bmp.Ok():
tsize = (32,32)
bmp = wx.EmptyBitmap(tsize)
return bmp
bmpverify = getBmp("verify-button")
bmpcharacterize = getBmp("characterize-button")
# add the actual tools
tb.AddSimpleTool(ID_VERIFY, bmpverify,"Verify","Verify claims")

View File

@ -28,6 +28,7 @@ import Claim
import Preference
import Scyther
import Attackwindow
import Icon
#---------------------------------------------------------------------------
@ -179,16 +180,16 @@ class ResultWindow(wx.Frame):
style=wx.DEFAULT_DIALOG_STYLE
):
self.parent = parent
wx.Frame.__init__(self,parentwindow,-1,title,pos,size,style)
Icon.ScytherIcon(self)
self.parent = parent
self.thread = None
self.Bind(wx.EVT_CLOSE, self.onCloseWindow)
self.CreateStatusBar()
self.BuildTable()
def onViewButton(self,evt):
btn = evt.GetEventObject()
w = Attackwindow.AttackWindow(btn.claim)