Changeset 139
- Timestamp:
- 04/14/08 04:04:15 (6 months ago)
- Files:
-
- sucrose/trunk/python/keypad_tk.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sucrose/trunk/python/keypad_tk.py
r134 r139 14 14 class TkinterUI(user_interface.UserInterface): 15 15 def update(self, tray): 16 self.reset_idle_timeout() 16 17 for i in self.views: 17 18 if hasattr(i, 'update'): … … 63 64 self.views.append(self.keypad) 64 65 65 # Kill yourself after 30 seconds66 self.window.after(30000,self.destroy)67 66 Tkinter.Button(self.window, text="Cancel", 68 67 font=('helvetica', 24, 'bold'), command=self.destroy).\ … … 70 69 self.window.mainloop() 71 70 71 72 def reset_idle_timeout(self): 73 if hasattr(self, 'timeout_id'): 74 self.window.after_cancel(self.timeout_id) 75 # Kill yourself after 30 seconds 76 self.timeout_id = self.window.after(30000, self.destroy) 72 77 73 78 def switch_view(self, view): … … 77 82 self.view_buttons[view].config(relief=Tkinter.SUNKEN) 78 83 view.grid(row=1, column=0) 84 self.reset_idle_timeout() 79 85 80 86
