summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/frames
diff options
context:
space:
mode:
Diffstat (limited to 'jfr_playoff/gui/frames')
-rw-r--r--jfr_playoff/gui/frames/__init__.py5
-rw-r--r--jfr_playoff/gui/frames/match.py11
-rw-r--r--jfr_playoff/gui/frames/network.py4
-rw-r--r--jfr_playoff/gui/frames/visual.py12
4 files changed, 17 insertions, 15 deletions
diff --git a/jfr_playoff/gui/frames/__init__.py b/jfr_playoff/gui/frames/__init__.py
index a02791d..f4fdf4f 100644
--- a/jfr_playoff/gui/frames/__init__.py
+++ b/jfr_playoff/gui/frames/__init__.py
@@ -7,7 +7,8 @@ import tkinter as tk
from tkinter import ttk
import tkMessageBox
-from ..variables import NotifyStringVar, NotifyIntVar, NotifyNumericVar, NumericVar
+from ..variables import NotifyStringVar, NotifyIntVar
+from ..variables import NotifyBoolVar, NotifyNumericVar, NumericVar
def setPanelState(frame, state):
for child in frame.winfo_children():
@@ -355,7 +356,7 @@ class SelectionFrame(ScrollableFrame):
self.renderHeader(container)
for idx, option in enumerate(self.options):
key = self._mapValue(idx, option)
- self.values[key] = NotifyIntVar()
+ self.values[key] = NotifyBoolVar()
self.renderOption(container, option, idx)
if self.selected and key in self.selected:
self.values[key].set(True)
diff --git a/jfr_playoff/gui/frames/match.py b/jfr_playoff/gui/frames/match.py
index c91119d..7d0b923 100644
--- a/jfr_playoff/gui/frames/match.py
+++ b/jfr_playoff/gui/frames/match.py
@@ -12,7 +12,8 @@ from ..frames import SelectionFrame, SelectionButton, RefreshableOptionMenu
from ..frames.team import DBSelectionField, TeamSelectionFrame
from ..frames.team import TeamSelectionButton
from ..frames.visual import PositionsSelectionFrame
-from ..variables import NotifyStringVar, NotifyIntVar, NotifyNumericVar
+from ..variables import NotifyStringVar, NotifyIntVar
+from ..variables import NotifyNumericVar, NotifyBoolVar
class SwissSettingsFrame(RepeatableFrame):
SOURCE_LINK = 0
@@ -51,9 +52,9 @@ class SwissSettingsFrame(RepeatableFrame):
self.fetchDB = NotifyStringVar()
self.fetchLink = NotifyStringVar()
self.setFrom = NotifyNumericVar()
- self.setToEnabled = NotifyIntVar()
+ self.setToEnabled = NotifyBoolVar()
self.setTo = NotifyNumericVar()
- self.fetchFromEnabled = NotifyIntVar()
+ self.fetchFromEnabled = NotifyBoolVar()
self.fetchFrom = NotifyNumericVar()
self.linkLabel = NotifyStringVar()
self.linkRelPath = NotifyStringVar()
@@ -304,7 +305,7 @@ class BracketMatchSettingsFrame(GuiFrame):
self.source = NotifyIntVar()
self.source.trace('w', self._enablePanels)
self.source.trace('w', self._configChangeNotify)
- self.selected = NotifyIntVar()
+ self.selected = NotifyBoolVar()
self.selected.trace('w', self._enablePanels)
self.selectedIndex = NotifyStringVar()
self.positions = []
@@ -487,7 +488,7 @@ class MatchSettingsFrame(RepeatableFrame):
self.scoreRound = NotifyNumericVar()
self.scoreTable = NotifyNumericVar()
self.scoreCustom = [NotifyStringVar(), NotifyStringVar()]
- self.scoreNotFinished = NotifyIntVar()
+ self.scoreNotFinished = NotifyBoolVar()
self.scoreNotFinished.trace('w', self._enablePanels)
self.scoreBoards = NotifyNumericVar()
diff --git a/jfr_playoff/gui/frames/network.py b/jfr_playoff/gui/frames/network.py
index 90c21d1..fb27434 100644
--- a/jfr_playoff/gui/frames/network.py
+++ b/jfr_playoff/gui/frames/network.py
@@ -10,7 +10,7 @@ import tkMessageBox as tkmb
from ...db import PlayoffDB
from ..frames import RepeatableEntry, WidgetRepeater, NumericSpinbox
from ..frames import GuiFrame, ScrollableFrame
-from ..variables import NotifyStringVar, NotifyIntVar, NotifyNumericVar
+from ..variables import NotifyStringVar, NotifyNumericVar, NotifyBoolVar
def network_test(connFunction, testLabel):
try:
@@ -128,7 +128,7 @@ class GoniecConfigurationFrame(GuiFrame):
tkmb.showerror('Błąd połączenia z Gońcem', self.testError)
def renderContent(self):
- self.enable = NotifyIntVar()
+ self.enable = NotifyBoolVar()
self.enable.trace('w', self._enableWidgets)
self.host = NotifyStringVar()
self.port = NotifyNumericVar()
diff --git a/jfr_playoff/gui/frames/visual.py b/jfr_playoff/gui/frames/visual.py
index 147d6fe..1cbe177 100644
--- a/jfr_playoff/gui/frames/visual.py
+++ b/jfr_playoff/gui/frames/visual.py
@@ -10,7 +10,7 @@ from ..frames import GuiFrame, RepeatableFrame, ScrollableFrame
from ..frames import WidgetRepeater
from ..frames import SelectionFrame, RefreshableOptionMenu, NumericSpinbox
from ..frames.team import TeamSelectionButton
-from ..variables import NotifyStringVar, NotifyIntVar, NotifyNumericVar
+from ..variables import NotifyStringVar, NotifyNumericVar, NotifyBoolVar
class VisualSettingsFrame(GuiFrame):
DEFAULT_VALUES = {
@@ -32,17 +32,17 @@ class VisualSettingsFrame(GuiFrame):
}
def renderContent(self):
- self.startingPositionIndicators = NotifyIntVar()
- self.finishingPositionIndicators = NotifyIntVar()
+ self.startingPositionIndicators = NotifyBoolVar()
+ self.finishingPositionIndicators = NotifyBoolVar()
self.boxWidth = NotifyNumericVar()
self.boxHeight = NotifyNumericVar()
self.boxMargin = NotifyNumericVar()
- self.shortenTeamNames = NotifyIntVar()
+ self.shortenTeamNames = NotifyBoolVar()
self.teamNameLength = NotifyNumericVar()
self.teamNameEllipsis = NotifyStringVar()
- self.teamNamePredict = NotifyIntVar()
+ self.teamNamePredict = NotifyBoolVar()
self.teamNamePlaceholder = NotifyStringVar()
- self.teamNameSortPredictions = NotifyIntVar()
+ self.teamNameSortPredictions = NotifyBoolVar()
self.teamLabelSeparator = NotifyStringVar()
self.teamNameSeparator = NotifyStringVar()
self.teamNamePrefix = NotifyStringVar()