Skip to content
Permalink
Browse files

Catch issue with updates where version can silently fail. Switch all …

…windows over to using new font system.
  • Loading branch information...
Ebag333 committed May 22, 2017
1 parent 0841ab4 commit fa47af5f67ed6b655ffaad34bdac124974f41380
@@ -1,8 +1,8 @@
# pyfa.fit

_Master_: [![Build Status](https://travis-ci.org/Pyfa-fit/Pyfa.svg?branch=master)](https://travis-ci.org/pyfa-fit/Pyfa) [![Build Status](https://ci.appveyor.com/api/projects/status/6o0qe49yajcg7hyy/branch/master?svg=true)](https://ci.appveyor.com/project/Ebag333/pyfa-nr5qw/branch/master) [![codecov](https://codecov.io/gh/Pyfa-fit/Pyfa-fit/branch/master/graph/badge.svg)](https://codecov.io/gh/Pyfa-fit/Pyfa) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/86ace8fc05c24ae59b61e0223f7d161b)](https://www.codacy.com/app/Ebag333/Pyfa-fit?utm_source=github.com&utm_medium=referral&utm_content=Pyfa-fit/Pyfa-fit&utm_campaign=Badge_Grade)
_Master_: [![Build Status](https://api.travis-ci.org/Pyfa-fit/Pyfa-fit.svg?branch=master)](https://travis-ci.org/Pyfa-fit/Pyfa-fit) [![Build Status](https://ci.appveyor.com/api/projects/status/6o0qe49yajcg7hyy/branch/master?svg=true)](https://ci.appveyor.com/project/Ebag333/pyfa-nr5qw/branch/master) [![codecov](https://codecov.io/gh/Pyfa-fit/Pyfa-fit/branch/master/graph/badge.svg)](https://codecov.io/gh/Pyfa-fit/Pyfa-fit) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/86ace8fc05c24ae59b61e0223f7d161b)](https://www.codacy.com/app/Ebag333/Pyfa-fit?utm_source=github.com&utm_medium=referral&utm_content=Pyfa-fit/Pyfa-fit&utm_campaign=Badge_Grade)

_Development_: [![Build Status](https://travis-ci.org/Pyfa-fit/Pyfa.svg?branch=development)](https://travis-ci.org/pyfa-fit/Pyfa) [![Build Status](https://ci.appveyor.com/api/projects/status/6o0qe49yajcg7hyy/branch/development?svg=true)](https://ci.appveyor.com/project/Ebag333/pyfa-nr5qw/branch/development) [![codecov](https://codecov.io/gh/Pyfa-fit/Pyfa-fit/branch/development/graph/badge.svg)](https://codecov.io/gh/Pyfa-fit/Pyfa)
_Development_: [![Build Status](https://travis-ci.org/Pyfa-fit/Pyfa-fit.svg?branch=development)](https://travis-ci.org/Pyfa-fit/Pyfa-fit) [![Build Status](https://ci.appveyor.com/api/projects/status/6o0qe49yajcg7hyy/branch/development?svg=true)](https://ci.appveyor.com/project/Ebag333/pyfa-nr5qw/branch/development) [![codecov](https://codecov.io/gh/Pyfa-fit/Pyfa-fit/branch/development/graph/badge.svg)](https://codecov.io/gh/Pyfa-fit/Pyfa-fit)

![pyfa](/imgs/mainframe.png "Pyfa")
## What is it?
@@ -16,7 +16,7 @@ The latest version along with release notes can always be found on the project's
Development releases will have newer features, and may not function correctly. Use at your own risk.
_*Release Downloads*_:
[Current Release](https://github.com/Pyfa-fit/Pyfa/releases)
[Current Release](https://github.com/Pyfa-fit/Pyfa-fit/releases)
### Development Downloads
@@ -25,7 +25,7 @@
saveInRoot = False

# Version data
version = "2017.05.21"
version = "2017.05.23"
if hasattr(sys, 'frozen'):
tag = ""
else:
@@ -20,6 +20,7 @@
# noinspection PyPackageRequirements
import wx
from gui.preferenceView import PreferenceView
from gui.utils.fonts import Fonts


class DummyView(PreferenceView):
@@ -52,7 +53,7 @@ def initHeader(self, panel):
headerSizer = wx.BoxSizer(wx.VERTICAL)
self.stTitle = wx.StaticText(panel, wx.ID_ANY, u"Dummy", wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(14, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))
headerSizer.Add(self.stTitle, 0, wx.ALL, 5)

return headerSizer
@@ -4,6 +4,7 @@
from gui.bitmapLoader import BitmapLoader
import gui.mainFrame
from service.settings import ContextMenuSettings
from gui.utils.fonts import Fonts


class PFContextMenuPref(PreferenceView):
@@ -18,7 +19,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))

mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

@@ -7,7 +7,7 @@
import gui.mainFrame

from service.settings import CRESTSettings
from gui.utils.fonts import font_title_plus_one
from gui.utils.fonts import Fonts

# noinspection PyPackageRequirements
from wx.lib.intctrl import IntCtrl
@@ -29,7 +29,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(font_title_plus_one)
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))

mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

@@ -74,7 +74,7 @@ def populatePanel(self, panel):

detailsTitle = wx.StaticText(panel, wx.ID_ANY, "CREST client details", wx.DefaultPosition, wx.DefaultSize, 0)
detailsTitle.Wrap(-1)
self.stTitle.SetFont(font_title_plus_one)
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))

mainSizer.Add(detailsTitle, 0, wx.ALL, 5)
mainSizer.Add(wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL), 0,
@@ -10,6 +10,7 @@
from service.settings import DatabaseSettings
from service.esi import esiItems, esiDogma
import sys
from gui.utils.fonts import Fonts

import logging

@@ -29,7 +30,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

self.stSubTitle = wx.StaticText(panel, wx.ID_ANY, u"(Cannot be changed while pyfa is running. Set via command line switches.)",
@@ -7,6 +7,7 @@
from gui.bitmapLoader import BitmapLoader
from gui.preferenceView import PreferenceView
from service.settings import EOSSettings
from gui.utils.fonts import Fonts

logger = logging.getLogger(__name__)

@@ -29,7 +30,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
@@ -11,6 +11,7 @@
from service.settings import GeneralSettings
from service.fit import Fit
from service.price import Price
from gui.utils.fonts import Fonts


class PFGeneralPref(PreferenceView):
@@ -30,7 +31,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))

mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

@@ -8,6 +8,7 @@
import gui.mainFrame

from service.settings import HTMLExportSettings
from gui.utils.fonts import Fonts


class PFHTMLExportPref(PreferenceView):
@@ -27,7 +28,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
@@ -4,6 +4,7 @@
from gui.bitmapLoader import BitmapLoader
import config
from logbook import Logger
from gui.utils.fonts import Fonts

pyfalog = Logger(__name__)

@@ -22,7 +23,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

self.stSubTitle = wx.StaticText(panel, wx.ID_ANY, u"(Cannot be changed while pyfa is running. Set via command line switches.)",
@@ -7,6 +7,7 @@
import gui.mainFrame
from service.settings import NetworkSettings
from service.network import Network
from gui.utils.fonts import Fonts


class PFNetworkPref(PreferenceView):
@@ -23,7 +24,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))

mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

@@ -48,7 +49,7 @@ def populatePanel(self, panel):

proxyTitle = wx.StaticText(panel, wx.ID_ANY, "Proxy settings", wx.DefaultPosition, wx.DefaultSize, 0)
proxyTitle.Wrap(-1)
proxyTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
proxyTitle.SetFont(Fonts.getFont("font_standard"))

mainSizer.Add(proxyTitle, 0, wx.ALL, 5)
mainSizer.Add(wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL), 0,
@@ -4,6 +4,7 @@
from gui.preferenceView import PreferenceView
from gui.bitmapLoader import BitmapLoader
from service.settings import StatViewSettings
from gui.utils.fonts import Fonts


class PFStatViewPref(PreferenceView):
@@ -22,7 +23,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))

mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

@@ -4,6 +4,7 @@
from gui.preferenceView import PreferenceView
from gui.bitmapLoader import BitmapLoader
from service.settings import UpdateSettings
from gui.utils.fonts import Fonts


class PFUpdatePref(PreferenceView):
@@ -23,7 +24,7 @@ def populatePanel(self, panel):

self.stTitle = wx.StaticText(panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0)
self.stTitle.Wrap(-1)
self.stTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.stTitle.SetFont(Fonts.getFont("font_title_plus_one"))
mainSizer.Add(self.stTitle, 0, wx.ALL, 5)

self.m_staticline1 = wx.StaticLine(panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL)
@@ -46,7 +47,7 @@ def populatePanel(self, panel):
self.versionTitle = wx.StaticText(panel, wx.ID_ANY, "Suppressing {0} Notifications".format(
self.UpdateSettings.get('version')), wx.DefaultPosition, wx.DefaultSize, 0)
self.versionTitle.Wrap(-1)
self.versionTitle.SetFont(wx.Font(12, 70, 90, 90, False, wx.EmptyString))
self.versionTitle.SetFont(Fonts.getFont("font_title_plus_one"))

self.versionInfo = ("There is a release available which you have chosen to suppress. "
"You can choose to reset notification suppression for this release, "
@@ -1,7 +1,8 @@
# noinspection PyPackageRequirements
import wx
from gui.bitmapLoader import BitmapLoader
from gui.utils.fonts import font_standard
# TODO: Add font sizing to this
# from gui.utils.fonts import Fonts


class BaseValidator(wx.PyValidator):
@@ -37,7 +38,6 @@ class EntityEditor(wx.Panel):

def __init__(self, parent, entityName):
wx.Panel.__init__(self, parent, id=wx.ID_ANY, style=wx.TAB_TRAVERSAL)
self.SetFont(font_standard)

self.entityName = entityName
self.validator = None
@@ -57,6 +57,7 @@ def __init__(self, parent, entityName):
for name, art, func in buttons:
bitmap = wx.ArtProvider.GetBitmap(art, wx.ART_BUTTON) if name != "rename" else art
btn = wx.BitmapButton(self, wx.ID_ANY, bitmap)

if size is None:
size = btn.GetSize()

@@ -102,7 +103,6 @@ def OnNew(self, event):
u"Enter a name for your new {}:".format(self.entityName),
u"New {}".format(self.entityName))
dlg.CenterOnParent()
dlg.SetFont(font_standard)

if dlg.ShowModal() == wx.ID_OK:
# using dlg.textctrl.GetValue instead of simply dlg.GetValue because the proper way does not work in wxPython 2.8
@@ -116,7 +116,6 @@ def OnCopy(self, event):
dlg = TextEntryValidatedDialog(self, self.validator,
u"Enter a name for your {} copy:".format(self.entityName),
u"Copy {}".format(self.entityName))
dlg.SetFont(font_standard)
active = self.getActiveEntity()
dlg.SetValue(u"{} Copy".format(active.name))
dlg.txtctrl.SetInsertionPointEnd()
@@ -131,7 +130,6 @@ def OnRename(self, event):
dlg = TextEntryValidatedDialog(self, self.validator,
u"Enter a new name for your {}:".format(self.entityName),
u"Rename {}".format(self.entityName))
dlg.SetFont(font_standard)
active = self.getActiveEntity()
dlg.SetValue(active.name)
dlg.txtctrl.SetInsertionPointEnd()
@@ -148,7 +146,6 @@ def OnDelete(self, event):
self.entityName),
u"Confirm Delete", wx.YES | wx.NO | wx.ICON_QUESTION)
dlg.CenterOnParent()
dlg.SetFont(font_standard)

if dlg.ShowModal() == wx.ID_YES:
self.DoDelete(self.getActiveEntity())
@@ -35,7 +35,7 @@
import gui.builtinViews.emptyView
from logbook import Logger
from gui.chromeTabs import EVT_NOTEBOOK_PAGE_CHANGED
from gui.utils.fonts import font_standard
from gui.utils.fonts import Fonts

from service.fit import Fit
from service.market import Market
@@ -572,7 +572,7 @@ def spawnMenu(self):
self.PopupMenu(menu)
except Exception as e:
# We can destroy the context menu before it's fully spawned. See:
# https://github.com/Pyfa-fit/Pyfa/issues/50
# https://github.com/Pyfa-fit/Pyfa-fit/issues/50
pyfalog.warning("Caught exception trying to spawn context menu.")
pyfalog.warning(e)

@@ -696,7 +696,7 @@ def MakeSnapshot(self, maxColumns=1337):
tbmp = wx.EmptyBitmap(16, 16)
tdc = wx.MemoryDC()
tdc.SelectObject(tbmp)
tdc.SetFont(font_standard)
tdc.SetFont(Fonts.getFont("font_standard"))

columnsWidths = []
for i in range(len(self.DEFAULT_COLS)):
@@ -791,7 +791,7 @@ def MakeSnapshot(self, maxColumns=1337):
mdc.SetBackground(wx.Brush(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW)))
mdc.Clear()

mdc.SetFont(font_standard)
mdc.SetFont(Fonts.getFont("font_standard"))
mdc.SetTextForeground(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOWTEXT))

cx = padding
@@ -36,7 +36,7 @@
from service.market import Market
from logbook import Logger
from service.settings import GeneralSettings
from gui.utils.fonts import font_standard
from gui.utils.fonts import Fonts

pyfalog = Logger(__name__)

@@ -136,7 +136,7 @@ def __init__(self, parent):

i = wx.IconFromBitmap(BitmapLoader.getBitmap("character_small", "gui"))
self.SetIcon(i)
self.SetFont(font_standard)
self.SetFont(Fonts.getFont("font_standard"))

self.mainFrame = parent
# self.disableWin = wx.WindowDisabler(self)
@@ -276,7 +276,7 @@ def __init__(self, parent):
style=wx.TAB_TRAVERSAL)
self.charEditor = self.Parent.Parent # first parent is Notebook, second is Character Editor
self.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW))
self.SetFont(font_standard)
self.SetFont(Fonts.getFont("font_standard"))

pmainSizer = wx.BoxSizer(wx.VERTICAL)

@@ -309,7 +309,7 @@ def __init__(self, parent):
self.Bind(wx.EVT_TIMER, self.populateSkillTreeSkillSearch, self.searchTimer)

tree = self.skillTreeListCtrl = wx.gizmos.TreeListCtrl(self, wx.ID_ANY, style=wx.TR_DEFAULT_STYLE | wx.TR_HIDE_ROOT)
tree.SetFont(font_standard)
tree.SetFont(Fonts.getFont("font_standard"))
pmainSizer.Add(tree, 1, wx.EXPAND | wx.ALL, 5)

self.imageList = wx.ImageList(16, 16)
@@ -26,7 +26,7 @@
from service.fit import Fit
from logbook import Logger
from eos.config import settings as eos_settings
from gui.utils.fonts import font_standard
from gui.utils.fonts import Fonts

pyfalog = Logger(__name__)

@@ -35,7 +35,7 @@ class CharacterSelection(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)

self.SetFont(font_standard)
self.SetFont(Fonts.getFont("font_standard"))

self.mainFrame = gui.mainFrame.MainFrame.getInstance()
mainSizer = wx.BoxSizer(wx.HORIZONTAL)

0 comments on commit fa47af5

Please sign in to comment.
You can’t perform that action at this time.