NeoMutt  2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.c File Reference

Browser functions. More...

#include "config.h"
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "functions.h"
#include "lib.h"
#include "attach/lib.h"
#include "editor/lib.h"
#include "history/lib.h"
#include "imap/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "nntp/lib.h"
#include "pattern/lib.h"
#include "question/lib.h"
#include "send/lib.h"
#include "globals.h"
#include "module_data.h"
#include "mutt_mailbox.h"
#include "muttlib.h"
#include "mx.h"
#include "nntp/adata.h"
#include "nntp/mdata.h"
#include "private_data.h"
#include "sort.h"
Include dependency graph for functions.c:

Go to the source code of this file.

Functions

static int op_subscribe_pattern (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Subscribe to newsgroups matching a pattern - Implements browser_function_t -.
void browser_init_keys (struct NeoMutt *n, struct SubMenu *sm_generic)
 Initialise the Browser Keybindings - Implements ::init_keys_api.
void destroy_state (struct BrowserState *state)
 Free the BrowserState.
static int browser_add_selection (struct FolderFilePtrArray *ffpa, struct BrowserState *state, struct Menu *menu, bool tagged, int count)
 Build a working set of FolderFile pointers for an action.
static int op_browser_new_file (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Select a new file in this directory - Implements browser_function_t -.
static void browser_apply_subscribe_nntp (struct FolderFilePtrArray *ffpa, struct NntpAccountData *adata, bool subscribe)
 Subscribe/unsubscribe to NNTP newsgroups.
static void browser_apply_subscribe_imap (struct FolderFilePtrArray *ffpa, bool subscribe)
 Subscribe/unsubscribe to IMAP mailboxes.
static int op_browser_subscribe (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Subscribe to current mbox (IMAP/NNTP only) - Implements browser_function_t -.
static int op_browser_tell (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Display the currently selected file's name - Implements browser_function_t -.
static int op_browser_toggle_lsub (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Toggle view all/subscribed mailboxes (IMAP only) - Implements browser_function_t -.
static int op_browser_view_file (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 View file - Implements browser_function_t -.
static struct NntpMboxDatabrowser_apply_catchup (struct FolderFilePtrArray *ffpa, struct Mailbox *m, struct NntpAccountData *adata, bool up)
 (Un)catchup a working set of newsgroups
static int op_catchup (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Mark all articles in newsgroup as read - Implements browser_function_t -.
static int op_change_directory (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Change directories - Implements browser_function_t -.
static int op_create_mailbox (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Create a new mailbox (IMAP only) - Implements browser_function_t -.
static int browser_apply_delete_mailbox (struct FolderFilePtrArray *ffpa, struct BrowserState *state, struct Mailbox *m, int *num_failed)
 Delete a working set of IMAP mailboxes.
static int op_delete_mailbox (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Delete the current mailbox (IMAP only) - Implements browser_function_t -.
static int op_browser_limit (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Limit the browser - Implements browser_function_t -.
static int op_quit (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Save changes and exit this dialog - Implements browser_function_t -.
static int op_jump (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Jump to an index number - Implements browser_function_t -.
static int op_generic_select_entry (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Select the current entry - Implements browser_function_t -.
static int op_load_active (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Load list of all newsgroups from NNTP server - Implements browser_function_t -.
static int op_mailbox_list (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 List mailboxes with new mail - Implements browser_function_t -.
static int op_rename_mailbox (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Rename the current mailbox (IMAP only) - Implements browser_function_t -.
static int op_sort (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Sort messages - Implements browser_function_t -.
static int op_toggle_mailboxes (struct BrowserPrivateData *priv, const struct KeyEvent *event)
 Toggle whether to browse mailboxes or all files - Implements browser_function_t -.
int browser_function_dispatcher (struct MuttWindow *win, const struct KeyEvent *event)
 Perform a Browser function.

Variables

static const struct MenuFuncOp OpBrowser []
 Functions for the file Browser Menu.
static const struct MenuOpSeq BrowserDefaultBindings []
 Key bindings for the file Browser Menu.
static const struct BrowserFunction BrowserFunctions []
 All the NeoMutt functions that the Browser supports.

Detailed Description

Browser functions.

Authors
  • Richard Russon
  • Dennis Schön

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file functions.c.

Function Documentation

◆ browser_init_keys()

void browser_init_keys ( struct NeoMutt * n,
struct SubMenu * sm_generic )

Initialise the Browser Keybindings - Implements ::init_keys_api.

Definition at line 131 of file functions.c.

132{
134 ASSERT(mod_data);
135
136 struct MenuDefinition *md = NULL;
137 struct SubMenu *sm = NULL;
138
140 md = km_register_menu(MENU_BROWSER, "browser");
141 km_menu_add_submenu(md, sm);
142 km_menu_add_submenu(md, sm_generic);
144
145 mod_data->menu_browser = md;
146}
static const struct MenuOpSeq BrowserDefaultBindings[]
Key bindings for the file Browser Menu.
Definition functions.c:106
static const struct MenuFuncOp OpBrowser[]
Functions for the file Browser Menu.
Definition functions.c:69
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
@ MODULE_ID_BROWSER
ModuleBrowser, Mailbox Browser
Definition module_api.h:52
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:666
#define ASSERT(COND)
Definition signal2.h:59
Browser private Module data.
Definition module_data.h:32
struct MenuDefinition * menu_browser
Browser menu definition.
Definition module_data.h:34
Functions for a Dialog or Window.
Definition menudef.h:44
Collection of related functions.
Definition menudef.h:33
@ MENU_BROWSER
General file/mailbox browser.
Definition type.h:39
Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroy_state()

void destroy_state ( struct BrowserState * state)

Free the BrowserState.

Parameters
stateState to free

Frees up the memory allocated for the local-global variables.

Definition at line 154 of file functions.c.

155{
156 struct FolderFile *ff = NULL;
157 ARRAY_FOREACH(ff, &state->entry)
158 {
159 FREE(&ff->name);
160 FREE(&ff->desc);
161 }
162 ARRAY_FREE(&state->entry);
163 FREE(&state->folder);
164}
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
Definition array.h:223
#define ARRAY_FREE(head)
Release all memory.
Definition array.h:209
#define FREE(x)
Free memory and set the pointer to NULL.
Definition memory.h:68
char * folder
Folder name.
Definition lib.h:151
struct BrowserEntryArray entry
Array of files / dirs / mailboxes.
Definition lib.h:149
Browser entry representing a folder/dir.
Definition lib.h:82
char * name
Name of file/dir/mailbox.
Definition lib.h:90
char * desc
Description of mailbox.
Definition lib.h:91
Here is the caller graph for this function:

◆ browser_add_selection()

int browser_add_selection ( struct FolderFilePtrArray * ffpa,
struct BrowserState * state,
struct Menu * menu,
bool tagged,
int count )
static

Build a working set of FolderFile pointers for an action.

Parameters
ffpaFolderFile Array to populate
stateBrowser state (source of entries)
menuMenu
taggedUse tagged entries (tag-prefix)
countRepeat-count (0 or 1 == just the current selection)
Return values
numNumber of entries added

If tagged is true, the array is filled with the tagged entries (in source order) and count is ignored.

Otherwise the array is filled with the current selection and the next count - 1 entries. Overruns are silently capped at the end of the list.

Definition at line 183 of file functions.c.

185{
186 if (!ffpa || !state || !menu)
187 return 0;
188
189 const int max = ARRAY_SIZE(&state->entry);
190
191 if (tagged)
192 {
193 struct FolderFile *ff = NULL;
194 ARRAY_FOREACH(ff, &state->entry)
195 {
196 if (ff->tagged)
197 ARRAY_ADD(ffpa, ff);
198 }
199 }
200 else
201 {
202 const int index = menu_get_index(menu);
203 if ((index < 0) || (index >= max))
204 return 0;
205
206 int n = (count > 1) ? count : 1;
207 if ((index + n) > max)
208 n = max - index;
209
210 for (int i = 0; i < n; i++)
211 {
212 struct FolderFile *ff = ARRAY_GET(&state->entry, index + i);
213 if (ff)
214 ARRAY_ADD(ffpa, ff);
215 }
216 }
217
218 return ARRAY_SIZE(ffpa);
219}
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
Definition array.h:157
#define ARRAY_SIZE(head)
The number of elements stored.
Definition array.h:87
#define ARRAY_GET(head, idx)
Return the element at index.
Definition array.h:109
int menu_get_index(struct Menu *menu)
Get the current selection in the Menu.
Definition menu.c:153
bool tagged
Folder is tagged.
Definition lib.h:106
Here is the call graph for this function:
Here is the caller graph for this function:

◆ browser_apply_subscribe_nntp()

void browser_apply_subscribe_nntp ( struct FolderFilePtrArray * ffpa,
struct NntpAccountData * adata,
bool subscribe )
static

Subscribe/unsubscribe to NNTP newsgroups.

Parameters
ffpaWorking set of FolderFiles
adataNNTP account
subscribetrue to subscribe, false to unsubscribe

Definition at line 251 of file functions.c.

253{
254 if (!ffpa || !adata)
255 return;
256
257 struct FolderFile **ffp = NULL;
258 ARRAY_FOREACH(ffp, ffpa)
259 {
260 struct FolderFile *ff = *ffp;
261 if (!ff || !ff->name)
262 continue;
263 if (subscribe)
264 mutt_newsgroup_subscribe(adata, ff->name);
265 else
267 }
268}
struct NntpMboxData * mutt_newsgroup_subscribe(struct NntpAccountData *adata, char *group)
Subscribe newsgroup.
Definition newsrc.c:1188
struct NntpMboxData * mutt_newsgroup_unsubscribe(struct NntpAccountData *adata, char *group)
Unsubscribe newsgroup.
Definition newsrc.c:1212
Here is the call graph for this function:
Here is the caller graph for this function:

◆ browser_apply_subscribe_imap()

void browser_apply_subscribe_imap ( struct FolderFilePtrArray * ffpa,
bool subscribe )
static

Subscribe/unsubscribe to IMAP mailboxes.

Parameters
ffpaWorking set of FolderFiles
subscribetrue to subscribe, false to unsubscribe

Definition at line 275 of file functions.c.

276{
277 if (!ffpa)
278 return;
279
280 struct Buffer *buf = buf_pool_get();
281 struct FolderFile **ffp = NULL;
282 ARRAY_FOREACH(ffp, ffpa)
283 {
284 struct FolderFile *ff = *ffp;
285 if (!ff || !ff->name)
286 continue;
287 buf_strcpy(buf, ff->name);
288 expand_path(buf, false);
289 imap_subscribe(buf_string(buf), subscribe);
290 }
291 buf_pool_release(&buf);
292}
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition buffer.c:401
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition buffer.h:96
int imap_subscribe(const char *path, bool subscribe)
Subscribe to a mailbox.
Definition imap.c:1413
void expand_path(struct Buffer *buf, bool regex)
Create the canonical path.
Definition muttlib.c:122
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition pool.c:91
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition pool.c:111
String manipulation buffer.
Definition buffer.h:36
Here is the call graph for this function:
Here is the caller graph for this function:

◆ browser_apply_catchup()

struct NntpMboxData * browser_apply_catchup ( struct FolderFilePtrArray * ffpa,
struct Mailbox * m,
struct NntpAccountData * adata,
bool up )
static

(Un)catchup a working set of newsgroups

Parameters
ffpaWorking set of FolderFiles
mMailbox
adataNNTP account
uptrue to catchup, false to uncatchup
Return values
ptrLast NntpMboxData touched (NULL if nothing changed)

Definition at line 470 of file functions.c.

473{
474 if (!ffpa || !adata)
475 return NULL;
476
477 struct NntpMboxData *mdata = NULL;
478 struct FolderFile **ffp = NULL;
479 ARRAY_FOREACH(ffp, ffpa)
480 {
481 struct FolderFile *ff = *ffp;
482 if (!ff || !ff->name)
483 continue;
484 if (up)
485 mdata = mutt_newsgroup_catchup(m, adata, ff->name);
486 else
487 mdata = mutt_newsgroup_uncatchup(m, adata, ff->name);
488 }
489 return mdata;
490}
struct NntpMboxData * mutt_newsgroup_catchup(struct Mailbox *m, struct NntpAccountData *adata, char *group)
Catchup newsgroup.
Definition newsrc.c:1239
struct NntpMboxData * mutt_newsgroup_uncatchup(struct Mailbox *m, struct NntpAccountData *adata, char *group)
Uncatchup newsgroup.
Definition newsrc.c:1278
void * mdata
Driver specific data.
Definition mailbox.h:134
NNTP-specific Mailbox data -.
Definition mdata.h:34
Here is the call graph for this function:
Here is the caller graph for this function:

◆ browser_apply_delete_mailbox()

int browser_apply_delete_mailbox ( struct FolderFilePtrArray * ffpa,
struct BrowserState * state,
struct Mailbox * m,
int * num_failed )
static

Delete a working set of IMAP mailboxes.

Parameters
[in]ffpaWorking set of FolderFiles (ascending source order)
[in]stateBrowser state (source array)
[in]mCurrent mailbox
[out]num_failedNumber of mailbox deletions that failed
Return values
numNumber of mailboxes successfully deleted (and removed from state)

Iterates the working set in reverse so that ARRAY_REMOVE() does not invalidate the pointers we still need.

Definition at line 721 of file functions.c.

724{
725 int deleted = 0;
726 int failed = 0;
727
728 if (ffpa && state)
729 {
730 struct FolderFile **ffp = NULL;
731 ARRAY_FOREACH_REVERSE(ffp, ffpa)
732 {
733 struct FolderFile *ff = *ffp;
734 if (!ff || !ff->name)
735 continue;
736 if (imap_delete_mailbox(m, ff->name) != 0)
737 {
738 failed++;
739 continue;
740 }
741 FREE(&ff->name);
742 FREE(&ff->desc);
743 ARRAY_REMOVE(&state->entry, ff);
744 deleted++;
745 }
746 }
747
748 if (num_failed)
749 *num_failed = failed;
750 return deleted;
751}
#define ARRAY_FOREACH_REVERSE(elem, head)
Iterate backwards over all elements of the array.
Definition array.h:274
#define ARRAY_REMOVE(head, elem)
Remove an entry from the array, shifting down the subsequent entries.
Definition array.h:355
int imap_delete_mailbox(struct Mailbox *m, char *path)
Delete a mailbox.
Definition imap.c:611
Here is the call graph for this function:
Here is the caller graph for this function:

◆ browser_function_dispatcher()

int browser_function_dispatcher ( struct MuttWindow * win,
const struct KeyEvent * event )

Perform a Browser function.

Parameters
winWindow for the Browser
eventEvent to process
Return values
numFunctionRetval, e.g. FR_SUCCESS

Definition at line 1492 of file functions.c.

1493{
1494 // The Dispatcher may be called on any Window in the Dialog
1495 struct MuttWindow *dlg = dialog_find(win);
1496 if (!dlg || !dlg->wdata)
1497 return FR_ERROR;
1498
1499 struct Menu *menu = dlg->wdata;
1500 struct BrowserPrivateData *priv = menu->mdata;
1501 if (!priv)
1502 return FR_ERROR;
1503
1504 int rc = FR_UNKNOWN;
1505 for (size_t i = 0; BrowserFunctions[i].op != OP_NULL; i++)
1506 {
1507 const struct BrowserFunction *fn = &BrowserFunctions[i];
1508 if (fn->op == event->op)
1509 {
1510 rc = fn->function(priv, event);
1511 break;
1512 }
1513 }
1514
1515 return rc;
1516}
static const struct BrowserFunction BrowserFunctions[]
All the NeoMutt functions that the Browser supports.
Definition functions.c:1451
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
Definition dialog.c:89
@ FR_UNKNOWN
Unknown function.
Definition dispatcher.h:34
@ FR_ERROR
Valid function - error occurred.
Definition dispatcher.h:39
A NeoMutt function.
Definition functions.h:49
int op
Op code, e.g. OP_MAIN_LIMIT.
Definition functions.h:50
browser_function_t function
Function to call.
Definition functions.h:51
Private state data for the Browser.
struct Menu * menu
Menu.
int op
Function opcode, e.g. OP_HELP.
Definition get.h:77
Definition lib.h:86
void * mdata
Private data.
Definition lib.h:155
void * wdata
Private data.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ OpBrowser

const struct MenuFuncOp OpBrowser[]
static

Functions for the file Browser Menu.

Definition at line 69 of file functions.c.

69 { /* map: browser */
70 { "catchup", OP_CATCHUP },
71 { "change-dir", OP_CHANGE_DIRECTORY },
72 { "check-new", OP_CHECK_NEW },
73 { "create-mailbox", OP_CREATE_MAILBOX },
74 { "delete-mailbox", OP_DELETE_MAILBOX },
75 { "descend-directory", OP_DESCEND_DIRECTORY },
76 { "display-filename", OP_BROWSER_TELL },
77 { "goto-folder", OP_BROWSER_GOTO_FOLDER },
78 { "goto-home", OP_GOTO_HOME },
79 { "goto-parent", OP_GOTO_PARENT },
80 { "goto-root", OP_GOTO_ROOT },
81 { "limit", OP_BROWSER_LIMIT },
82 { "mailbox-list", OP_MAILBOX_LIST },
83 { "reload-active", OP_LOAD_ACTIVE },
84 { "rename-mailbox", OP_RENAME_MAILBOX },
85 { "select-new", OP_BROWSER_NEW_FILE },
86 { "sort", OP_SORT },
87 { "sort-reverse", OP_SORT_REVERSE },
88 { "subscribe", OP_BROWSER_SUBSCRIBE },
89 { "subscribe-pattern", OP_SUBSCRIBE_PATTERN },
90 { "toggle-mailboxes", OP_TOGGLE_MAILBOXES },
91 { "toggle-subscribed", OP_BROWSER_TOGGLE_LSUB },
92 { "uncatchup", OP_UNCATCHUP },
93 { "unsubscribe", OP_BROWSER_UNSUBSCRIBE },
94 { "unsubscribe-pattern", OP_UNSUBSCRIBE_PATTERN },
95 { "view-file", OP_BROWSER_VIEW_FILE },
96
97 // Deprecated
98 { "enter-mask", OP_BROWSER_LIMIT, MFF_DEPRECATED },
99 { "buffy-list", OP_MAILBOX_LIST, MFF_DEPRECATED },
100 { NULL, 0 },
101};
@ MFF_DEPRECATED
Function is deprecated.
Definition get.h:67

◆ BrowserDefaultBindings

const struct MenuOpSeq BrowserDefaultBindings[]
static
Initial value:
= {
{ OP_BROWSER_GOTO_FOLDER, "=" },
{ OP_BROWSER_NEW_FILE, "N" },
{ OP_BROWSER_SUBSCRIBE, "s" },
{ OP_BROWSER_TELL, "@" },
{ OP_BROWSER_TOGGLE_LSUB, "T" },
{ OP_BROWSER_UNSUBSCRIBE, "u" },
{ OP_BROWSER_VIEW_FILE, " " },
{ OP_CHANGE_DIRECTORY, "c" },
{ OP_CREATE_MAILBOX, "C" },
{ OP_DELETE_MAILBOX, "d" },
{ OP_BROWSER_LIMIT, "m" },
{ OP_GOTO_PARENT, "p" },
{ OP_MAILBOX_LIST, "." },
{ OP_RENAME_MAILBOX, "r" },
{ OP_SORT, "o" },
{ OP_SORT_REVERSE, "O" },
{ OP_TOGGLE_MAILBOXES, "\t" },
{ 0, NULL },
}

Key bindings for the file Browser Menu.

Definition at line 106 of file functions.c.

106 { /* map: browser */
107 { OP_BROWSER_GOTO_FOLDER, "=" },
108 { OP_BROWSER_NEW_FILE, "N" },
109 { OP_BROWSER_SUBSCRIBE, "s" },
110 { OP_BROWSER_TELL, "@" },
111 { OP_BROWSER_TOGGLE_LSUB, "T" },
112 { OP_BROWSER_UNSUBSCRIBE, "u" },
113 { OP_BROWSER_VIEW_FILE, " " }, // <Space>
114 { OP_CHANGE_DIRECTORY, "c" },
115 { OP_CREATE_MAILBOX, "C" },
116 { OP_DELETE_MAILBOX, "d" },
117 { OP_BROWSER_LIMIT, "m" },
118 { OP_GOTO_PARENT, "p" },
119 { OP_MAILBOX_LIST, "." },
120 { OP_RENAME_MAILBOX, "r" },
121 { OP_SORT, "o" },
122 { OP_SORT_REVERSE, "O" },
123 { OP_TOGGLE_MAILBOXES, "\t" }, // <Tab>
124 { 0, NULL },
125};

◆ BrowserFunctions

const struct BrowserFunction BrowserFunctions[]
static

All the NeoMutt functions that the Browser supports.

Definition at line 1451 of file functions.c.

1451 {
1452 // clang-format off
1453 { OP_BROWSER_GOTO_FOLDER, op_toggle_mailboxes },
1454 { OP_BROWSER_LIMIT, op_browser_limit },
1455 { OP_BROWSER_NEW_FILE, op_browser_new_file },
1456 { OP_BROWSER_SUBSCRIBE, op_browser_subscribe },
1457 { OP_BROWSER_TELL, op_browser_tell },
1458 { OP_BROWSER_TOGGLE_LSUB, op_browser_toggle_lsub },
1459 { OP_BROWSER_UNSUBSCRIBE, op_browser_subscribe },
1460 { OP_BROWSER_VIEW_FILE, op_browser_view_file },
1461 { OP_CATCHUP, op_catchup },
1462 { OP_CHANGE_DIRECTORY, op_change_directory },
1463 { OP_CHECK_NEW, op_toggle_mailboxes },
1464 { OP_CREATE_MAILBOX, op_create_mailbox },
1465 { OP_DELETE_MAILBOX, op_delete_mailbox },
1466 { OP_DESCEND_DIRECTORY, op_generic_select_entry },
1467 { OP_EXIT, op_quit },
1468 { OP_GENERIC_SELECT_ENTRY, op_generic_select_entry },
1469 { OP_GOTO_HOME, op_change_directory },
1470 { OP_GOTO_PARENT, op_change_directory },
1471 { OP_GOTO_ROOT, op_change_directory },
1472 { OP_LOAD_ACTIVE, op_load_active },
1473 { OP_MAILBOX_LIST, op_mailbox_list },
1474 { OP_QUIT, op_quit },
1475 { OP_RENAME_MAILBOX, op_rename_mailbox },
1476 { OP_SORT, op_sort },
1477 { OP_SORT_REVERSE, op_sort },
1478 { OP_SUBSCRIBE_PATTERN, op_subscribe_pattern },
1479 { OP_TOGGLE_MAILBOXES, op_toggle_mailboxes },
1480 { OP_UNCATCHUP, op_catchup },
1481 { OP_UNSUBSCRIBE_PATTERN, op_subscribe_pattern },
1482 { 0, NULL },
1483 // clang-format on
1484};
static int op_quit(struct AliasFunctionData *fdata, const struct KeyEvent *event)
Save changes and exit this dialog - Implements alias_function_t -.
Definition functions.c:308
static int op_generic_select_entry(struct AliasFunctionData *fdata, const struct KeyEvent *event)
select the current entry - Implements alias_function_t -
Definition functions.c:388
static int op_sort(struct AliasFunctionData *fdata, const struct KeyEvent *event)
sort aliases - Implements alias_function_t -
Definition functions.c:559
static int op_browser_new_file(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Select a new file in this directory - Implements browser_function_t -.
Definition functions.c:224
static int op_rename_mailbox(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Rename the current mailbox (IMAP only) - Implements browser_function_t -.
Definition functions.c:1184
static int op_create_mailbox(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Create a new mailbox (IMAP only) - Implements browser_function_t -.
Definition functions.c:685
static int op_browser_view_file(struct BrowserPrivateData *priv, const struct KeyEvent *event)
View file - Implements browser_function_t -.
Definition functions.c:419
static int op_browser_limit(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Limit the browser - Implements browser_function_t -.
Definition functions.c:833
static int op_mailbox_list(struct BrowserPrivateData *priv, const struct KeyEvent *event)
List mailboxes with new mail - Implements browser_function_t -.
Definition functions.c:1175
static int op_catchup(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Mark all articles in newsgroup as read - Implements browser_function_t -.
Definition functions.c:502
static int op_browser_subscribe(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Subscribe to current mbox (IMAP/NNTP only) - Implements browser_function_t -.
Definition functions.c:304
static int op_delete_mailbox(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Delete the current mailbox (IMAP only) - Implements browser_function_t -.
Definition functions.c:759
static int op_load_active(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Load list of all newsgroups from NNTP server - Implements browser_function_t -.
Definition functions.c:1137
static int op_subscribe_pattern(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Subscribe to newsgroups matching a pattern - Implements browser_function_t -.
Definition functions.c:1289
static int op_browser_tell(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Display the currently selected file's name - Implements browser_function_t -.
Definition functions.c:363
static int op_browser_toggle_lsub(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Toggle view all/subscribed mailboxes (IMAP only) - Implements browser_function_t -.
Definition functions.c:405
static int op_toggle_mailboxes(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Toggle whether to browse mailboxes or all files - Implements browser_function_t -.
Definition functions.c:1377
static int op_change_directory(struct BrowserPrivateData *priv, const struct KeyEvent *event)
Change directories - Implements browser_function_t -.
Definition functions.c:557