summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-06-27 14:07:39 +0200
committeremkael <emkael@tlen.pl>2019-06-27 14:07:39 +0200
commit7354a92ecb7c69537c4e1904ec463a2b216be162 (patch)
tree8a2d91d6c9ac017f7286e7cf75990e429494204d /jfr_playoff/gui
parent8d9100f32b50e24ee030ec88ccf3d74650225b23 (diff)
Storing filepath in main window
Diffstat (limited to 'jfr_playoff/gui')
-rw-r--r--jfr_playoff/gui/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/jfr_playoff/gui/__init__.py b/jfr_playoff/gui/__init__.py
index 02ef3bb..2a890d1 100644
--- a/jfr_playoff/gui/__init__.py
+++ b/jfr_playoff/gui/__init__.py
@@ -16,6 +16,7 @@ class PlayoffGUI(tk.Tk):
self._title = tk.StringVar()
self._title.trace('w', self._setTitle)
self._dirty = False
+ self._filepath = None
def run(self):
self.notebook = ttk.Notebook(self)
@@ -37,6 +38,7 @@ class PlayoffGUI(tk.Tk):
self._setValues({})
def newFile(self):
+ self._filepath = None
self.newFileIndex += 1
self._title.set('Nowa drabinka %d' % (self.newFileIndex))
self._resetValues()
@@ -49,6 +51,7 @@ class PlayoffGUI(tk.Tk):
))
def openFile(self, filepath):
+ self._filepath = filepath
self._title.set(os.path.basename(filepath))
self._setValues(json.load(open(filepath)))