WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [PYGRUB] Don't redraw the interactive men

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [PYGRUB] Don't redraw the interactive menu screen if it doesn't need it.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Jan 2007 08:50:10 -0800
Delivery-date: Mon, 22 Jan 2007 08:49:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=