Compose functions. More...
#include "config.h"#include <errno.h>#include <stdbool.h>#include <string.h>#include <sys/stat.h>#include <unistd.h>#include "private.h"#include "mutt/lib.h"#include "config/lib.h"#include "email/lib.h"#include "core/lib.h"#include "conn/lib.h"#include "gui/lib.h"#include "mutt.h"#include "functions.h"#include "lib.h"#include "attach/lib.h"#include "browser/lib.h"#include "editor/lib.h"#include "history/lib.h"#include "hooks/lib.h"#include "imap/lib.h"#include "index/lib.h"#include "key/lib.h"#include "menu/lib.h"#include "ncrypt/lib.h"#include "nntp/lib.h"#include "pop/lib.h"#include "question/lib.h"#include "send/lib.h"#include "attach_data.h"#include "external.h"#include "globals.h"#include "module_data.h"#include "mutt_logging.h"#include "muttlib.h"#include "mx.h"#include "nntp/adata.h"#include "shared_data.h"#include <libintl.h>
Include dependency graph for functions.c:Go to the source code of this file.
Functions | |
| void | compose_init_keys (struct NeoMutt *n, struct SubMenu *sm_generic) |
| Initialise the Compose Keybindings - Implements ::init_keys_api. | |
| static bool | check_count (struct AttachCtx *actx) |
| Check if there are any attachments. | |
| static char * | gen_cid (void) |
| Generate a random Content ID. | |
| static bool | check_cid (const char *cid) |
| Check if a Content-ID is valid. | |
| static bool | content_id_exists (struct AttachCtx *actx, const struct Body *skip, const char *cid) |
| Check whether a Content-ID is already in use. | |
| static int | check_attachments (struct AttachCtx *actx, struct ConfigSubset *sub) |
| Check if any attachments have changed or been deleted. | |
| static int | delete_attachment (struct AttachCtx *actx, int aidx, struct ConfigSubset *sub) |
| Delete an attachment. | |
| static void | update_idx (struct Menu *menu, struct AttachCtx *actx, struct AttachPtr *ap) |
| Add a new attachment to the message. | |
| static void | compose_attach_swap (struct Email *e, struct AttachCtx *actx, int first, int second) |
| Swap two adjacent entries in the attachment list. | |
| static int | body_index (struct AttachCtx *actx, const struct Body *b) |
| Find the index of an attachment body. | |
| static int | prev_sibling (struct AttachCtx *actx, int index) |
| Find the previous sibling of an attachment. | |
| static int | next_sibling (struct AttachCtx *actx, int index) |
| Find the next sibling of an attachment. | |
| static bool | body_array_contains (struct BodyArray *ba, const struct Body *b) |
| Does a selection contain a body? | |
| static bool | selected_attachments_are_siblings (struct Email *e, struct BodyArray *ba) |
| Check whether selected attachments are siblings. | |
| static MenuRedrawFlags | selection_redraw_flags (size_t count) |
| Choose redraw flags for a selection. | |
| static void | resolve_attachment (struct Menu *menu, const struct ConfigSubset *sub, int index, int num) |
| Advance the Attachment List selection after an action. | |
| static int | move_attachment (struct ComposeSharedData *shared, bool up, int count) |
| Move attachments in the attachment list. | |
| static int | group_attachments (struct ComposeSharedData *shared, char *subtype, struct BodyArray *ba) |
| Group selected attachments into a multipart group. | |
| static int | op_attach_attach_file (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Attach files to this message - Implements compose_function_t -. | |
| static int | op_attach_attach_key (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Attach a PGP public key - Implements compose_function_t -. | |
| static int | op_attach_attach_message (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Attach messages to this message - Implements compose_function_t -. | |
| static int | op_attach_detach (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Delete the current entry - Implements compose_function_t -. | |
| static int | op_attach_edit_content_id (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit the 'Content-ID' of the attachment - Implements compose_function_t -. | |
| static int | op_attach_edit_description (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit attachment description - Implements compose_function_t -. | |
| static int | op_attach_edit_encoding (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit attachment transfer-encoding - Implements compose_function_t -. | |
| static int | op_attach_edit_language (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit the 'Content-Language' of the attachment - Implements compose_function_t -. | |
| static int | op_attach_edit_mime (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit attachment using mailcap entry - Implements compose_function_t -. | |
| static int | op_attach_edit_type (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit attachment content type - Implements compose_function_t -. | |
| static int | op_attach_filter (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Filter attachment through a shell command - Implements compose_function_t -. | |
| static int | op_attach_get_attachment (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Get a temporary copy of an attachment - Implements compose_function_t -. | |
| static int | op_attach_group_alts (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Group selected attachments as 'multipart/alternative' - Implements compose_function_t -. | |
| static int | op_attach_group_lingual (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Group selected attachments as 'multipart/multilingual' - Implements compose_function_t -. | |
| static int | op_attach_group_related (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Group selected attachments as 'multipart/related' - Implements compose_function_t -. | |
| static int | op_attach_move_down (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Move an attachment down in the attachment list - Implements compose_function_t -. | |
| static int | op_attach_move_up (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Move an attachment up in the attachment list - Implements compose_function_t -. | |
| static int | op_attach_new_mime (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Compose new attachment using mailcap entry - Implements compose_function_t -. | |
| static int | op_attach_print (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Print the current entry - Implements compose_function_t -. | |
| static int | op_attach_rename_attachment (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Send attachment with a different name - Implements compose_function_t -. | |
| static int | op_attach_save (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Save message/attachment to a mailbox/file - Implements compose_function_t -. | |
| static int | op_attach_toggle_disposition (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Toggle disposition between inline/attachment - Implements compose_function_t -. | |
| static int | op_attach_toggle_recode (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Toggle recoding of this attachment - Implements compose_function_t -. | |
| static int | op_attach_toggle_unlink (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Toggle whether to delete file after sending it - Implements compose_function_t -. | |
| static int | op_attach_ungroup (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Ungroup a 'multipart' attachment - Implements compose_function_t -. | |
| static int | op_attach_update_encoding (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Update an attachment's encoding info - Implements compose_function_t -. | |
| static int | op_envelope_edit_headers (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit the message with headers - Implements compose_function_t -. | |
| static int | op_compose_edit_file (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit the file to be attached - Implements compose_function_t -. | |
| static int | op_compose_edit_message (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Edit the message - Implements compose_function_t -. | |
| static int | op_compose_ispell (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Run ispell on the message - Implements compose_function_t -. | |
| static int | op_compose_postpone_message (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Save this message to send later - Implements compose_function_t -. | |
| static int | op_compose_rename_file (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Rename/move an attached file - Implements compose_function_t -. | |
| static int | op_compose_send_message (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Send the message - Implements compose_function_t -. | |
| static int | op_compose_write_message (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Write the message to a folder - Implements compose_function_t -. | |
| static int | op_display_headers (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Display message and toggle header weeding - Implements compose_function_t -. | |
| static int | op_quit (struct ComposeFunctionData *fdata, const struct KeyEvent *event) |
| Save changes and exit this dialog - Implements compose_function_t -. | |
| int | compose_function_dispatcher (struct MuttWindow *win, const struct KeyEvent *event) |
| Perform a Compose function - Implements function_dispatcher_t -. | |
Variables | |
| static const struct MenuFuncOp | OpCompose [] |
| Functions for the Compose Menu. | |
| static const struct MenuOpSeq | ComposeDefaultBindings [] |
| Key bindings for the Compose Menu. | |
| static const struct ComposeFunction | ComposeFunctions [] |
| All the NeoMutt functions that the Compose supports. | |
Compose functions.
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.
Initialise the Compose Keybindings - Implements ::init_keys_api.
Definition at line 212 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Check if there are any attachments.
| actx | Attachment context |
| true | There are attachments |
Definition at line 234 of file functions.c.
Here is the caller graph for this function:
|
static |
Generate a random Content ID.
| ptr | Content ID |
Definition at line 251 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Check if a Content-ID is valid.
| cid | Content-ID to check |
| true | Content-ID is valid |
| false | Content-ID is not valid |
Definition at line 267 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Check whether a Content-ID is already in use.
| actx | Attachment context |
| skip | Body to ignore |
| cid | Content-ID to check |
| true | Content-ID already exists |
Definition at line 287 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Check if any attachments have changed or been deleted.
| actx | Attachment context |
| sub | ConfigSubset |
| 0 | Success |
| -1 | Error |
Definition at line 312 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Delete an attachment.
| actx | Attachment context |
| aidx | Index number of attachment to delete |
| sub | Config subset |
| 0 | Success |
| -1 | Error |
Definition at line 377 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Add a new attachment to the message.
| menu | Current menu |
| actx | Attachment context |
| ap | Attachment to add |
Definition at line 466 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Swap two adjacent entries in the attachment list.
| e | |
| actx | Attachment information |
| first | Index of first attachment to swap |
| second | Index of second attachment to swap |
Definition at line 491 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:Find the index of an attachment body.
| actx | Attachment context |
| b | Body to find |
| num | Index of body |
| -1 | Body wasn't found |
Definition at line 557 of file functions.c.
Here is the caller graph for this function:
|
static |
Find the previous sibling of an attachment.
| actx | Attachment context |
| index | Index of attachment |
| num | Index of previous sibling |
| -1 | No previous sibling |
Definition at line 578 of file functions.c.
Here is the caller graph for this function:
|
static |
Find the next sibling of an attachment.
| actx | Attachment context |
| index | Index of attachment |
| num | Index of next sibling |
| -1 | No next sibling |
Definition at line 598 of file functions.c.
Here is the caller graph for this function:
|
static |
Does a selection contain a body?
| ba | Selected attachments |
| b | Body to find |
| true | Body is selected |
Definition at line 620 of file functions.c.
Here is the caller graph for this function:
|
static |
Check whether selected attachments are siblings.
| e | |
| ba | Selected attachments |
| true | Selected attachments are siblings |
Definition at line 638 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Choose redraw flags for a selection.
| count | Number of selected attachments |
| redraw | flags for the selection |
Definition at line 675 of file functions.c.
Here is the caller graph for this function:
|
static |
Advance the Attachment List selection after an action.
| menu | Menu |
| sub | Config subset |
| index | Original menu index, before the action |
| num | Number of selected attachment entries operated on |
If $resolve is set, move the selection on by the number of items that were acted upon. Overruns are silently capped at the end of the list.
Nothing is moved when operating on a tag-prefix selection.
Definition at line 692 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Move attachments in the attachment list.
| shared | Shared compose data |
| up | If true, move up, otherwise move down |
| count | Repeat-count |
| enum | FunctionRetval |
Definition at line 714 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Group selected attachments into a multipart group.
| shared | Shared compose data |
| subtype | MIME subtype |
| ba | Selected attachments |
| FR_SUCCESS | Success |
| FR_ERROR | Failure |
Definition at line 802 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Functions for the Compose Menu.
Definition at line 78 of file functions.c.
|
static |
Key bindings for the Compose Menu.
Definition at line 150 of file functions.c.
|
static |
All the NeoMutt functions that the Compose supports.
Definition at line 2729 of file functions.c.