aboutsummaryrefslogtreecommitdiffstats
path: root/src/notify.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2014-05-13 21:37:19 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2014-05-18 11:02:59 +0200
commit7cf42c10830c83fd09e3eb23740855526d13f54c (patch)
tree183676408f38183c01c4e6b9885d9538cb29f14a /src/notify.c
parent05ba450c3b58c095b1e4ed206c25654f29a33b5a (diff)
downloadcalcurse-7cf42c10830c83fd09e3eb23740855526d13f54c.tar.gz
calcurse-7cf42c10830c83fd09e3eb23740855526d13f54c.zip
Remove numbers and whitespace from option menus
These are no longer needed since items are no longer accessed via numeric keys. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/notify.c')
-rw-r--r--src/notify.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/notify.c b/src/notify.c
index 541c5ba..c833cd9 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -555,14 +555,13 @@ void notify_start_main_thread(void)
*/
static void
print_option(WINDOW * win, unsigned x, unsigned y, char *name,
- char *valstr, unsigned valbool, char *desc, unsigned num)
+ char *valstr, unsigned valbool, char *desc)
{
- const int XOFF = 4;
const int MAXCOL = col - 3;
int x_opt, len;
- x_opt = x + XOFF + strlen(name);
- mvwprintw(win, y, x, "[%u] %s", num, name);
+ x_opt = x + strlen(name);
+ mvwprintw(win, y, x, "%s", name);
erase_window_part(win, x_opt, y, MAXCOL, y);
if ((len = strlen(valstr)) != 0) {
unsigned maxlen;
@@ -588,8 +587,6 @@ print_option(WINDOW * win, unsigned x, unsigned y, char *name,
/* Print options related to the notify-bar. */
static void print_config_option(int i, WINDOW *win, int y, int hilt, void *cb_data)
{
- const int XORIG = 3;
-
enum { SHOW, DATE, CLOCK, WARN, CMD, NOTIFY_ALL, DMON, DMON_LOG,
NB_OPT };
@@ -654,8 +651,8 @@ static void print_config_option(int i, WINDOW *win, int y, int hilt, void *cb_da
if (hilt)
custom_apply_attr(win, ATTR_HIGHEST);
- print_option(win, XORIG, y, opt[i].name, opt[i].valstr,
- opt[i].valnum, opt[i].desc, i + 1);
+ print_option(win, 1, y, opt[i].name, opt[i].valstr,
+ opt[i].valnum, opt[i].desc);
if (hilt)
custom_remove_attr(win, ATTR_HIGHEST);