Merge pull request #4423 from PySimpleGUI/Dev-latest

Replaced popup_error with traceback error popups when button colors p…
This commit is contained in:
PySimpleGUI 2021-06-17 13:49:34 -04:00 committed by GitHub
commit 6109f4b935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/python3 #!/usr/bin/python3
version = __version__ = "4.44.0.2 Unreleased\nWindow.current_location docstring update to indicate value my be off due to titlebar, Menu element fixed problem of updates modifying the original menu spec, better string length handling in error popups, New popup function - popup_error_with_traceback allows you to show error info with a button to take the user to the line with the problem" version = __version__ = "4.44.0.3 Unreleased\nWindow.current_location docstring update to indicate value my be off due to titlebar, Menu element fixed problem of updates modifying the original menu spec, better string length handling in error popups, New popup function - popup_error_with_traceback allows you to show error info with a button to take the user to the line with the problem, replaced error popups with traceback popups when button colors problems are detected"
__version__ = version.split()[0] # For PEP 396 and PEP 345 __version__ = version.split()[0] # For PEP 396 and PEP 345
@ -11731,13 +11731,13 @@ def _simplified_dual_color_to_tuple(color_tuple_or_string, default=(None, None))
text_color, background_color = default text_color, background_color = default
else: else:
if not SUPPRESS_ERROR_POPUPS: if not SUPPRESS_ERROR_POPUPS:
popup_error('** Badly formatted button color... not a tuple nor string **', color_tuple_or_string) _error_popup_with_traceback('** Badly formatted button color... not a tuple nor string **', color_tuple_or_string)
else: else:
print('** Badly formatted button color... not a tuple nor string **', color_tuple_or_string) print('** Badly formatted button color... not a tuple nor string **', color_tuple_or_string)
text_color = background_color = COLOR_SYSTEM_DEFAULT text_color = background_color = COLOR_SYSTEM_DEFAULT
except Exception as e: except Exception as e:
if not SUPPRESS_ERROR_POPUPS: if not SUPPRESS_ERROR_POPUPS:
popup_error('** Badly formatted button color **', color_tuple_or_string, e) _error_popup_with_traceback('** Badly formatted button color **', color_tuple_or_string, e)
else: else:
print('** Badly formatted button color... not a tuple nor string **', color_tuple_or_string, e) print('** Badly formatted button color... not a tuple nor string **', color_tuple_or_string, e)
text_color = background_color = COLOR_SYSTEM_DEFAULT text_color = background_color = COLOR_SYSTEM_DEFAULT