- Fixed that PIL is only used under Linux
This commit is contained in:
@@ -5,19 +5,17 @@
|
||||
""" Import externals """
|
||||
import wx
|
||||
import time
|
||||
# Python Imaging library?
|
||||
usePIL = True
|
||||
try:
|
||||
import Image
|
||||
except ImportError:
|
||||
usePIL = False
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
""" Import scyther-gui components """
|
||||
import Icon
|
||||
import Preference
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
if Preference.usePIL():
|
||||
import Image
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class AttackDisplay(wx.ScrolledWindow):
|
||||
def __init__(self, daddy, parent, attack):
|
||||
@@ -117,8 +115,6 @@ class AttackDisplay(wx.ScrolledWindow):
|
||||
|
||||
class AttackWindow(wx.Frame):
|
||||
def __init__(self,cl):
|
||||
global usePIL
|
||||
|
||||
super(AttackWindow, self).__init__(None, size=(400,800))
|
||||
self.SetBackgroundColour('Default')
|
||||
self.claim = cl
|
||||
@@ -126,7 +122,7 @@ class AttackWindow(wx.Frame):
|
||||
# TODO maybe fitting defaults should come from Preferences.
|
||||
# Now, it is default yes if it looks nice (i.e. we are using
|
||||
# PIL)
|
||||
if usePIL:
|
||||
if Preference.usePIL():
|
||||
self.fit = True
|
||||
else:
|
||||
self.fit = False
|
||||
|
||||
Reference in New Issue
Block a user