commit
706acf5c91
|
@ -3,6 +3,7 @@ import subprocess
|
|||
import sys
|
||||
import mmap, re
|
||||
import warnings
|
||||
|
||||
import PySimpleGUI as sg
|
||||
|
||||
|
||||
|
@ -434,7 +435,7 @@ def make_window():
|
|||
|
||||
|
||||
left_col = sg.Column([
|
||||
[sg.Listbox(values=get_file_list(), select_mode=sg.SELECT_MODE_EXTENDED, size=(50,20), key='-DEMO LIST-')],
|
||||
[sg.Listbox(values=get_file_list(), select_mode=sg.SELECT_MODE_EXTENDED, size=(50,20), bind_return_key=True, key='-DEMO LIST-')],
|
||||
[sg.Text('Filter (F1):', tooltip=filter_tooltip), sg.Input(size=(25, 1), enable_events=True, key='-FILTER-', tooltip=filter_tooltip),
|
||||
sg.T(size=(15,1), k='-FILTER NUMBER-')],
|
||||
[sg.Button('Run'), sg.B('Edit'), sg.B('Clear'), sg.B('Open Folder')],
|
||||
|
@ -476,10 +477,6 @@ def make_window():
|
|||
window.bind('<F1>', '-FOCUS FILTER-')
|
||||
window.bind('<F2>', '-FOCUS FIND-')
|
||||
window.bind('<F3>', '-FOCUS RE FIND-')
|
||||
if sg.user_settings_get_entry('-dclick runs-'):
|
||||
window['-DEMO LIST-'].bind('<Double-Button-1>', '+Run+')
|
||||
elif sg.user_settings_get_entry('-dclick edits-'):
|
||||
window['-DEMO LIST-'].bind('<Double-Button-1>', '+Edit+')
|
||||
if not advanced_mode():
|
||||
window['-FOLDER CHOOSE-'].update(visible=False)
|
||||
window['-RE COL-'].update(visible=False)
|
||||
|
@ -512,7 +509,12 @@ def main():
|
|||
counter += 1
|
||||
if event in (sg.WINDOW_CLOSED, 'Exit'):
|
||||
break
|
||||
if event == 'Edit' or event.endswith('+Edit+'):
|
||||
if event == '-DEMO LIST-': # if double clicked (used the bind return key parm)
|
||||
if sg.user_settings_get_entry('-dclick runs-'):
|
||||
event = 'Run'
|
||||
elif sg.user_settings_get_entry('-dclick edits-'):
|
||||
event = 'Edit'
|
||||
if event == 'Edit':
|
||||
editor_program = get_editor()
|
||||
for file in values['-DEMO LIST-']:
|
||||
if find_in_file.file_list_dict is not None:
|
||||
|
@ -534,15 +536,15 @@ def main():
|
|||
# else:
|
||||
# sg.execute_editor(full_filename)
|
||||
else:
|
||||
sg.cprint('Editing canclled')
|
||||
elif event == 'Run' or event.endswith('+Run+'):
|
||||
sg.cprint('Editing canceled')
|
||||
elif event == 'Run':
|
||||
sg.cprint('Running....', c='white on green', end='')
|
||||
sg.cprint('')
|
||||
for file in values['-DEMO LIST-']:
|
||||
file_to_run = str(file_list_dict[file])
|
||||
sg.cprint(file_to_run,text_color='white', background_color='purple')
|
||||
try:
|
||||
sp = execute_py_file(f'{file_to_run}', pipe_output=values['-WAIT-'])
|
||||
sp = execute_py_file(file_to_run, pipe_output=values['-WAIT-'])
|
||||
except TypeError:
|
||||
sg.cprint('Consider upgrading to a newer PySimpleGUI.... 4.37.0 has better execution controls', c='white on red')
|
||||
sp = execute_py_file_with_pipe_output(f'{file_to_run}', pipe_output=values['-WAIT-'])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python3
|
||||
version = __version__ = "4.39.1.14 Unreleased\nfix for TCL error when scrolling col element (Jason99020 scores again!), Button error popups with trace when bad images found, addition of size parameter to TabGroup, changed where key gets set for buttons - was causing problems with buttons that set a key explicitly, fix for grraph drag events that was caused by the realtime button fix, one more fix for realtimebutton problem, Checkbox.get now returns bool, Button gets mouseover_colors parm, fix for Debug window, changed the console message when using the word default in the theme, set ColorChooser target default to match other chooser buttons, fix for SystemDefaultForReal theme right click menu, reworked the Issues GUI to fit on smaller screens, fixed extend_layout so key counter not restarted, hopefully last fix for COLOR_SYSTEM_DEFAULTS problem. New theme GrayGrayGray for those that insist, added back popup_annoying, popup_no_border, popup_no_frame, popup_no_wait, popup_timed, sgprint, sgprint_close"
|
||||
version = __version__ = "4.39.1.15 Unreleased\nfix for TCL error when scrolling col element (Jason99020 scores again!), Button error popups with trace when bad images found, addition of size parameter to TabGroup, changed where key gets set for buttons - was causing problems with buttons that set a key explicitly, fix for grraph drag events that was caused by the realtime button fix, one more fix for realtimebutton problem, Checkbox.get now returns bool, Button gets mouseover_colors parm, fix for Debug window, changed the console message when using the word default in the theme, set ColorChooser target default to match other chooser buttons, fix for SystemDefaultForReal theme right click menu, reworked the Issues GUI to fit on smaller screens, fixed extend_layout so key counter not restarted, hopefully last fix for COLOR_SYSTEM_DEFAULTS problem. New theme GrayGrayGray for those that insist, added back popup_annoying, popup_no_border, popup_no_frame, popup_no_wait, popup_timed, sgprint, sgprint_close, MENU_RIGHT_CLICK_EXIT constant to get an Exit only right click menu, fix for Window.extend_layout when a scrollable column is used"
|
||||
|
||||
__version__ = version.split()[0] # For PEP 396 and PEP 345
|
||||
|
||||
|
@ -487,7 +487,8 @@ WRITE_ONLY_KEY = '__WRITE ONLY__'
|
|||
MENU_DISABLED_CHARACTER = '!'
|
||||
MENU_SHORTCUT_CHARACTER = '&'
|
||||
MENU_KEY_SEPARATOR = '::'
|
||||
MENU_RIGHT_CLICK_EDITME_EXIT = ['_', ['Edit Me', 'Exit']]
|
||||
MENU_RIGHT_CLICK_EDITME_EXIT = ['', ['Edit Me', 'Exit']]
|
||||
MENU_RIGHT_CLICK_EXIT = ['', ['Exit']]
|
||||
MENU_RIGHT_CLICK_DISABLED = [[]]
|
||||
ENABLE_TK_WINDOWS = False
|
||||
|
||||
|
@ -8070,6 +8071,8 @@ Normally a tuple, but can be a simplified-dual-color-string "foreground on backg
|
|||
column = Column(rows, pad=(0,0))
|
||||
if self == container:
|
||||
frame = self.TKroot
|
||||
elif isinstance(container.Widget, TkScrollableFrame):
|
||||
frame = container.Widget.TKFrame
|
||||
else:
|
||||
frame = container.Widget
|
||||
PackFormIntoFrame(column, frame, self)
|
||||
|
|
Loading…
Reference in New Issue