From 7cf42c10830c83fd09e3eb23740855526d13f54c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 13 May 2014 21:37:19 +0200 Subject: 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 --- src/notify.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/notify.c') 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); -- cgit v1.2.3-54-g00ecf