summaryrefslogtreecommitdiff
path: root/src/notify.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2014-05-18 09:47:19 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2014-05-18 11:07:27 +0200
commit2a15531bb9df283060e0eb0e7e93ecf33e494b4d (patch)
treec2bfb323789bf43123e70ec209cb18533914e4ad /src/notify.c
parenta5f3e53ce3b1e99058bf75d6dfddfec3c9c95768 (diff)
downloadcalcurse-2a15531bb9df283060e0eb0e7e93ecf33e494b4d.zip
Add support for caption rows in list boxes
This adds support for rows that cannot be selected. Such rows can be used for section headings and the like. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/notify.c')
-rw-r--r--src/notify.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/notify.c b/src/notify.c
index 1adaded..532bd01 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -658,6 +658,11 @@ static void print_config_option(int i, WINDOW *win, int y, int hilt, void *cb_da
custom_remove_attr(win, ATTR_HIGHEST);
}
+static enum listbox_row_type config_option_row_type(int i, void *cb_data)
+{
+ return LISTBOX_ROW_TEXT;
+}
+
static int config_option_height(int i, void *cb_data)
{
return 3;
@@ -761,7 +766,9 @@ void notify_config_bar(void)
int ch;
clear();
- listbox_init(&lb, 0, 0, notify_bar() ? row - 3 : row - 2, col, _("notification options"), config_option_height, print_config_option);
+ listbox_init(&lb, 0, 0, notify_bar() ? row - 3 : row - 2, col,
+ _("notification options"), config_option_row_type,
+ config_option_height, print_config_option);
listbox_load_items(&lb, 8);
listbox_draw_deco(&lb, 0);
status_mesg("", "");