aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
Commit message (Collapse)AuthorAgeFilesLines
* create OriginalMail structLeszek Cimała2020-01-092-3/+5
|
* FetchBodyParts: decode source in the workersReto Brunner2020-01-051-23/+3
| | | | | | | Previously the workers returned a mixture of decoded / encoded parts. This lead to a whole bunch of issues. This commit changes the msgviewer and the commands to assume parts to already be decoded
* msgviewer: decode headers prior to displaying themReto Brunner2020-01-051-1/+7
|
* msgviewer: bypass filter for headersReto Brunner2020-01-051-3/+6
|
* msgviewer: do not anchor ansi escape to start of lineReto Brunner2020-01-051-1/+1
|
* msgviewer: Add Labels as a virtual headerReto Brunner2019-12-272-6/+26
| | | | | | In order to accommodate for that, the headerlayout needed to be rewritten to pass the filter criteria back to the msgviewer, instead of just using the normal headers.
* add LabelList eventReto Brunner2019-12-211-0/+7
|
* msglist: highlight marked messagesReto Brunner2019-12-211-1/+1
| | | | | | Note that, until we get color configuration, this means that the user *must* have the %Z verb in the index format else it'll be horribly confusing as no visual indication is provided
* msgviewer: implement ProvidesMessages interfaceReto Brunner2019-12-211-0/+7
|
* AccountView: implement ProvidesMessagesReto Brunner2019-12-211-0/+7
|
* widgets: add msgInfoFromUids helperReto Brunner2019-12-211-0/+20
|
* add ProvidesMessages interfaceReto Brunner2019-12-211-0/+8
|
* Add address book completion in composerBen Burwell2019-12-211-3/+20
| | | | | Complete email address fields in the message composer with an external address book command, compatible with mutt's query_cmd.
* Show textinput completions in popoversBen Burwell2019-12-212-6/+13
| | | | | | Rather than showing completions inline in the text input, show them in a popover which can be scrolled by repeatedly pressing the tab key. The selected completion can be executed by pressing enter.
* Use timestamp-format in msgviewerBen Burwell2019-12-191-3/+3
| | | | | This allows the time to be displayed in a user-configurable way. Also localize the time in the message viewer as it is in the message list.
* Composer: fix EOF errorsDrew DeVault2019-12-121-6/+10
| | | | | PrepareHeaders generated a fresh message ID and Date header every time. This instead generates those headers in advance.
* Add custom sorting for foldersMichele Finotto2019-12-091-2/+34
| | | | | | | | | | | | | | A new config options for accounts.conf (folders-sort) was added to allow a user to choose which folders should be shown on top. My use case was to avoid stepping into heavy, but rarely viewed folders when cycling through other often accessed ones. To test add this to your account.conf: folders-sort = INBOX,Sent,Archive INBOX, Sent and Archive should then show at the top of your dirlist, and all other folders should come next in alphabetical order.
* remove garbage headers in reply messageLeszek Cimała2019-12-081-1/+2
| | | | | | Very important fix. Remove garbage from reply message headers. Till now all Original fields were send in reply, which we do not want and could lead to uncorrect email message.
* failback to Content-Type filename when encoded Content-Disposition is usedLeszek Cimała2019-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | | Hi! This patch will fix missing filename if it is RFC2231 encoded with charset different then ASCII or UTF8. Example how it looks like in mail: Content-Type: application/pdf; name="=?UTF-8?Q?Opis_przedmiotu_zam=c3=b3wienia_-_za=c5=82=c4=85cznik_nr_1?= =?UTF-8?Q?=2epdf?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0*=iso-8859-2''%4F%70%69%73%20%70%72%7A%65%64%6D%69%6F%74%75%20; filename*1*=%7A%61%6D%F3%77%69%65%6E%69%61%20%2D%20%7A%61%B3%B1%63%7A%6E; filename*2*=%69%6B%20%6E%72%20%31%2E%70%64%66 Yes, this should be forbidden :-). Anyway, best solotion in such cases is to failback to Content-Type name. I am not sure if it is guaranted to be there, but probably it will. Leszek
* fix non-utf8 encoding in msgviewerernierasta2019-12-071-2/+2
| | | | | | | | This patch should fix encoding problem with non-utf8 text/plain mime. It is now correctly convert to utf8 before sending to pager. It will also solve quoting such mails. Leszek
* Parse headers from templateRobert Günzler2019-12-071-3/+50
| | | | | | | | | | | This patch parses the processed template for headers and populates matching header editors. Those are then stripped from the template body before prepending the template and remaining header fields to the composer content. The main motivation for this is keeping receiver, sender and subject lines in the template file and generating the message subject from the date.
* Revert "Parse headers from template"Drew DeVault2019-12-041-39/+3
| | | | This reverts commit 31e3e9f56e0b8123f0238537112496b407055aef.
* Parse headers from templateRobert Günzler2019-12-041-3/+39
| | | | | | | | | | | Parse the processed template for headers and populates matching header editors accordingly. Those are then stripped from the template body before prepending it and remaining header fields to the composer content. The motivation for this is keeping receiver, sender and subject lines in the template file and generating the message subject with the date functions.
* widgets/terminal: Reap more zombiesKevin Kuehler2019-11-211-0/+1
| | | | | | | The editor and pager were not properly being reaped, causing resource leakage whenever a user replies to a message. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Allow fields in compose widget to be clickedGreg Anders2019-11-171-2/+32
| | | | | When the mouse is enabled, clicking on a header field switches focus to that field (likewise for the terminal).
* Complete the F rune.Srivathsan Murali2019-11-171-0/+1
| | | | | %F now shows the auth name or recepient name/address if the message is from you.
* Add UI options to save/pipe messages with unsupported mimetypesGreg Anders2019-11-176-122/+161
| | | | | | | | | | | | | | | Adds a message indicating the user's ability to :save or :pipe a message with an unsupported mimetype and also adds a selector widget (similar to the tutorial). The selector widget was previously defined in the account wizard module, so this commit breaks it out into its own module to allow for re-use. Further, modify the BeginExLine() function to take an argument that pre-populates the command line, allowing functions to initiate an ex command without executing it. Closes #95.
* Check for terminal before forwarding mouse eventGreg Anders2019-11-171-1/+1
| | | | | | | When viewing a message part with no available filter, clicking the UI would cause a nil pointer dereference because the MouseEvent was passed to the PartViewer's `term` field, which does not exist in the case of an absent filter.
* Add some defaults for template optionsDrew DeVault2019-11-101-2/+4
|
* Add Templates with ParsingSrivathsan Murali2019-11-102-5/+39
| | | | | | | | | | | | | | | + Changes NewComposer to return error. + Add lib to handle templates using "text/template". + Add -T option to following commands - compose. - reply - forward + Quoted replies using templates. + Forwards as body using templates + Default templates are installed similar to filters. + Templates Config in aerc.conf. - Required templates are parsed while loading config. + Add aerc-templates.7 manual for using template data.
* widgets/msgviewer: Don't crash if pager is nilKevin Kuehler2019-11-101-1/+1
| | | | Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* widgets/msgview: Reap the filter commandKevin Kuehler2019-10-161-0/+1
| | | | | | | | The filter command shells out and returns almost immediately. Call Wait() so the filter process gets reaped. Prior to this patch, aerc creates a zombie process for every email that is viewed. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Cleanup pager processes after closing a msgviewerKevin Kuehler2019-10-161-0/+17
| | | | | | | | | A pager is spawned every time an email is viewed but not killed off when quitting the msgviewer, thus leading to process leakage. This patch fixes this by adding a Close method to the msgview widget, which is called in the close command. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
* Revert "Show spinner when fetching contents"Drew DeVault2019-10-091-3/+0
| | | | This reverts commit 1339faf7881f33762c6e0a4915404e362fc51de1.
* Show spinner when fetching contentsJeffas2019-10-091-0/+3
| | | | | The spinner should be shown when fetching the contents as we don't know at that point whether there are some messages or not.
* Fix selected account to return for messageviewerJeffas2019-10-021-4/+6
| | | | | | This ensures that the selectedaccount is returned if currently selected tab is a messageviewer. This also makes it more extensible for adding other ways of getting the selected account.
* Add sorting functionalityJeffas2019-09-201-0/+14
| | | | | | | | There is a command and config option. The criteria are a list of the sort criterion and each can be individually reversed. This only includes support for sorting in the maildir backend currently. The other backends are not supported in this patch.
* Revert "Fix out-of-order messages by sorting as we display"Drew DeVault2019-09-181-31/+0
| | | | This reverts commit ac99d9ed62644cf0259bdd79481b28c3fbcef650.
* widgets: remove duplicate importWagner Riffel2019-09-121-18/+17
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* Add signaturesJeffas2019-09-122-2/+66
| | | | | | | | | | | | | This adds the ability for per-account signatures in the accounts.conf config file. The signature is added to emails in the editor at the bottom of the email. This includes when forwarding, replying to, and composing emails. There are two config options: signature-file and signature-cmd. The former allows a signature to be read from a file and the latter allows an arbitrary command to be executed to return the signature. The config options have been documented in aerc-config
* Add modify-labels commandReto Brunner2019-09-121-3/+3
| | | | | This adds the event type as well as the command implementation, but no backend supports it yet.
* Add display of unread messages in dirlistJeffas2019-09-111-1/+98
| | | | | | | Add an onUpdateDirs handler. This is used to invalidate the dirlist and redraw with the correct number of recent/unread/total messages is shown. A config option and formatting options are provided.
* Fix segfault on deleteDevon Johnson2019-09-111-1/+5
|
* Add MouseableJeffas2019-09-118-23/+212
| | | | | | | | | | | | | | | | | | | | | | This adds the Mouseable interface. When this is implemented for a component that item can accept and process mouseevents. At the top level when a mouse event is received it is passed to the grid's handler and then it trickles down until it reaches a component that can actually handle it, such as the tablist, dirlist or msglist. A mouse event is passed so that components can handle other things such as scrolling with the mousewheel. The components themselves then perform the necessary actions. Clicking emails in the messagelist opens them in a new tab. Textinputs can be clicked to position the cursor inside them. Mouseevents are not forwarded to the terminal at the moment. Elements which do not handle mouse events are not required to implement the Mouseable interface.
* widgets: gofmtWagner Riffel2019-09-041-2/+2
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* widgets: rewrite references to os.SET_SEEK to io.SeekStartWagner Riffel2019-09-041-4/+4
| | | | | | | Os.SET_SEEK is deprecated, it's recommended to use contants from io package Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* all: purge redundant underscoresWagner Riffel2019-09-042-3/+3
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* Use sort.Stable for sorting displayed messagesa3v2019-09-021-1/+1
| | | | | With sort.Sort, sometimes two messages with the same timestamp will switch places every time the message list is redrawn
* Allow custom spinner via config filePaul Spooren2019-08-303-21/+12
| | | | | | | | | | | Allows to set `ui.spinner=` to a string which is then split by `ui.spinner-delimiter=` (Default: comma) instead of having a hard coded animation. This implementation doesn't use INIs capabilities to split strings as it trims whitespaces breaking the default animation. Signed-off-by: Paul Spooren <mail@aparcar.org>
* Fix out-of-order messages by sorting as we displayStephen Brennan2019-08-291-0/+31
| | | | | | | | | | Sometimes I observe out-of-order messages when using a maildir inbox. It appears that the UIDs for these messages are returned out of order by the MessageStore. In order for a maildir MessageStore to return messages in most recently received order, it must have already opened all messages and parsed the date to use as a sort key. Rather than implement that, simply sort messages by time as we display. This fix shows my emails in order.