NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
module.c File Reference

Definition of the Compose Module. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "module_data.h"
+ Include dependency graph for module.c:

Go to the source code of this file.

Functions

static bool compose_init (struct NeoMutt *n)
 Initialise a Module - Implements Module::init()
 
static bool compose_config_define_variables (struct NeoMutt *n, struct ConfigSet *cs)
 Define the Config Variables - Implements Module::config_define_variables()
 
static bool compose_cleanup (struct NeoMutt *n)
 Clean up a Module - Implements Module::cleanup()
 

Variables

struct ConfigDef ComposeVars []
 Config definitions for compose.
 
const struct Module ModuleCompose
 Module for the Compose library.
 

Detailed Description

Definition of the Compose Module.

Authors
  • Richard Russon

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 module.c.

Function Documentation

◆ compose_init()

static bool compose_init ( struct NeoMutt * n)
static

Initialise a Module - Implements Module::init()

Definition at line 42 of file module.c.

43{
44 // struct ComposeModuleData *md = MUTT_MEM_CALLOC(1, struct ComposeModuleData);
45 // neomutt_set_module_data(n, MODULE_ID_COMPOSE, md);
46
47 return true;
48}

◆ compose_config_define_variables()

static bool compose_config_define_variables ( struct NeoMutt * n,
struct ConfigSet * cs )
static

Define the Config Variables - Implements Module::config_define_variables()

Definition at line 53 of file module.c.

54{
56}
struct ConfigDef ComposeVars[]
Config definitions for compose.
Definition config.c:65
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition set.c:290
+ Here is the call graph for this function:

◆ compose_cleanup()

static bool compose_cleanup ( struct NeoMutt * n)
static

Clean up a Module - Implements Module::cleanup()

Definition at line 61 of file module.c.

62{
63 // struct ComposeModuleData *md = neomutt_get_module_data(n, MODULE_ID_COMPOSE);
64 // ASSERT(md);
65
66 // FREE(&md);
67 return true;
68}

Variable Documentation

◆ ComposeVars

struct ConfigDef ComposeVars[]
extern

Config definitions for compose.

Definition at line 65 of file config.c.

65 {
66 // clang-format off
67 { "compose_confirm_detach_first", DT_BOOL, true, 0, NULL,
68 "Prevent the accidental deletion of the composed message"
69 },
70 // L10N: $compose_format default format
71 { "compose_format", DT_EXPANDO|D_L10N_STRING, IP N_("-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-"), IP &ComposeFormatDef, NULL,
72 "printf-like format string for the Compose panel's status bar"
73 },
74 { "compose_show_preview", DT_BOOL, true, 0, NULL,
75 "Display a preview of the message body in the Compose window"
76 },
77 { "compose_show_user_headers", DT_BOOL, true, 0, NULL,
78 "Controls whether or not custom headers are shown in the compose envelope"
79 },
80 { "compose_preview_min_rows", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 5, 0, NULL,
81 "Hide the preview if it has fewer than this number of rows"
82 },
83 { "compose_preview_above_attachments", DT_BOOL, false, 0, NULL,
84 "Show the message preview above the attachments list. By default it is shown below it."
85 },
86 { "copy", DT_QUAD, MUTT_YES, 0, NULL,
87 "Save outgoing emails to $record"
88 },
89 { "edit_headers", DT_BOOL, false, 0, NULL,
90 "Let the user edit the email headers whilst editing an email"
91 },
92 { "ispell", DT_STRING|D_STRING_COMMAND, IP ISPELL, 0, NULL,
93 "External command to perform spell-checking"
94 },
95 { "postpone", DT_QUAD, MUTT_ASKYES, 0, NULL,
96 "Save messages to the `$postponed` folder"
97 },
98
99 { "edit_hdrs", DT_SYNONYM, IP "edit_headers", IP "2021-03-21" },
100 { NULL },
101 // clang-format on
102};
#define ISPELL
Definition config.c:40
static const struct ExpandoDefinition ComposeFormatDef[]
Expando definitions.
Definition config.c:49
#define IP
Definition set.h:55
#define N_(a)
Definition message.h:32
@ MUTT_ASKYES
Ask the user, defaulting to 'Yes'.
Definition quad.h:41
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition quad.h:39
#define D_STRING_COMMAND
A command.
Definition types.h:99
#define D_L10N_STRING
String can be localised.
Definition types.h:82
@ DT_NUMBER
a number
Definition types.h:38
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition types.h:40
@ DT_SYNONYM
synonym for another variable
Definition types.h:45
@ DT_STRING
a string
Definition types.h:44
@ DT_EXPANDO
an expando
Definition types.h:34
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:101

◆ ModuleCompose

const struct Module ModuleCompose
Initial value:
= {
"compose",
NULL,
NULL,
NULL,
NULL,
}
static bool compose_cleanup(struct NeoMutt *n)
Clean up a Module - Implements Module::cleanup()
Definition module.c:61
static bool compose_init(struct NeoMutt *n)
Initialise a Module - Implements Module::init()
Definition module.c:42
static bool compose_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:53
@ MODULE_ID_COMPOSE
ModuleCompose, Compose an Email
Definition module_api.h:57

Module for the Compose library.

Definition at line 73 of file module.c.

73 {
75 "compose",
77 NULL, // config_define_types
79 NULL, // commands_register
80 NULL, // gui_init
81 NULL, // gui_cleanup
83};