|
|
|
@ -35,7 +35,7 @@ def show_pictures(files):
|
|
|
|
|
subprocess.call(files)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def search_pictures(win, path):
|
|
|
|
|
def search_pictures(out, path):
|
|
|
|
|
files = sorted([str(f) for f in path.iterdir() if f.is_file() and f.suffix.lower() in ['.png', '.jpg', '.jpeg', '.gif']])
|
|
|
|
|
return show_pictures(files)
|
|
|
|
|
|
|
|
|
@ -45,7 +45,11 @@ def show_select(win, base_dir, path):
|
|
|
|
|
dirs = sorted([d for d in path.iterdir() if d.is_dir()])
|
|
|
|
|
win.clear()
|
|
|
|
|
if len(dirs) <= 0:
|
|
|
|
|
return search_pictures(win, path)
|
|
|
|
|
x_size = win.getmaxyx()[1]
|
|
|
|
|
def out(text):
|
|
|
|
|
win.addstr(3, 1, stretch(text, x_size - 2))
|
|
|
|
|
win.refresh()
|
|
|
|
|
return search_pictures(out, path)
|
|
|
|
|
sel = 0
|
|
|
|
|
while True:
|
|
|
|
|
for y, d in enumerate(dirs):
|
|
|
|
|