Added versioning info. Added button to global settings
This commit is contained in:
parent
58b9f79d33
commit
3d95bc52e9
|
@ -1,5 +1,5 @@
|
||||||
import PySimpleGUI as sg
|
import PySimpleGUI as sg
|
||||||
|
import sys
|
||||||
"""
|
"""
|
||||||
Compare 2 .py files using PyCharm's compare utility
|
Compare 2 .py files using PyCharm's compare utility
|
||||||
If you use PyCharm, then you've likely used their awesome
|
If you use PyCharm, then you've likely used their awesome
|
||||||
|
@ -10,14 +10,17 @@ import PySimpleGUI as sg
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
layout = [[sg.T('This is your layout')],
|
layout = [[sg.T('Choose 2 files to compare using PyCharm\'s compare utility', font='_ 18')],
|
||||||
[sg.Text('Filename:'), sg.Combo(values=sorted(sg.user_settings_get_entry('-filenames1-', [])),
|
[sg.Text('Filename:'), sg.Combo(values=sorted(sg.user_settings_get_entry('-filenames1-', [])),
|
||||||
default_value=sg.user_settings_get_entry('-last filename chosen1-', None),
|
default_value=sg.user_settings_get_entry('-last filename chosen1-', None),
|
||||||
size=(40,1), auto_size_text=False, k='-COMBO1-'), sg.FileBrowse(), sg.B('Clear History', k='-CLEAR1-')],
|
size=(90,1), auto_size_text=False, k='-COMBO1-'), sg.FileBrowse(), sg.B('Clear History', k='-CLEAR1-')],
|
||||||
[sg.Text('Filename:'),sg.Combo(values=sorted(sg.user_settings_get_entry('-filenames2-', [])),
|
[sg.Text('Filename:'),sg.Combo(values=sorted(sg.user_settings_get_entry('-filenames2-', [])),
|
||||||
default_value=sg.user_settings_get_entry('-last filename chosen2-', None),
|
default_value=sg.user_settings_get_entry('-last filename chosen2-', None),
|
||||||
size=(40,1), auto_size_text=False, k='-COMBO2-'), sg.FileBrowse(), sg.B('Clear History', k='-CLEAR2-')],
|
size=(90,1), auto_size_text=False, k='-COMBO2-'), sg.FileBrowse(), sg.B('Clear History', k='-CLEAR2-')],
|
||||||
[sg.Button('Compare'), sg.Button('Exit')]]
|
[sg.Button('Compare'), sg.Button('Exit'), sg.T('PySimpleGUI ver ' + sg.version.split(' ')[0] + ' tkinter ver ' + sg.tclversion_detailed + 'Python ver ' + sys.version, font='Default 8', pad=(0,0))],
|
||||||
|
[sg.Text('Note - You must setup the PyCharm information using PySimpleGUI global settings')],
|
||||||
|
[sg.Button('Global Settings')]
|
||||||
|
]
|
||||||
|
|
||||||
window = sg.Window('Compare 2 files using PyCharm', layout)
|
window = sg.Window('Compare 2 files using PyCharm', layout)
|
||||||
while True:
|
while True:
|
||||||
|
@ -40,6 +43,8 @@ def main():
|
||||||
sg.user_settings_set_entry('-filenames2-', [])
|
sg.user_settings_set_entry('-filenames2-', [])
|
||||||
sg.user_settings_set_entry('-last filename chosen2-', '')
|
sg.user_settings_set_entry('-last filename chosen2-', '')
|
||||||
window['-COMBO2-'].update(values=[], value='')
|
window['-COMBO2-'].update(values=[], value='')
|
||||||
|
elif event == 'Global Settings':
|
||||||
|
sg.main_global_pysimplegui_settings()
|
||||||
window.close()
|
window.close()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue