summaryrefslogtreecommitdiff
path: root/dselect
diff options
context:
space:
mode:
authorAdam Heath <doogie@debian.org>2000-12-24 12:01:31 +0000
committerAdam Heath <doogie@debian.org>2000-12-24 12:01:31 +0000
commit7d0fda8105375d37134f751310f4d67615e4adfd (patch)
treed3e2019439aa19c7420cc0792195105329410970 /dselect
parent41299c25a882a287c0d2f2c67c62af6dc744c108 (diff)
downloaddpkg-7d0fda8105375d37134f751310f4d67615e4adfd.tar.gz
Made the accelerator keys in dselect's main menu separate options, so that
they can be translated separately.
Diffstat (limited to 'dselect')
-rw-r--r--dselect/main.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/dselect/main.cc b/dselect/main.cc
index 57853e10e..eda42bc54 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -60,20 +60,21 @@ int expertmode = 0;
static keybindings packagelistbindings(packagelist_kinterps,packagelist_korgbindings);
struct menuentry {
+ const char *key;
const char *option;
const char *menuent;
urqfunction *fn;
};
static const menuentry menuentries[]= {
- { N_("access"), N_("Choose the access method to use."), &urq_setup },
- { N_("update"), N_("Update list of available packages, if possible."), &urq_update },
- { N_("select"), N_("Request which packages you want on your system."), &urq_list },
- { N_("install"), N_("Install and upgrade wanted packages."), &urq_install },
- { N_("config"), N_("Configure any packages that are unconfigured."), &urq_config },
- { N_("remove"), N_("Remove unwanted software."), &urq_remove },
- { N_("quit"), N_("Quit dselect."), &urq_quit },
- { N_("menu"), 0, &urq_menu },
+ { N_("a"), N_("[A]ccess"), N_("Choose the access method to use."), &urq_setup },
+ { N_("u"), N_("[U]pdate"), N_("Update list of available packages, if possible."), &urq_update },
+ { N_("s"), N_("[S]elect"), N_("Request which packages you want on your system."), &urq_list },
+ { N_("i"), N_("[I]nstall"), N_("Install and upgrade wanted packages."), &urq_install },
+ { N_("c"), N_("[C]onfig"), N_("Configure any packages that are unconfigured."), &urq_config },
+ { N_("r"), N_("[R]emove"), N_("Remove unwanted software."), &urq_remove },
+ { N_("q"), N_("[Q]uit"), N_("Quit dselect."), &urq_quit },
+ { 0, N_("menu"), 0, &urq_menu },
{ 0 }
};
@@ -194,10 +195,9 @@ urqresult urq_list(void) {
void dme(int i, int so) {
char buf[120];
const menuentry *me= &menuentries[i];
- const char* option = gettext(me->option);
- sprintf(buf," %c %d. [%c]%-10.10s %-80.80s ",
+ sprintf(buf," %c %d. %-11.11s %-80.80s ",
so ? '*' : ' ', i,
- toupper(option[0]), option+1,
+ me->option,
gettext(me->menuent));
int y,x;
@@ -287,7 +287,7 @@ urqresult urq_menu(void) {
}
} else if (isalpha(c)) {
c= tolower(c);
- for (i=0; i<entries && gettext(menuentries[i].option)[0] != c; i++);
+ for (i=0; i<entries && gettext(menuentries[i].key)[0] != c; i++);
if (i < entries) {
dme(cursor,0); cursor=i; dme(cursor,1);
} else {