File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -257,15 +257,11 @@ def get_message():
257257 global get , language
258258 get = True
259259 from tkinter import filedialog
260- f_path = filedialog .askopenfilename (title = 'Open Sounds File' )
260+ f_path = filedialog .askopenfilename (title = 'Open Sounds File' , filetypes = [( 'Sounds' , '*.mp3 *.wav' )] )
261261 if f_path != '' :
262- if os .path .splitext (f_path )[1 ] not in ('.mp3' , '.wav' ):
263- from tkinter import messagebox
264- messagebox .showerror (title = 'File Error' , message = LANGUAGE_LIST [language ]['not sounds' ])
265- else :
266- sounds_path = f_path
267- path_entry .delete (0 , tk .END )
268- path_entry .insert (0 , f_path )
262+ sounds_path = f_path
263+ path_entry .delete (0 , tk .END )
264+ path_entry .insert (0 , f_path )
269265
270266 old_language = language
271267 newlanguage = tk .StringVar ()
You can’t perform that action at this time.
0 commit comments