Merge pull request #4677 from PySimpleGUI/Dev-latest

Dev latest
This commit is contained in:
PySimpleGUI 2021-08-29 10:53:07 -04:00 committed by GitHub
commit a3cdbacd5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,7 @@ def main():
if new_count is not None: if new_count is not None:
counter = int(new_count) counter = int(new_count)
elif event == 'Choose Title': elif event == 'Choose Title':
new_title = sg.popup_get_text('Choose a title for your date', location=window.current_location(), keep_on_top=True) new_title = sg.popup_get_text('Choose a title for your counter', default_text=sg.user_settings_get_entry('-coutitle-', ''), location=window.current_location(), keep_on_top=True)
if new_title is not None: if new_title is not None:
window['-TITLE-'].update(new_title) window['-TITLE-'].update(new_title)
sg.user_settings_set_entry('-title-', new_title) sg.user_settings_set_entry('-title-', new_title)
@ -165,9 +165,9 @@ def main():
winsound.PlaySound(sound_file, 1) winsound.PlaySound(sound_file, 1)
elif event == 'Set Click Sound': elif event == 'Set Click Sound':
if not sg.running_windows(): if not sg.running_windows():
sg.popup_error('I am terribly sorry to inform you that you are not running Windows and thus, no clicky sound for you.', location=window.current_location()) sg.popup_error('I am terribly sorry to inform you that you are not running Windows and thus, no clicky sound for you.', keep_on_top=True, location=window.current_location())
else: else:
sound_file = sg.popup_get_file('Choose the file to play when changing counter', file_types=(('WAV', '*.wav'),), location=window.current_location(), default_path=sg.user_settings_get_entry('-sound file-', '')) sound_file = sg.popup_get_file('Choose the file to play when changing counter', file_types=(('WAV', '*.wav'),), keep_on_top=True, location=window.current_location(), default_path=sg.user_settings_get_entry('-sound file-', ''))
if sound_file is not None: if sound_file is not None:
sg.user_settings_set_entry('-sound file-', sound_file) sg.user_settings_set_entry('-sound file-', sound_file)