NeoMutt  2025-12-11-949-g4870ee
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions_sidebar.c
Go to the documentation of this file.
1
23
29
30#include "config.h"
31#include <stdbool.h>
32#include <string.h>
33#include "private.h"
34#include "mutt/lib.h"
35#include "config/lib.h"
36#include "core/lib.h"
37#include "gui/lib.h"
38#include "functions_sidebar.h"
39#include "lib.h"
40#include "editor/lib.h"
41#include "index/lib.h"
42#include "key/lib.h"
43#include "menu/lib.h"
44#include "functions_fuzzy.h"
45#include "module_data.h"
46
47// clang-format off
51static const struct MenuFuncOp OpSidebar[] = { /* map: sidebar */
52 { "sidebar-first", OP_SIDEBAR_FIRST },
53 { "sidebar-last", OP_SIDEBAR_LAST },
54 { "sidebar-next", OP_SIDEBAR_NEXT },
55 { "sidebar-next-new", OP_SIDEBAR_NEXT_NEW },
56 { "sidebar-open", OP_SIDEBAR_OPEN },
57 { "sidebar-page-down", OP_SIDEBAR_PAGE_DOWN },
58 { "sidebar-page-up", OP_SIDEBAR_PAGE_UP },
59 { "sidebar-prev", OP_SIDEBAR_PREV },
60 { "sidebar-prev-new", OP_SIDEBAR_PREV_NEW },
61 { "sidebar-start-search", OP_SIDEBAR_START_SEARCH },
62 { "sidebar-toggle-virtual", OP_SIDEBAR_TOGGLE_VIRTUAL },
63 { "sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE },
64 { NULL, 0 },
65};
66
70const struct MenuOpSeq SidebarDefaultBindings[] = { /* map: sidebar */
71 { 0, NULL },
72};
73// clang-format on
74
78void sidebar_init_keys(struct NeoMutt *n, struct SubMenu *sm_generic)
79{
81 ASSERT(mod_data);
82
83 struct MenuDefinition *md = NULL;
84 struct SubMenu *sm = NULL;
85 struct SubMenu *sm_editor = editor_get_submenu();
86 ASSERT(sm_editor);
87
89 md = km_register_menu(MENU_SIDEBAR, "sidebar");
90 km_menu_add_submenu(md, sm);
91 km_menu_add_submenu(md, sm_editor);
93
94 mod_data->md_sidebar = md;
95 mod_data->sm_sidebar = sm;
96}
97
103{
105 ASSERT(mod_data);
106
107 return mod_data->sm_sidebar;
108}
109
115bool sb_next(struct SidebarWindowData *wdata)
116{
117 struct SbEntry **sbep = NULL;
118 ARRAY_FOREACH_FROM(sbep, &wdata->entries, wdata->hil_index + 1)
119 {
120 if (!(*sbep)->is_hidden)
121 {
122 wdata->hil_index = ARRAY_FOREACH_IDX_sbep;
123 return true;
124 }
125 }
126
127 return false;
128}
129
137static bool sb_next_n(struct SidebarWindowData *wdata, int count)
138{
139 int orig = wdata->hil_index;
140 for (int i = 0; i < count; i++)
141 {
142 if (!sb_next(wdata))
143 break;
144 }
145 return (wdata->hil_index != orig);
146}
147
155static bool sb_prev_n(struct SidebarWindowData *wdata, int count)
156{
157 int orig = wdata->hil_index;
158 for (int i = 0; i < count; i++)
159 {
160 if (!sb_prev(wdata))
161 break;
162 }
163 return (wdata->hil_index != orig);
164}
165
174static struct SbEntry **sb_next_new(struct SidebarWindowData *wdata, size_t begin, size_t end)
175{
176 struct SbEntry **sbep = NULL;
177 ARRAY_FOREACH_FROM_TO(sbep, &wdata->entries, begin, end)
178 {
179 if ((*sbep)->mailbox->has_new || ((*sbep)->mailbox->msg_unread != 0))
180 return sbep;
181 }
182 return NULL;
183}
184
190bool sb_prev(struct SidebarWindowData *wdata)
191{
192 struct SbEntry **sbep = NULL, **prev = NULL;
193 ARRAY_FOREACH_TO(sbep, &wdata->entries, wdata->hil_index)
194 {
195 if (!(*sbep)->is_hidden)
196 prev = sbep;
197 }
198
199 if (prev)
200 {
201 wdata->hil_index = ARRAY_IDX(&wdata->entries, prev);
202 return true;
203 }
204
205 return false;
206}
207
216static struct SbEntry **sb_prev_new(struct SidebarWindowData *wdata, size_t begin, size_t end)
217{
218 struct SbEntry **sbep = NULL, **prev = NULL;
219 ARRAY_FOREACH_FROM_TO(sbep, &wdata->entries, begin, end)
220 {
221 if ((*sbep)->mailbox->has_new || ((*sbep)->mailbox->msg_unread != 0))
222 prev = sbep;
223 }
224
225 return prev;
226}
227
228// -----------------------------------------------------------------------------
229
233int op_sidebar_first(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
234{
235 struct SidebarWindowData *wdata = fdata->wdata;
236 if (!mutt_window_is_visible(wdata->win))
237 return FR_NO_ACTION;
238
239 if (ARRAY_EMPTY(&wdata->entries) || (wdata->hil_index < 0))
240 return FR_NO_ACTION;
241
242 int orig_hil_index = wdata->hil_index;
243
244 wdata->hil_index = 0;
245 if ((*ARRAY_GET(&wdata->entries, wdata->hil_index))->is_hidden)
246 if (!sb_next(wdata))
247 wdata->hil_index = orig_hil_index;
248
249 if (orig_hil_index == wdata->hil_index)
250 return FR_NO_ACTION;
251
252 wdata->win->actions |= WA_RECALC;
253 return FR_SUCCESS;
254}
255
259int op_sidebar_last(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
260{
261 struct SidebarWindowData *wdata = fdata->wdata;
262 if (!mutt_window_is_visible(wdata->win))
263 return FR_NO_ACTION;
264
265 if (ARRAY_EMPTY(&wdata->entries) || (wdata->hil_index < 0))
266 return FR_NO_ACTION;
267
268 int orig_hil_index = wdata->hil_index;
269
270 wdata->hil_index = ARRAY_SIZE(&wdata->entries);
271 if (!sb_prev(wdata))
272 wdata->hil_index = orig_hil_index;
273
274 if (orig_hil_index == wdata->hil_index)
275 return FR_NO_ACTION;
276
277 wdata->win->actions |= WA_RECALC;
278 return FR_SUCCESS;
279}
280
284int op_sidebar_next(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
285{
286 struct SidebarWindowData *wdata = fdata->wdata;
287 if (!mutt_window_is_visible(wdata->win))
288 return FR_NO_ACTION;
289
290 if (ARRAY_EMPTY(&wdata->entries) || (wdata->hil_index < 0))
291 return FR_NO_ACTION;
292
293 const int count = event->count;
294 if (count > 0)
295 {
296 if (!sb_next_n(wdata, count))
297 return FR_NO_ACTION;
298 }
299 else
300 {
301 if (!sb_next(wdata))
302 {
303 mutt_message(_("You are on the last entry"));
304 return FR_ERROR;
305 }
306 }
307
308 wdata->win->actions |= WA_RECALC;
309 return FR_SUCCESS;
310}
311
317static int op_sidebar_next_new(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
318{
319 struct SidebarWindowData *wdata = fdata->wdata;
320 if (!mutt_window_is_visible(wdata->win))
321 return FR_NO_ACTION;
322
323 const size_t max_entries = ARRAY_SIZE(&wdata->entries);
324 if ((max_entries == 0) || (wdata->hil_index < 0))
325 return FR_NO_ACTION;
326
327 const int count = MAX(event->count, 1);
328 const bool c_sidebar_next_new_wrap = cs_subset_bool(fdata->n->sub, "sidebar_next_new_wrap");
329 int orig_hil_index = wdata->hil_index;
330
331 for (int i = 0; i < count; i++)
332 {
333 struct SbEntry **sbep = NULL;
334 if ((sbep = sb_next_new(wdata, wdata->hil_index + 1, max_entries)) ||
335 (c_sidebar_next_new_wrap && (sbep = sb_next_new(wdata, 0, wdata->hil_index))))
336 {
337 wdata->hil_index = ARRAY_IDX(&wdata->entries, sbep);
338 }
339 else
340 {
341 break;
342 }
343 }
344
345 if (wdata->hil_index == orig_hil_index)
346 return FR_NO_ACTION;
347
348 wdata->win->actions |= WA_RECALC;
349 return FR_SUCCESS;
350}
351
355int op_sidebar_open(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
356{
357 struct SidebarWindowData *wdata = fdata->wdata;
358 struct MuttWindow *win_sidebar = wdata->win;
359 if (!mutt_window_is_visible(win_sidebar))
360 return FR_NO_ACTION;
361
362 struct MuttWindow *dlg = dialog_find(win_sidebar);
363 index_change_folder(dlg, sb_get_highlight(win_sidebar));
364 return FR_SUCCESS;
365}
366
370int op_sidebar_page_down(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
371{
372 struct SidebarWindowData *wdata = fdata->wdata;
373 if (!mutt_window_is_visible(wdata->win))
374 return FR_NO_ACTION;
375
376 if (ARRAY_EMPTY(&wdata->entries) || (wdata->bot_index < 0))
377 return FR_NO_ACTION;
378
379 int orig_hil_index = wdata->hil_index;
380 const int page_size = wdata->win->state.rows;
381 const int count = MAX(event->count, 1);
382
383 if (!sb_next_n(wdata, count * page_size))
384 return FR_NO_ACTION;
385
386 /* If we landed on a hidden entry, go up to the last unhidden one */
387 if ((*ARRAY_GET(&wdata->entries, wdata->hil_index))->is_hidden)
388 sb_prev(wdata);
389
390 if (orig_hil_index == wdata->hil_index)
391 return FR_NO_ACTION;
392
393 wdata->repage = true;
394 wdata->win->actions |= WA_RECALC;
395 return FR_SUCCESS;
396}
397
401int op_sidebar_page_up(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
402{
403 struct SidebarWindowData *wdata = fdata->wdata;
404 if (!mutt_window_is_visible(wdata->win))
405 return FR_NO_ACTION;
406
407 if (ARRAY_EMPTY(&wdata->entries) || (wdata->top_index < 0))
408 return FR_NO_ACTION;
409
410 int orig_hil_index = wdata->hil_index;
411 const int page_size = wdata->win->state.rows;
412 const int count = MAX(event->count, 1);
413
414 if (!sb_prev_n(wdata, count * page_size))
415 return FR_NO_ACTION;
416
417 /* If we landed on a hidden entry, go down to the last unhidden one */
418 if ((*ARRAY_GET(&wdata->entries, wdata->hil_index))->is_hidden)
419 sb_next(wdata);
420
421 if (orig_hil_index == wdata->hil_index)
422 return FR_NO_ACTION;
423
424 wdata->repage = true;
425 wdata->win->actions |= WA_RECALC;
426 return FR_SUCCESS;
427}
428
432int op_sidebar_prev(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
433{
434 struct SidebarWindowData *wdata = fdata->wdata;
435 if (!mutt_window_is_visible(wdata->win))
436 return FR_NO_ACTION;
437
438 if (ARRAY_EMPTY(&wdata->entries) || (wdata->hil_index < 0))
439 return FR_NO_ACTION;
440
441 const int count = event->count;
442 if (count > 0)
443 {
444 if (!sb_prev_n(wdata, count))
445 return FR_NO_ACTION;
446 }
447 else
448 {
449 if (!sb_prev(wdata))
450 {
451 mutt_message(_("You are on the first entry"));
452 return FR_ERROR;
453 }
454 }
455
456 wdata->win->actions |= WA_RECALC;
457 return FR_SUCCESS;
458}
459
465static int op_sidebar_prev_new(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
466{
467 struct SidebarWindowData *wdata = fdata->wdata;
468 if (!mutt_window_is_visible(wdata->win))
469 return FR_NO_ACTION;
470
471 const size_t max_entries = ARRAY_SIZE(&wdata->entries);
472 if ((max_entries == 0) || (wdata->hil_index < 0))
473 return FR_NO_ACTION;
474
475 const int count = MAX(event->count, 1);
476 const bool c_sidebar_next_new_wrap = cs_subset_bool(fdata->n->sub, "sidebar_next_new_wrap");
477 int orig_hil_index = wdata->hil_index;
478
479 for (int i = 0; i < count; i++)
480 {
481 struct SbEntry **sbep = NULL;
482 if ((sbep = sb_prev_new(wdata, 0, wdata->hil_index)) ||
483 (c_sidebar_next_new_wrap &&
484 (sbep = sb_prev_new(wdata, wdata->hil_index + 1, max_entries))))
485 {
486 wdata->hil_index = ARRAY_IDX(&wdata->entries, sbep);
487 }
488 else
489 {
490 break;
491 }
492 }
493
494 if (wdata->hil_index == orig_hil_index)
495 return FR_NO_ACTION;
496
497 wdata->win->actions |= WA_RECALC;
498 return FR_SUCCESS;
499}
500
505 const struct KeyEvent *event)
506{
507 bool_str_toggle(fdata->n->sub, "sidebar_visible", NULL);
508 mutt_window_reflow(NULL);
509 return FR_SUCCESS;
510}
511
516 const struct KeyEvent *event)
517{
518 return FR_SUCCESS;
519}
520
521// -----------------------------------------------------------------------------
522
526static const struct SidebarFunction SidebarFunctions[] = {
527 // clang-format off
528 { OP_SIDEBAR_FIRST, op_sidebar_first },
529 { OP_SIDEBAR_LAST, op_sidebar_last },
530 { OP_SIDEBAR_NEXT, op_sidebar_next },
531 { OP_SIDEBAR_NEXT_NEW, op_sidebar_next_new },
532 { OP_SIDEBAR_OPEN, op_sidebar_open },
533 { OP_SIDEBAR_PAGE_DOWN, op_sidebar_page_down },
534 { OP_SIDEBAR_PAGE_UP, op_sidebar_page_up },
535 { OP_SIDEBAR_PREV, op_sidebar_prev },
536 { OP_SIDEBAR_PREV_NEW, op_sidebar_prev_new },
537 { OP_SIDEBAR_START_SEARCH, op_sidebar_start_search },
538 { OP_SIDEBAR_TOGGLE_VIRTUAL, op_sidebar_toggle_virtual },
539 { OP_SIDEBAR_TOGGLE_VISIBLE, op_sidebar_toggle_visible },
540 { 0, NULL },
541 // clang-format on
542};
543
547int sb_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
548{
549 if (!event || !win || !win->wdata)
550 return FR_UNKNOWN;
551
552 const int op = event->op;
553
555
556 struct SidebarFunctionData fdata = {
557 .n = NeoMutt,
558 .mod_data = mod_data,
559 .wdata = win->wdata,
560 };
561
562 int rc = FR_UNKNOWN;
563 for (size_t i = 0; SidebarFunctions[i].op != OP_NULL; i++)
564 {
565 const struct SidebarFunction *fn = &SidebarFunctions[i];
566 if (fn->op == op)
567 {
568 rc = fn->function(&fdata, event);
569 break;
570 }
571 }
572
573 if (rc == FR_UNKNOWN) // Not our function
574 return rc;
575
576 const char *result = dispatcher_get_retval_name(rc);
577 mutt_debug(LL_DEBUG1, "Handled %s (%d) -> %s\n", opcodes_get_name(op), op, NONULL(result));
578
580 return rc;
581}
#define ARRAY_IDX(head, elem)
Return the index of an element of the array.
Definition array.h:324
#define ARRAY_EMPTY(head)
Check if an array is empty.
Definition array.h:74
#define ARRAY_FOREACH_TO(elem, head, to)
Iterate from the beginning to an index.
Definition array.h:247
#define ARRAY_SIZE(head)
The number of elements stored.
Definition array.h:87
#define ARRAY_FOREACH_FROM(elem, head, from)
Iterate from an index to the end.
Definition array.h:235
#define ARRAY_GET(head, idx)
Return the element at index.
Definition array.h:109
#define ARRAY_FOREACH_FROM_TO(elem, head, from, to)
Iterate between two indexes.
Definition array.h:261
int bool_str_toggle(struct ConfigSubset *sub, const char *name, struct Buffer *err)
Toggle the value of a bool.
Definition bool.c:231
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition helpers.c:47
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
Definition dialog.c:89
const char * dispatcher_get_retval_name(int rv)
Get the name of a return value.
Definition dispatcher.c:55
void dispatcher_flush_on_error(int rv)
Flush pending keys after a dispatch error.
Definition dispatcher.c:65
@ FR_SUCCESS
Valid function - successfully performed.
Definition dispatcher.h:40
@ FR_UNKNOWN
Unknown function.
Definition dispatcher.h:34
@ FR_ERROR
Valid function - error occurred.
Definition dispatcher.h:39
@ FR_NO_ACTION
Valid function - no action performed.
Definition dispatcher.h:38
void index_change_folder(struct MuttWindow *dlg, struct Mailbox *m)
Change the current folder, cautiously.
Definition dlg_index.c:1490
struct SubMenu * editor_get_submenu(void)
Get the Editor SubMenu.
Definition functions.c:587
Edit a string.
Sidebar fuzzy search functions.
static const struct SidebarFunction SidebarFunctions[]
All the NeoMutt functions that the Sidebar supports.
const struct MenuOpSeq SidebarDefaultBindings[]
Key bindings for the Sidebar Window.
bool sb_prev(struct SidebarWindowData *wdata)
Find the previous unhidden Mailbox.
void sidebar_init_keys(struct NeoMutt *n, struct SubMenu *sm_generic)
Initialise the Sidebar Keybindings - Implements ::init_keys_api.
static struct SbEntry ** sb_prev_new(struct SidebarWindowData *wdata, size_t begin, size_t end)
Return the previous mailbox with new messages.
struct SubMenu * sidebar_get_submenu(void)
Get the Sidebar SubMenu.
static bool sb_next_n(struct SidebarWindowData *wdata, int count)
Move down N unhidden Mailboxes, capping at the last.
bool sb_next(struct SidebarWindowData *wdata)
Find the next unhidden Mailbox.
static bool sb_prev_n(struct SidebarWindowData *wdata, int count)
Move up N unhidden Mailboxes, capping at the first.
static const struct MenuFuncOp OpSidebar[]
Functions for the Sidebar Window.
static struct SbEntry ** sb_next_new(struct SidebarWindowData *wdata, size_t begin, size_t end)
Return the next mailbox with new messages.
Sidebar functions.
int sb_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform a Sidebar function - Implements function_dispatcher_t -.
#define mutt_message(...)
Definition logging2.h:93
#define mutt_debug(LEVEL,...)
Definition logging2.h:91
int op_sidebar_start_search(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the last unhidden mailbox - Implements sidebar_function_t -.
int op_sidebar_open(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Open highlighted mailbox - Implements sidebar_function_t -.
int op_sidebar_page_down(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the first entry in the next page of mailboxes - Implements sidebar_function_t -.
int op_sidebar_prev(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the previous unhidden mailbox - Implements sidebar_function_t -.
int op_sidebar_page_up(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the last entry in the previous page of mailboxes - Implements sidebar_function_t -.
static int op_sidebar_toggle_visible(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Make the sidebar (in)visible - Implements sidebar_function_t -.
static int op_sidebar_toggle_virtual(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Deprecated - Implements sidebar_function_t -.
int op_sidebar_next(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the next unhidden mailbox - Implements sidebar_function_t -.
int op_sidebar_first(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the first unhidden mailbox - Implements sidebar_function_t -.
static int op_sidebar_next_new(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the next new mailbox - Implements sidebar_function_t -.
static int op_sidebar_prev_new(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the previous new mailbox - Implements sidebar_function_t -.
int op_sidebar_last(struct SidebarFunctionData *fdata, const struct KeyEvent *event)
Selects the last unhidden mailbox - Implements sidebar_function_t -.
Convenience wrapper for the gui headers.
GUI manage the main index (list of emails)
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
Definition init.c:123
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
Definition init.c:88
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
Definition init.c:105
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
Definition init.c:136
Manage keymappings.
@ LL_DEBUG1
Log at debug level 1.
Definition logging2.h:45
#define MAX(a, b)
Return the maximum of two values.
Definition memory.h:38
GUI present the user with a selectable list.
@ MODULE_ID_SIDEBAR
ModuleSidebar, Sidebar
Definition module_api.h:93
Convenience wrapper for the library headers.
#define _(a)
Definition message.h:28
bool mutt_window_is_visible(struct MuttWindow *win)
Is the Window visible?
void mutt_window_reflow(struct MuttWindow *win)
Resize a Window and its children.
@ WA_RECALC
Recalculate the contents of the Window.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:666
const char * opcodes_get_name(int op)
Get the name of an opcode.
Definition opcodes.c:48
GUI display the mailboxes in a side panel.
Sidebar private Module data.
GUI display the mailboxes in a side panel.
struct Mailbox * sb_get_highlight(struct MuttWindow *win)
Get the Mailbox that's highlighted in the sidebar.
Definition sidebar.c:73
#define ASSERT(COND)
Definition signal2.h:59
#define NONULL(x)
Definition string2.h:44
An event such as a keypress.
Definition get.h:75
int count
Optional count prefix, e.g. 3 for 3j
Definition get.h:78
Functions for a Dialog or Window.
Definition menudef.h:44
Mapping between a function and an operation.
Definition menu.h:37
Mapping between an operation and a key sequence.
Definition menu.h:47
void * wdata
Private data.
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.
Container for Accounts, Notifications.
Definition neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:49
Info about folders in the sidebar.
Definition private.h:40
Data passed to Sidebar worker functions.
struct SidebarWindowData * wdata
Sidebar window data.
struct NeoMutt * n
NeoMutt application data.
struct SidebarModuleData * mod_data
Sidebar module data.
A NeoMutt function.
int op
Op code, e.g. OP_SIDEBAR_NEXT.
sidebar_function_t function
Function to call.
Sidebar private Module data.
Definition module_data.h:32
struct MenuDefinition * md_sidebar
Sidebar Menu Definition.
Definition module_data.h:34
struct SubMenu * sm_sidebar
Sidebar functions.
Definition module_data.h:35
Sidebar private Window data -.
Definition private.h:89
int hil_index
Highlighted mailbox.
Definition private.h:96
struct MuttWindow * win
Sidebar Window.
Definition private.h:90
struct SbEntryArray entries
Items to display in the sidebar.
Definition private.h:92
Collection of related functions.
Definition menudef.h:33
@ MENU_SIDEBAR
Sidebar menu.
Definition type.h:51