Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Implement compatibility with Python 3.10 #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nuxhash/gui/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, parent, *args, **kwargs):
h_sizer = wx.BoxSizer(orient=wx.HORIZONTAL)
self.SetSizer(h_sizer)
v_sizer = wx.BoxSizer(orient=wx.VERTICAL)
h_sizer.Add(v_sizer, wx.SizerFlags().Proportion(1.0)
h_sizer.Add(v_sizer, wx.SizerFlags().Proportion(1)
.Align(wx.ALIGN_CENTER))

with open(LOGO_PATH, 'rb') as f:
Expand Down
2 changes: 1 addition & 1 deletion nuxhash/gui/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, parent, *args, devices=[], **kwargs):
innerWindow.SetupScrolling()
sizer.Add(innerWindow, wx.SizerFlags().Border(wx.LEFT|wx.RIGHT|wx.TOP,
main.PADDING_PX)
.Proportion(1.0)
.Proportion(1)
.Expand())
innerSizer = wx.BoxSizer(orient=wx.VERTICAL)
innerWindow.SetSizer(innerSizer)
Expand Down
6 changes: 3 additions & 3 deletions nuxhash/gui/mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def __init__(self, parent, *args, devices=[], **kwargs):
# Update balance periodically.
self._Timer = wx.Timer(self)
self.Bind(wx.EVT_TIMER, self._OnBalanceTimer, self._Timer)
self._Timer.Start(milliseconds=BALANCE_UPDATE_MIN*60*1e3)
self._Timer.Start(milliseconds=BALANCE_UPDATE_MIN*60*1000)

# Add mining panel.
self._Panel = MiningPanel(self, style=wx.dataview.DV_HORIZ_RULES)
sizer.Add(self._Panel, wx.SizerFlags().Border(wx.LEFT|wx.RIGHT|wx.TOP,
main.PADDING_PX)
.Proportion(1.0)
.Proportion(1)
.Expand())

bottomSizer = wx.BoxSizer(orient=wx.HORIZONTAL)
Expand All @@ -70,7 +70,7 @@ def __init__(self, parent, *args, devices=[], **kwargs):
# Add balance displays.
balances = wx.FlexGridSizer(2, 2, main.PADDING_PX)
balances.AddGrowableCol(1)
bottomSizer.Add(balances, wx.SizerFlags().Proportion(1.0).Expand())
bottomSizer.Add(balances, wx.SizerFlags().Proportion(1).Expand())

balances.Add(wx.StaticText(self, label='Daily revenue'))
self._Revenue = wx.StaticText(
Expand Down
2 changes: 1 addition & 1 deletion nuxhash/gui/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def _Reset(self):
self._ApiKey.SetValue(self._Settings['nicehash']['api_key'])
self._ApiSecret.SetValue(self._Settings['nicehash']['api_secret'])
self._Interval.SetValue(self._Settings['switching']['interval'])
self._Threshold.SetValue(self._Settings['switching']['threshold']*100)
self._Threshold.SetValue(int(self._Settings['switching']['threshold']*100))
self._Units.SetValue(self._Settings['gui']['units'])
self._Revert.Disable()
self._Save.Disable()
Expand Down