diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bidding_data_gui.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bidding_data_gui.py b/src/bidding_data_gui.py index f770003..b9a3a34 100644 --- a/src/bidding_data_gui.py +++ b/src/bidding_data_gui.py @@ -121,9 +121,11 @@ class BiddingGUI(tk.Frame): Displays file selection dialog for tournament file and stores user's choice in Tk variable. """ - self.__variables['tour_filename'].set(tkFileDialog.askopenfilename( + filename = tkFileDialog.askopenfilename( title='Wybierz główny plik wyników turnieju', - filetypes=[('HTML files', '.htm*'), ('all files', '.*')])) + filetypes=[('HTML files', '.htm*'), ('all files', '.*')]) + if filename is not None and len(filename) > 0: + self.__variables['tour_filename'].set(filename) def bws_select(self): """ @@ -133,9 +135,11 @@ class BiddingGUI(tk.Frame): Displays file selection dialog for tournament file and stores user's choice in Tk variable. """ - self.__variables['bws_filename'].set(tkFileDialog.askopenfilename( + filename = tkFileDialog.askopenfilename( title='Wybierz plik z danymi licytacji', - filetypes=[('BWS files', '.bws'), ('all files', '.*')])) + filetypes=[('BWS files', '.bws'), ('all files', '.*')]) + if filename is not None and len(filename) > 0: + self.__variables['bws_filename'].set(filename) def display_info(self): """Show application "About" box.""" |