summaryrefslogtreecommitdiffstats
path: root/buffy.h
AgeCommit message (Collapse)Author
2021-01-22Add -nonotify argument to mailboxes commandRene Kita
-nonotify allows to disable notifications for mailboxes. -notify can be used to re-enable notifications for a previously disabled mailbox. A typical use case are mailboxes for mailing lists. The User may want to get notified about new mail in their work mailbox, but not get disrupted by new mail received from the mailing list. This patch allows individual configuration for all mailboxes.
2020-07-06Directly add/remove mailboxes for IMAP.Kevin McCarthy
The LSUB processor along with <subscribe> and <unsubscribe> would construct a mailboxes command and send it to the muttrc parser. Since the poll/label refactor it's much easier to just directly call the functions, and is much more secure. So do that instead.
2020-03-27Add -label and -nopoll arguments to mailboxes commandKevin McCarthy
-nopoll allows adding the mailbox to the sidebar, or the mailbox browser menu, without incurring polling costs. -poll can be used to re-enable polling for a previously disabled mailbox. -label allows specifying an alternative string to show in the sidebar and mailbox browser menu. -nolabel removes a label from an existing mailbox. Change $sidebar_sort_method so that "alpha" and "name" will sort by the label if specified. "path", however, will always sort by the actual mailbox path.
2019-06-21Remove NULL and 0 INITVAL declarataions.Kevin McCarthy
The C standard says static storage duration variables will be initialized to NULL/0.
2019-04-16Convert BUFFER->path to a BUFFER.Kevin McCarthy
Rename to BUFFER->pathbuf to make it clear the field is a BUFFER, and to make sure to catch and review all usages. There are still uses of pathbuf that are truncating and need to be fixed, for example in browser.c and buffy.c. Fix up sidebar usage in one place, that was pointing inside the BUFFY->path with a char *. At the same time, change their "short folder" computation to also use a BUFFER.
2019-04-16Change BUFFY->realpath to be const char *.Kevin McCarthy
BUFFY->path is a fixed array (which will be converted to a BUFFER in the next commit). This is needed to call mutt_expand_path(). However, BUFFY->realpath has no such need, and so it is a bit wasteful (not to mention not big enough) to store as such.
2019-04-07Create mutt_buffer_buffy() buffer function.Kevin McCarthy
Relocate some of the buffy function declarations to buffy.h while adding the new declaration.
2018-12-31Remove trailing whitespace.Kevin McCarthy
The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
2018-06-28Add check-stats function to calculate mailbox statistics.Anton Lindqvist
This allows the statistics to be updated without setting $mail_check_stats or before $mail_check_stats_interval has passed.
2018-06-18Convert context and buffy to use nanosecond timestamps.Kevin McCarthy
The inotify interface has an unfortunate side effect of making Mutt react too quickly to new mail. Sometimes, the mail is only half-delivered when the mailbox is checked. Because Mutt is using the stat mtime - seconds resolution - this means it won't realize there are more messages delivered during the same second. Nanosecond resolution fields were standardized in POSIX.1-2008, so check for and use those if they are available.
2016-07-02Decouple the sidebar from the Buffy list.Kevin McCarthy
Change the sidebar to use an array of SBENTRY* instead. Move the "is_hidden" into SBENTRY. Remove the added "prev" pointer from BUFFY. This way, sorting the sidebar doesn't affect the BUFFY list order, and we don't need elements inside BUFFY just for the sidebar presentation. Fix sidebar-next for the case where the mailboxes are unsorted and $sidebar_new_mail_only is set. Change sorting not to clump hidden mailboxes at the bottom, instead simply skip over hidden mailboxes in sidebar-next/prev.
2016-06-23Change sidebar to consistently use realpath for context and buffy comparison.Kevin McCarthy
The original sidebar patch contained a half-implemented attempt to use realpath() mailbox paths for comparison. (Presumably so the open mailbox remains highlighted despite symlink issues). Add realpath to the Context, and set it when opening a mailbox. Remove sidebar ifdef for the buffy member, and always set it there too. Change the sidebar to use the realpath for comparison everywhere. mutt_buffy_check() is using stat device and inode for comparison. Perhaps this can be changed to use realpath instead, but that's beyond the scope of this patch.
2016-06-17Combine the basic and extended buffy functions.Kevin McCarthy
Add a check_stats parameter to the mbox, maildir, and mh buffy functions. Use that parameter to determine whether to also count total, new, and flagged messages. This makes the functions a bit more complicated, but improves efficiency (for maildir and mh). Also includes the following cleanup/fixes: * Move the orig-value counter reset to the beginnining of the loop, (before tmp->new is set to 0). * Change trashed maildir messages to not be counted in msg_count * Remove an incorrect setting of mailbox->new based on msg_count in maildir. (I missed this one for 1f840760e6e0) * Change mbox to use the context->mtime for stats_last_checked, removing a race condition. * Fix mh to actually count the messages in order to generate msg_count. mh_sequences only covers the range of messages with some sort of flag.
2016-06-07Make extended buffy independent of the sidebar.Kevin McCarthy
Add new boolean option $mail_check_stats (default off) and $mail_check_stats_interval. The first turns extended buffy on. The second sets the amount of time in between extended buffy checks (defaulting to 60 seconds). Remove the option $sidebar_refresh_time. Change mutt_buffy_check() to only notify the sidebar to redraw if a mailbox buffy value changes. Remove the #ifdefs around the extended buffy functions. The next patch will merge these functions with the basic functions and pass a parameter instead. Imap is a special case, because it sends out the status in one batch. Change this to perform the comparisons inside cmd_parse_status() and flag the sidebar there. It was previously directly assigning the status counters (unsigned int) to the buffy->new (short). Change this to assign 1/0.
2016-06-04Add neomutt version of sidebar patch. (closes #3829)Richard Russon
This is the patch from neomutt; branch 'devel/win-sidebar'; commit c796fa85f9cacefb69b8f7d8545fc9ba71674180 with the following changes: - move the sample muttrc and vimrc to contrib. - remove the README.sidebar. - empty out the PATCHES file.
2016-05-09Change M_* symbols to MUTT_*Derek Martin
Changeset 23334e967dd7 created a workaround for a namespace conflict with Solaris and derivatives. After some discussion, the team decided it would be best to move away from using the "M_" prefix for macros. This patch was automatically generated by running: perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print` with the exception that sys_socket.h was exempted. (That file will be backed out subsequent to this commit.) Thanks to Andras Salamon for supplying the perl script used to make this change.
2016-01-01Update copyright notices.Kevin McCarthy
This patch only updates existing copyright notices in the source files, using commit dates since the last copyright update in commits e3af935cdb1a and f8fd60d8d3f2. Add a notice to the COPYRIGHT file to refer to our mercurial repository for the full commit history. Add myself to the COPYRIGHT file and smime_keys.pl file.
2013-01-23add support for $mail_check_recent to mh mailbox driverMichael Elkins
closes #3629
2010-09-12add $mail_check_recent boolean to control whether Mutt will notify about all ↵Michael Elkins
new mail, or just new mail received since the last visit to a mailbox closes #3271 partly addresses #3310
2009-07-05Suppress new mail notification from mailbox just left. Closes #3290.Brendan Cully
2009-04-21Call mutt_expand_path() from mutt_buffy to fix imap separator.Aron Griffis
Closes #3208 and #3218 Signed-off-by: Aron Griffis <agriffis@n01se.net>
2009-04-11Don't raise new mail flag on mbox/mmdf Fcc mailboxes. Closes #1896.Rocco Rutte
2008-05-21Fix new mail detection for >2 GB mboxes with $check_mbox_size setRocco Rutte
2007-03-20Make BUFFY_SIZE a runtime switch ($check_mbox_size)Miroslav Lichvar
2005-09-17Gah, forgot the zip code when updating the FSF address...Brendan Cully
2005-09-17Update FSF address (via sed, I hope nothing got mangled). Closes: #2071.Brendan Cully
2002-12-11Fix Mike's and my e-mail addresses in copyright lines.Thomas Roessler
2002-09-09An unmailboxes command. #1311.Nicolas Rachinsky
2000-03-03The FSF apparently has moved.Thomas Roessler
2000-01-06Update copyright notices for unstable.Thomas Roessler
1999-01-07Get rid of RCS ids in source files. They are getting in our wayThomas Roessler
when merging changes.
1998-10-13Add RCS $Id$ strings to (hopefully) all source files.Thomas Roessler
1998-06-08Initial revisionThomas Roessler