Merge branch 'wx3'

This commit is contained in:
blitzmann
2015-10-01 21:16:06 -04:00
1789 changed files with 722 additions and 551 deletions

View File

@@ -17,11 +17,6 @@ debug = False
# Defines if our saveddata will be in pyfa root or not
saveInRoot = False
if debug:
logLevel = logging.DEBUG
else:
logLevel = logging.WARN
# Version data
version = "1.15.1"
tag = "git"
@@ -31,7 +26,6 @@ evemonMinVersion = "4081"
pyfaPath = None
savePath = None
staticPath = None
saveDB = None
gameDB = None
@@ -50,23 +44,40 @@ class StreamToLogger(object):
for line in buf.rstrip().splitlines():
self.logger.log(self.log_level, line.rstrip())
def isFrozen():
if hasattr(sys, 'frozen'):
return True
else:
return False
def getPyfaRoot():
base = sys.executable if isFrozen() else sys.argv[0]
root = os.path.dirname(os.path.realpath(os.path.abspath(base)))
root = unicode(root, sys.getfilesystemencoding())
return root
def __createDirs(path):
if not os.path.exists(path):
os.makedirs(path)
def defPaths():
global debug
global pyfaPath
global savePath
global staticPath
global saveDB
global gameDB
global saveInRoot
if debug:
logLevel = logging.DEBUG
else:
logLevel = logging.WARN
# The main pyfa directory which contains run.py
# Python 2.X uses ANSI by default, so we need to convert the character encoding
pyfaPath = getattr(configforced, "pyfaPath", pyfaPath)
if pyfaPath is None:
pyfaPath = unicode(os.path.dirname(os.path.realpath(os.path.abspath(
sys.modules['__main__'].__file__))), sys.getfilesystemencoding())
pyfaPath = getPyfaRoot()
# Where we store the saved fits etc, default is the current users home directory
if saveInRoot is True:
@@ -95,13 +106,10 @@ def defPaths():
sl = StreamToLogger(stdout_logger, logging.INFO)
sys.stdout = sl
stderr_logger = logging.getLogger('STDERR')
sl = StreamToLogger(stderr_logger, logging.ERROR)
sys.stderr = sl
# Static EVE Data from the staticdata repository, should be in the staticdata
# directory in our pyfa directory
staticPath = os.path.join(pyfaPath, "staticdata")
# This interferes with cx_Freeze's own handling of exceptions. Find a way to fix this.
#stderr_logger = logging.getLogger('STDERR')
#sl = StreamToLogger(stderr_logger, logging.ERROR)
#sys.stderr = sl
# The database where we store all the fits etc
saveDB = os.path.join(savePath, "saveddata.db")
@@ -109,7 +117,7 @@ def defPaths():
# The database where the static EVE data from the datadump is kept.
# This is not the standard sqlite datadump but a modified version created by eos
# maintenance script
gameDB = os.path.join(staticPath, "eve.db")
gameDB = os.path.join(pyfaPath, "eve.db")
## DON'T MODIFY ANYTHING BELOW ##
import eos.config

BIN
dist_assets/mac/pyfa.icns Normal file

Binary file not shown.

BIN
dist_assets/win/pyfa.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -3,22 +3,15 @@ import shutil
import time
import re
import os
def getAppVersion():
# calculate app version based on upgrade files we have
appVersion = 0
for fname in os.listdir(os.path.join(os.path.dirname(__file__), "migrations")):
m = re.match("^upgrade(?P<index>\d+)\.py$", fname)
if not m:
continue
index = int(m.group("index"))
appVersion = max(appVersion, index)
return appVersion
import migrations
def getVersion(db):
cursor = db.execute('PRAGMA user_version')
return cursor.fetchone()[0]
def getAppVersion():
return migrations.appVersion
def update(saveddata_engine):
dbVersion = getVersion(saveddata_engine)
appVersion = getAppVersion()
@@ -37,10 +30,11 @@ def update(saveddata_engine):
shutil.copyfile(config.saveDB, toFile)
for version in xrange(dbVersion, appVersion):
module = __import__("eos.db.migrations.upgrade{}".format(version + 1), fromlist=True)
upgrade = getattr(module, "upgrade", False)
if upgrade:
upgrade(saveddata_engine)
func = migrations.updates[version+1]
if func:
print "applying update",version+1
func(saveddata_engine)
# when all is said and done, set version to current
saveddata_engine.execute("PRAGMA user_version = {}".format(appVersion))

View File

@@ -7,3 +7,25 @@ define an upgrade() function with the logic. Please note that there must be as
many upgrade files as there are database versions (version 5 would include
upgrade files 1-5)
"""
import pkgutil
import re
updates = {}
appVersion = 0
prefix = __name__ + "."
for importer, modname, ispkg in pkgutil.iter_modules(__path__, prefix):
# loop through python files, extracting update number and function, and
# adding it to a list
modname_tail = modname.rsplit('.', 1)[-1]
module = __import__(modname, fromlist=True)
m = re.match("^upgrade(?P<index>\d+)$", modname_tail)
if not m:
continue
index = int(m.group("index"))
appVersion = max(appVersion, index)
upgrade = getattr(module, "upgrade", False)
if upgrade:
updates[index] = upgrade

View File

@@ -1,7 +1,7 @@
import wx
import gui.utils.colorUtils as colorUtils
import gui.utils.drawUtils as drawUtils
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
SearchButton, EVT_SEARCH_BTN = wx.lib.newevent.NewEvent()
@@ -49,10 +49,6 @@ class PFSearchBox(wx.Window):
self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp)
self.Bind(wx.EVT_MOTION, self.OnMouseMove)
self.Bind(wx.EVT_ENTER_WINDOW, self.OnEnterLeaveWindow)
self.Bind(wx.EVT_LEAVE_WINDOW, self.OnEnterLeaveWindow)
# self.EditBox.ChangeValue(self.descriptiveText)
@@ -64,25 +60,26 @@ class PFSearchBox(wx.Window):
self.SetMinSize(size)
def OnEnterLeaveWindow(self, event):
self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
self._hl = False
def OnText(self, event):
wx.PostEvent(self, TextTyped())
event.Skip()
def OnTextEnter(self, event):
wx.PostEvent(self, TextEnter())
event.Skip()
def OnEditSetFocus(self, event):
# value = self.EditBox.GetValue()
# if value == self.descriptiveText:
# self.EditBox.ChangeValue("")
pass
event.Skip()
def OnEditKillFocus(self, event):
if self.EditBox.GetValue() == "":
self.Clear()
event.Skip()
def Clear(self):
self.EditBox.Clear()
@@ -138,20 +135,6 @@ class PFSearchBox(wx.Window):
btnsize.append( (cw,ch))
return btnsize
def OnMouseMove(self, event):
btnpos = self.GetButtonsPos()
btnsize = self.GetButtonsSize()
for btn in xrange(2):
if self.HitTest(btnpos[btn], event.GetPosition(), btnsize[btn]):
if not self._hl:
self.SetCursor(wx.StockCursor(wx.CURSOR_HAND))
self._hl = True
break
else:
if self._hl:
self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
self._hl = False
def OnLeftDown(self, event):
btnpos = self.GetButtonsPos()
btnsize = self.GetButtonsSize()

View File

@@ -26,7 +26,7 @@ from gui.implantView import ImplantView
from gui.projectedView import ProjectedView
from gui.pyfatogglepanel import TogglePanel
from gui.gangView import GangView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.chromeTabs
@@ -51,12 +51,12 @@ class AdditionsPane(TogglePanel):
self.notebook.SetMinSize(size)
baseSizer.Add(self.notebook, 1, wx.EXPAND)
droneImg = bitmapLoader.getImage("drone_small", "icons")
implantImg = bitmapLoader.getImage("implant_small", "icons")
boosterImg = bitmapLoader.getImage("booster_small", "icons")
projectedImg = bitmapLoader.getImage("projected_small", "icons")
gangImg = bitmapLoader.getImage("fleet_fc_small", "icons")
cargoImg = bitmapLoader.getImage("cargo_small", "icons")
droneImg = BitmapLoader.getImage("drone_small", "gui")
implantImg = BitmapLoader.getImage("implant_small", "gui")
boosterImg = BitmapLoader.getImage("booster_small", "gui")
projectedImg = BitmapLoader.getImage("projected_small", "gui")
gangImg = BitmapLoader.getImage("fleet_fc_small", "gui")
cargoImg = BitmapLoader.getImage("cargo_small", "gui")
self.notebook.AddPage(DroneView(self.notebook), "Drones", tabImage = droneImg, showClose = False)
self.notebook.AddPage(CargoView(self.notebook), "Cargo", tabImage = cargoImg, showClose = False)

View File

@@ -20,87 +20,74 @@
import os.path
import config
import wx
import time
import zipfile
import cStringIO
try:
from collections import OrderedDict
except ImportError:
from utils.compat import OrderedDict
cachedBitmapsCount = 0
cachedBitmaps = OrderedDict()
dontUseCachedBitmaps = False
class BitmapLoader():
def getStaticBitmap(name, parent, location):
static = wx.StaticBitmap(parent)
static.SetBitmap(getBitmap(name,location))
return static
try:
archive = zipfile.ZipFile(os.path.join(config.pyfaPath, 'imgs.zip'), 'r')
except IOError:
archive = None
locationMap = {"pack": os.path.join(config.staticPath, "icons"),
"ships": os.path.join(config.staticPath, "icons/ships")}
cachedBitmaps = OrderedDict()
dontUseCachedBitmaps = False
max_bmps = 500
def getBitmap(name,location):
@classmethod
def getStaticBitmap(cls, name, parent, location):
static = wx.StaticBitmap(parent)
static.SetBitmap(cls.getBitmap(name,location))
return static
global cachedBitmaps
global cachedBitmapsCount
global dontUseCachedBitmaps
@classmethod
def getBitmap(cls, name, location):
if cls.dontUseCachedBitmaps:
img = cls.getImage(name, location)
if img is not None:
return img.ConvertToBitmap()
if dontUseCachedBitmaps:
img = getImage(name, location)
if img is not None:
return img.ConvertToBitmap()
path = "%s%s" % (name, location)
path = "%s%s" % (name,location)
MAX_BMPS = 500
# start = time.clock()
if cachedBitmapsCount == MAX_BMPS:
cachedBitmaps.popitem(False)
cachedBitmapsCount -=1
if len(cls.cachedBitmaps) == cls.max_bmps:
cls.cachedBitmaps.popitem(False)
if path not in cachedBitmaps:
img = getImage(name, location)
if img is not None:
bmp = img.ConvertToBitmap()
if path not in cls.cachedBitmaps:
img = cls.getImage(name, location)
if img is not None:
bmp = img.ConvertToBitmap()
else:
bmp = None
cls.cachedBitmaps[path] = bmp
else:
bmp = None
cachedBitmaps[path] = bmp
cachedBitmapsCount += 1
else:
bmp = cachedBitmaps[path]
bmp = cls.cachedBitmaps[path]
# print "#BMPs:%d - Current took: %.8f" % (cachedBitmapsCount,time.clock() - start)
return bmp
return bmp
def stripPath(fname):
"""
Here we extract 'core' of icon name. Path and
extension are sometimes specified in database
but we don't need them.
"""
# Path before the icon file name
fname = fname.split('/')[-1]
# Extension
fname = fname.rsplit('.', 1)[0]
return fname
def getImage(name, location):
if location in locationMap:
if location == "pack":
location = locationMap[location]
name = stripPath(name)
filename = "icon{0}.png".format(name)
path = os.path.join(location, filename)
else:
location = locationMap[location]
filename = "{0}.png".format(name)
path = os.path.join(location, filename)
else:
location = os.path.join(config.pyfaPath, location)
@classmethod
def getImage(cls, name, location):
filename = "{0}.png".format(name)
path = os.path.join(location, filename)
if os.path.exists(path):
return wx.Image(path)
else:
print "Missing icon file: {0}".format(filename)
if cls.archive:
path = os.path.join(location, filename)
if os.sep != "/" and os.sep in path:
path = path.replace(os.sep, "/")
try:
img_data = cls.archive.read(path)
sbuf = cStringIO.StringIO(img_data)
return wx.ImageFromStream(sbuf)
except KeyError:
print "Missing icon file from zip: {0}".format(path)
else:
path = os.path.join(config.pyfaPath, 'imgs', location, filename)
if os.path.exists(path):
return wx.Image(path)
else:
print "Missing icon file: {0}".format(path)

View File

@@ -3,7 +3,7 @@ from gui.contextMenu import ContextMenu
import gui.mainFrame
import service
import wx
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from eos.types import Skill
import gui.globalEvents as GE
@@ -74,7 +74,7 @@ class ChangeAffectingSkills(ContextMenu):
grandSub = wx.Menu()
skillItem.SetSubMenu(grandSub)
if skill.learned:
bitmap = bitmapLoader.getBitmap("lvl%s" % skill.level, "icons")
bitmap = BitmapLoader.getBitmap("lvl%s" % skill.level, "gui")
if bitmap is not None:
skillItem.SetBitmap(bitmap)

View File

@@ -3,7 +3,7 @@ import gui.mainFrame
import service
import gui.globalEvents as GE
import wx
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
try:
from collections import OrderedDict
@@ -65,7 +65,7 @@ class DamagePattern(ContextMenu):
dp = f.damagePattern
if dp == pattern:
bitmap = bitmapLoader.getBitmap("state_active_small", "icons")
bitmap = BitmapLoader.getBitmap("state_active_small", "gui")
menuItem.SetBitmap(bitmap)
return menuItem
@@ -80,7 +80,7 @@ class DamagePattern(ContextMenu):
self.patternIds[id] = self.singles[i]
rootMenu.Bind(wx.EVT_MENU, self.handlePatternSwitch, pitem)
if self.patternIds[id] == self.fit.damagePattern:
bitmap = bitmapLoader.getBitmap("state_active_small", "icons")
bitmap = BitmapLoader.getBitmap("state_active_small", "gui")
pitem.SetBitmap(bitmap)
return False

View File

@@ -3,7 +3,7 @@ import gui.mainFrame
import service
import gui.globalEvents as GE
import wx
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
class FactorReload(ContextMenu):
def __init__(self):
@@ -27,7 +27,7 @@ class FactorReload(ContextMenu):
fitID = self.mainFrame.getActiveFit()
fit = sFit.getFit(fitID)
if fit.factorReload:
return bitmapLoader.getBitmap("state_active_small", "icons")
return BitmapLoader.getBitmap("state_active_small", "gui")
else:
return None

View File

@@ -3,7 +3,7 @@ from gui.contextMenu import ContextMenu
import gui.mainFrame
import service
import wx
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from eos.types import Hardpoint
import gui.globalEvents as GE
@@ -105,7 +105,7 @@ class ModuleAmmoPicker(ContextMenu):
menu.Bind(wx.EVT_MENU, self.handleAmmoSwitch, item)
item.charge = charge
if charge is not None and charge.icon is not None:
bitmap = bitmapLoader.getBitmap(charge.icon.iconFile, "pack")
bitmap = BitmapLoader.getBitmap(charge.icon.iconFile, "icons")
if bitmap is not None:
item.SetBitmap(bitmap)
@@ -181,7 +181,7 @@ class ModuleAmmoPicker(ContextMenu):
type = currType
item = wx.MenuItem(m, wx.ID_ANY, type.capitalize())
bitmap = bitmapLoader.getBitmap("%s_small" % type, "icons")
bitmap = BitmapLoader.getBitmap("%s_small" % type, "gui")
if bitmap is not None:
item.SetBitmap(bitmap)

View File

@@ -3,7 +3,7 @@ from gui.contextMenu import ContextMenu
import gui.mainFrame
import service
import wx
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from eos.types import Hardpoint
import gui.globalEvents as GE
from gui.builtinContextMenus.moduleAmmoPicker import ModuleAmmoPicker

View File

@@ -3,7 +3,7 @@ import gui.mainFrame
import service
import gui.globalEvents as GE
import wx
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
try:
from collections import OrderedDict
@@ -56,7 +56,7 @@ class TargetResists(ContextMenu):
tr = f.targetResists
if tr == pattern:
bitmap = bitmapLoader.getBitmap("state_active_small", "icons")
bitmap = BitmapLoader.getBitmap("state_active_small", "gui")
item.SetBitmap(bitmap)
return item

View File

@@ -19,7 +19,7 @@
from gui.graph import Graph
import service
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from eos.graph.fitDps import FitDpsGraph as FitDps
from eos.graph import Data
import gui.mainFrame
@@ -56,7 +56,7 @@ class FitDpsGraph(Graph):
sAttr = service.Attribute.getInstance()
for key, attrName in self.propertyAttributeMap.iteritems():
iconFile = sAttr.getAttributeInfo(attrName).icon.iconFile
bitmap = bitmapLoader.getBitmap(iconFile, "pack")
bitmap = BitmapLoader.getBitmap(iconFile, "icons")
if bitmap:
icons[key] = bitmap

View File

@@ -19,7 +19,7 @@
import wx
from gui.preferenceView import PreferenceView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
class DummyView(PreferenceView):
title = "Dummy"

View File

@@ -6,7 +6,7 @@ import wx
import copy
from gui.preferenceView import PreferenceView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils import colorUtils
import gui.utils.drawUtils as drawUtils
@@ -313,7 +313,7 @@ class PFGaugePref ( PreferenceView):
self.cp103105E.Bind( wx.EVT_COLOURPICKER_CHANGED, self.OnColourChanged )
def getImage(self):
return bitmapLoader.getBitmap("pref-gauges_big", "icons")
return BitmapLoader.getBitmap("pref-gauges_big", "gui")
def InitDefaultColours(self):
self.c0100S = wx.Colour(191, 191, 191, 255)

View File

@@ -1,7 +1,7 @@
import wx
from gui.preferenceView import PreferenceView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
import service
@@ -144,6 +144,6 @@ class PFGeneralPref ( PreferenceView):
self.sFit.serviceFittingOptions["showMarketShortcuts"] = self.cbMarketShortcuts.GetValue()
def getImage(self):
return bitmapLoader.getBitmap("prefs_settings", "icons")
return BitmapLoader.getBitmap("prefs_settings", "gui")
PFGeneralPref.register()

View File

@@ -2,7 +2,7 @@ import wx
import os
from gui.preferenceView import PreferenceView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
import service
@@ -76,6 +76,6 @@ class PFHTMLExportPref ( PreferenceView):
self.HTMLExportSettings.setEnabled(self.exportEnabled.GetValue())
def getImage(self):
return bitmapLoader.getBitmap("prefs_html", "icons")
return BitmapLoader.getBitmap("prefs_html", "gui")
PFHTMLExportPref.register()

View File

@@ -1,7 +1,7 @@
import wx
from gui.preferenceView import PreferenceView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
import service
@@ -223,6 +223,6 @@ class PFNetworkPref ( PreferenceView):
self.editProxySettingsPort.Disable()
def getImage(self):
return bitmapLoader.getBitmap("prefs_proxy", "icons")
return BitmapLoader.getBitmap("prefs_proxy", "gui")
PFNetworkPref.register()

View File

@@ -3,7 +3,7 @@ import service
import os
from gui.preferenceView import PreferenceView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import service
import gui.globalEvents as GE
@@ -99,6 +99,6 @@ class PFUpdatePref (PreferenceView):
wx.LaunchDefaultBrowser('https://github.com/DarkFenX/Pyfa/releases/tag/'+self.UpdateSettings.get('version'))
def getImage(self):
return bitmapLoader.getBitmap("prefs_update", "icons")
return BitmapLoader.getBitmap("prefs_update", "gui")
PFUpdatePref.register()

View File

@@ -20,7 +20,7 @@
import wx
from gui.statsView import StatsView
from gui import builtinStatsViews
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
class CapacitorViewFull(StatsView):
@@ -48,7 +48,7 @@ class CapacitorViewFull(StatsView):
baseBox = wx.BoxSizer(wx.HORIZONTAL)
sizerCapacitor.Add(baseBox, 0, wx.ALIGN_LEFT)
bitmap = bitmapLoader.getStaticBitmap("capacitorInfo_big", parent, "icons")
bitmap = BitmapLoader.getStaticBitmap("capacitorInfo_big", parent, "gui")
tooltip = wx.ToolTip("Capacitor stability")
bitmap.SetToolTip(tooltip)
baseBox.Add(bitmap, 0, wx.ALIGN_CENTER)
@@ -83,7 +83,7 @@ class CapacitorViewFull(StatsView):
sizerCapacitor.Add(baseBox, 0, wx.ALIGN_CENTER_HORIZONTAL)
tooltip = wx.ToolTip("Capacitor throughput")
bitmap = bitmapLoader.getStaticBitmap("capacitorRecharge_big", parent, "icons")
bitmap = BitmapLoader.getStaticBitmap("capacitorRecharge_big", parent, "gui")
bitmap.SetToolTip(tooltip)
baseBox.Add(bitmap, 0, wx.ALIGN_CENTER)

View File

@@ -21,7 +21,7 @@ import wx
import service
import gui.mainFrame
from gui.statsView import StatsView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
class FirepowerViewFull(StatsView):
@@ -61,7 +61,7 @@ class FirepowerViewFull(StatsView):
baseBox = wx.BoxSizer(wx.HORIZONTAL)
sizerFirepower.Add(baseBox, 1, wx.ALIGN_LEFT if counter == 0 else wx.ALIGN_CENTER_HORIZONTAL)
baseBox.Add(bitmapLoader.getStaticBitmap("%s_big" % image, parent, "icons"), 0, wx.ALIGN_CENTER)
baseBox.Add(BitmapLoader.getStaticBitmap("%s_big" % image, parent, "gui"), 0, wx.ALIGN_CENTER)
box = wx.BoxSizer(wx.VERTICAL)
baseBox.Add(box, 0, wx.ALIGN_CENTER)
@@ -82,7 +82,7 @@ class FirepowerViewFull(StatsView):
baseBox = wx.BoxSizer(wx.HORIZONTAL)
targetSizer.Add(baseBox, 0, wx.ALIGN_RIGHT)
baseBox.Add(bitmapLoader.getStaticBitmap("volley_big", parent, "icons"), 0, wx.ALIGN_CENTER)
baseBox.Add(BitmapLoader.getStaticBitmap("volley_big", parent, "gui"), 0, wx.ALIGN_CENTER)
gridS = wx.GridSizer(2,2,0,0)
@@ -103,7 +103,7 @@ class FirepowerViewFull(StatsView):
gridS.Add(lbl, 0, wx.ALIGN_LEFT)
image = bitmapLoader.getBitmap("mining_small", "icons")
image = BitmapLoader.getBitmap("mining_small", "gui")
self.miningyield = wx.BitmapButton(contentPanel, -1, image)
self.miningyield.SetToolTip(wx.ToolTip("Click to toggle to Mining Yield "))
self.miningyield.Bind(wx.EVT_BUTTON, self.switchToMiningYieldView)

View File

@@ -21,7 +21,7 @@ import wx
import service
import gui.mainFrame
from gui.statsView import StatsView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
class MiningYieldViewFull(StatsView):
@@ -55,7 +55,7 @@ class MiningYieldViewFull(StatsView):
baseBox = wx.BoxSizer(wx.HORIZONTAL)
sizerMiningYield.Add(baseBox, 1, wx.ALIGN_LEFT if counter == 0 else wx.ALIGN_CENTER_HORIZONTAL)
baseBox.Add(bitmapLoader.getStaticBitmap("%s_big" % image, parent, "icons"), 0, wx.ALIGN_CENTER)
baseBox.Add(BitmapLoader.getStaticBitmap("%s_big" % image, parent, "gui"), 0, wx.ALIGN_CENTER)
box = wx.BoxSizer(wx.VERTICAL)
baseBox.Add(box, 0, wx.ALIGN_CENTER)
@@ -76,7 +76,7 @@ class MiningYieldViewFull(StatsView):
baseBox = wx.BoxSizer(wx.HORIZONTAL)
targetSizer.Add(baseBox, 0, wx.ALIGN_LEFT)
baseBox.Add(bitmapLoader.getStaticBitmap("cargoBay_big", parent, "icons"), 0, wx.ALIGN_CENTER)
baseBox.Add(BitmapLoader.getStaticBitmap("cargoBay_big", parent, "gui"), 0, wx.ALIGN_CENTER)
box = wx.BoxSizer(wx.VERTICAL)
baseBox.Add(box, 0, wx.EXPAND)
@@ -92,7 +92,7 @@ class MiningYieldViewFull(StatsView):
self._cachedValues.append(0)
image = bitmapLoader.getBitmap("turret_small", "icons")
image = BitmapLoader.getBitmap("turret_small", "gui")
firepower = wx.BitmapButton(contentPanel, -1, image)
firepower.SetToolTip(wx.ToolTip("Click to toggle to Firepower View"))
firepower.Bind(wx.EVT_BUTTON, self.switchToFirepowerView)

View File

@@ -20,7 +20,7 @@
import wx
from gui.statsView import StatsView
from gui import builtinStatsViews
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
import service
import locale
@@ -56,7 +56,7 @@ class PriceViewFull(StatsView):
box = wx.BoxSizer(wx.HORIZONTAL)
gridPrice.Add(box, 0, wx.ALIGN_TOP)
box.Add(bitmapLoader.getStaticBitmap(image, contentPanel, "icons"), 0, wx.ALIGN_CENTER)
box.Add(BitmapLoader.getStaticBitmap(image, contentPanel, "gui"), 0, wx.ALIGN_CENTER)
vbox = wx.BoxSizer(wx.VERTICAL)
box.Add(vbox, 1, wx.EXPAND)

View File

@@ -19,7 +19,7 @@
import wx
from gui.statsView import StatsView
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
import gui.mainFrame
import gui.builtinStatsViews.resistancesViewFull as rvf
@@ -62,14 +62,14 @@ class RechargeViewFull(StatsView):
sizerTankStats.Add(wx.StaticText(contentPanel, wx.ID_ANY, ""), 0)
toolTipText = {"shieldPassive" : "Passive shield recharge", "shieldActive" : "Active shield boost", "armorActive" : "Armor repair amount", "hullActive" : "Hull repair amount"}
for tankType in ("shieldPassive", "shieldActive", "armorActive", "hullActive"):
bitmap = bitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "icons")
bitmap = BitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[tankType])
bitmap.SetToolTip(tooltip)
sizerTankStats.Add(bitmap, 0, wx.ALIGN_CENTER)
toolTipText = {"reinforced" : "Reinforced", "sustained" : "Sustained"}
for stability in ("reinforced", "sustained"):
bitmap = bitmapLoader.getStaticBitmap("regen%s_big" % stability.capitalize(), contentPanel, "icons")
bitmap = BitmapLoader.getStaticBitmap("regen%s_big" % stability.capitalize(), contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[stability])
bitmap.SetToolTip(tooltip)
sizerTankStats.Add(bitmap, 0, wx.ALIGN_CENTER)

View File

@@ -20,7 +20,7 @@
import wx
from gui.statsView import StatsView
from gui import builtinStatsViews
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui import pygauge as PG
from gui.utils.numberFormatter import formatAmount
import service
@@ -74,18 +74,15 @@ class ResistancesViewFull(StatsView):
# Display table
col = 0
row = 0
sizerResistances = wx.GridBagSizer(0, 0)
sizerResistances = wx.GridBagSizer()
contentSizer.Add( sizerResistances, 0, wx.EXPAND , 0)
for i in xrange(6):
sizerResistances.AddGrowableCol(i + 1)
# Add an empty label, then the rest.
sizerResistances.Add(wx.StaticText(contentPanel, wx.ID_ANY), wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ))
col+=1
toolTipText = {"em" : "Electromagnetic resistance", "thermal" : "Thermal resistance", "kinetic" : "Kinetic resistance", "explosive" : "Explosive resistance"}
for damageType in ("em", "thermal", "kinetic", "explosive"):
bitmap = bitmapLoader.getStaticBitmap("%s_big" % damageType, contentPanel, "icons")
bitmap = BitmapLoader.getStaticBitmap("%s_big" % damageType, contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[damageType])
bitmap.SetToolTip(tooltip)
sizerResistances.Add(bitmap, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
@@ -95,6 +92,8 @@ class ResistancesViewFull(StatsView):
self.stEHPs.Bind(wx.EVT_BUTTON, self.toggleEHP)
for i in xrange(4):
sizerResistances.AddGrowableCol(i+1)
sizerResistances.Add(self.stEHPs, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
col=0
@@ -105,7 +104,7 @@ class ResistancesViewFull(StatsView):
toolTipText = {"shield" : "Shield resistance", "armor" : "Armor resistance", "hull" : "Hull resistance", "damagePattern" : "Incoming damage pattern"}
for tankType in ("shield", "armor", "hull", "separator", "damagePattern"):
if tankType != "separator":
bitmap = bitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "icons")
bitmap = BitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[tankType])
bitmap.SetToolTip(tooltip)
sizerResistances.Add(bitmap, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)

View File

@@ -20,7 +20,7 @@
import wx
from gui.statsView import StatsView
from gui import builtinStatsViews
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui import pygauge as PG
import gui.mainFrame
import gui.chromeTabs
@@ -91,7 +91,7 @@ class ResourcesViewFull(StatsView):
for type in ("turret", "launcher", "drones", "calibration"):
box = wx.BoxSizer(wx.HORIZONTAL)
bitmap = bitmapLoader.getStaticBitmap("%s_big" % type, parent, "icons")
bitmap = BitmapLoader.getStaticBitmap("%s_big" % type, parent, "gui")
tooltip = wx.ToolTip(tooltipText[type])
bitmap.SetToolTip(tooltip)
@@ -119,7 +119,7 @@ class ResourcesViewFull(StatsView):
for type in group:
capitalizedType = type[0].capitalize() + type[1:]
bitmap = bitmapLoader.getStaticBitmap(type + "_big", parent, "icons")
bitmap = BitmapLoader.getStaticBitmap(type + "_big", parent, "gui")
tooltip = wx.ToolTip(tooltipText[type])
bitmap.SetToolTip(tooltip)

View File

@@ -52,7 +52,7 @@ class TargetingMiscViewFull(StatsView):
gridTargetingMisc.AddGrowableCol(2)
# Targeting
gridTargeting = wx.FlexGridSizer(4, 2)
gridTargeting = wx.FlexGridSizer(5, 2)
gridTargeting.AddGrowableCol(1)
gridTargetingMisc.Add(gridTargeting, 0, wx.ALIGN_LEFT | wx.ALL, 5)
@@ -77,7 +77,7 @@ class TargetingMiscViewFull(StatsView):
# Misc
gridTargetingMisc.Add( wx.StaticLine( contentPanel, wx.ID_ANY, style = wx.VERTICAL),0, wx.EXPAND, 3 )
gridMisc = wx.FlexGridSizer(4, 2)
gridMisc = wx.FlexGridSizer(5, 2)
gridMisc.AddGrowableCol(1)
gridTargetingMisc.Add(gridMisc,0 , wx.ALIGN_LEFT | wx.ALL, 5)

View File

@@ -19,7 +19,7 @@
from gui import builtinViewColumns
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import wx
class Ammo(ViewColumn):
@@ -27,8 +27,8 @@ class Ammo(ViewColumn):
def __init__(self, fittingView, params):
ViewColumn.__init__(self, fittingView)
self.mask = wx.LIST_MASK_IMAGE
self.imageId = fittingView.imageList.GetImageIndex("damagePattern_small", "icons")
self.bitmap = bitmapLoader.getBitmap("damagePattern_small", "icons")
self.imageId = fittingView.imageList.GetImageIndex("damagePattern_small", "gui")
self.bitmap = BitmapLoader.getBitmap("damagePattern_small", "gui")
def getText(self, stuff):
if getattr(stuff, "charge", None) is not None:

View File

@@ -19,7 +19,7 @@
from gui import builtinViewColumns
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import wx
from eos.types import Module
@@ -27,7 +27,7 @@ class AmmoIcon(ViewColumn):
name = "Ammo Icon"
def __init__(self, fittingView, params):
ViewColumn.__init__(self, fittingView)
self.size = 16
self.size = 24
self.maxsize = self.size
self.mask = wx.LIST_MASK_IMAGE
self.columnText = ""
@@ -44,7 +44,7 @@ class AmmoIcon(ViewColumn):
else:
iconFile = stuff.charge.icon.iconFile if stuff.item.icon else ""
if iconFile:
return self.fittingView.imageList.GetImageIndex(iconFile, "pack")
return self.fittingView.imageList.GetImageIndex(iconFile, "icons")
else:
return -1

View File

@@ -19,7 +19,7 @@
from gui import builtinViewColumns
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
import service
@@ -35,13 +35,13 @@ class AttributeDisplay(ViewColumn):
if params["showIcon"]:
if info.name == "power":
iconFile = "pg_small"
iconType = "icons"
iconType = "gui"
else:
iconFile = info.icon.iconFile if info.icon else None
iconType = "pack"
iconType = "icons"
if iconFile:
self.imageId = fittingView.imageList.GetImageIndex(iconFile, iconType)
self.bitmap = bitmapLoader.getBitmap(iconFile, iconType)
self.bitmap = BitmapLoader.getBitmap(iconFile, iconType)
else:
self.imageId = -1

View File

@@ -1,6 +1,6 @@
from gui import builtinViewColumns
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import wx
from eos.types import Drone, Fit, Module, Slot, Rack
@@ -8,11 +8,11 @@ class BaseIcon(ViewColumn):
name = "Base Icon"
def __init__(self, fittingView, params):
ViewColumn.__init__(self, fittingView)
self.size = 16
self.size = 24
self.maxsize = self.size
self.mask = wx.LIST_MASK_IMAGE
self.columnText = ""
self.shipImage = fittingView.imageList.GetImageIndex("ship_small", "icons")
self.shipImage = fittingView.imageList.GetImageIndex("ship_small", "gui")
def getImageId(self, stuff):
if isinstance(stuff, Drone):
@@ -23,7 +23,7 @@ class BaseIcon(ViewColumn):
return -1
if isinstance(stuff, Module):
if stuff.isEmpty:
return self.fittingView.imageList.GetImageIndex("slot_%s_small" % Slot.getName(stuff.slot).lower(), "icons")
return self.fittingView.imageList.GetImageIndex("slot_%s_small" % Slot.getName(stuff.slot).lower(), "gui")
else:
return self.loadIconFile(stuff.item.icon.iconFile if stuff.item.icon else "")
@@ -32,7 +32,7 @@ class BaseIcon(ViewColumn):
def loadIconFile(self, iconFile):
if iconFile:
return self.fittingView.imageList.GetImageIndex(iconFile, "pack")
return self.fittingView.imageList.GetImageIndex(iconFile, "icons")
else:
return -1

View File

@@ -32,7 +32,7 @@ class BaseName(ViewColumn):
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
self.columnText = "Name"
self.shipImage = fittingView.imageList.GetImageIndex("ship_small", "icons")
self.shipImage = fittingView.imageList.GetImageIndex("ship_small", "gui")
self.mask = wx.LIST_MASK_TEXT
self.projectedView = isinstance(fittingView, gui.projectedView.ProjectedView)

View File

@@ -22,7 +22,7 @@ import service
from gui.utils.numberFormatter import formatAmount
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from eos.types import Mode
class CapacitorUse(ViewColumn):
@@ -34,8 +34,8 @@ class CapacitorUse(ViewColumn):
sAttr = service.Attribute.getInstance()
info = sAttr.getAttributeInfo("capacitorNeed")
self.imageId = fittingView.imageList.GetImageIndex("capacitorRecharge_small", "icons")
self.bitmap = bitmapLoader.getBitmap("capacitorRecharge_small", "icons")
self.imageId = fittingView.imageList.GetImageIndex("capacitorRecharge_small", "gui")
self.bitmap = BitmapLoader.getBitmap("capacitorRecharge_small", "gui")
def getText(self, mod):
if isinstance(mod, Mode):

View File

@@ -19,7 +19,7 @@
from gui import builtinViewColumns
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import service
from gui.utils.numberFormatter import formatAmount
import wx
@@ -39,8 +39,8 @@ class MaxRange(ViewColumn):
if params["showIcon"]:
iconFile = info.icon.iconFile if info.icon else None
if iconFile:
self.imageId = fittingView.imageList.GetImageIndex(iconFile, "pack")
self.bitmap = bitmapLoader.getBitmap(iconFile, "pack")
self.imageId = fittingView.imageList.GetImageIndex(iconFile, "icons")
self.bitmap = BitmapLoader.getBitmap(iconFile, "icons")
else:
self.imageId = -1
self.mask = wx.LIST_MASK_IMAGE

View File

@@ -20,7 +20,7 @@
import gui.mainFrame
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
from gui.utils.listFormatter import formatList
from service.fit import Fit, Market
@@ -35,8 +35,8 @@ class Miscellanea(ViewColumn):
"displayName": False}
ViewColumn.__init__(self, fittingView)
if params["showIcon"]:
self.imageId = fittingView.imageList.GetImageIndex("column_misc", "icons")
self.bitmap = bitmapLoader.getBitmap("column_misc", "icons")
self.imageId = fittingView.imageList.GetImageIndex("column_misc", "gui")
self.bitmap = BitmapLoader.getBitmap("column_misc", "gui")
self.mask = wx.LIST_MASK_IMAGE
else:
self.imageId = -1

View File

@@ -18,7 +18,7 @@
#===============================================================================
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
from eos.types import Drone, Cargo
import wx
@@ -29,8 +29,8 @@ class Price(ViewColumn):
def __init__(self, fittingView, params):
ViewColumn.__init__(self, fittingView)
self.mask = wx.LIST_MASK_IMAGE
self.bitmap = bitmapLoader.getBitmap("totalPrice_small", "icons")
self.imageId = fittingView.imageList.GetImageIndex("totalPrice_small", "icons")
self.bitmap = BitmapLoader.getBitmap("totalPrice_small", "gui")
self.imageId = fittingView.imageList.GetImageIndex("totalPrice_small", "gui")
def getText(self, stuff):
if stuff.item is None or stuff.item.group.name == "Ship Modifiers":

View File

@@ -18,7 +18,7 @@
#===============================================================================
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
import wx
import service
@@ -39,10 +39,10 @@ class PropertyDisplay(ViewColumn):
if params["showIcon"]:
if info.name == "power":
iconFile = "pg_small"
iconType = "icons"
iconType = "gui"
else:
iconFile = info.icon.iconFile if info.icon else None
iconType = "pack"
iconType = "icons"
if iconFile:
self.imageId = fittingView.imageList.GetImageIndex(iconFile, iconType)
else:

View File

@@ -18,7 +18,7 @@
#===============================================================================
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
import wx
@@ -43,8 +43,8 @@ class State(ViewColumn):
return State_.getName(mod.state).title()
def getImageId(self, stuff):
generic_active = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(1).lower(), "icons")
generic_inactive = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(-1).lower(), "icons")
generic_active = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(1).lower(), "gui")
generic_inactive = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(-1).lower(), "gui")
if isinstance(stuff, Drone):
if stuff.amountActive > 0:
@@ -57,7 +57,7 @@ class State(ViewColumn):
if stuff.isEmpty:
return -1
else:
return self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(stuff.state).lower(), "icons")
return self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(stuff.state).lower(), "gui")
elif isinstance(stuff, Fit):
fitID = self.mainFrame.getActiveFit()
projectionInfo = stuff.getProjectionInfo(fitID)

View File

@@ -28,7 +28,7 @@ import gui.shipBrowser
import gui.multiSwitch
from eos.types import Slot, Rack, Module
from gui.builtinViewColumns.state import State
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.builtinViews.emptyView
from gui.utils.exportHtml import exportHtml
@@ -57,7 +57,7 @@ class FitSpawner(gui.multiSwitch.TabSpawner):
startup = getattr(event, "startup", False) # see OpenFitsThread in gui.mainFrame
mstate = wx.GetMouseState()
if mstate.CmdDown() or mstate.MiddleDown() or startup:
if mstate.CmdDown() or startup:
self.multiSwitch.AddPage()
view = FittingView(self.multiSwitch)
@@ -294,7 +294,7 @@ class FittingView(d.Display):
sFit = service.Fit.getInstance()
fit = sFit.getFit(self.getActiveFit())
bitmap = bitmapLoader.getImage("race_%s_small" % fit.ship.item.race, "icons")
bitmap = BitmapLoader.getImage("race_%s_small" % fit.ship.item.race, "gui")
text = "%s: %s" % (fit.ship.item.name, fit.name)
pageIndex = self.parent.GetPageIndex(self)
@@ -521,7 +521,7 @@ class FittingView(d.Display):
sFit = service.Fit.getInstance()
fitID = self.mainFrame.getActiveFit()
ctrl = wx.GetMouseState().CmdDown() or wx.GetMouseState().MiddleDown()
click = "ctrl" if ctrl is True else "right" if event.Button == 3 else "left"
click = "ctrl" if ctrl is True else "right" if event.GetButton() == 3 else "left"
sFit.toggleModulesState(fitID, self.mods[self.GetItemData(row)], mods, click)
# update state tooltip

View File

@@ -1,7 +1,7 @@
import wx.gizmos
import gui.fleetBrowser
import service
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
#Tab spawning handler
class FleetSpawner(gui.multiSwitch.TabSpawner):
@@ -28,7 +28,7 @@ class FleetView(wx.gizmos.TreeListCtrl):
self.tabManager = parent
self.fleetId = None
self.fleetImg = bitmapLoader.getImage("53_16", "pack")
self.fleetImg = BitmapLoader.getImage("53_16", "icons")
self.imageList = wx.ImageList(16, 16)
self.SetImageList(self.imageList)
@@ -38,9 +38,9 @@ class FleetView(wx.gizmos.TreeListCtrl):
self.SetMainColumn(1)
self.icons = {}
self.addImage = self.imageList.Add(bitmapLoader.getBitmap("add_small", "icons"))
self.addImage = self.imageList.Add(BitmapLoader.getBitmap("add_small", "gui"))
for icon in ("fb", "fc", "sb", "sc", "wb", "wc"):
self.icons[icon] = self.imageList.Add(bitmapLoader.getBitmap("fleet_%s_small" % icon, "icons"))
self.icons[icon] = self.imageList.Add(BitmapLoader.getBitmap("fleet_%s_small" % icon, "gui"))
self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.checkNew)
self.mainFrame = gui.mainFrame.MainFrame.getInstance()

View File

@@ -18,7 +18,7 @@
#===============================================================================
import wx
import bitmapLoader
from gui.bitmapLoader import BitmapLoader
class CachingImageList(wx.ImageList):
def __init__(self, width, height):
@@ -28,7 +28,7 @@ class CachingImageList(wx.ImageList):
def GetImageIndex(self, *loaderArgs):
id = self.map.get(loaderArgs)
if id is None:
bitmap = bitmapLoader.getBitmap(*loaderArgs)
bitmap = BitmapLoader.getBitmap(*loaderArgs)
if bitmap is None:
return -1
id = self.map[loaderArgs] = wx.ImageList.Add(self,bitmap)

View File

@@ -22,7 +22,7 @@ import wx
import gui.mainFrame
import wx.lib.newevent
import wx.gizmos
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import service
import gui.display as d
from gui.contextMenu import ContextMenu
@@ -34,9 +34,10 @@ class CharacterEditor(wx.Frame):
wx.Frame.__init__ (self, parent, id=wx.ID_ANY, title=u"pyfa: Character Editor", pos=wx.DefaultPosition,
size=wx.Size(641, 600), style=wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT|wx.TAB_TRAVERSAL)
i = wx.IconFromBitmap(BitmapLoader.getBitmap("character_small", "gui"))
self.mainFrame = parent
i = wx.IconFromBitmap(bitmapLoader.getBitmap("character_small", "icons"))
self.SetIcon(i)
self.disableWin= wx.WindowDisabler(self)
@@ -67,7 +68,7 @@ class CharacterEditor(wx.Frame):
self.charChoice.SetSelection(i)
buttons = (("new", wx.ART_NEW),
("rename", bitmapLoader.getBitmap("rename", "icons")),
("rename", BitmapLoader.getBitmap("rename", "gui")),
("copy", wx.ART_COPY),
("delete", wx.ART_DELETE))
@@ -261,10 +262,8 @@ class CharacterEditor(wx.Frame):
self.characterRename.SetFocus()
for btn in (self.btnNew, self.btnCopy, self.btnRename, self.btnDelete):
btn.Hide()
self.navSizer.Remove(btn)
self.btnSave.Show()
self.navSizer.Add(self.btnSave, 0, wx.ALIGN_CENTER)
self.navSizer.Layout()
sChar = service.Character.getInstance()
@@ -287,9 +286,7 @@ class CharacterEditor(wx.Frame):
self.navSizer.Replace(self.characterRename, self.charChoice)
for btn in (self.btnNew, self.btnCopy, self.btnRename, self.btnDelete):
btn.Show()
self.navSizer.Add(btn, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 2)
self.navSizer.Remove(self.btnSave)
self.btnSave.Hide()
self.navSizer.Layout()
self.refreshCharacterList()
@@ -338,7 +335,7 @@ class SkillTreeView (wx.Panel):
self.imageList = wx.ImageList(16, 16)
tree.SetImageList(self.imageList)
self.skillBookImageId = self.imageList.Add(bitmapLoader.getBitmap("skill_small", "icons"))
self.skillBookImageId = self.imageList.Add(BitmapLoader.getBitmap("skill_small", "gui"))
tree.AddColumn("Skill")
tree.AddColumn("Level")
@@ -478,7 +475,7 @@ class ImplantsTreeView (wx.Panel):
def addMarketViewImage(self, iconFile):
if iconFile is None:
return -1
bitmap = bitmapLoader.getBitmap(iconFile, "pack")
bitmap = BitmapLoader.getBitmap(iconFile, "icons")
if bitmap is None:
return -1
else:
@@ -506,9 +503,9 @@ class ImplantsTreeView (wx.Panel):
buttonSizer = wx.BoxSizer(wx.VERTICAL)
pmainSizer.Add(buttonSizer, 0, wx.TOP, 5)
self.btnAdd = GenBitmapButton(self, wx.ID_ADD, bitmapLoader.getBitmap("fit_add_small", "icons"), style = wx.BORDER_NONE)
self.btnAdd = GenBitmapButton(self, wx.ID_ADD, BitmapLoader.getBitmap("fit_add_small", "gui"), style = wx.BORDER_NONE)
buttonSizer.Add(self.btnAdd, 0)
self.btnRemove = GenBitmapButton(self, wx.ID_REMOVE, bitmapLoader.getBitmap("fit_delete_small", "icons"), style = wx.BORDER_NONE)
self.btnRemove = GenBitmapButton(self, wx.ID_REMOVE, BitmapLoader.getBitmap("fit_delete_small", "gui"), style = wx.BORDER_NONE)
buttonSizer.Add(self.btnRemove, 0)
self.pluggedImplantsTree = AvailableImplantsView(self, style=wx.LC_SINGLE_SEL)

View File

@@ -19,7 +19,7 @@
import wx
import service
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.globalEvents as GE
import gui.mainFrame
@@ -41,10 +41,10 @@ class CharacterSelection(wx.Panel):
self.refreshCharacterList()
self.cleanSkills = bitmapLoader.getBitmap("skill_big", "icons")
self.redSkills = bitmapLoader.getBitmap("skillRed_big", "icons")
self.greenSkills = bitmapLoader.getBitmap("skillGreen_big", "icons")
self.refresh = bitmapLoader.getBitmap("refresh", "icons")
self.cleanSkills = BitmapLoader.getBitmap("skill_big", "gui")
self.redSkills = BitmapLoader.getBitmap("skillRed_big", "gui")
self.greenSkills = BitmapLoader.getBitmap("skillGreen_big", "gui")
self.refresh = BitmapLoader.getBitmap("refresh", "gui")
self.btnRefresh = wx.BitmapButton(self, wx.ID_ANY, self.refresh)
size = self.btnRefresh.GetSize()

View File

@@ -21,7 +21,8 @@ import wx
import wx.lib.newevent
import gui.utils.colorUtils as colorUtils
import gui.utils.drawUtils as drawUtils
from gui import bitmapLoader
import gui.utils.fonts as fonts
from gui.bitmapLoader import BitmapLoader
import gui.utils.fonts as fonts
import service
@@ -277,7 +278,7 @@ class PFNotebook(wx.Panel):
bx, by = self.GetBorders()
ww -= bx * 4
wh -= by * 4
self.activePage.SetSize((ww, wh))
self.activePage.SetSize((max(ww, -1), max(wh, -1)))
self.activePage.SetPosition((0, 0))
if not resizeOnly:
@@ -335,10 +336,10 @@ class PFTabRenderer:
closeButton -- True if tab can be closed
"""
# tab left/right zones inclination
self.ctabLeft = bitmapLoader.getImage("ctableft", "icons")
self.ctabMiddle = bitmapLoader.getImage("ctabmiddle", "icons")
self.ctabRight = bitmapLoader.getImage("ctabright", "icons")
self.ctabClose = bitmapLoader.getImage("ctabclose", "icons")
self.ctabLeft = BitmapLoader.getImage("ctableft", "gui")
self.ctabMiddle = BitmapLoader.getImage("ctabmiddle", "gui")
self.ctabRight = BitmapLoader.getImage("ctabright", "gui")
self.ctabClose = BitmapLoader.getImage("ctabclose", "gui")
self.leftWidth = self.ctabLeft.GetWidth()
self.rightWidth = self.ctabRight.GetWidth()
@@ -594,7 +595,7 @@ class PFTabRenderer:
class PFAddRenderer:
def __init__(self):
"""Renders the add tab button"""
self.addImg = bitmapLoader.getImage("ctabadd", "icons")
self.addImg = BitmapLoader.getImage("ctabadd", "gui")
self.width = self.addImg.GetWidth()
self.height = self.addImg.GetHeight()
@@ -671,6 +672,8 @@ class PFTabsContainer(wx.Panel):
"""
wx.Panel.__init__(self, parent, id, pos, size)
if wx.VERSION >= (3,0):
self.SetBackgroundStyle(wx.BG_STYLE_PAINT)
self.tabs = []
width, height = size
@@ -1073,13 +1076,12 @@ class PFTabsContainer(wx.Panel):
selected = 0
if 'wxMac' in wx.PlatformInfo:
if 'wxMac' in wx.PlatformInfo and wx.VERSION < (3,0):
color = wx.Colour(0, 0, 0)
brush = wx.Brush(color)
from Carbon.Appearance import kThemeBrushDialogBackgroundActive
brush.MacSetTheme(kThemeBrushDialogBackgroundActive)
else:
color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE)
brush = wx.Brush(color)

View File

@@ -1,6 +1,6 @@
import wx
import copy
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
from gui.PFListPane import PFListPane
import service.fleet
@@ -135,7 +135,7 @@ class FleetBrowserHeader (wx.Panel):
wx.Panel.__init__ (self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.Size(500, 24), style=wx.TAB_TRAVERSAL)
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
self.newBmp = bitmapLoader.getBitmap("fit_add_small","icons")
self.newBmp = BitmapLoader.getBitmap("fit_add_small","gui")
bmpSize = (16,16)
mainSizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -264,11 +264,11 @@ class FleetItem(SFItem.SFBrowserItem):
self.fontNormal = wx.FontFromPixelSize((0,14),wx.SWISS, wx.NORMAL, wx.NORMAL, False)
self.fontSmall = wx.FontFromPixelSize((0,12),wx.SWISS, wx.NORMAL, wx.NORMAL, False)
self.copyBmp = bitmapLoader.getBitmap("fit_add_small", "icons")
self.renameBmp = bitmapLoader.getBitmap("fit_rename_small", "icons")
self.deleteBmp = bitmapLoader.getBitmap("fit_delete_small","icons")
self.acceptBmp = bitmapLoader.getBitmap("faccept_small", "icons")
self.fleetBmp = bitmapLoader.getBitmap("fleet_item_big", "icons")
self.copyBmp = BitmapLoader.getBitmap("fit_add_small", "gui")
self.renameBmp = BitmapLoader.getBitmap("fit_rename_small", "gui")
self.deleteBmp = BitmapLoader.getBitmap("fit_delete_small","gui")
self.acceptBmp = BitmapLoader.getBitmap("faccept_small", "gui")
self.fleetBmp = BitmapLoader.getBitmap("fleet_item_big", "gui")
fleetImg = self.fleetBmp.ConvertToImage()
fleetImg = fleetImg.Blur(2)
@@ -453,4 +453,4 @@ class PFGenBitmapButton(GenBitmapButton):
self.bgcolor = wx.Brush(color)
def GetBackgroundBrush(self, dc):
return self.bgcolor
return self.bgcolor

View File

@@ -19,7 +19,7 @@
import wx
import os
import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.display
import gui.globalEvents as GE
@@ -70,7 +70,7 @@ class GraphFrame(wx.Frame):
wx.Frame.__init__(self, parent, title=u"pyfa: Graph Generator", style=style, size=(520, 390))
i = wx.IconFromBitmap(bitmapLoader.getBitmap("graphs_small", "icons"))
i = wx.IconFromBitmap(BitmapLoader.getBitmap("graphs_small", "gui"))
self.SetIcon(i)
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
self.CreateStatusBar()

View File

@@ -20,7 +20,7 @@
import wx
import re
import gui.mainFrame
import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import sys
import wx.lib.mixins.listctrl as listmix
import wx.html
@@ -77,7 +77,7 @@ class ItemStatsDialog(wx.Dialog):
if item.icon is not None:
before,sep,after = item.icon.iconFile.rpartition("_")
iconFile = "%s%s%s" % (before,sep,"0%s" % after if len(after) < 2 else after)
itemImg = bitmapLoader.getBitmap(iconFile, "pack")
itemImg = BitmapLoader.getBitmap(iconFile, "icons")
if itemImg is not None:
self.SetIcon(wx.IconFromBitmap(itemImg))
self.SetTitle("%s: %s" % ("%s Stats" % itmContext if itmContext is not None else "Stats", item.name))
@@ -364,16 +364,16 @@ class ItemParams (wx.Panel):
if info:
if info.icon is not None:
iconFile = info.icon.iconFile
icon = bitmapLoader.getBitmap(iconFile, "pack")
icon = BitmapLoader.getBitmap(iconFile, "icons")
if icon is None:
icon = bitmapLoader.getBitmap("transparent16x16", "icons")
icon = BitmapLoader.getBitmap("transparent16x16", "gui")
attrIcon = self.imageList.Add(icon)
else:
attrIcon = self.imageList.Add(bitmapLoader.getBitmap("07_15", "pack"))
attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons"))
else:
attrIcon = self.imageList.Add(bitmapLoader.getBitmap("07_15", "pack"))
attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons"))
index = self.paramList.InsertImageStringItem(sys.maxint, attrName,attrIcon)
@@ -461,7 +461,7 @@ class ItemRequirements ( wx.Panel ):
self.imageList = wx.ImageList(16, 16)
self.reqTree.SetImageList(self.imageList)
skillBookId = self.imageList.Add(bitmapLoader.getBitmap("skill_small", "icons"))
skillBookId = self.imageList.Add(BitmapLoader.getBitmap("skill_small", "gui"))
self.getFullSkillTree(item,self.root,skillBookId)
@@ -753,7 +753,7 @@ class ItemAffectedBy (wx.Panel):
if thing == self.stuff:
parent = root
else: # projected fit
icon = self.imageList.Add(bitmapLoader.getBitmap("ship_small", "icons"))
icon = self.imageList.Add(BitmapLoader.getBitmap("ship_small", "gui"))
child = self.affectedBy.AppendItem(root, "{} ({})".format(thing.name, thing.ship.item.name), icon)
parent = child
@@ -767,14 +767,14 @@ class ItemAffectedBy (wx.Panel):
if attrInfo:
if attrInfo.icon is not None:
iconFile = attrInfo.icon.iconFile
icon = bitmapLoader.getBitmap(iconFile, "pack")
icon = BitmapLoader.getBitmap(iconFile, "icons")
if icon is None:
icon = bitmapLoader.getBitmap("transparent16x16", "icons")
icon = BitmapLoader.getBitmap("transparent16x16", "gui")
attrIcon = self.imageList.Add(icon)
else:
attrIcon = self.imageList.Add(bitmapLoader.getBitmap("07_15", "pack"))
attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons"))
else:
attrIcon = self.imageList.Add(bitmapLoader.getBitmap("07_15", "pack"))
attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons"))
if self.showRealNames:
display = attrName
@@ -794,9 +794,9 @@ class ItemAffectedBy (wx.Panel):
afflictorType, afflictor, item, attrModifier, attrAmount, projected = itemInfo
if afflictorType == Ship:
itemIcon = self.imageList.Add(bitmapLoader.getBitmap("ship_small", "icons"))
itemIcon = self.imageList.Add(BitmapLoader.getBitmap("ship_small", "gui"))
elif item.icon:
bitmap = bitmapLoader.getBitmap(item.icon.iconFile, "pack")
bitmap = BitmapLoader.getBitmap(item.icon.iconFile, "icons")
itemIcon = self.imageList.Add(bitmap) if bitmap else -1
else:
itemIcon = -1
@@ -884,7 +884,7 @@ class ItemAffectedBy (wx.Panel):
if thing == self.stuff:
parent = root
else: # projected fit
icon = self.imageList.Add(bitmapLoader.getBitmap("ship_small", "icons"))
icon = self.imageList.Add(BitmapLoader.getBitmap("ship_small", "gui"))
child = self.affectedBy.AppendItem(root, "{} ({})".format(thing.name, thing.ship.item.name), icon)
parent = child
@@ -897,9 +897,9 @@ class ItemAffectedBy (wx.Panel):
afflictorType, afflictors, attrData, item, projected = info
counter = len(afflictors)
if afflictorType == Ship:
itemIcon = self.imageList.Add(bitmapLoader.getBitmap("ship_small", "icons"))
itemIcon = self.imageList.Add(BitmapLoader.getBitmap("ship_small", "gui"))
elif item.icon:
bitmap = bitmapLoader.getBitmap(item.icon.iconFile, "pack")
bitmap = BitmapLoader.getBitmap(item.icon.iconFile, "icons")
itemIcon = self.imageList.Add(bitmap) if bitmap else -1
else:
itemIcon = -1
@@ -925,15 +925,15 @@ class ItemAffectedBy (wx.Panel):
if attrInfo:
if attrInfo.icon is not None:
iconFile = attrInfo.icon.iconFile
icon = bitmapLoader.getBitmap(iconFile, "pack")
icon = BitmapLoader.getBitmap(iconFile, "icons")
if icon is None:
icon = bitmapLoader.getBitmap("transparent16x16", "icons")
icon = BitmapLoader.getBitmap("transparent16x16", "gui")
attrIcon = self.imageList.Add(icon)
else:
attrIcon = self.imageList.Add(bitmapLoader.getBitmap("07_15", "pack"))
attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons"))
else:
attrIcon = self.imageList.Add(bitmapLoader.getBitmap("07_15", "pack"))
attrIcon = self.imageList.Add(BitmapLoader.getBitmap("07_15", "icons"))
if attrModifier == "s*":
attrModifier = "*"

View File

@@ -36,7 +36,7 @@ import gui.chromeTabs
import gui.utils.animUtils as animUtils
import gui.globalEvents as GE
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
from gui.mainMenuBar import MainMenuBar
from gui.additionsPane import AdditionsPane
from gui.marketBrowser import MarketBrowser, ItemSelected
@@ -57,8 +57,6 @@ from gui.builtinViews import *
from time import gmtime, strftime
import locale
locale.setlocale(locale.LC_ALL, '')
#dummy panel(no paint no erasebk)
class PFPanel(wx.Panel):
@@ -116,7 +114,7 @@ class MainFrame(wx.Frame):
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )
#Load and set the icon for pyfa main window
i = wx.IconFromBitmap(bitmapLoader.getBitmap("pyfa", "icons"))
i = wx.IconFromBitmap(BitmapLoader.getBitmap("pyfa", "gui"))
self.SetIcon(i)
#Create the layout and windows
@@ -141,8 +139,8 @@ class MainFrame(wx.Frame):
self.notebookBrowsers = gui.chromeTabs.PFNotebook(self.splitter, False)
marketImg = bitmapLoader.getImage("market_small", "icons")
shipBrowserImg = bitmapLoader.getImage("ship_small", "icons")
marketImg = BitmapLoader.getImage("market_small", "gui")
shipBrowserImg = BitmapLoader.getImage("ship_small", "gui")
self.marketBrowser = MarketBrowser(self.notebookBrowsers)
self.notebookBrowsers.AddPage(self.marketBrowser, "Market", tabImage = marketImg, showClose = False)
@@ -588,7 +586,7 @@ class MainFrame(wx.Frame):
if (dlg.ShowModal() == wx.ID_OK):
self.progressDialog = wx.ProgressDialog(
"Importing fits",
" "*100, # set some arbitrary spacing to create wifth in window
" "*100, # set some arbitrary spacing to create width in window
parent=self, style = wx.PD_APP_MODAL | wx.PD_ELAPSED_TIME)
self.progressDialog.message = None
sFit.importFitsThreaded(dlg.GetPaths(), self.fileImportCallback)
@@ -607,7 +605,12 @@ class MainFrame(wx.Frame):
if info == -1:
# Done processing
self.progressDialog.Hide()
# see GH issue #281 on why conditional is needed
if 'wxMSW' in wx.PlatformInfo:
self.progressDialog.Destroy()
else:
self.progressDialog.Hide()
self._openAfterImport(fits)
elif info != self.progressDialog.message and info is not None:
# New message, overwrite cached message and update
@@ -647,13 +650,16 @@ class MainFrame(wx.Frame):
"Backing up %d fits to: %s"%(max, filePath),
maximum=max, parent=self,
style=wx.PD_APP_MODAL | wx.PD_ELAPSED_TIME)
sFit.backupFits(filePath, self.backupCallback)
self.progressDialog.ShowModal()
def backupCallback(self, info):
if info == -1:
self.progressDialog.Hide()
# see GH issue #281 on why conditional is needed
if 'wxMSW' in wx.PlatformInfo:
self.progressDialog.Destroy()
else:
self.progressDialog.Hide()
else:
self.progressDialog.Update(info)

View File

@@ -19,7 +19,7 @@
import wx
import config
import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
import gui.graphFrame
import gui.globalEvents as GE
@@ -83,23 +83,23 @@ class MainMenuBar(wx.MenuBar):
self.Append(windowMenu, "&Window")
charEditItem = wx.MenuItem(windowMenu, self.characterEditorId, "&Character Editor\tCTRL+E")
charEditItem.SetBitmap(bitmapLoader.getBitmap("character_small", "icons"))
charEditItem.SetBitmap(BitmapLoader.getBitmap("character_small", "gui"))
windowMenu.AppendItem(charEditItem)
damagePatternEditItem = wx.MenuItem(windowMenu, self.damagePatternEditorId, "Damage Pattern Editor\tCTRL+D")
damagePatternEditItem.SetBitmap(bitmapLoader.getBitmap("damagePattern_small", "icons"))
damagePatternEditItem.SetBitmap(BitmapLoader.getBitmap("damagePattern_small", "gui"))
windowMenu.AppendItem(damagePatternEditItem)
targetResistsEditItem = wx.MenuItem(windowMenu, self.targetResistsEditorId, "Target Resists Editor\tCTRL+R")
targetResistsEditItem.SetBitmap(bitmapLoader.getBitmap("explosive_big", "icons"))
targetResistsEditItem.SetBitmap(BitmapLoader.getBitmap("explosive_big", "gui"))
windowMenu.AppendItem(targetResistsEditItem)
graphFrameItem = wx.MenuItem(windowMenu, self.graphFrameId, "Graphs\tCTRL+G")
graphFrameItem.SetBitmap(bitmapLoader.getBitmap("graphs_small", "icons"))
graphFrameItem.SetBitmap(BitmapLoader.getBitmap("graphs_small", "gui"))
windowMenu.AppendItem(graphFrameItem)
preferencesItem = wx.MenuItem(windowMenu, wx.ID_PREFERENCES, "Preferences\tCTRL+P")
preferencesItem.SetBitmap(bitmapLoader.getBitmap("preferences_small", "icons"))
preferencesItem.SetBitmap(BitmapLoader.getBitmap("preferences_small", "gui"))
windowMenu.AppendItem(preferencesItem)
# Help menu

View File

@@ -24,7 +24,7 @@ from gui.cachingImageList import CachingImageList
from gui.contextMenu import ContextMenu
import gui.PFSearchBox as SBox
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
ItemSelected, ITEM_SELECTED = wx.lib.newevent.NewEvent()
@@ -105,8 +105,8 @@ class MarketBrowser(wx.Panel):
class SearchBox(SBox.PFSearchBox):
def __init__(self, parent):
SBox.PFSearchBox.__init__(self, parent)
cancelBitmap = bitmapLoader.getBitmap("fit_delete_small","icons")
searchBitmap = bitmapLoader.getBitmap("fsearch_small","icons")
cancelBitmap = BitmapLoader.getBitmap("fit_delete_small","gui")
searchBitmap = BitmapLoader.getBitmap("fsearch_small","gui")
self.SetSearchBitmap(searchBitmap)
self.SetCancelBitmap(cancelBitmap)
self.ShowSearchButton()
@@ -134,13 +134,13 @@ class MarketTree(wx.TreeCtrl):
self.SortChildren(self.root)
# Add recently used modules node
rumIconId = self.addImage("market_small", "icons")
rumIconId = self.addImage("market_small", "gui")
self.AppendItem(self.root, "Recently Used Modules", rumIconId, data = wx.TreeItemData(RECENTLY_USED_MODULES))
# Bind our lookup method to when the tree gets expanded
self.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.expandLookup)
def addImage(self, iconFile, location = "pack"):
def addImage(self, iconFile, location="icons"):
if iconFile is None:
return -1
return self.imageList.GetImageIndex(iconFile, location)

View File

@@ -18,7 +18,7 @@
#===============================================================================
import wx
import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import service
from wx.lib.intctrl import IntCtrl
from gui.utils.clipboard import toClipboard, fromClipboard
@@ -58,14 +58,10 @@ class DmgPatternEditorDlg(wx.Dialog):
self.namePicker.Bind(wx.EVT_TEXT_ENTER, self.processRename)
self.namePicker.Hide()
self.btnSave = wx.Button(self, wx.ID_SAVE)
self.btnSave.Hide()
self.btnSave.Bind(wx.EVT_BUTTON, self.processRename)
size = None
headerSizer.Add(self.ccDmgPattern, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT|wx.LEFT, 3)
buttons = (("new", wx.ART_NEW),
("rename", bitmapLoader.getBitmap("rename", "icons")),
("rename", BitmapLoader.getBitmap("rename", "gui")),
("copy", wx.ART_COPY),
("delete", wx.ART_DELETE))
for name, art in buttons:
@@ -83,6 +79,10 @@ class DmgPatternEditorDlg(wx.Dialog):
btn.SetToolTipString("%s pattern" % name.capitalize())
headerSizer.Add(btn, 0, wx.ALIGN_CENTER_VERTICAL)
self.btnSave = wx.Button(self, wx.ID_SAVE)
self.btnSave.Hide()
self.btnSave.Bind(wx.EVT_BUTTON, self.processRename)
self.headerSizer.Add(self.btnSave, 0, wx.ALIGN_CENTER)
mainSizer.Add(headerSizer, 0, wx.EXPAND | wx.ALL, 2)
@@ -90,10 +90,10 @@ class DmgPatternEditorDlg(wx.Dialog):
mainSizer.Add(self.sl, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
contentSizer = wx.BoxSizer(wx.VERTICAL)
self.embitmap = bitmapLoader.getBitmap("em_big", "icons")
self.thermbitmap = bitmapLoader.getBitmap("thermal_big", "icons")
self.kinbitmap = bitmapLoader.getBitmap("kinetic_big", "icons")
self.expbitmap = bitmapLoader.getBitmap("explosive_big", "icons")
self.embitmap = BitmapLoader.getBitmap("em_big", "gui")
self.thermbitmap = BitmapLoader.getBitmap("thermal_big", "gui")
self.kinbitmap = BitmapLoader.getBitmap("kinetic_big", "gui")
self.expbitmap = BitmapLoader.getBitmap("explosive_big", "gui")
dmgeditSizer = wx.FlexGridSizer(2, 6, 0, 2)
dmgeditSizer.AddGrowableCol(0)
@@ -105,7 +105,7 @@ class DmgPatternEditorDlg(wx.Dialog):
defSize = wx.Size(width,-1)
for i, type in enumerate(self.DAMAGE_TYPES):
bmp = wx.StaticBitmap(self, wx.ID_ANY, bitmapLoader.getBitmap("%s_big"%type, "icons"))
bmp = wx.StaticBitmap(self, wx.ID_ANY, BitmapLoader.getBitmap("%s_big"%type, "gui"))
if i%2:
style = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.LEFT
border = 10
@@ -276,9 +276,7 @@ class DmgPatternEditorDlg(wx.Dialog):
for btn in (self.new, self.rename, self.delete, self.copy):
btn.Hide()
self.headerSizer.Remove(btn)
self.headerSizer.Add(self.btnSave, 0, wx.ALIGN_CENTER)
self.btnSave.Show()
self.headerSizer.Layout()
if event is not None:
@@ -311,9 +309,7 @@ class DmgPatternEditorDlg(wx.Dialog):
self.ccDmgPattern.Show()
self.namePicker.Hide()
self.btnSave.Hide()
self.headerSizer.Remove(self.btnSave)
for btn in (self.new, self.rename, self.delete, self.copy):
self.headerSizer.Add(btn, 0, wx.ALIGN_CENTER_VERTICAL)
btn.Show()
sel = self.ccDmgPattern.GetSelection()

View File

@@ -19,22 +19,22 @@
import wx
from gui.preferenceView import PreferenceView
import bitmapLoader
from gui.bitmapLoader import BitmapLoader
class PreferenceDialog(wx.Dialog):
def __init__(self, parent):
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE)
self.SetTitle("pyfa - Preferences")
i = wx.IconFromBitmap(bitmapLoader.getBitmap("preferences_small", "icons"))
i = wx.IconFromBitmap(BitmapLoader.getBitmap("preferences_small", "gui"))
self.SetIcon(i)
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.listbook = wx.Listbook(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LB_DEFAULT)
self.listview = self.listbook.GetListView()
self.listview.SetMinSize((500, -1))
self.listview.SetSize((500, -1))
#self.listview.SetMinSize((500, -1))
#self.listview.SetSize((500, -1))
self.imageList = wx.ImageList(32,32)
self.listbook.SetImageList(self.imageList)
@@ -77,4 +77,4 @@ class PreferenceDialog(wx.Dialog):
self.btnOK.Bind(wx.EVT_BUTTON, self.OnBtnOK)
def OnBtnOK(self, event):
self.Destroy()
self.Destroy()

View File

@@ -24,7 +24,7 @@
###########################################################################
import wx
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
###########################################################################
## Class TogglePanel
@@ -54,8 +54,8 @@ class TogglePanel ( wx.Panel ):
# Load expanded/collapsed bitmaps from the icons folder
self.bmpExpanded = bitmapLoader.getBitmap("down-arrow2","icons")
self.bmpCollapsed = bitmapLoader.getBitmap("up-arrow2","icons")
self.bmpExpanded = BitmapLoader.getBitmap("down-arrow2","gui")
self.bmpCollapsed = BitmapLoader.getBitmap("up-arrow2","gui")
# Make the bitmaps have the same color as window text
@@ -146,7 +146,6 @@ class TogglePanel ( wx.Panel ):
else:
return True
def IsExpanded(self):
""" Returns ``True`` if the pane window is currently shown. """
if self._toggle == 1:
@@ -154,7 +153,6 @@ class TogglePanel ( wx.Panel ):
else:
return True
def OnStateChange(self, sz):
"""
Handles the status changes (collapsing/expanding).
@@ -168,9 +166,8 @@ class TogglePanel ( wx.Panel ):
self.parent.GetSizer().SetSizeHints(self.parent)
if self.IsCollapsed():
# expanded . collapsed transition
# expanded . collapsed transition
if self.parent.GetSizer():
# we have just set the size hints...
sz = self.parent.GetSizer().CalcMin()
@@ -178,39 +175,36 @@ class TogglePanel ( wx.Panel ):
# use SetClientSize() and not SetSize() otherwise the size for
# e.g. a wxFrame with a menubar wouldn't be correctly set
self.parent.SetClientSize(sz)
else:
self.parent.Layout()
else:
# collapsed . expanded transition
# force our parent to "fit", i.e. expand so that it can honour
# our minimal size
# collapsed . expanded transition
# force our parent to "fit", i.e. expand so that it can honour
# our minimal size
self.parent.Fit()
# Toggle the content panel (hide/show)
def toggleContent( self, event ):
def toggleContent(self, event):
self.Freeze()
print self.contentPanel.GetSize()
if self._toggle == 1:
self.contentMinSize = self.contentPanel.GetSize()
self.contentPanel.SetMinSize(wx.Size(self.contentMinSize[0],0))
self.headerBmp.SetBitmap( self.bmpCollapsed)
self.contentPanel.Hide()
self.headerBmp.SetBitmap(self.bmpCollapsed)
else:
self.contentPanel.SetMinSize(self.contentMinSize)
self.headerBmp.SetBitmap( self.bmpExpanded)
self._toggle *=-1
self.contentPanel.Show()
self.headerBmp.SetBitmap(self.bmpExpanded)
self._toggle *= -1
self.Layout()
self.Thaw()
if self.forceLayout == -1:
self.OnStateChange(self.GetBestSize())
if wx.VERSION >= (3, 0):
x, y = self.GetBestSize()
y -= self.contentPanel.GetSize()[1]
else:
x, y = self.GetBestSize()
self.OnStateChange((x, y))
else:
self.parent.Layout()

View File

@@ -312,47 +312,53 @@ class PyGauge(wx.PyWindow):
r = copy.copy(rect)
r.width = w
if r.width > 0:
# If we draw it with zero width, GTK throws errors. This way,
# only draw it if the gauge will actually show something.
# We stick other calculations in this block to avoid wasting
# time on them if not needed. See GH issue #282
pv = value
xv=1
transition = 0
if pv <= 100:
xv = pv/100
pv = value
xv=1
transition = 0
elif pv <=101:
xv = pv -100
transition = 1
if pv <= 100:
xv = pv/100
transition = 0
elif pv <= 103:
xv = (pv -101)/2
transition = 2
elif pv <=101:
xv = pv -100
transition = 1
elif pv <= 105:
xv = (pv -103)/2
transition = 3
elif pv <= 103:
xv = (pv -101)/2
transition = 2
else:
pv = 106
xv = pv -100
transition = -1
elif pv <= 105:
xv = (pv -103)/2
transition = 3
if transition != -1:
colorS,colorE = self.transitionsColors[transition]
color = colorUtils.CalculateTransitionColor(colorS, colorE, xv)
else:
color = wx.Colour(191,48,48)
else:
pv = 106
xv = pv -100
transition = -1
if self.gradientEffect > 0:
gcolor = colorUtils.BrightenColor(color, float(self.gradientEffect) / 100)
gMid = colorUtils.BrightenColor(color, float(self.gradientEffect/2) / 100)
else:
gcolor = colorUtils.DarkenColor(color, float(-self.gradientEffect) / 100)
gMid = colorUtils.DarkenColor(color, float(-self.gradientEffect/2) / 100)
if transition != -1:
colorS,colorE = self.transitionsColors[transition]
color = colorUtils.CalculateTransitionColor(colorS, colorE, xv)
else:
color = wx.Colour(191,48,48)
if self.gradientEffect > 0:
gcolor = colorUtils.BrightenColor(color, float(self.gradientEffect) / 100)
gMid = colorUtils.BrightenColor(color, float(self.gradientEffect/2) / 100)
else:
gcolor = colorUtils.DarkenColor(color, float(-self.gradientEffect) / 100)
gMid = colorUtils.DarkenColor(color, float(-self.gradientEffect/2) / 100)
gBmp = drawUtils.DrawGradientBar(r.width, r.height, gMid, color, gcolor)
dc.DrawBitmap(gBmp, r.left, r.top)
gBmp = drawUtils.DrawGradientBar(r.width, r.height, gMid, color, gcolor)
dc.DrawBitmap(gBmp,r.left, r.top)
else:
colour=self.GetBarColour()
dc.SetBrush(wx.Brush(colour))
@@ -397,7 +403,6 @@ class PyGauge(wx.PyWindow):
dc.SetTextForeground(wx.Colour(255,255,255))
dc.DrawLabel(formatStr.format(value), rect, wx.ALIGN_CENTER)
def OnTimer(self,event):
"""
Handles the ``wx.EVT_TIMER`` event for L{PyfaGauge}.

View File

@@ -18,7 +18,7 @@
#===============================================================================
import wx
import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import service
from gui.utils.clipboard import toClipboard, fromClipboard
from service.targetResists import ImportError
@@ -51,15 +51,11 @@ class ResistsEditorDlg(wx.Dialog):
self.namePicker.Bind(wx.EVT_TEXT_ENTER, self.processRename)
self.namePicker.Hide()
self.btnSave = wx.Button(self, wx.ID_SAVE)
self.btnSave.Hide()
self.btnSave.Bind(wx.EVT_BUTTON, self.processRename)
size = None
headerSizer.Add(self.ccResists, 1, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT | wx.LEFT, 3)
buttons = (("new", wx.ART_NEW),
("rename", bitmapLoader.getBitmap("rename", "icons")),
("rename", BitmapLoader.getBitmap("rename", "gui")),
("copy", wx.ART_COPY),
("delete", wx.ART_DELETE))
for name, art in buttons:
@@ -77,6 +73,12 @@ class ResistsEditorDlg(wx.Dialog):
btn.SetToolTipString("%s resist profile" % name.capitalize())
headerSizer.Add(btn, 0, wx.ALIGN_CENTER_VERTICAL)
self.btnSave = wx.Button(self, wx.ID_SAVE)
self.btnSave.Hide()
self.btnSave.Bind(wx.EVT_BUTTON, self.processRename)
headerSizer.Add(self.btnSave, 0, wx.ALIGN_CENTER)
mainSizer.Add(headerSizer, 0, wx.EXPAND | wx.ALL, 2)
self.sl = wx.StaticLine(self)
@@ -101,7 +103,7 @@ class ResistsEditorDlg(wx.Dialog):
style = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT
border = 5
bmp = wx.StaticBitmap(self, wx.ID_ANY, bitmapLoader.getBitmap("%s_big"%type, "icons"))
bmp = wx.StaticBitmap(self, wx.ID_ANY, BitmapLoader.getBitmap("%s_big"%type, "gui"))
resistEditSizer.Add(bmp, 0, style, border)
# set text edit
setattr(self, "%sEdit"%type, wx.TextCtrl(self, wx.ID_ANY, "", wx.DefaultPosition, defSize))
@@ -110,6 +112,9 @@ class ResistsEditorDlg(wx.Dialog):
resistEditSizer.Add(wx.StaticText( self, wx.ID_ANY, u"%", wx.DefaultPosition, wx.DefaultSize, 0 ), 0, wx.BOTTOM | wx.TOP | wx.ALIGN_CENTER_VERTICAL, 5)
editObj.Bind(wx.EVT_TEXT, self.ValuesUpdated)
# Color we use to reset invalid value color
self.colorReset = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)
contentSizer.Add(resistEditSizer, 1, wx.EXPAND | wx.ALL, 5)
self.slfooter = wx.StaticLine(self)
contentSizer.Add(self.slfooter, 0, wx.EXPAND | wx.TOP, 5)
@@ -196,21 +201,21 @@ class ResistsEditorDlg(wx.Dialog):
# if everything checks out, set resist attribute
setattr(p, "%sAmount"%type, value/100)
editObj.SetForegroundColour(self.colorReset)
self.stNotice.SetLabel("")
self.totSizer.Layout()
if event is not None:
# If we get here, everything is normal. Reset color
event.EventObject.SetForegroundColour(wx.NullColor)
event.Skip()
service.TargetResists.getInstance().saveChanges(p)
except ValueError:
event.EventObject.SetForegroundColour(wx.RED)
editObj.SetForegroundColour(wx.RED)
self.stNotice.SetLabel("Incorrect Formatting (decimals only)")
except AssertionError:
event.EventObject.SetForegroundColour(wx.RED)
editObj.SetForegroundColour(wx.RED)
self.stNotice.SetLabel("Incorrect Range (must be 0-100)")
finally: # Refresh for color changes to take effect immediately
self.Refresh()
@@ -266,7 +271,7 @@ class ResistsEditorDlg(wx.Dialog):
for type in self.DAMAGE_TYPES:
editObj = getattr(self, "%sEdit"%type)
editObj.ChangeValue("0.0")
editObj.SetForegroundColour(wx.NullColor)
editObj.SetForegroundColour(self.colorReset)
self.Refresh()
self.renamePattern()
@@ -349,8 +354,6 @@ class ResistsEditorDlg(wx.Dialog):
self.namePicker.SetFocus()
for btn in (self.new, self.rename, self.delete, self.copy):
btn.Hide()
self.headerSizer.Remove(btn)
self.headerSizer.Add(self.btnSave, 0, wx.ALIGN_CENTER)
self.btnSave.Show()
self.restrict()
self.headerSizer.Layout()
@@ -359,12 +362,10 @@ class ResistsEditorDlg(wx.Dialog):
self.ccResists.Show()
self.namePicker.Hide()
self.btnSave.Hide()
self.headerSizer.Remove(self.btnSave)
for btn in (self.new, self.rename, self.delete, self.copy):
self.headerSizer.Add(btn, 0, wx.ALIGN_CENTER_VERTICAL)
btn.Show()
self.unrestrict()
#self.headerSizer.Layout()
self.headerSizer.Layout()
def __del__( self ):

View File

@@ -325,7 +325,8 @@ class SFBrowserItem(wx.Window):
def OnLeftDown(self, event):
self.CaptureMouse()
if not self.HasCapture():
self.CaptureMouse()
btn = self.toolbar.MouseClick(event)

View File

@@ -1,6 +1,6 @@
import wx
import copy
from gui import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
import gui.globalEvents as GE
import time
@@ -15,6 +15,7 @@ import gui.utils.animEffects as animEffects
import gui.sfBrowserItem as SFItem
from gui.contextMenu import ContextMenu
import gui.utils.fonts as fonts
import service
import gui.utils.fonts as fonts
@@ -106,9 +107,9 @@ class RaceSelector(wx.Window):
self.buttonsPadding = 4
if layout == wx.VERTICAL:
self.bmpArrow = bitmapLoader.getBitmap("down-arrow2","icons")
self.bmpArrow = BitmapLoader.getBitmap("down-arrow2","gui")
else:
self.bmpArrow = bitmapLoader.getBitmap("up-arrow2","icons")
self.bmpArrow = BitmapLoader.getBitmap("up-arrow2","gui")
# Make the bitmaps have the same color as window text
@@ -206,7 +207,7 @@ class RaceSelector(wx.Window):
self.raceBmps = []
for race in races:
if race:
self.raceBmps.append(bitmapLoader.getBitmap("race_%s_small" % race, "icons"))
self.raceBmps.append(BitmapLoader.getBitmap("race_%s_small" % race, "gui"))
self.raceNames = races
self.CalcButtonsBarPos()
self.Refresh()
@@ -327,14 +328,14 @@ class NavigationPanel(SFItem.SFBrowserItem):
def __init__(self,parent, size = (-1, 24)):
SFItem.SFBrowserItem.__init__(self,parent,size = size)
self.rewBmpH = bitmapLoader.getBitmap("frewind_small","icons")
self.forwBmp = bitmapLoader.getBitmap("fforward_small","icons")
self.searchBmpH = bitmapLoader.getBitmap("fsearch_small","icons")
self.newBmpH = bitmapLoader.getBitmap("fit_add_small","icons")
self.resetBmpH = bitmapLoader.getBitmap("freset_small","icons")
self.switchBmpH = bitmapLoader.getBitmap("fit_switch_view_mode_small","icons")
self.rewBmpH = BitmapLoader.getBitmap("frewind_small","gui")
self.forwBmp = BitmapLoader.getBitmap("fforward_small","gui")
self.searchBmpH = BitmapLoader.getBitmap("fsearch_small","gui")
self.newBmpH = BitmapLoader.getBitmap("fit_add_small","gui")
self.resetBmpH = BitmapLoader.getBitmap("freset_small","gui")
self.switchBmpH = BitmapLoader.getBitmap("fit_switch_view_mode_small","gui")
switchImg = bitmapLoader.getImage("fit_switch_view_mode_small","icons")
switchImg = BitmapLoader.getImage("fit_switch_view_mode_small","gui")
switchImg = switchImg.AdjustChannels(1,1,1,0.4)
self.switchBmpD = wx.BitmapFromImage(switchImg)
@@ -966,7 +967,7 @@ class CategoryItem(SFItem.SFBrowserItem):
SFItem.SFBrowserItem.__init__(self,parent,size = size)
if categoryID:
self.shipBmp = bitmapLoader.getBitmap("ship_small","icons")
self.shipBmp = BitmapLoader.getBitmap("ship_small","gui")
else:
self.shipBmp = wx.EmptyBitmap(16,16)
@@ -1098,26 +1099,26 @@ class ShipItem(SFItem.SFBrowserItem):
self.shipBmp = None
if shipID:
self.shipBmp = bitmapLoader.getBitmap(str(shipID),"ships")
self.shipBmp = BitmapLoader.getBitmap(str(shipID), "renders")
if not self.shipBmp:
self.shipBmp = bitmapLoader.getBitmap("ship_no_image_big","icons")
self.shipBmp = BitmapLoader.getBitmap("ship_no_image_big", "gui")
self.shipFittingInfo = shipFittingInfo
self.shipName, self.shipFits = shipFittingInfo
self.newBmp = bitmapLoader.getBitmap("fit_add_small", "icons")
self.acceptBmp = bitmapLoader.getBitmap("faccept_small", "icons")
self.newBmp = BitmapLoader.getBitmap("fit_add_small", "gui")
self.acceptBmp = BitmapLoader.getBitmap("faccept_small", "gui")
self.shipEffBk = bitmapLoader.getBitmap("fshipbk_big","icons")
self.shipEffBk = BitmapLoader.getBitmap("fshipbk_big","gui")
img = wx.ImageFromBitmap(self.shipEffBk)
img = img.Mirror(False)
self.shipEffBkMirrored = wx.BitmapFromImage(img)
self.raceBmp = bitmapLoader.getBitmap("race_%s_small" % self.shipRace, "icons")
self.raceBmp = BitmapLoader.getBitmap("race_%s_small" % self.shipRace, "gui")
if not self.raceBmp:
self.raceBmp = bitmapLoader.getBitmap("fit_delete_small","icons")
self.raceBmp = BitmapLoader.getBitmap("fit_delete_small","gui")
self.raceDropShadowBmp = drawUtils.CreateDropShadowBitmap(self.raceBmp, 0.2)
@@ -1340,7 +1341,7 @@ class ShipItem(SFItem.SFBrowserItem):
editCtl.SetPosition((fnEditPosX,fnEditPosY))
class PFBitmapFrame(wx.Frame):
def __init__ (self,parent, pos, bitmap):
def __init__ (self, parent, pos, bitmap):
wx.Frame.__init__(self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = pos, size = wx.DefaultSize, style =
wx.NO_BORDER
| wx.FRAME_NO_TASKBAR
@@ -1428,10 +1429,10 @@ class FitItem(SFItem.SFBrowserItem):
self.deleted = False
if shipID:
self.shipBmp = bitmapLoader.getBitmap(str(shipID),"ships")
self.shipBmp = BitmapLoader.getBitmap(str(shipID),"renders")
if not self.shipBmp:
self.shipBmp = bitmapLoader.getBitmap("ship_no_image_big","icons")
self.shipBmp = BitmapLoader.getBitmap("ship_no_image_big","gui")
self.shipFittingInfo = shipFittingInfo
self.shipName, self.fitName, self.fitBooster, self.timestamp = shipFittingInfo
@@ -1439,13 +1440,13 @@ class FitItem(SFItem.SFBrowserItem):
# see GH issue #62
if self.fitBooster is None: self.fitBooster = False
self.boosterBmp = bitmapLoader.getBitmap("fleet_fc_small", "icons")
self.copyBmp = bitmapLoader.getBitmap("fit_add_small", "icons")
self.renameBmp = bitmapLoader.getBitmap("fit_rename_small", "icons")
self.deleteBmp = bitmapLoader.getBitmap("fit_delete_small","icons")
self.acceptBmp = bitmapLoader.getBitmap("faccept_small", "icons")
self.boosterBmp = BitmapLoader.getBitmap("fleet_fc_small", "gui")
self.copyBmp = BitmapLoader.getBitmap("fit_add_small", "gui")
self.renameBmp = BitmapLoader.getBitmap("fit_rename_small", "gui")
self.deleteBmp = BitmapLoader.getBitmap("fit_delete_small","gui")
self.acceptBmp = BitmapLoader.getBitmap("faccept_small", "gui")
self.shipEffBk = bitmapLoader.getBitmap("fshipbk_big","icons")
self.shipEffBk = BitmapLoader.getBitmap("fshipbk_big","gui")
img = wx.ImageFromBitmap(self.shipEffBk)
img = img.Mirror(False)
@@ -1718,7 +1719,8 @@ class FitItem(SFItem.SFBrowserItem):
if self.dragging:
if not self.dragged:
if self.dragMotionTrigger < 0:
self.CaptureMouse()
if not self.HasCapture():
self.CaptureMouse()
self.dragWindow = PFBitmapFrame(self, pos, self.dragTLFBmp)
self.dragWindow.Show()
self.dragged = True
@@ -1818,7 +1820,7 @@ class FitItem(SFItem.SFBrowserItem):
self.AdjustControlSizePos(self.tcFitName, self.textStartx, self.toolbarx - self.editWidth - self.padding)
tdc = wx.MemoryDC()
self.dragTLFBmp = wx.EmptyBitmap((self.toolbarx if self.toolbarx < 200 else 200), rect.height)
self.dragTLFBmp = wx.EmptyBitmap((self.toolbarx if self.toolbarx < 200 else 200), rect.height, 24)
tdc.SelectObject(self.dragTLFBmp)
tdc.Blit(0, 0, (self.toolbarx if self.toolbarx < 200 else 200), rect.height, mdc, 0, 0, wx.COPY)
tdc.SelectObject(wx.NullBitmap)

View File

@@ -18,7 +18,7 @@
#===============================================================================
import wx
import bitmapLoader
from gui.bitmapLoader import BitmapLoader
import config
import service
import dateutil.parser

View File

@@ -33,9 +33,10 @@ def DrawFilledBitmap(width, height, color):
return canvas
def DrawGradientBar(width, height, gStart, gEnd, gMid = None, fillRatio = 4):
# we need to have dimensions to draw
assert width > 0 and height > 0
canvas = wx.EmptyBitmap(width,height)
mdc = wx.MemoryDC()
mdc.SelectObject(canvas)

View File

@@ -136,7 +136,7 @@ class exportHtmlThread(threading.Thread):
categoryList = list(sMkt.getShipRoot())
categoryList.sort(key=lambda ship: ship.name)
count = 1
count = 0
for group in categoryList:
# init market group string to give ships something to attach to

View File

@@ -1,3 +1,8 @@
'''
Font file to handle the differences in font calculations between
different wxPython versions
'''
import wx
if 'wxMac' in wx.PlatformInfo:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Some files were not shown because too many files have changed in this diff Show More