Browser functions. More...
#include "config.h"#include <limits.h>#include <stdbool.h>#include <stdio.h>#include <string.h>#include <sys/stat.h>#include "mutt/lib.h"#include "config/lib.h"#include "email/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "functions.h"#include "lib.h"#include "attach/lib.h"#include "editor/lib.h"#include "history/lib.h"#include "imap/lib.h"#include "key/lib.h"#include "menu/lib.h"#include "nntp/lib.h"#include "pattern/lib.h"#include "question/lib.h"#include "send/lib.h"#include "globals.h"#include "module_data.h"#include "mutt_mailbox.h"#include "muttlib.h"#include "mx.h"#include "nntp/adata.h"#include "nntp/mdata.h"#include "private_data.h"#include "sort.h"
Include dependency graph for functions.c:Go to the source code of this file.
Functions | |
| static int | op_subscribe_pattern (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Subscribe to newsgroups matching a pattern - Implements browser_function_t -. | |
| void | browser_init_keys (struct NeoMutt *n, struct SubMenu *sm_generic) |
| Initialise the Browser Keybindings - Implements ::init_keys_api. | |
| void | destroy_state (struct BrowserState *state) |
| Free the BrowserState. | |
| static int | browser_add_selection (struct FolderFilePtrArray *ffpa, struct BrowserState *state, struct Menu *menu, bool tagged, int count) |
| Build a working set of FolderFile pointers for an action. | |
| static int | op_browser_new_file (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Select a new file in this directory - Implements browser_function_t -. | |
| static void | browser_apply_subscribe_nntp (struct FolderFilePtrArray *ffpa, struct NntpAccountData *adata, bool subscribe) |
| Subscribe/unsubscribe to NNTP newsgroups. | |
| static void | browser_apply_subscribe_imap (struct FolderFilePtrArray *ffpa, bool subscribe) |
| Subscribe/unsubscribe to IMAP mailboxes. | |
| static int | op_browser_subscribe (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Subscribe to current mbox (IMAP/NNTP only) - Implements browser_function_t -. | |
| static int | op_browser_tell (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Display the currently selected file's name - Implements browser_function_t -. | |
| static int | op_browser_toggle_lsub (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Toggle view all/subscribed mailboxes (IMAP only) - Implements browser_function_t -. | |
| static int | op_browser_view_file (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| View file - Implements browser_function_t -. | |
| static struct NntpMboxData * | browser_apply_catchup (struct FolderFilePtrArray *ffpa, struct Mailbox *m, struct NntpAccountData *adata, bool up) |
| (Un)catchup a working set of newsgroups | |
| static int | op_catchup (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Mark all articles in newsgroup as read - Implements browser_function_t -. | |
| static int | op_change_directory (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Change directories - Implements browser_function_t -. | |
| static int | op_create_mailbox (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Create a new mailbox (IMAP only) - Implements browser_function_t -. | |
| static int | browser_apply_delete_mailbox (struct FolderFilePtrArray *ffpa, struct BrowserState *state, struct Mailbox *m, int *num_failed) |
| Delete a working set of IMAP mailboxes. | |
| static int | op_delete_mailbox (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Delete the current mailbox (IMAP only) - Implements browser_function_t -. | |
| static int | op_enter_mask (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Enter a file mask - Implements browser_function_t -. | |
| static int | op_exit (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Exit this menu - Implements browser_function_t -. | |
| static int | op_jump (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Jump to an index number - Implements browser_function_t -. | |
| static int | op_generic_select_entry (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Select the current entry - Implements browser_function_t -. | |
| static int | op_load_active (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Load list of all newsgroups from NNTP server - Implements browser_function_t -. | |
| static int | op_mailbox_list (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| List mailboxes with new mail - Implements browser_function_t -. | |
| static int | op_rename_mailbox (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Rename the current mailbox (IMAP only) - Implements browser_function_t -. | |
| static int | op_sort (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Sort messages - Implements browser_function_t -. | |
| static int | op_toggle_mailboxes (struct BrowserPrivateData *priv, const struct KeyEvent *event) |
| Toggle whether to browse mailboxes or all files - Implements browser_function_t -. | |
| int | browser_function_dispatcher (struct MuttWindow *win, const struct KeyEvent *event) |
| Perform a Browser function. | |
Variables | |
| static const struct MenuFuncOp | OpBrowser [] |
| Functions for the file Browser Menu. | |
| static const struct MenuOpSeq | BrowserDefaultBindings [] |
| Key bindings for the file Browser Menu. | |
| static const struct BrowserFunction | BrowserFunctions [] |
| All the NeoMutt functions that the Browser supports. | |
Browser functions.
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 functions.c.
Initialise the Browser Keybindings - Implements ::init_keys_api.
Definition at line 129 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void destroy_state | ( | struct BrowserState * | state | ) |
Free the BrowserState.
| state | State to free |
Frees up the memory allocated for the local-global variables.
Definition at line 152 of file functions.c.
Here is the caller graph for this function:
|
static |
Build a working set of FolderFile pointers for an action.
| ffpa | FolderFile Array to populate |
| state | Browser state (source of entries) |
| menu | Menu |
| tagged | Use tagged entries (tag-prefix) |
| count | Repeat-count (0 or 1 == just the current selection) |
| num | Number of entries added |
If tagged is true, the array is filled with the tagged entries (in source order) and count is ignored.
Otherwise the array is filled with the current selection and the next count - 1 entries. Overruns are silently capped at the end of the list.
Definition at line 181 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Subscribe/unsubscribe to NNTP newsgroups.
| ffpa | Working set of FolderFiles |
| adata | NNTP account |
| subscribe | true to subscribe, false to unsubscribe |
Definition at line 249 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Subscribe/unsubscribe to IMAP mailboxes.
| ffpa | Working set of FolderFiles |
| subscribe | true to subscribe, false to unsubscribe |
Definition at line 273 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
(Un)catchup a working set of newsgroups
| ffpa | Working set of FolderFiles |
| m | Mailbox |
| adata | NNTP account |
| up | true to catchup, false to uncatchup |
| ptr | Last NntpMboxData touched (NULL if nothing changed) |
Definition at line 438 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Delete a working set of IMAP mailboxes.
| [in] | ffpa | Working set of FolderFiles (ascending source order) |
| [in] | state | Browser state (source array) |
| [in] | m | Current mailbox |
| [out] | num_failed | Number of mailbox deletions that failed |
| num | Number of mailboxes successfully deleted (and removed from state) |
Iterates the working set in reverse so that ARRAY_REMOVE() does not invalidate the pointers we still need.
Definition at line 678 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int browser_function_dispatcher | ( | struct MuttWindow * | win, |
| const struct KeyEvent * | event ) |
Perform a Browser function.
| win | Window for the Browser |
| event | Event to process |
| num | FunctionRetval, e.g. FR_SUCCESS |
Definition at line 1442 of file functions.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Functions for the file Browser Menu.
Definition at line 69 of file functions.c.
|
static |
Key bindings for the file Browser Menu.
Definition at line 103 of file functions.c.
|
static |
All the NeoMutt functions that the Browser supports.
Definition at line 1404 of file functions.c.