[Aptitude-devel] r3142 - in branches/aptitude-0.3/aptitude: . src src/vscreen
Daniel Burrows
dburrows@costa.debian.org
Wed, 27 Apr 2005 12:45:20 +0000
Author: dburrows
Date: Wed Apr 27 12:45:17 2005
New Revision: 3142
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/broken_indicator.cc
branches/aptitude-0.3/aptitude/src/solution_dialog.cc
branches/aptitude-0.3/aptitude/src/ui.cc
branches/aptitude-0.3/aptitude/src/vscreen/testvscreen.cc
branches/aptitude-0.3/aptitude/src/vscreen/vs_menu.cc
Log:
Use readable_keyname.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Wed Apr 27 12:45:17 2005
@@ -1,5 +1,9 @@
2005-04-27 Daniel Burrows <dburrows@debian.org>
+ * 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.
+
* src/vscreen/config/keybindings.cc, src/vscreen/config/keybindings.h:
Add a 'readable_keyname' function, whose current useful feature
Modified: branches/aptitude-0.3/aptitude/src/broken_indicator.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/broken_indicator.cc (original)
+++ branches/aptitude-0.3/aptitude/src/broken_indicator.cc Wed Apr 27 12:45:17 2005
@@ -85,10 +85,10 @@
return;
}
- string next=global_bindings.keyname("NextSolution");
- string prev=global_bindings.keyname("PrevSolution");
- string examine=global_bindings.keyname("ExamineSolution");
- string apply=global_bindings.keyname("ApplySolution");
+ string next=global_bindings.readable_keyname("NextSolution");
+ string prev=global_bindings.readable_keyname("PrevSolution");
+ string examine=global_bindings.readable_keyname("ExamineSolution");
+ string apply=global_bindings.readable_keyname("ApplySolution");
// try to retrieve the current solution to show information about
// it.
Modified: branches/aptitude-0.3/aptitude/src/solution_dialog.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/solution_dialog.cc (original)
+++ branches/aptitude-0.3/aptitude/src/solution_dialog.cc Wed Apr 27 12:45:17 2005
@@ -105,7 +105,7 @@
catch(NoMoreTime)
{
set_fragment(fragf(_("Time exhausted while searching for a solution (you can select \"Next Solution\" or press %s to try harder)."),
- global_bindings.keyname("NextSolution").c_str()));
+ global_bindings.readable_keyname("NextSolution").c_str()));
}
}
};
Modified: branches/aptitude-0.3/aptitude/src/ui.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.cc (original)
+++ branches/aptitude-0.3/aptitude/src/ui.cc Wed Apr 27 12:45:17 2005
@@ -859,7 +859,7 @@
catch(NoMoreTime)
{
show_message(attr_fragment(fragf(_("Ran out of time while trying to resolver dependencies (press \"%s\" to try harder)"),
- global_bindings.keyname("NextSolution").c_str()),
+ global_bindings.readable_keyname("NextSolution").c_str()),
get_color("Error")),
NULL);
}
@@ -1636,11 +1636,11 @@
main_table->show();
// FIXME: highlight the keys.
- string menu_key=global_bindings.keyname("ToggleMenuActive"),
- help_key=global_bindings.keyname("Help"),
- quit_key=global_bindings.keyname("Quit"),
- update_key=global_bindings.keyname("UpdatePackageList"),
- install_key=global_bindings.keyname("DoInstallRun");
+ string menu_key=global_bindings.readable_keyname("ToggleMenuActive"),
+ help_key=global_bindings.readable_keyname("Help"),
+ quit_key=global_bindings.readable_keyname("Quit"),
+ update_key=global_bindings.readable_keyname("UpdatePackageList"),
+ install_key=global_bindings.readable_keyname("DoInstallRun");
char buf[512];
snprintf(buf, 512, _("%s: Menu %s: Help %s: Quit %s: Update %s: Download/Install/Remove Pkgs"),
Modified: branches/aptitude-0.3/aptitude/src/vscreen/testvscreen.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/testvscreen.cc (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/testvscreen.cc Wed Apr 27 12:45:17 2005
@@ -58,7 +58,7 @@
bool handle_char(chtype ch)
{
- set_text(keyname(ch));
+ set_text(readable_keyname(ch));
return true;
}
};
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vs_menu.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vs_menu.cc (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vs_menu.cc Wed Apr 27 12:45:17 2005
@@ -138,7 +138,7 @@
if(newitem->get_binding().empty())
shortcutsize=0;
else
- shortcutsize=global_bindings.keyname(newitem->get_binding()).size()+1;
+ shortcutsize=global_bindings.readable_keyname(newitem->get_binding()).size()+1;
req_width=max<int>(menusize+2+shortcutsize,req_width);
}
@@ -382,7 +382,7 @@
mvaddch(1+i, width-1, ACS_VLINE);
string title=items[i]->get_title();
- string righttext=items[i]->get_binding().empty()?"":global_bindings.keyname(items[i]->get_binding());
+ string righttext=items[i]->get_binding().empty()?"":global_bindings.readable_keyname(items[i]->get_binding());
bool enabled=items[i]->is_enabled();