GUI manage the main index (list of emails). More...
#include <stdbool.h>#include <stdint.h>#include <stdio.h>#include "mutt/lib.h"#include "core/lib.h"#include "expando/lib.h"#include "expando_index.h"#include "functions.h"#include "shared_data.h"#include "status.h"#include "subjectrx.h"Go to the source code of this file.
Typedefs | |
| typedef uint8_t | NotifyIndex |
| typedef uint8_t | CheckFlags |
Enumerations | |
| enum | NotifyIndexFlag { NT_INDEX_NONE = 0 , NT_INDEX_ADD = 1U << 0 , NT_INDEX_DELETE = 1U << 1 , NT_INDEX_SUBSET = 1U << 2 , NT_INDEX_ACCOUNT = 1U << 3 , NT_INDEX_MVIEW = 1U << 4 , NT_INDEX_MAILBOX = 1U << 5 , NT_INDEX_EMAIL = 1U << 6 } |
| Flags, e.g. More... | |
| enum | CheckFlag { CHECK_NONE = 0 , CHECK_IN_MAILBOX = 1U << 0 , CHECK_MSGCOUNT = 1U << 1 , CHECK_VISIBLE = 1U << 2 , CHECK_READONLY = 1U << 3 , CHECK_ATTACH = 1U << 4 } |
| Flags, e.g. More... | |
| enum | CollapseMode { COLLAPSE_MODE_TOGGLE , COLLAPSE_MODE_CLOSE , COLLAPSE_MODE_OPEN } |
| Action to perform on a Thread. More... | |
Functions | |
| void | index_init_keys (struct NeoMutt *n, struct SubMenu *sm_generic) |
| Initialise the Index Keybindings - Implements ::init_keys_api. | |
| void | change_folder_mailbox (struct Menu *menu, struct Mailbox *m, int *oldcount, struct IndexSharedData *shared, bool read_only) |
| Change to a different Mailbox by pointer. | |
| struct Mailbox * | change_folder_notmuch (struct Menu *menu, char *buf, int buflen, int *oldcount, struct IndexSharedData *shared, bool read_only) |
| Change to a different Notmuch Mailbox by string. | |
| void | change_folder_string (struct Menu *menu, struct Buffer *buf, int *oldcount, struct IndexSharedData *shared, bool read_only) |
| Change to a different Mailbox by string. | |
| bool | check_acl (struct Mailbox *m, AclFlags acl, const char *msg) |
| Check the ACLs for a function. | |
| void | collapse_all (struct MailboxView *mv, struct Menu *menu, enum CollapseMode mode) |
| Collapse/uncollapse all threads. | |
| struct Mailbox * | dlg_index (struct MuttWindow *dlg, struct Mailbox *m) |
| Display a list of emails -. | |
| int | find_first_message (struct MailboxView *mv) |
| Get index of first new message. | |
| int | find_next_undeleted (struct MailboxView *mv, int msgno, bool uncollapse) |
| Find the next undeleted email. | |
| int | find_previous_undeleted (struct MailboxView *mv, int msgno, bool uncollapse) |
| Find the previous undeleted email. | |
| struct Mailbox * | get_current_mailbox (void) |
| Get the current Mailbox. | |
| struct MailboxView * | get_current_mailbox_view (void) |
| Get the current Mailbox view. | |
| void | index_change_folder (struct MuttWindow *dlg, struct Mailbox *m) |
| Change the current folder, cautiously. | |
| const struct AttrColor * | index_color (struct Menu *menu, int line) |
| Calculate the colour for a line of the index - Implements Menu::color() -. | |
| int | index_make_entry (struct Menu *menu, int line, int max_cols, struct Buffer *buf) |
| Format an Email for the Menu - Implements Menu::make_entry() -. | |
| struct MuttWindow * | index_pager_init (void) |
| Allocate the Windows for the Index/Pager. | |
| int | mutt_dlgindex_observer (struct NotifyCallback *nc) |
| void | mutt_draw_statusline (struct MuttWindow *win, int max_cols, const char *buf, size_t buflen) |
| Draw a highlighted status bar. | |
| void | email_set_color (struct Mailbox *m, struct Email *e) |
| Select an Index colour for an Email. | |
| void | resort_index (struct MailboxView *mv, struct Menu *menu) |
| Resort the index. | |
| void | update_index (struct Menu *menu, struct MailboxView *mv, enum MxStatus check, int oldcount, const struct IndexSharedData *shared) |
| Update the index. | |
| int | mutt_make_string (struct Buffer *buf, size_t max_cols, const struct Expando *exp, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress) |
| Create formatted strings using mailbox expandos. | |
Variables | |
| const struct Mapping | IndexNewsHelp [] |
| Help Bar for the News Index dialog. | |
| const struct ExpandoDefinition | StatusFormatDef [] |
| Expando definitions. | |
GUI manage the main index (list of emails).
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 lib.h.
| typedef uint8_t NotifyIndex |
| typedef uint8_t CheckFlags |
| enum NotifyIndexFlag |
Flags, e.g.
| Enumerator | |
|---|---|
| NT_INDEX_NONE | No flags are set. |
| NT_INDEX_ADD | New Index Shared Data has been created. |
| NT_INDEX_DELETE | Index Shared Data is about to be freed. |
| NT_INDEX_SUBSET | Config Subset has changed. |
| NT_INDEX_ACCOUNT | Account has changed. |
| NT_INDEX_MVIEW | MailboxView has changed. |
| NT_INDEX_MAILBOX | Mailbox has changed. |
| NT_INDEX_EMAIL | Email has changed. |
Definition at line 71 of file lib.h.
| enum CheckFlag |
Flags, e.g.
Definition at line 87 of file lib.h.
| enum CollapseMode |
Action to perform on a Thread.
| Enumerator | |
|---|---|
| COLLAPSE_MODE_TOGGLE | Toggle collapsed state. |
| COLLAPSE_MODE_CLOSE | Collapse all threads. |
| COLLAPSE_MODE_OPEN | Open all threads. |
Initialise the Index Keybindings - Implements ::init_keys_api.
Definition at line 332 of file functions.c.
| void change_folder_mailbox | ( | struct Menu * | menu, |
| struct Mailbox * | m, | ||
| int * | oldcount, | ||
| struct IndexSharedData * | shared, | ||
| bool | read_only ) |
Change to a different Mailbox by pointer.
| menu | Current Menu |
| m | Mailbox |
| oldcount | How many items are currently in the index |
| shared | Shared Index data |
| read_only | Open Mailbox in read-only mode |
Definition at line 631 of file dlg_index.c.
| struct Mailbox * change_folder_notmuch | ( | struct Menu * | menu, |
| char * | buf, | ||
| int | buflen, | ||
| int * | oldcount, | ||
| struct IndexSharedData * | shared, | ||
| bool | read_only ) |
Change to a different Notmuch Mailbox by string.
| menu | Current Menu |
| buf | Folder to change to |
| buflen | Length of buffer |
| oldcount | How many items are currently in the index |
| shared | Shared Index data |
| read_only | Open Mailbox in read-only mode |
| ptr | Mailbox |
Definition at line 752 of file dlg_index.c.
| void change_folder_string | ( | struct Menu * | menu, |
| struct Buffer * | buf, | ||
| int * | oldcount, | ||
| struct IndexSharedData * | shared, | ||
| bool | read_only ) |
Change to a different Mailbox by string.
| menu | Current Menu |
| buf | Folder to change to |
| oldcount | How many items are currently in the index |
| shared | Shared Index data |
| read_only | Open Mailbox in read-only mode |
Definition at line 777 of file dlg_index.c.
Check the ACLs for a function.
| true | The function is permitted |
Definition at line 137 of file dlg_index.c.
| void collapse_all | ( | struct MailboxView * | mv, |
| struct Menu * | menu, | ||
| enum CollapseMode | mode ) |
Collapse/uncollapse all threads.
| mv | Mailbox View |
| menu | Current menu |
| mode | Collapse mode |
This function is called by OP_MAIN_COLLAPSE_ALL, by the one-way open/close commands, and on folder enter if the $collapse_all option is set.
Definition at line 161 of file dlg_index.c.
| int find_first_message | ( | struct MailboxView * | mv | ) |
Get index of first new message.
| mv | Mailbox view |
| num | Index of first new message |
Return the index of the first new message, or failing that, the first unread message.
Definition at line 327 of file dlg_index.c.
| int find_next_undeleted | ( | struct MailboxView * | mv, |
| int | msgno, | ||
| bool | uncollapse ) |
Find the next undeleted email.
| >=0 | Message number of next undeleted email |
| -1 | No more undeleted messages |
Definition at line 259 of file dlg_index.c.
| int find_previous_undeleted | ( | struct MailboxView * | mv, |
| int | msgno, | ||
| bool | uncollapse ) |
Find the previous undeleted email.
| >=0 | Message number of next undeleted email |
| -1 | No more undeleted messages |
Definition at line 293 of file dlg_index.c.
| struct Mailbox * get_current_mailbox | ( | void | ) |
Get the current Mailbox.
| ptr | Current Mailbox |
Search for the last (most recent) dialog that has an Index. Then return the Mailbox from its shared data.
Definition at line 725 of file index.c.
| struct MailboxView * get_current_mailbox_view | ( | void | ) |
Get the current Mailbox view.
| ptr | Current Mailbox view |
Search for the last (most recent) dialog that has an Index. Then return the Mailbox from its shared data.
Definition at line 692 of file index.c.
| void index_change_folder | ( | struct MuttWindow * | dlg, |
| struct Mailbox * | m ) |
Change the current folder, cautiously.
| dlg | Dialog holding the Index |
| m | Mailbox to change to |
Definition at line 1490 of file dlg_index.c.
| struct MuttWindow * index_pager_init | ( | void | ) |
Allocate the Windows for the Index/Pager.
| ptr | Dialog containing nested Windows |
Definition at line 1462 of file dlg_index.c.
| int mutt_dlgindex_observer | ( | struct NotifyCallback * | nc | ) |
| void mutt_draw_statusline | ( | struct MuttWindow * | win, |
| int | max_cols, | ||
| const char * | buf, | ||
| size_t | buflen ) |
Draw a highlighted status bar.
| win | Window |
| max_cols | Maximum number of screen columns |
| buf | Message to be displayed |
| buflen | Length of the buffer |
Users configure the highlighting of the status bar, e.g. color status red default "[0-9][0-9]:[0-9][0-9]"
Where regexes overlap, the one nearest the start will be used. If two regexes start at the same place, the longer match will be used.
Colours of the status bar
< Colour attribute
< First character of that colour
< Last character of that colour
Definition at line 980 of file dlg_index.c.
Select an Index colour for an Email.
Calculate the colour for an Email in the Index. Cache the colour in the Email.
Definition at line 1431 of file dlg_index.c.
| void resort_index | ( | struct MailboxView * | mv, |
| struct Menu * | menu ) |
Resort the index.
Definition at line 387 of file dlg_index.c.
| void update_index | ( | struct Menu * | menu, |
| struct MailboxView * | mv, | ||
| enum MxStatus | check, | ||
| int | oldcount, | ||
| const struct IndexSharedData * | shared ) |
Update the index.
| menu | Current Menu |
| mv | Mailbox |
| check | Flags, e.g. MX_STATUS_REOPENED |
| oldcount | How many items are currently in the index |
| shared | Shared Index data |
Definition at line 562 of file dlg_index.c.
| int mutt_make_string | ( | struct Buffer * | buf, |
| size_t | max_cols, | ||
| const struct Expando * | exp, | ||
| struct Mailbox * | m, | ||
| int | inpgr, | ||
| struct Email * | e, | ||
| MuttFormatFlags | flags, | ||
| const char * | progress ) |
Create formatted strings using mailbox expandos.
| buf | Buffer for the result |
| max_cols | Number of screen columns (-1 means unlimited) |
| exp | Expando containing expando tree |
| m | Mailbox |
| inpgr | Message shown in the pager |
| e | |
| flags | Flags, see MuttFormatFlags |
| progress | Pager progress string |
| num | Number of screen columns used |
Definition at line 824 of file dlg_index.c.
|
extern |
Help Bar for the News Index dialog.
Definition at line 116 of file dlg_index.c.
|
extern |
Expando definitions.
Config:
Definition at line 49 of file config.c.