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 "expando_index.h"#include "functions.h"#include "globals.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 "status.h"#include "notmuch/lib.h"#include "monitor.h"
Include dependency graph for dlg_index.c: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 | 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. | |
| 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 | email_set_color (struct Mailbox *m, struct Email *e) |
| Select an Index colour for an Email. | |
| 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 138 of file dlg_index.c.
Here is the caller graph for this function:| 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 165 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Open a collapsed thread.
Definition at line 219 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 241 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 275 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 309 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void resort_index | ( | struct MailboxView * | mv, |
| struct Menu * | menu ) |
Resort the index.
Definition at line 369 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 411 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Update the index (if unthreaded)
| mv | Mailbox |
| check | Flags, e.g. MX_STATUS_REOPENED |
Definition at line 493 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 542 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 611 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 732 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 757 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 803 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 959 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function: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 1406 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct MuttWindow * index_pager_init | ( | void | ) |
Allocate the Windows for the Index/Pager.
| ptr | Dialog containing nested Windows |
Definition at line 1437 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 1465 of file dlg_index.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Help Bar for the Index dialog.
Definition at line 102 of file dlg_index.c.
| const struct Mapping IndexNewsHelp[] |
Help Bar for the News Index dialog.
Definition at line 117 of file dlg_index.c.