aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/msglist.go
Commit message (Collapse)AuthorAgeFilesLines
* Apply relevant msglist styles in orderChris Vittal2020-11-011-13/+14
| | | | | | | | | | | | | | | | | | Allow styles to be layered over a base style. The list of styles to apply is layered over the base style in order, such that if the layer does not differ from the base it is not used. The order that these styles are applied in is, from first to last: msglist_default msglist_unread msglist_read (exclusive with unread, so technically the same level) msglist_flagged msglist_deleted msglist_marked So, msglist_marked style dominates. This fixes an issue where the msglist_deleted style was not being applied.
* refactor ParseMessageFormat to use a ctx objectReto Brunner2020-10-141-3/+8
|
* correctly apply msglist_read colory0ast2020-09-011-1/+4
|
* Implement style configuration.Kalyan Sriram2020-08-061-18/+32
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Revert "Implement style configuration."Reto Brunner2020-07-301-32/+18
| | | | This reverts commit 1ff687ca2b0821c2cacc1fa725abb3302d2af9da.
* Implement style configuration.Kalyan Sriram2020-07-301-18/+32
| | | | | | Introduce the ability to configure stylesets, allowing customization of aerc's look (color scheme, font weight, etc). Default styleset is installed to /path/to/aerc/stylesets/default.
* Fix nil pointer deref on EnvelopeAndrew Jeffery2020-07-021-3/+7
| | | | | The Envelope was nil but being deref'ed for the Subject. This was experienced when switching tabs on IMAP.
* Add scrollbarJeffas2020-06-091-3/+37
| | | | | This transplants the logic for drawing the scrollbar from dirlist and the completion popover and adds it to the msglist.
* Rework msglist scrollingJeffas2020-06-091-14/+30
| | | | | | | | | | | | This changes the scrolling to be done on the draw, when the height is updated, ensuring that the selected item is kept on screen during resizing. Also, this ensures that messages will fill the screen when resizing the window, for instance, shrinking and then growing drags down more messages if possible. This is a transplant of the dirlist scrolling logic.
* Revert "Add Style configuration"Drew DeVault2020-05-281-37/+18
| | | | This reverts commit 0f78f06610c0e8887aba2ae50e99b86477a384b3.
* Revert "Remove duration from the status methods"Drew DeVault2020-05-281-1/+2
| | | | This reverts commit f06d683688e3d2139b14f67b7e349089e7200bf4.
* Remove duration from the status methodsReto Brunner2020-05-271-2/+1
| | | | We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
* Add Style configurationReto Brunner2020-05-271-18/+37
| | | | | | | | | | The following functionalities are added to configure aerc ui styles. - Read stylesets from file with very basic fnmatch wildcard matching - Add default styleset - Support different stylesets as part of UiConfig allowing contextual styles. - Move widgets/ui elements to use the stylesets. - Add configuration manual for the styleset
* pgp: fail gracefully from email decryptionRay Ganardi2020-05-251-1/+5
| | | | | Aerc panics when there's an error on email decryption. Instead, an error message should be shown.
* Initial support for PGP decryption & signaturesDrew DeVault2020-03-031-2/+5
|
* Only show spinner while sorting if no uidsJeffas2020-02-281-7/+7
| | | | | This fixes the problem where we already have messages and then have to sort again.
* Don't show empty message while sortingJeffas2020-02-281-0/+6
| | | | | | This changes the ui to show the spinner while we are sorting. It only shows one line of the spinner since there are an unknown number of messages at this time.
* Fix crash on mouse scrolling before messages loadWiktor Kwapisiewicz2020-02-221-2/+6
| | | | | Using mouse scroll before messages load will trigger a panic as `ml.store` has not been assigned yet and is `nil`.
* config: Strongly type context typeReto Brunner2020-01-241-1/+1
| | | | | | | | The go compiler can't help much with untyped int constants. Even though the only valid constants are 0-3 it will happily accept 4 as input. Let's let the go compiler worry about correctness here. This also allows people not very familiar with the code to use it properly via auto completion.
* Contextual UI ConfigurationSrivathsan Murali2020-01-241-3/+9
| | | | | | | | | + 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
* 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
* 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.
* 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.
* Revert "Fix out-of-order messages by sorting as we display"Drew DeVault2019-09-181-31/+0
| | | | This reverts commit ac99d9ed62644cf0259bdd79481b28c3fbcef650.
* Add MouseableJeffas2019-09-111-1/+44
| | | | | | | | | | | | | | | | | | | | | | 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>
* 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-301-1/+1
| | | | | | | | | | | 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.
* msglist: add initialization stateReto Brunner2019-08-021-15/+31
| | | | | | | | | Make the msglist aware of whether we are still initializing or not. We never stopped spinning the msglist if we didn't get any Directories back from types.ListDirectories. With this change, we can set the init state from the account and display the spinner only if we don't know whether we have directories or not and else the "no messages" string from the config.
* Add new-email triggerJeffas2019-07-261-1/+4
| | | | | | | | | | | | | | | | | This patch sets up the trigger config section of aerc.conf. Each trigger has its own function which is called from the place where it is triggered. Currently only the new-email trigger is implemented. The triggers make use of format strings. For instance, in the new-email trigger this allows the user to select the trigger command and also the information extracted from the command and placed into their command. To actually execute the trigger commands the keypresses are simulated. Further triggers can be implemented in the future. Formatting of the command is moved to a new package.
* Implement :filter, :clearKevin Kuehler2019-07-191-13/+16
| | | | Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Factor IMAP-specific structs out of UI modelsBen Burwell2019-07-081-2/+1
| | | | | | | 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-2/+2
| | | | | | | | 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.
* Fix jumping around in searchDrew DeVault2019-06-261-10/+5
|
* Implement :search, :next-result, :prev-resultDrew DeVault2019-06-261-0/+1
|
* Fix automatic scrolling when messages arrive/leaveDrew DeVault2019-06-111-2/+2
|
* Move select functionality from msglist to msgstoreKevin Kuehler2019-06-111-43/+20
| | | | | | Remove msglist Next and Prev commands Signed-off-by: Kevin Kuehler <kkuehler@brave.com>
* msglist: use distinct style for unread emailsYash Srivastav2019-06-081-0/+15
|
* Truncate long subject linesDrew DeVault2019-06-071-1/+5
|
* Message list: implement index-format optionYash Srivastav2019-06-071-1/+6
|
* Advance cursor after :delete and :moveDrew DeVault2019-05-191-4/+5
| | | | So that you can repeat the action on the next message if appropriate
* Reset message list cursor when switching storesDrew DeVault2019-05-191-1/+1
|
* Advance message list cursor when messages arriveDrew DeVault2019-05-191-0/+13
|
* Update internal state and draw from the same goroutineSimon Ser2019-05-191-21/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new Aerc.Tick function that should be called to refresh the internal state. This in turn makes each AccountView process worker events. The UI goroutine repeatedly refreshes the internal state before drawing a new frame. The reason for this is that many worker messages may need to be processed for a single frame, and drawing the UI is far slower than refreshing the internal state. This has been confirmed in my testing (calling Aerc.Tick only once per frame results in a slower display). Many synchronization code has been removed. We can now write widgets without having to care so much about races. The remaining sync users are: - widgets/spinner: the spinner value is updated from inside an internal goroutine - lib/ui/invalidatable: Invalidate may be called from any goroutine - lib/ui/grid: same - lib/ui/ui: an internal goroutine needs read access to UI.exit - worker/types/worker: Worker.callbacks is used for both worker and UI callbacks The exact goroutine requirements for Drawable have been documented.
* s/aerc2/aerc/gDrew DeVault2019-05-171-4/+4
|
* Remove unimplemented color configurationDrew DeVault2019-05-171-2/+2
| | | | Will probably end up doing this differently anyway
* Implement ui.empty-message config optionDrew DeVault2019-05-171-1/+1
| | | | | Also removes some options that aren't going to be supported any time soon.
* Handle external message deletionsDrew DeVault2019-05-131-1/+0
|