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

Postponed Emails Functions. More...

#include "config.h"
#include <stddef.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "functions.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "pattern/lib.h"
+ Include dependency graph for functions.c:

Go to the source code of this file.

Functions

void postponed_init_keys (struct SubMenu *sm_generic)
 Initialise the Postponed Keybindings - Implements ::init_keys_api.
 
static int op_delete (struct PostponeData *pd, const struct KeyEvent *event)
 Delete the current entry - Implements postpone_function_t -.
 
static int op_exit (struct PostponeData *pd, const struct KeyEvent *event)
 Exit this menu - Implements postpone_function_t -.
 
static int op_generic_select_entry (struct PostponeData *pd, const struct KeyEvent *event)
 Select the current entry - Implements postpone_function_t -.
 
static int op_search (struct PostponeData *pd, const struct KeyEvent *event)
 Search for a regular expression - Implements postpone_function_t -.
 
int postpone_function_dispatcher (struct MuttWindow *win, const struct KeyEvent *event)
 Perform a Postpone function - Implements function_dispatcher_t -.
 
struct MailboxViewpostponed_get_mailbox_view (struct MuttWindow *dlg)
 Extract the Mailbox from the Postponed Dialog.
 

Variables

struct MenuDefinitionMdPostpone = NULL
 Postpone Menu Definition.
 
static const struct MenuFuncOp OpPostponed []
 Functions for the Postpone Menu.
 
static const struct MenuOpSeq PostponedDefaultBindings []
 Key bindings for the Postpone Menu.
 
static const struct PostponeFunction PostponeFunctions []
 All the NeoMutt functions that the Postpone supports.
 

Detailed Description

Postponed Emails 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

◆ postponed_init_keys()

void postponed_init_keys ( struct SubMenu * sm_generic)

Initialise the Postponed Keybindings - Implements ::init_keys_api.

Definition at line 70 of file functions.c.

71{
72 struct MenuDefinition *md = NULL;
73 struct SubMenu *sm = NULL;
74
76 md = km_register_menu(MENU_POSTPONE, "postpone");
77 km_menu_add_submenu(md, sm);
78 km_menu_add_submenu(md, sm_generic);
80
81 MdPostpone = md;
82}
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:91
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
Definition init.c:107
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
Definition init.c:136
static const struct MenuFuncOp OpPostponed[]
Functions for the Postpone Menu.
Definition functions.c:49
static const struct MenuOpSeq PostponedDefaultBindings[]
Key bindings for the Postpone Menu.
Definition functions.c:59
struct MenuDefinition * MdPostpone
Postpone Menu Definition.
Definition functions.c:43
Functions for a Dialog or Window.
Definition menu.h:80
Collection of related functions.
Definition menu.h:68
@ MENU_POSTPONE
Select a postponed email.
Definition type.h:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ postponed_get_mailbox_view()

struct MailboxView * postponed_get_mailbox_view ( struct MuttWindow * dlg)

Extract the Mailbox from the Postponed Dialog.

Parameters
dlgPostponed Dialog
Return values
ptrMailbox view

Definition at line 229 of file functions.c.

230{
231 if (!dlg)
232 return NULL;
233
234 struct Menu *menu = dlg->wdata;
235 struct PostponeData *pd = menu->mdata;
236 if (!pd)
237 return NULL;
238
239 return pd->mailbox_view;
240}
Definition lib.h:80
void * mdata
Private data.
Definition lib.h:149
void * wdata
Private data.
Data to pass to the Postpone Functions.
Definition functions.h:37
struct MailboxView * mailbox_view
Postponed Mailbox view.
Definition functions.h:38
struct Menu * menu
Postponed Menu.
Definition functions.h:39
+ Here is the caller graph for this function:

Variable Documentation

◆ MdPostpone

struct MenuDefinition* MdPostpone = NULL

Postpone Menu Definition.

Definition at line 43 of file functions.c.

◆ OpPostponed

const struct MenuFuncOp OpPostponed[]
static
Initial value:
= {
{ "exit", OP_EXIT },
{ "delete-entry", OP_DELETE },
{ "undelete-entry", OP_UNDELETE },
{ NULL, 0 },
}

Functions for the Postpone Menu.

Definition at line 49 of file functions.c.

49 { /* map: postpone */
50 { "exit", OP_EXIT },
51 { "delete-entry", OP_DELETE },
52 { "undelete-entry", OP_UNDELETE },
53 { NULL, 0 },
54};

◆ PostponedDefaultBindings

const struct MenuOpSeq PostponedDefaultBindings[]
static
Initial value:
= {
{ OP_DELETE, "d" },
{ OP_EXIT, "q" },
{ OP_UNDELETE, "u" },
{ 0, NULL },
}

Key bindings for the Postpone Menu.

Definition at line 59 of file functions.c.

59 { /* map: postpone */
60 { OP_DELETE, "d" },
61 { OP_EXIT, "q" },
62 { OP_UNDELETE, "u" },
63 { 0, NULL },
64};

◆ PostponeFunctions

const struct PostponeFunction PostponeFunctions[]
static
Initial value:
= {
{ OP_DELETE, op_delete },
{ OP_EXIT, op_exit },
{ OP_GENERIC_SELECT_ENTRY, op_generic_select_entry },
{ OP_SEARCH, op_search },
{ OP_SEARCH_NEXT, op_search },
{ OP_SEARCH_OPPOSITE, op_search },
{ OP_SEARCH_REVERSE, op_search },
{ OP_UNDELETE, op_delete },
{ 0, NULL },
}
static int op_generic_select_entry(struct AliasMenuData *mdata, const struct KeyEvent *event)
select the current entry - Implements alias_function_t -
Definition functions.c:248
static int op_search(struct AliasMenuData *mdata, const struct KeyEvent *event)
search for a regular expression - Implements alias_function_t -
Definition functions.c:386
static int op_exit(struct AliasMenuData *mdata, const struct KeyEvent *event)
exit this menu - Implements alias_function_t -
Definition functions.c:234
static int op_delete(struct AliasMenuData *mdata, const struct KeyEvent *event)
delete the current entry - Implements alias_function_t -
Definition functions.c:197

All the NeoMutt functions that the Postpone supports.

Definition at line 174 of file functions.c.

174 {
175 // clang-format off
176 { OP_DELETE, op_delete },
177 { OP_EXIT, op_exit },
178 { OP_GENERIC_SELECT_ENTRY, op_generic_select_entry },
179 { OP_SEARCH, op_search },
180 { OP_SEARCH_NEXT, op_search },
181 { OP_SEARCH_OPPOSITE, op_search },
182 { OP_SEARCH_REVERSE, op_search },
183 { OP_UNDELETE, op_delete },
184 { 0, NULL },
185 // clang-format on
186};