🚧 Save session to app

This commit is contained in:
Shikiryu
2023-06-02 09:38:35 +02:00
parent 25314fde08
commit e2546c7bfb
2 changed files with 11 additions and 5 deletions

View File

@@ -12,7 +12,9 @@ from src.window.session import SessionWindow
class App:
def __init__(self, root):
super().__init__()
self.custom = False
self.config = Config()
self.session = None
self.session_window = None
self.image_window = None
self.root = root
@@ -41,7 +43,6 @@ class App:
t = i
new_button = Button(self.button_frame, text=Util.format_seconds(t),
command=partial(self.set_timer_in_seconds, t))
self.buttons.append(new_button)
self.button_frame.columnconfigure(i, weight=1)
new_button.grid(row=0, column=i, sticky=W + E)
@@ -72,7 +73,7 @@ class App:
self.check_lets_draw()
def check_lets_draw(self):
if self.selected_folder != "" and len(self.found_images) > 0 and self.timer != 0:
if self.selected_folder != "" and len(self.found_images) > 0 and (self.timer != 0 or self.custom):
self.launch_button.config(state="normal")
else:
self.launch_button.config(state="disabled")
@@ -85,3 +86,7 @@ class App:
else:
button.config(bg="gray85")
self.check_lets_draw()
def set_custom(self, list_in_session):
self.custom = True
self.list_in_session = list_in_session