diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 04b171ee..d522dfa2 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -version = __version__ = "4.20.0.8 Unreleased\n Ability to add your own theme easier using theme_add_new, VSeparator added (spelling error), removed Radio update clearing all if one is cleared (forgot about reset_group), new Element.set_vscroll_position method, added initial_folder to popup_get_folder and default_path to no_window version of popup_get_file, HorizontalSeparator (FINALLY), added keys to separators, added color parameter to Separators (defaults to theme text color), docstring for Window.get_screen_size" +version = __version__ = "4.20.0.9 Unreleased\n Ability to add your own theme easier using theme_add_new, VSeparator added (spelling error), removed Radio update clearing all if one is cleared (forgot about reset_group), new Element.set_vscroll_position method, added initial_folder to popup_get_folder and default_path to no_window version of popup_get_file, HorizontalSeparator (FINALLY), added keys to separators, added color parameter to Separators (defaults to theme text color), docstring for Window.get_screen_size, added default key for one_line_progress_meter" port = 'PySimpleGUI' @@ -11677,7 +11677,7 @@ class QuickMeter(object): return self.stat_messages -def OneLineProgressMeter(title, current_value, max_value, key, *args, orientation='v', bar_color=(None, None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, border_width=None, grab_anywhere=False, no_titlebar=False): +def OneLineProgressMeter(title, current_value, max_value, key='OK for 1 meter', *args, orientation='v', bar_color=(None, None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, border_width=None, grab_anywhere=False, no_titlebar=False): """ :param title: text to display in eleemnt :type title: (str) @@ -11685,7 +11685,7 @@ def OneLineProgressMeter(title, current_value, max_value, key, *args, orientatio :type current_value: (int) :param max_value: max value of QuickMeter :type max_value: (int) - :param key: Used with window.FindElement and with return values to uniquely identify this element + :param key: Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters :type key: Union[str, int, tuple] :param *args: stuff to output :type *args: (Any) @@ -11717,7 +11717,7 @@ def OneLineProgressMeter(title, current_value, max_value, key, *args, orientatio return rc == METER_OK -def OneLineProgressMeterCancel(key): +def OneLineProgressMeterCancel(key='OK for 1 meter'): """ Cancels and closes a previously created One Line Progress Meter window diff --git a/PySimpleGUIQt/PySimpleGUIQt.py b/PySimpleGUIQt/PySimpleGUIQt.py index 68ac7991..170a9915 100644 --- a/PySimpleGUIQt/PySimpleGUIQt.py +++ b/PySimpleGUIQt/PySimpleGUIQt.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -version = __version__ = "0.35.0.4 Unreleased\nMassive update of docstrings (thanks nngogol), default for slider tick interval set automatically now, margins added to Window but not yet hooked up, VSeparator added (spelling error), added Radio.reset_group and removed clearing all when one of them is cleared (recent change)" +version = __version__ = "0.35.0.5 Unreleased\nMassive update of docstrings (thanks nngogol), default for slider tick interval set automatically now, margins added to Window but not yet hooked up, VSeparator added (spelling error), added Radio.reset_group and removed clearing all when one of them is cleared (recent change), added default key for one_line_progress_meter" port = 'PySimpleGUIQt' @@ -7034,7 +7034,7 @@ class QuickMeter(object): return self.stat_messages -def OneLineProgressMeter(title, current_value, max_value, key, *args, orientation='v', bar_color=(None, None), +def OneLineProgressMeter(title, current_value, max_value, key='OK for 1 meter', *args, orientation='v', bar_color=(None, None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, border_width=None, grab_anywhere=False): """ :param orientation: 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') @@ -7063,7 +7063,7 @@ def OneLineProgressMeter(title, current_value, max_value, key, *args, orientatio OneLineProgressMeter.exit_reasons = getattr(OneLineProgressMeter,'exit_reasons', QuickMeter.exit_reasons) return rc == METER_OK -def OneLineProgressMeterCancel(key): +def OneLineProgressMeterCancel(key='OK for 1 meter'): try: meter = QuickMeter.active_meters[key] meter.window.Close() diff --git a/PySimpleGUIWeb/PySimpleGUIWeb.py b/PySimpleGUIWeb/PySimpleGUIWeb.py index e562ee6c..13632616 100644 --- a/PySimpleGUIWeb/PySimpleGUIWeb.py +++ b/PySimpleGUIWeb/PySimpleGUIWeb.py @@ -1,6 +1,6 @@ #usr/bin/python3 -version = __version__ = "0.39.0.1 Unreleased\n , VSeparator added (spelling error)" +version = __version__ = "0.39.0.2 Unreleased\n , VSeparator added (spelling error), added default key for one_line_progress_meter" port = 'PySimpleGUIWeb' @@ -5554,7 +5554,7 @@ _one_line_progress_meters = {} # ============================== OneLineProgressMeter =====# -def OneLineProgressMeter(title, current_value, max_value, key, *args, orientation=None, bar_color=(None, None), +def OneLineProgressMeter(title, current_value, max_value, key='OK for 1 meter', *args, orientation=None, bar_color=(None, None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, border_width=None, grab_anywhere=False): global _one_line_progress_meters @@ -5596,7 +5596,7 @@ def OneLineProgressMeter(title, current_value, max_value, key, *args, orientatio return rc # return whatever the update told us -def OneLineProgressMeterCancel(key): +def OneLineProgressMeterCancel(key='OK for 1 meter'): global _one_line_progress_meters try: diff --git a/PySimpleGUIWx/PySimpleGUIWx.py b/PySimpleGUIWx/PySimpleGUIWx.py index cd20d5c1..15112c90 100644 --- a/PySimpleGUIWx/PySimpleGUIWx.py +++ b/PySimpleGUIWx/PySimpleGUIWx.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -version = __version__ = "0.17.1.2 Unreleased\n VSeparator added (spelling error), Radio.reset_group added and removed the clearing all when one cleared" +version = __version__ = "0.17.1.3 Unreleased\n VSeparator added (spelling error), Radio.reset_group added and removed the clearing all when one cleared, added default key for one_line_progress_meter" port = 'PySimpleGUIWx' @@ -5639,7 +5639,7 @@ class QuickMeter(object): return self.stat_messages -def OneLineProgressMeter(title, current_value, max_value, key, *args, orientation='v', bar_color=(None, None), +def OneLineProgressMeter(title, current_value, max_value, key='OK for 1 meter', *args, orientation='v', bar_color=(None, None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, border_width=None, grab_anywhere=False): if key not in QuickMeter.active_meters: meter = QuickMeter(title, current_value, max_value, key, *args, orientation=orientation, bar_color=bar_color, @@ -5652,7 +5652,7 @@ def OneLineProgressMeter(title, current_value, max_value, key, *args, orientatio OneLineProgressMeter.exit_reasons = getattr(OneLineProgressMeter,'exit_reasons', QuickMeter.exit_reasons) return rc == METER_OK -def OneLineProgressMeterCancel(key): +def OneLineProgressMeterCancel(key='OK for 1 meter'): try: meter = QuickMeter.active_meters[key] meter.window.Close()