From 3845f0de660159fe2050f8caefb9895eb54e3b14 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Mon, 6 Dec 2021 08:52:41 -0500 Subject: [PATCH] Fixed logging github issue problem with overall and python years swapped --- DemoPrograms/Demo_Post_An_Issue.py | 28 ++++++++++++++++------------ PySimpleGUI.py | 6 ++++-- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/DemoPrograms/Demo_Post_An_Issue.py b/DemoPrograms/Demo_Post_An_Issue.py index 8af8cbe2..02aab51c 100644 --- a/DemoPrograms/Demo_Post_An_Issue.py +++ b/DemoPrograms/Demo_Post_An_Issue.py @@ -12,10 +12,10 @@ import urllib.parse """ -def make_markdown(issue_type, operating_system, os_ver, psg_port, psg_ver, gui_ver, python_ver, - python_exp, prog_exp, used_gui, gui_notes, - cb_docs, cb_demos, cb_demo_port, cb_readme_other, cb_command_line, cb_issues, cb_github, - detailed_desc, code,): +def _github_issue_post_make_markdown(issue_type, operating_system, os_ver, psg_port, psg_ver, gui_ver, python_ver, + python_exp, prog_exp, used_gui, gui_notes, + cb_docs, cb_demos, cb_demo_port, cb_readme_other, cb_command_line, cb_issues, cb_github, + detailed_desc, code, ): body = \ """ ### Type of Issue (Enhancement, Error, Bug, Question) @@ -108,7 +108,7 @@ This pre-formatted code block is all set for you to paste in your bit of code: -def make_github_link(title, body): +def _github_issue_post_make_github_link(title, body): pysimplegui_url = "https://github.com/PySimpleGUI/PySimpleGUI" pysimplegui_issues = f"{pysimplegui_url}/issues/new?" @@ -119,7 +119,7 @@ def make_github_link(title, body): ######################################################################################################### -def validate(values, checklist, issue_types): +def _github_issue_post_validate(values, checklist, issue_types): issue_type = None for itype in issue_types: if values[itype]: @@ -303,9 +303,12 @@ def main_open_github_issue(): # [sg.Frame('Details',frame_details, font=font_frame, k='-FRAME DETAILS-')], # [sg.Frame('Minimum Code to Duplicate',frame_code, font=font_frame, k='-FRAME CODE-')], [sg.Text(size=(12,1), key='-OUT-')], - [sg.B('Post Issue'), sg.B('Create Markdown Only'), sg.B('Quit')]] + ] - layout = [[sg.Pane([sg.Col(top_layout), sg.Col(bottom_layout)])]] + layout_pane = sg.Pane([sg.Col(top_layout), sg.Col(bottom_layout)], key='-PANE-') + + layout = [[layout_pane], + [sg.Col([[sg.B('Post Issue'), sg.B('Create Markdown Only'), sg.B('Quit')]], expand_x=False, expand_y=False)]] window = sg.Window('Open A GitHub Issue', layout, finalize=True, resizable=True, enable_close_attempted_event=False) for i in range(len(checklist)): @@ -314,6 +317,7 @@ def main_open_github_issue(): window['-ML CODE-'].expand(True, True, True) window['-ML DETAILS-'].expand(True, True, True) window['-ML MARKDOWN-'].expand(True, True, True) + window['-PANE-'].expand(True, True, True) # window['-FRAME CODE-'].expand(True, True, True) # window['-FRAME DETAILS-'].expand(True, True, True) @@ -365,13 +369,13 @@ def main_open_github_issue(): continue checkboxes = ['X' if values[('-CB-', i)] else ' ' for i in range(len(checklist))] - if not validate(values, checklist, issue_types): + if not _github_issue_post_validate(values, checklist, issue_types): continue - markdown = make_markdown(issue_type, operating_system, os_ver, 'tkinter', values['-VER PSG-'], values['-VER TK-'], values['-VER PYTHON-'], - values['-EXP PROG-'], values['-EXP PYTHON-'], 'Yes' if values['-CB PRIOR GUI-'] else 'No', values['-EXP NOTES-'], *checkboxes, values['-ML DETAILS-'], values['-ML CODE-'] ) + markdown = _github_issue_post_make_markdown(issue_type, operating_system, os_ver, 'tkinter', values['-VER PSG-'], values['-VER TK-'], values['-VER PYTHON-'], + values['-EXP PYTHON-'], values['-EXP PROG-'], 'Yes' if values['-CB PRIOR GUI-'] else 'No', values['-EXP NOTES-'], *checkboxes, values['-ML DETAILS-'], values['-ML CODE-']) window['-ML MARKDOWN-'].update(markdown) - link = make_github_link(values['-TITLE-'], window['-ML MARKDOWN-'].get()) + link = _github_issue_post_make_github_link(values['-TITLE-'], window['-ML MARKDOWN-'].get()) if event == 'Post Issue': webbrowser.open_new_tab(link) else: diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 732816e9..64f3fcb9 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -version = __version__ = "4.55.1.15 Unreleased" +version = __version__ = "4.55.1.16 Unreleased" _change_log = """ Changelog since 4.55.1 released to PyPI on 7-Nov-2021 @@ -50,6 +50,8 @@ _change_log = """ New update parms - image_source, image_size, image_subsample - enables the initial image to be changed to a new one 4.55.1.15 Fix in sdk_help - crashed if asked for summary view of Titlebar or MenubarCustom because they're not classes + 4.55.1.16 + Fix in open github issue - the python experience and overall experience values were swapped. """ __version__ = version.split()[0] # For PEP 396 and PEP 345 @@ -22303,7 +22305,7 @@ def main_open_github_issue(): markdown = _github_issue_post_make_markdown(issue_type, operating_system, os_ver, 'tkinter', values['-VER PSG-'], values['-VER TK-'], values['-VER PYTHON-'], - values['-EXP PROG-'], values['-EXP PYTHON-'], 'Yes' if values['-CB PRIOR GUI-'] else 'No', + values['-EXP PYTHON-'],values['-EXP PROG-'], 'Yes' if values['-CB PRIOR GUI-'] else 'No', values['-EXP NOTES-'], **cb_dict) window['-ML MARKDOWN-'].update(markdown)