[Aptitude-devel] r3143 - in branches/aptitude-0.3/aptitude: . src/vscreen/config
Daniel Burrows
dburrows@costa.debian.org
Wed, 27 Apr 2005 12:47:10 +0000
Author: dburrows
Date: Wed Apr 27 12:47:07 2005
New Revision: 3143
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/vscreen/config/keybindings.cc
branches/aptitude-0.3/aptitude/src/vscreen/config/keybindings.h
Log:
Fix the declaration of the new keyname function.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Wed Apr 27 12:47:07 2005
@@ -1,5 +1,9 @@
2005-04-27 Daniel Burrows <dburrows@debian.org>
+ * src/vscreen/config/keybindings.cc, src/vscreen/config/keybindings.h:
+
+ Oops, properly declare the new keyname function.
+
* src/broken_indicator.cc, src/solution_dialog.cc, src/ui.cc, src/vscreen/testvscreen.cc, src/vscreen/vs_menu.cc:
Use the readable_keyname function as appropriate.
Modified: branches/aptitude-0.3/aptitude/src/vscreen/config/keybindings.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/config/keybindings.cc (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/config/keybindings.cc Wed Apr 27 12:47:07 2005
@@ -387,7 +387,7 @@
}
// Doesn't return all available bindings as that gets way too long.
-string keybindings::keyname(string tag)
+string keybindings::keyname(const string &tag)
{
hash_map<string, keybinding>::iterator found=keymap.find(tag);
@@ -397,7 +397,7 @@
return "";
}
-string keybindings::readable_keyname(string tag)
+string keybindings::readable_keyname(const string &tag)
{
hash_map<string, keybinding>::iterator found=keymap.find(tag);
Modified: branches/aptitude-0.3/aptitude/src/vscreen/config/keybindings.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/config/keybindings.h (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/config/keybindings.h Wed Apr 27 12:47:07 2005
@@ -56,7 +56,16 @@
public:
keybindings(keybindings *_parent=NULL):parent(_parent) {}
- std::string keyname(std::string tag);
+ /** \return the first binding of the given key, in a form suitable
+ * for inclusion in a config file.
+ */
+ std::string keyname(const std::string &tag);
+
+
+ /** \return a human-readable string identifying the given keystroke
+ * (as opposed to 'keyname', which is a strict reverse mapping).
+ */
+ std::string readable_keyname(const std::string &tag);
keybinding get(std::string tag)
// Returns the keybinding for the given string. Almost never needed.
@@ -91,11 +100,6 @@
std::string keyname(chtype ch);
// Returns a string identifying the given keystroke.
-/** \return a human-readable string identifying the given keystroke
- * (as opposed to 'keyname', which is a strict reverse mapping).
- */
-std::string readable_keyname(chtype ch);
-
extern keybindings global_bindings;
// For now, this is where the global bindings are stored (I might want to move
// it in the future, hmmm..)