[Aptitude-svn-commit] r3457 - in branches/aptitude-0.3/aptitude: . src/vscreen

Daniel Burrows dburrows@costa.debian.org
Sun, 26 Jun 2005 16:54:08 +0000


Author: dburrows
Date: Sun Jun 26 16:54:05 2005
New Revision: 3457

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/vscreen/vscreen.cc
Log:
Use get_wch instead of getch

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sun Jun 26 16:54:05 2005
@@ -1,5 +1,10 @@
 2005-06-26  Daniel Burrows  <dburrows@debian.org>
 
+	* src/vscreen/vscreen.cc:
+
+	  Use get_wch() instead of getch() -- this will need to be
+	  propagated into the vscreen_widget hierarchy.
+
 	* src/vscreen/curses++.h:
 
 	  Doh, make it compile (forgot to #undef the macros and dropped

Modified: branches/aptitude-0.3/aptitude/src/vscreen/vscreen.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vscreen.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vscreen.cc	Sun Jun 26 16:54:05 2005
@@ -490,22 +490,23 @@
 
   if(toplevel)
     {
-      chtype ch;
+      wint_t wch = 0;
+      int status;
 
       do
 	{
 	  toplevel->win.nodelay(true);
-	  ch=toplevel->win.getch();
+	  status = toplevel->win.get_wch(&wch);
 	  toplevel->win.nodelay(false);
-	} while(ch==(chtype) KEY_RESIZE);
+	} while(wch==(wint_t) KEY_RESIZE);
 
       sigprocmask(SIG_BLOCK, &signals, &prevsignals);
 
-      if(ch!=(chtype) ERR)
+      if(status != ERR)
 	{
-	  rval=true;
+	  rval = true;
 
-	  if(ch==KEY_MOUSE)
+	  if(wch == KEY_MOUSE)
 	    {
 	      MEVENT ev;
 	      getmouse(&ev);
@@ -517,11 +518,11 @@
 		  vscreen_tryupdate();
 		}
 	    }
-	  else if(global_bindings.key_matches(ch, "Refresh"))
+	  else if(global_bindings.key_matches(wch, "Refresh"))
 	    vscreen_redraw();
 	  else if(toplevel)
 	    {
-	      toplevel->dispatch_char(ch);
+	      toplevel->dispatch_char(wch);
 	      main_hook();
 	      vscreen_tryupdate();
 	    }