summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/frames/team.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-07-22 11:52:38 +0200
committeremkael <emkael@tlen.pl>2019-07-22 11:52:38 +0200
commit8c0b4f0f0ea0fddcdad348fb0c5a9f546375ec29 (patch)
treeb06936a260935479b88da715c04a716f5cca98f3 /jfr_playoff/gui/frames/team.py
parent8bf96412b75689c578f5690dd0974304265d7fea (diff)
Ordered dictionaries for config export
Diffstat (limited to 'jfr_playoff/gui/frames/team.py')
-rw-r--r--jfr_playoff/gui/frames/team.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/jfr_playoff/gui/frames/team.py b/jfr_playoff/gui/frames/team.py
index cc474b4..dbef680 100644
--- a/jfr_playoff/gui/frames/team.py
+++ b/jfr_playoff/gui/frames/team.py
@@ -1,5 +1,7 @@
#coding=utf-8
+from collections import OrderedDict
+
import tkinter as tk
from tkinter.font import Font
from tkinter import ttk
@@ -168,7 +170,7 @@ class TeamFetchSettingsFrame(GuiFrame):
'<<TeamSettingsChanged>>', when='tail')
def getTeams(self):
- teams = {}
+ teams = OrderedDict()
if self.fetchSource.get() == self.SOURCE_LINK:
teams['link'] = self.fetchLink.get()
elif self.fetchSource.get() == self.SOURCE_DB:
@@ -364,7 +366,8 @@ class TeamAliasFrame(ScrollableFrame):
self.repeater.grid(row=1, column=0, sticky=tk.W+tk.E)
def getConfig(self):
- return {val[0]: val[1] for val in self.repeater.getValue() if val[0]}
+ return OrderedDict(
+ {val[0]: val[1] for val in self.repeater.getValue() if val[0]})
def setValues(self, values):
self.repeater.setValue(list(values.iteritems()))