- Toolbars should be realized.
This commit is contained in:
parent
69581fcacc
commit
77afb897fa
@ -136,10 +136,12 @@ class AttackWindow(wx.Frame):
|
||||
# Add fit button
|
||||
bmp = wx.ArtProvider_GetBitmap(wx.ART_MISSING_IMAGE,wx.ART_TOOLBAR,(20,20))
|
||||
if not bmp.Ok():
|
||||
bmp = wx.EmptyBitmap(20,20)
|
||||
bmp = wx.EmptyBitmap(32,32)
|
||||
tb.AddCheckTool(wx.ID_ZOOM_FIT, bmp, bmp, 'Toggle zoom', 'Toggle zoom level')
|
||||
self.Bind(wx.EVT_TOOL, self.OnFit, id=wx.ID_ZOOM_FIT)
|
||||
|
||||
tb.Realize()
|
||||
|
||||
# And shortcut
|
||||
aTable = wx.AcceleratorTable([
|
||||
(wx.ACCEL_NORMAL, ord('Z'), wx.ID_ZOOM_FIT)
|
||||
|
@ -114,13 +114,20 @@ class MainWindow(wx.Frame):
|
||||
| wx.TB_TEXT
|
||||
)
|
||||
|
||||
bmp = wx.ArtProvider_GetBitmap(wx.ART_EXECUTABLE_FILE,wx.ART_TOOLBAR,(20,20))
|
||||
#print "Default toolbar tool size: %s\n" % tb.GetToolBitmapSize()
|
||||
|
||||
tsize = (32,32)
|
||||
|
||||
bmp = wx.ArtProvider_GetBitmap(wx.ART_EXECUTABLE_FILE,wx.ART_TOOLBAR,tsize)
|
||||
if not bmp.Ok():
|
||||
bmp = wx.EmptyBitmap(20,20)
|
||||
bmp = wx.EmptyBitmap(tsize)
|
||||
|
||||
# add the actual tools
|
||||
tb.AddSimpleTool(ID_VERIFY, bmp,"Verify","Verify claims")
|
||||
self.Bind(wx.EVT_TOOL, self.OnVerify, id=ID_VERIFY)
|
||||
tb.AddSimpleTool(ID_STATESPACE, bmp,"Statespace","Generate statespace for all roles")
|
||||
self.Bind(wx.EVT_TOOL, self.OnStatespace, id=ID_STATESPACE)
|
||||
|
||||
tb.AddSeparator()
|
||||
|
||||
tb.AddSimpleTool(ID_CHECK, bmp,"Check","Check protocol")
|
||||
@ -128,6 +135,8 @@ class MainWindow(wx.Frame):
|
||||
tb.AddSimpleTool(ID_AUTOVERIFY, bmp,"Default claims","Verify default claims")
|
||||
self.Bind(wx.EVT_TOOL, self.OnAutoVerify, id=ID_AUTOVERIFY)
|
||||
|
||||
tb.Realize()
|
||||
|
||||
def CreateMenu(self, bar, name, list):
|
||||
|
||||
fileMenu = wx.Menu()
|
||||
|
Loading…
Reference in New Issue
Block a user