Merge branch 'master' of evefit.org:pyfa

Conflicts:
	eos
This commit is contained in:
cncfanatics
2010-11-03 09:10:58 +01:00
7 changed files with 37 additions and 24 deletions

2
eos

Submodule eos updated: f5c8a2c503...7a644ce951

View File

@@ -75,7 +75,7 @@ class ResourcesViewFull(StatsView):
suffix = {'turret':'Hardpoints', 'launcher':'Hardpoints', 'drones':'Active', 'calibration':'Points'}
lbl = wx.StaticText(parent, wx.ID_ANY, "0")
setattr(self, "label%sUsed%s%s" % (panel.capitalize(), type.capitalize(), suffix[type].capitalize()), lbl)
box.Add(lbl, 0, wx.ALIGN_CENTER)
box.Add(lbl, 0, wx.ALIGN_CENTER | wx.LEFT, 5)
box.Add(wx.StaticText(parent, wx.ID_ANY, "/"), 0, wx.ALIGN_CENTER)
@@ -109,7 +109,7 @@ class ResourcesViewFull(StatsView):
lbl = wx.StaticText(parent, wx.ID_ANY, "0")
setattr(self, "label%sUsed%s" % (panel.capitalize(), capitalizedType), lbl)
absolute.Add(lbl, 0, wx.ALIGN_LEFT)
absolute.Add(lbl, 0, wx.ALIGN_LEFT | wx.LEFT, 3)
absolute.Add(wx.StaticText(parent, wx.ID_ANY, "/"), 0, wx.ALIGN_LEFT)

View File

@@ -1,5 +1,5 @@
__all__ = ["moduleState", "moduleName", "attributeDisplay", "maxRange",
"name", "droneDps", "droneNameAmount", "droneCheckbox", "moduleAmmo",
"capacitorUse", "activityCheckbox", "moduleAmmoIcon", "modulePrice",
"projectedName", "projectedState", "projectedAmmoIcon", "projectedAmmo",
"moduleTracking"]
"projectedName", "projectedState", "projectedAmmoIcon",
"projectedAmmo", "moduleTracking"]

View File

@@ -115,12 +115,12 @@ class CharacterSelection(wx.Panel):
sCharacter = service.Character.getInstance()
reqs = sCharacter.checkRequirements(fit)
if len(reqs) == 0:
tip = "All prerequisites have been met"
self.skillReqsStaticBitmap.SetBitmap(self.greenSkills)
self.skillReqsStaticBitmap.SetToolTip(None)
else:
tip = self._buildSkillsTooltip(reqs)
self.skillReqsStaticBitmap.SetBitmap(self.redSkills)
self.skillReqsStaticBitmap.SetToolTipString(tip.strip())
self.skillReqsStaticBitmap.SetToolTipString(tip.strip())
if newCharID == None:
cChar = service.Character.getInstance()

View File

@@ -112,6 +112,9 @@ class MainFrame(wx.Frame):
self.SetSizer(mainSizer)
self.addTabId = wx.NewId()
self.closeTabId = wx.NewId()
#Add menu
self.SetMenuBar(MainMenuBar())
#self.SetToolBar(MainToolBar(self))
@@ -169,7 +172,7 @@ class MainFrame(wx.Frame):
sFit = service.Fit.getInstance()
dlg=wx.FileDialog(
self,
"Choose one or more fitting files to import",
"Open One Or More Fitting Files",
wildcard = "EFT text fitting files (*.cfg)|*.cfg|EvE XML fitting files (*.xml)|*.xml|All Files (*)|*",
style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST | wx.FD_MULTIPLE)
if (dlg.ShowModal() == wx.ID_OK):
@@ -186,11 +189,11 @@ class MainFrame(wx.Frame):
if importCount == 1:
if self.getActiveFit() != fitIDs[0]:
wx.PostEvent(self, FitSelected(fitID=fitIDs[0]))
self.shipBrowser.RefreshContent()
def showExportDialog(self, event):
dlg=wx.FileDialog(
self,
"Choose a file to export the current fitting to",
"Save Fitting As...",
wildcard = "EFT text fitting files (*.cfg)|*.cfg|EvE XML fitting files (*.xml)|*.xml",
style = wx.FD_SAVE)
if (dlg.ShowModal() == wx.ID_OK):
@@ -246,17 +249,16 @@ class MainFrame(wx.Frame):
#Clipboard exports
self.Bind(wx.EVT_MENU, self.exportToClipboard, id=wx.ID_COPY)
addTabId = wx.NewId()
toggleShipMarketId = wx.NewId()
# Close Tab
self.Bind(wx.EVT_MENU, self.CloseCurrentFit, id=wx.ID_CLOSE)
self.Bind(wx.EVT_MENU,self.HAddTab, id = addTabId)
self.Bind(wx.EVT_MENU, self.CloseCurrentFit, id=self.closeTabId)
self.Bind(wx.EVT_MENU,self.HAddTab, id = self.addTabId)
self.Bind(wx.EVT_MENU,self.toggleShipMarket, id = toggleShipMarketId)
actb = [(wx.ACCEL_CTRL, ord('T'), addTabId),
(wx.ACCEL_CMD, ord('T'), addTabId),
(wx.ACCEL_CTRL, ord("W"), wx.ID_CLOSE),
(wx.ACCEL_CMD, ord("W"), wx.ID_CLOSE),
actb = [(wx.ACCEL_CTRL, ord('T'), self.addTabId),
(wx.ACCEL_CMD, ord('T'), self.addTabId),
(wx.ACCEL_CTRL, ord("W"), self.closeTabId),
(wx.ACCEL_CMD, ord("W"), self.closeTabId),
(wx.ACCEL_CTRL, ord(" "), toggleShipMarketId),
(wx.ACCEL_CMD, ord(" "), toggleShipMarketId)]
atable = wx.AcceleratorTable(actb)
@@ -325,7 +327,7 @@ class MainFrame(wx.Frame):
sFit = service.Fit.getInstance()
saveDialog = wx.FileDialog(
self,
"Choose where to save the backup",
"Save Backup As...",
wildcard = "EvE XML fitting file (*.xml)|*.xml",
style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
if (saveDialog.ShowModal() == wx.ID_OK):

View File

@@ -28,20 +28,24 @@ class MainMenuBar(wx.MenuBar):
self.damagePatternEditorId = wx.NewId()
self.backupFitsId = wx.NewId()
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
wx.MenuBar.__init__(self)
# File menu
fileMenu = wx.Menu()
self.Append(fileMenu, "&File")
if 'wxMSW' in wx.PlatformInfo:
fileMenu.Append(wx.ID_CLOSE, "&Close\tCTRL+W", "Close the currently open fit")
else:
fileMenu.Append(wx.ID_CLOSE)
fileMenu.Append(wx.ID_EXIT)
fileMenu.Append(self.mainFrame.addTabId, "&New Tab\tCTRL+T", "Open a new fitting tab")
fileMenu.Append(self.mainFrame.closeTabId, "&Close Tab\tCTRL+W", "Close the current fit")
fileMenu.AppendSeparator()
fileMenu.Append(self.backupFitsId, "&Backup fits", "Backup all fittings to a XML file")
fileMenu.Append(wx.ID_OPEN, "&Import\tCTRL+O", "Import a fit into pyfa.")
fileMenu.Append(wx.ID_SAVEAS, "&Export\tCTRL+S", "Export the fit to another format.")
fileMenu.AppendSeparator()
fileMenu.Append(wx.ID_EXIT)
# Edit menu
@@ -79,7 +83,7 @@ class MainMenuBar(wx.MenuBar):
helpMenu.Append(911,"Open Widgets Inspect tool", "Open Widgets Inspect tool")
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
self.mainFrame.Bind(gui.fittingView.FIT_CHANGED, self.fitChanged)
def fitChanged(self, event):

View File

@@ -20,6 +20,7 @@ Stage2Selected, EVT_SB_STAGE2_SEL = wx.lib.newevent.NewEvent()
Stage3Selected, EVT_SB_STAGE3_SEL = wx.lib.newevent.NewEvent()
SearchSelected, EVT_SB_SEARCH_SEL = wx.lib.newevent.NewEvent()
class ShipBrowser(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__ (self, parent,style = 0 if 'wxGTK' in wx.PlatformInfo else wx.DOUBLE_BORDER)
@@ -63,10 +64,16 @@ class ShipBrowser(wx.Panel):
self.Bind(EVT_SB_STAGE1_SEL, self.stage1)
self.Bind(EVT_SB_STAGE3_SEL, self.stage3)
self.Bind(EVT_SB_SEARCH_SEL, self.searchStage)
self.mainFrame.Bind(fv.FIT_CHANGED, self.RefreshList)
self.stage1(None)
def RefreshContent(self):
stage = self.GetActiveStage()
stageData = self.GetStageData(stage)
self.hpane.gotoStage(stage, stageData)
def RefreshList(self, event):
stage = self.GetActiveStage()
if stage == 3 or stage == 4: