summaryrefslogtreecommitdiff
path: root/src/custom.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2006-09-03 17:53:26 +0000
committerFrederic Culot <calcurse@culot.org>2006-09-03 17:53:26 +0000
commit3ffab39ccf494599664232b7672b16d12d854fcc (patch)
tree0478628b5d89f679b23f8687dbc05a56363ea6fd /src/custom.c
parentbe0506d5e203cb7bcf2eed14a2fccacf044f2bf9 (diff)
downloadcalcurse-3ffab39ccf494599664232b7672b16d12d854fcc.zip
layout_config() improved, and new layout configurations added
Diffstat (limited to 'src/custom.c')
-rwxr-xr-xsrc/custom.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/custom.c b/src/custom.c
index 4a2ea72..bd19429 100755
--- a/src/custom.c
+++ b/src/custom.c
@@ -1,4 +1,4 @@
-/* $calcurse: custom.c,v 1.1 2006/07/31 21:00:02 culot Exp $ */
+/* $calcurse: custom.c,v 1.2 2006/09/03 17:53:26 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -108,9 +108,11 @@ int layout_config(int layout, int colr)
{
int ch, old_layout;
char *layout_mesg = _("Pick the desired layout on next screen [press ENTER]");
- char *choice_mesg = _("('A'= Appointment panel, 'c'= calendar panel, 't'= todo panel)");
- char *layout_up_mesg = _(" |Ac| |At| |cA| |tA|");
- char *layout_down_mesg = _("[1]|At| [2]|Ac| [3]|tA| [4]|cA|");
+ char *choice_mesg = _("('A'= Appointment panel, 'C'= calendar panel, 'T'= todo panel)");
+ char *layout_up_mesg =
+ _(" AC AT CA TA TC TA CT AT");
+ char *layout_down_mesg =
+ _(" [1]AT [2]AC [3]TA [4]CA [5]TA [6]TC [7]AT [8]CT");
old_layout = layout;
status_mesg(layout_mesg, choice_mesg);
@@ -119,18 +121,8 @@ int layout_config(int layout, int colr)
wnoutrefresh(swin);
doupdate();
while ((ch = wgetch(swin)) != 'q') {
- switch (ch) {
- case '1':
- layout = 1;
- return layout;
- case '2':
- layout = 2;
- return layout;
- case '3':
- layout = 3;
- return layout;
- case '4':
- layout = 4;
+ if ( ch <= '8' && ch >= '1' ) {
+ layout = ch - '0';
return layout;
}
}