diff options
author | emkael <emkael@tlen.pl> | 2019-06-06 13:03:37 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-06-06 13:03:37 +0200 |
commit | 0335f4b6cd470ffd27930a4b08596a15ea4c1137 (patch) | |
tree | 612bbce962e7035be8b4d81290414ac4e375fec5 /jfr_playoff/gui/frames/team.py | |
parent | 85230f1914d5d7061848b0051dcd2d7975b09ada (diff) |
Common parent class for GUI frames
Diffstat (limited to 'jfr_playoff/gui/frames/team.py')
-rw-r--r-- | jfr_playoff/gui/frames/team.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/jfr_playoff/gui/frames/team.py b/jfr_playoff/gui/frames/team.py index 9466c92..23c1ada 100644 --- a/jfr_playoff/gui/frames/team.py +++ b/jfr_playoff/gui/frames/team.py @@ -5,8 +5,9 @@ from tkinter.font import Font from tkinter import ttk import tkMessageBox -from ..frames import RepeatableFrame, WidgetRepeater, RepeatableEntry -from ..frames import getIntVal, setPanelState, ScrollableFrame +from ..frames import GuiFrame, RepeatableFrame, ScrollableFrame +from ..frames import WidgetRepeater, RepeatableEntry +from ..frames import getIntVal, setPanelState class ManualTeamRow(RepeatableFrame): def renderContent(self): @@ -38,11 +39,7 @@ class ManualTeamRow(RepeatableFrame): self.winfo_toplevel().event_generate( '<<TeamSettingsChanged>>', when='tail') -class TeamManualSettingsFrame(tk.Frame): - def __init__(self, *args, **kwargs): - tk.Frame.__init__(self, *args, **kwargs) - self.renderContent() - +class TeamManualSettingsFrame(GuiFrame): def renderContent(self): headers = [ (ttk.Label, {'text': 'Pełna nazwa', 'width': 20}), @@ -91,14 +88,10 @@ class TeamSelectionFrame(ScrollableFrame): self.values[row-1].set(True) row += 1 -class TeamFetchSettingsFrame(tk.Frame): +class TeamFetchSettingsFrame(GuiFrame): SOURCE_LINK = 0 SOURCE_DB = 1 - def __init__(self, *args, **kwargs): - tk.Frame.__init__(self, *args, **kwargs) - self.renderContent() - def _changeNotify(self, *args): self.winfo_toplevel().event_generate( '<<TeamSettingsChanged>>', when='tail') |