diff options
| -rw-r--r-- | taler2.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -135,6 +135,7 @@ class Withdrawal: taler_qrcode: tk.Label withdrawal: Withdrawal | None bank: TalerBank +pollcount: int = 0 def startwin(): global root @@ -169,6 +170,8 @@ def startwin(): main_taler = tk.Frame(master=root) def main_start_button_func(): + global pollcount + pollcount = 0 main_start.place_forget() main_scan.place(relx=0, rely=0, relwidth=1, relheight=1) main_start_button = tk.Button(master=main_start, command=main_start_button_func, text="Click here to start", font=font) @@ -217,9 +220,10 @@ def main(): image.resize((200,200)) image = ImageTk.PhotoImage(image.resize((200,200))) taler_qrcode.configure(image = image, width = 200, height = 200) + global pollcount pollcount = 0 while withdrawal.poll(): - if pollcount > 500: + if pollcount > 30: withdrawal.end() pollcount += 1 main_scan.place_forget() |
