forked from neomutt/neomutt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move compose files to lib under compose/
No functional changes, simply moving all compose code under this directory in preparation for building libcompose. libsend depends on libcompose, so set it first under MUTTLIBS in Makefile.autosetup Move compose config to composelib
- Loading branch information
1 parent
8f7a470
commit e3c9ab8
Showing
8 changed files
with
146 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/** | ||
* @file | ||
* Config used by libcompose | ||
* | ||
* @authors | ||
* Copyright (C) 2020 Richard Russon <[email protected]> | ||
* | ||
* @copyright | ||
* This program is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License as published by the Free Software | ||
* Foundation, either version 2 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
/** | ||
* @page compose_config Config used by libcompose | ||
* | ||
* Config used by libcompose | ||
*/ | ||
|
||
#include <stdbool.h> | ||
#include "private.h" | ||
#include "config/lib.h" | ||
|
||
#ifndef ISPELL | ||
#define ISPELL "ispell" | ||
#endif | ||
|
||
// clang-format off | ||
char * C_ComposeFormat; ///< Config: printf-like format string for the Compose panel's status bar | ||
bool C_ComposeShowUserHeaders; ///< Config: Whether to display user-defined headers | ||
unsigned char C_Copy; ///< Config: Save outgoing emails to $record | ||
bool C_EditHeaders; ///< Config: Let the user edit the email headers whilst editing an email | ||
char * C_Ispell; ///< Config: External command to perform spell-checking | ||
unsigned char C_Postpone; ///< Config: Save messages to the `$postponed` folder | ||
// clang-format on | ||
|
||
static struct ConfigDef ComposeVars[] = { | ||
// clang-format off | ||
{ "compose_show_user_headers", DT_BOOL, &C_ComposeShowUserHeaders, true, 0, NULL, | ||
"Controls whether or not custom headers are shown in the compose envelope" | ||
}, | ||
{ "edit_headers", DT_BOOL, &C_EditHeaders, false, 0, NULL, | ||
"Let the user edit the email headers whilst editing an email" | ||
}, | ||
{ "compose_format", DT_STRING|R_MENU, &C_ComposeFormat, IP "-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-", 0, NULL, | ||
"printf-like format string for the Compose panel's status bar" | ||
}, | ||
{ "ispell", DT_STRING|DT_COMMAND, &C_Ispell, IP ISPELL, 0, NULL, | ||
"External command to perform spell-checking" | ||
}, | ||
{ "copy", DT_QUAD, &C_Copy, MUTT_YES, 0, NULL, | ||
"Save outgoing emails to $record" | ||
}, | ||
{ "postpone", DT_QUAD, &C_Postpone, MUTT_ASKYES, 0, NULL, | ||
"Save messages to the #C_Postponed folder" | ||
}, | ||
// clang-format on | ||
}; | ||
|
||
/** | ||
* config_init_compose - Register compose config variables - Implements ::module_init_config_t | ||
*/ | ||
bool config_init_compose(struct ConfigSet *cs) | ||
{ | ||
return cs_register_variables(cs, ComposeVars, 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* GUI editor for an email's headers | ||
* | ||
* @authors | ||
* Copyright (C) 2018 Richard Russon <[email protected]> | ||
* Copyright (C) 2020 Richard Russon <[email protected]> | ||
* | ||
* @copyright | ||
* This program is free software: you can redistribute it and/or modify it under | ||
|
@@ -20,21 +20,28 @@ | |
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef MUTT_COMPOSE_H | ||
#define MUTT_COMPOSE_H | ||
/** | ||
* @page compose COMPOSE: Display and edit an email's headers | ||
* | ||
* Display the mailboxes in a side panel | ||
* | ||
* | File | Description | | ||
* | :------------------ | :------------------------- | | ||
* | compose/compose.c | @subpage compose_compose | | ||
* | compose/config.c | @subpage compose_config | | ||
*/ | ||
|
||
#ifndef MUTT_COMPOSE_LIB_H | ||
#define MUTT_COMPOSE_LIB_H | ||
|
||
struct Buffer; | ||
struct Email; | ||
|
||
/* These Config Variables are only used in compose.c */ | ||
extern char *C_ComposeFormat; | ||
extern char *C_Ispell; | ||
extern unsigned char C_Postpone; | ||
extern bool C_ComposeShowUserHeaders; | ||
|
||
/* flags for mutt_compose_menu() */ | ||
#define MUTT_COMPOSE_NOFREEHEADER (1 << 0) | ||
|
||
int mutt_compose_menu(struct Email *e, struct Buffer *fcc, struct Email *e_cur, int flags); | ||
|
||
#endif /* MUTT_COMPOSE_H */ | ||
bool config_init_compose(struct ConfigSet *); | ||
|
||
#endif /* MUTT_COMPOSE_LIB_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* @file | ||
* GUI editor for an email's headers | ||
* | ||
* @authors | ||
* Copyright (C) 2020 Richard Russon <[email protected]> | ||
* | ||
* @copyright | ||
* This program is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License as published by the Free Software | ||
* Foundation, either version 2 of the License, or (at your option) any later | ||
* version. | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
#ifndef MUTT_COMPOSE_PRIVATE_H | ||
#define MUTT_COMPOSE_PRIVATE_H | ||
|
||
extern char * C_ComposeFormat; | ||
extern bool C_ComposeShowUserHeaders; | ||
extern unsigned char C_Copy; | ||
extern bool C_EditHeaders; | ||
extern char * C_Ispell; | ||
extern unsigned char C_Postpone; | ||
|
||
#endif /* MUTT_COMPOSE_PRIVATE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters