[Aptitude-svn-commit] r3487 - in branches/aptitude-0.3/aptitude: . src/vscreen
Daniel Burrows
dburrows@costa.debian.org
Mon, 27 Jun 2005 21:43:06 +0000
Author: dburrows
Date: Mon Jun 27 21:43:04 2005
New Revision: 3487
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/vscreen/vs_statuschoice.cc
branches/aptitude-0.3/aptitude/src/vscreen/vs_statuschoice.h
Log:
Convert vs_statuschoice::handle_char to vs_statuschoice::handle_key.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Mon Jun 27 21:43:04 2005
@@ -1,5 +1,10 @@
2005-06-27 Daniel Burrows <dburrows@debian.org>
+ * src/vscreen/vs_statuschoice.h:
+
+ Convert vs_statuschoice::handle_char to
+ vs_statuschoice::handle_key.
+
* src/vscreen/vs_passthrough.cc, src/vscreen/vs_passthrough.h:
Convert vs_passthrough::handle_char to
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_statuschoice.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_statuschoice.cc (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_statuschoice.cc Mon Jun 27 21:43:04 2005
@@ -27,27 +27,27 @@
using namespace std;
-bool vs_statuschoice::handle_char(chtype ch)
+bool vs_statuschoice::handle_key(const key &k)
{
- if(bindings->key_matches(ch, "Confirm"))
+ if(bindings->key_matches(k, "Confirm"))
{
chosen(0);
destroy();
return true;
}
- else if(bindings->key_matches(ch, "Cancel"))
+ else if(bindings->key_matches(k, "Cancel"))
{
destroy();
return true;
}
- else if(ch>255)
+ else if(k.function_key)
{
beep();
return true;
}
else
{
- std::string::size_type where=choices.find((char) ch);
+ std::string::size_type where=choices.find((char) k.ch);
if(where==string::npos)
beep();
else
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_statuschoice.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_statuschoice.h (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_statuschoice.h Mon Jun 27 21:43:04 2005
@@ -43,7 +43,7 @@
// to be the "default".
protected:
- bool handle_char(chtype ch);
+ bool handle_key(const key &k);
public:
vs_statuschoice(const std::string &_prompt, const std::string &_choices)
:vscreen_widget(), prompt(_prompt), choices(_choices)