|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [PYGRUB] Don't redraw the interactive men
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1169466545 0
# Node ID 6ce3b486f0d4ecdae6f6cd743137ca78beaa4af1
# Parent 7c455af5998a72953f7e4472ae943cb8794f2e57
[PYGRUB] Don't redraw the interactive menu screen if it doesn't need it.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
tools/pygrub/src/pygrub | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff -r 7c455af5998a -r 6ce3b486f0d4 tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub Sun Jan 21 17:10:58 2007 +0000
+++ b/tools/pygrub/src/pygrub Mon Jan 22 11:49:05 2007 +0000
@@ -400,14 +400,20 @@ class Grub:
%(int(timeout) - mytime))
else:
self.screen.addstr(20, 5, " " * 80)
-
self.fill_entry_list()
+
c = self.screen.getch()
- if mytime != -1:
- mytime += 1
- if mytime >= int(timeout):
- self.isdone = True
- break
+ if c == -1:
+ # Timed out waiting for a keypress
+ if mytime != -1:
+ mytime += 1
+ if mytime >= int(timeout):
+ self.isdone = True
+ break
+ else:
+ # received a keypress: stop the timer
+ mytime = -1
+ self.screen.timeout(-1)
# handle keypresses
if c == ord('c'):
@@ -432,10 +438,8 @@ class Grub:
self.isdone = True
break
elif c == curses.KEY_UP:
- mytime = -1
self.selected_image -= 1
elif c == curses.KEY_DOWN:
- mytime = -1
self.selected_image += 1
# elif c in (ord('q'), 27): # 27 == esc
# self.selected_image = -1
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [PYGRUB] Don't redraw the interactive menu screen if it doesn't need it.,
Xen patchbot-unstable <=
|
|
|
|
|