This commit is contained in:
jeffy-g
2017-04-03 01:50:26 +09:00
parent c560d17bdd
commit 4d8c3eadbc
4 changed files with 9 additions and 16 deletions

View File

@@ -73,7 +73,7 @@ class Ship(ItemAttrShortcut, HandledItem):
@property
def name(self):
# NOTE: add name property
# NOTE: add name property
return self.__item.name
@property

View File

@@ -802,10 +802,7 @@ class MainFrame(wx.Frame, IPortUser):
"Importing fits",
" " * 100, # set some arbitrary spacing to create width in window
parent=self,
style=wx.PD_CAN_ABORT
| wx.PD_SMOOTH
| wx.PD_ELAPSED_TIME
| wx.PD_APP_MODAL
style=wx.PD_CAN_ABORT | wx.PD_SMOOTH | wx.PD_ELAPSED_TIME | wx.PD_APP_MODAL
)
# self.progressDialog.message = None
Port.importFitsThreaded(dlg.GetPaths(), self)
@@ -840,10 +837,7 @@ class MainFrame(wx.Frame, IPortUser):
"Backing up %d fits to: %s" % (max_, filePath),
maximum=max_,
parent=self,
style=wx.PD_CAN_ABORT
| wx.PD_SMOOTH
| wx.PD_ELAPSED_TIME
| wx.PD_APP_MODAL
style=wx.PD_CAN_ABORT | wx.PD_SMOOTH | wx.PD_ELAPSED_TIME | wx.PD_APP_MODAL
)
Port.backupFits(filePath, self)
self.progressDialog.ShowModal()
@@ -891,6 +885,7 @@ class MainFrame(wx.Frame, IPortUser):
wx.CallAfter(
self._onPortProcessing, action, data
)
return self.__progress_flag
def _onPortProcessing(self, action, data):
@@ -924,7 +919,7 @@ class MainFrame(wx.Frame, IPortUser):
if action & IPortUser.ID_PULSE:
_message = ()
# update message
elif action & IPortUser.ID_UPDATE: # and data != self.progressDialog.message:
elif action & IPortUser.ID_UPDATE: # and data != self.progressDialog.message:
_message = data
if _message is not None:
@@ -940,7 +935,6 @@ class MainFrame(wx.Frame, IPortUser):
else:
self.__progress_flag, _unuse = self.progressDialog.Update(data[0], data[1])
def _openAfterImport(self, fits):
if len(fits) > 0:
if len(fits) == 1:

View File

@@ -47,6 +47,8 @@ from eos.saveddata.ship import Ship
from eos.saveddata.citadel import Citadel
from eos.saveddata.fit import Fit
from service.market import Market
from utils.strfunctions import sequential_rep, replaceLTGT
from abc import ABCMeta, abstractmethod
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
from service.crest import Crest
@@ -72,7 +74,6 @@ INV_FLAG_DRONEBAY = 87
INV_FLAG_FIGHTER = 158
from utils.strfunctions import sequential_rep, replaceLTGT
# -- 170327 Ignored description --
localized_pattern = re.compile(r'<localized hint="([^"]+)">([^\*]+)\*</localized>')
@@ -110,6 +111,7 @@ def _resolveShip(fitting, sMkt):
# True means localized
return matches is not None, fitobj
def _resolveModule(hardware, sMkt, b_localized):
moduleName = hardware.getAttribute("type")
emergency = None
@@ -139,9 +141,6 @@ class UserCancelException(Exception):
pass
from abc import ABCMeta, abstractmethod
class IPortUser:
__metaclass__ = ABCMeta

View File

@@ -25,10 +25,10 @@ def sequential_rep(text_, *args):
return text_
def replaceLTGT(text_):
"""if fit name contained "<" or ">" then reprace to named html entity by EVE client.
for fit name.
"""
return text_.replace("&lt;", "<").replace("&gt;", ">") if isinstance(text_, unicode) else text_