Index Dialog. More...
#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include <string.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 "lib.h"
#include "color/lib.h"
#include "expando/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "nntp/lib.h"
#include "pager/lib.h"
#include "pattern/lib.h"
#include "sidebar/lib.h"
#include "functions.h"
#include "globals.h"
#include "hdrline.h"
#include "hook.h"
#include "mutt_logging.h"
#include "mutt_mailbox.h"
#include "mutt_thread.h"
#include "mview.h"
#include "mx.h"
#include "nntp/adata.h"
#include "private_data.h"
#include "protos.h"
#include "shared_data.h"
#include "sort.h"
#include "status.h"
#include "notmuch/lib.h"
#include "monitor.h"
Go to the source code of this file.
Functions | |
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, int toggle) |
Collapse/uncollapse all threads. | |
static void | uncollapse_thread (struct MailboxView *mv, int index) |
Open a collapsed thread. | |
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. | |
int | find_first_message (struct MailboxView *mv) |
Get index of first new message. | |
void | resort_index (struct MailboxView *mv, struct Menu *menu) |
Resort the index. | |
static void | update_index_threaded (struct MailboxView *mv, enum MxStatus check, int oldcount) |
Update the index (if threaded) | |
static void | update_index_unthreaded (struct MailboxView *mv, enum MxStatus check) |
Update the index (if unthreaded) | |
void | update_index (struct Menu *menu, struct MailboxView *mv, enum MxStatus check, int oldcount, const struct IndexSharedData *shared) |
Update the index. | |
static int | index_mailbox_observer (struct NotifyCallback *nc) |
Notification that a Mailbox has changed - Implements observer_t -. | |
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. | |
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() -. | |
const struct AttrColor * | index_color (struct Menu *menu, int line) |
Calculate the colour for a line of the index - Implements Menu::color() -. | |
void | mutt_draw_statusline (struct MuttWindow *win, int max_cols, const char *buf, size_t buflen) |
Draw a highlighted status bar. | |
struct Mailbox * | dlg_index (struct MuttWindow *dlg, struct Mailbox *m_init) |
Display a list of emails -. | |
void | mutt_set_header_color (struct Mailbox *m, struct Email *e) |
Select a colour for a message. | |
struct MuttWindow * | index_pager_init (void) |
Allocate the Windows for the Index/Pager. | |
void | index_change_folder (struct MuttWindow *dlg, struct Mailbox *m) |
Change the current folder, cautiously. | |
Variables | |
static const struct Mapping | IndexHelp [] |
Help Bar for the Index dialog. | |
const struct Mapping | IndexNewsHelp [] |
Help Bar for the News Index dialog. | |
Index Dialog.
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 dlg_index.c.
Check the ACLs for a function.
true | The function is permitted |
Definition at line 139 of file dlg_index.c.
void collapse_all | ( | struct MailboxView * | mv, |
struct Menu * | menu, | ||
int | toggle | ||
) |
Collapse/uncollapse all threads.
mv | Mailbox View |
menu | current menu |
toggle | toggle collapsed state |
This function is called by the OP_MAIN_COLLAPSE_ALL command and on folder enter if the $collapse_all
option is set. In the first case, the toggle parameter is 1 to actually toggle collapsed/uncollapsed state on all threads. In the second case, the toggle parameter is 0, actually turning this function into a one-way collapse.
Definition at line 166 of file dlg_index.c.
|
static |
Open a collapsed thread.
Definition at line 220 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 242 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 276 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 310 of file dlg_index.c.
void resort_index | ( | struct MailboxView * | mv, |
struct Menu * | menu | ||
) |
Resort the index.
Definition at line 370 of file dlg_index.c.
|
static |
Update the index (if threaded)
mv | Mailbox |
check | Flags, e.g. MX_STATUS_REOPENED |
oldcount | How many items are currently in the index |
Definition at line 412 of file dlg_index.c.
|
static |
Update the index (if unthreaded)
mv | Mailbox |
check | Flags, e.g. MX_STATUS_REOPENED |
Definition at line 494 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 543 of file dlg_index.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 612 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 733 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 758 of file dlg_index.c.
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
< First character of that colour
< Last character of that colour
Definition at line 929 of file dlg_index.c.
Select a colour for a message.
Definition at line 1373 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 1404 of file dlg_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 1432 of file dlg_index.c.
|
static |
Help Bar for the Index dialog.
Definition at line 103 of file dlg_index.c.
const struct Mapping IndexNewsHelp[] |
Help Bar for the News Index dialog.
Definition at line 118 of file dlg_index.c.