about summary refs log tree commit diff stats
path: root/widgets/msgviewer.go
Commit message (Collapse)AuthorAgeFilesLines
* fix: Close unused MessageView when swapping viewRay Ganardi2020-04-201-1/+2
| | | | | | | Closes https://todo.sr.ht/~sircmpwn/aerc2/379 The old `MessageView` was not closed when replacing the tab content, which causes a memory leak.
* msgviewer: do not interpret header as format stringDrew DeVault2020-03-191-2/+2
|
* Refactoring: remove store from PartInfoDrew DeVault2020-03-091-1/+0
|
* Initial support for PGP decryption & signaturesDrew DeVault2020-03-031-42/+61
|
* Fix crash on mouse scrolling between message partsAmir Yalon2020-02-251-2/+2
|
* Contextual UI ConfigurationSrivathsan Murali2020-01-241-1/+1
| | | | | | | | | + Adds parsing of contextual ui sections to aerc config. + Add GetUiConfig method for AercConfig that is used to get the specialized UI config. + Add UiConfig method to AccountView to get specialized UI Config. + Modifies Aerc codebase to use specialized UIConfig instead. + Adds documentation for Contextual UI Configuration
* Display the mimetype when offering to pipe or saveLuke Drummond2020-01-201-1/+3
|
* 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-271-1/+17
| | | | | | 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.
* msgviewer: implement ProvidesMessages interfaceReto Brunner2019-12-211-0/+7
|
* 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.
* 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
* Add UI options to save/pipe messages with unsupported mimetypesGreg Anders2019-11-171-13/+45
| | | | | | | | | | | | | | | 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.
* 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>
* Add MouseableJeffas2019-09-111-1/+71
| | | | | | | | | | | | | | | | | | | | | | 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.
* Fixing #231 (alternative preferred mimetypes)Ben Cohen2019-08-031-10/+10
|
* Support configurable header layout in compose widgetDaniel Bridges2019-07-261-37/+10
|
* Fix alternatives configDrew DeVault2019-07-191-2/+5
|
* Add option to always show mimetype in viewerJeffas2019-07-171-4/+6
| | | | | | | | | | A user may want to be able to see what mimetype they are viewing, so that they can determine what program it may be opened in or for some other reason. The config option is under the [viewer] section and is called 'always-show-mime'. It defaults to false to preserve the current behaviour.
* Remove passing of showHeaders explicitlyJeffas2019-07-171-12/+12
| | | | | Where it is needed the configs are already available so just extract the value from these.
* Ensure new partswitcher doesn't start on multipartJeffas2019-07-171-0/+2
|
* Display user specified headers in viewer if presentDaniel Bridges2019-07-171-40/+61
|
* Revert "Ensure new partswitcher doesn't start on multipart"Drew DeVault2019-07-171-1/+0
| | | | This reverts commit 41390bc3e1e557eff15e8159767f206b3b74ea30.
* Ensure new partswitcher doesn't start on multipartJeffas2019-07-171-0/+1
|
* Fix crashes when operating on empty folder (#216)Daniel Bridges2019-07-101-2/+6
|
* Factor IMAP-specific structs out of UI modelsBen Burwell2019-07-081-9/+8
| | | | | | | Before, we were using several IMAP-specific concepts to represent information being displayed in the UI. Factor these structures out of the IMAP package to make it easier for other backends to provide the required information.
* Factor UI models out of the worker message packageBen Burwell2019-07-081-8/+8
| | | | | | | | Before, the information needed to display different parts of the UI was tightly coupled to the specific messages being sent back and forth to the backend worker. Separating out a models package allows us to be more specific about exactly what a backend is able to and required to provide for the UI.
* Make :pipe command more genericDrew DeVault2019-07-051-8/+1
|
* Select user's preferred mimetype in MessageViewerClayton Craft2019-06-091-2/+13
| | | | | | | | | | | This implements selecting the most preferred mimetype under the 'View->Alternatives' configuration setting when viewing a message. Mimetypes in the alternatives array are weighted by their position, where the lower the index in the array the higher the priority, so this is taken into account during selection. If no message part matches a mimetype in the alternatives array, then it selects the first mimetype in the message.
* Message list: implement index-format optionYash Srivastav2019-06-071-23/+5
|
* Move ANSI stripping from filters to GoDrew DeVault2019-06-071-4/+20
|
* Remove unnecessary branchDrew DeVault2019-06-071-3/+0
|
* implements ability to view headers in message viewYash Srivastav2019-06-071-53/+91
|
* Add date to message viewerDrew DeVault2019-06-021-3/+9
|
* widget: Add ProvidesMessage interfaceKevin Kuehler2019-06-021-1/+15
| | | | | | | | | | | Consists of 3 functions * Store: Access to MessageStore type * SelectedAccount: Access to Account widget that the target widget belongs to * SelectedMessage: Current message (selected in msglist or the one we are viewing) Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Simplify layout of message viewer gridDrew DeVault2019-06-021-17/+3
| | | | This sub-grid was an artifact of an older design
* Add :save and :pipe commands to viewerGalen Abell2019-05-271-0/+19
| | | | | | | | | * :save takes a path and saves the current message part to that location * :pipe is the same as pipe on the account page, but uses the current message part rather than the whole email (ie :pipe gzip -d) * Refactored account:pipe and extracted common pipe code to commands.util.QuickTerm * Added helper command aerc.PushError
* msgviewer: copy stderr into pagerDrew DeVault2019-05-261-1/+17
| | | | This prevents a broken filter config from being a silent error
* Show unsupported mimetype message in redDrew DeVault2019-05-201-1/+1
|
* Show attachment names in multipart viewDrew DeVault2019-05-201-1/+5
|
* Implement :next-part, :prev-partDrew DeVault2019-05-201-2/+31
|
* Flesh out multipart switcherDrew DeVault2019-05-201-65/+141
|
* Refactor message part into dedicated widgetDrew DeVault2019-05-201-86/+148
|