From 51fbffcacd1498ba323951d0ba41789ac1c597bc Mon Sep 17 00:00:00 2001 From: ccremers Date: Thu, 10 Aug 2006 14:58:08 +0000 Subject: [PATCH] - Remove zoom button when we do not have PIL and Linux --- gui/Gui/Attackwindow.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/gui/Gui/Attackwindow.py b/gui/Gui/Attackwindow.py index 44ae854..cded545 100644 --- a/gui/Gui/Attackwindow.py +++ b/gui/Gui/Attackwindow.py @@ -142,16 +142,18 @@ class AttackWindow(wx.Frame): ''' Create "interior" window components. In this case it is the attack picture. ''' - # Make zoom buttons sizer = wx.BoxSizer(wx.VERTICAL) - buttons = wx.BoxSizer(wx.HORIZONTAL) - bt = wx.Button(self,wx.ID_ZOOM_100) - buttons.Add(bt,0) - self.Bind(wx.EVT_BUTTON, self.OnZoom100, bt) - bt = wx.Button(self,wx.ID_ZOOM_FIT) - buttons.Add(bt,0) - self.Bind(wx.EVT_BUTTON, self.OnZoomFit, bt) - sizer.Add(buttons, 0, wx.ALIGN_LEFT) + + # Make zoom buttons + if Preference.usePIL(): + buttons = wx.BoxSizer(wx.HORIZONTAL) + bt = wx.Button(self,wx.ID_ZOOM_100) + buttons.Add(bt,0) + self.Bind(wx.EVT_BUTTON, self.OnZoom100, bt) + bt = wx.Button(self,wx.ID_ZOOM_FIT) + buttons.Add(bt,0) + self.Bind(wx.EVT_BUTTON, self.OnZoomFit, bt) + sizer.Add(buttons, 0, wx.ALIGN_LEFT) # Add attacks (possible with tabs) self.displays=[]