summaryrefslogtreecommitdiff
path: root/widgets
AgeCommit message (Collapse)Author
2020-05-27Add Style configurationReto Brunner
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
2020-05-25Set AnsweredFlag on successful replySrivathsan Murali
2020-05-25aerc: Refactor getpasswd dialogRay Ganardi
Previously there's a hack for showing and hiding the dialog. Change it to use channels to emulate async/await
2020-05-25feat(pgp): Show error message from pgpRay Ganardi
The error wasn't shown, making errors like wrong password being ignored and the password is prompted again.
2020-05-25feat(pgp): Add <ESC> to cancel password promptRay Ganardi
Previously there was no way to cancel the password prompt.
2020-05-25pgp: fail gracefully from email decryptionRay Ganardi
Aerc panics when there's an error on email decryption. Instead, an error message should be shown.
2020-05-17FetchBodyPart doesn't need the parent body structureReto Brunner
2020-05-11Change MarkedMessages to return uidsReto Brunner
Especially if one tries to interact with all marked messages there could be the case that not all headers are fetched yet, hence the messageInfo is still nil. This segfaults a lot of commands which in principle only need the uid to complete. If we switch to uids, this issue can be alleviated for those commands.
2020-05-06Use stdout as controlling terminalGuillaume J. Charmes
Soves an issue with go1.15 not letting ctty be a parent. See https://github.com/creack/pty/pull/97 for more details. Signed-off-by: Guillaume J. Charmes <git+guillaume@charmes.net>
2020-05-06Revert "Dont detach process under vterm"Drew DeVault
This reverts commit d07cf6c667a0d497c67196fca9967db71c1e02f6.
2020-05-06Dont detach process under vtermGuillaume J. Charmes
Signed-off-by: Guillaume J. Charmes <git+guillaume@charmes.net>
2020-04-24gofmt fixesDrew DeVault
2020-04-24Add recall commandJeffas
This command allows recalling the selected postponed email to edit in the composer. The command only allows recalling from the postpone directory.
2020-04-24Add postpone commandJeffas
This command uses the Postpone folder from the account config to save messages to. Messages are saved as though they were sent so have a valid 'to' recipient address and should be able to be read back in for later editing.
2020-04-24Add :choose commandRay Ganardi
Usage: *choose* -o <key> <text> <command> [-o <key> <text> <command>]... Prompts the user to choose from various options.
2020-04-24Remove ability to specify headers in the editorReto Brunner
Due to headers being essentially free text, we constantly run into issues with parts of the body being interpreted as headers. Remove the ability to overwrite headers to avoid that, while keeping the ability to specify headers in the template files. Fixes #383
2020-04-23Use aerc.PushError where appropriateBen Fiedler
Forgot an unused import, to save you the hassle here is v2.
2020-04-20fix: Close unused MessageView when swapping viewRay Ganardi
Closes https://todo.sr.ht/~sircmpwn/aerc2/379 The old `MessageView` was not closed when replacing the tab content, which causes a memory leak.
2020-03-26fix function keys in terminal widgetJonathan Halmen
off-by-one error
2020-03-19msgviewer: do not interpret header as format stringDrew DeVault
2020-03-09Add pinned tabsJeffas
This adds the commands pin-tab and unpin-tab. Once pinned a tab lives on the left of the tabstrip and has a configurable marker, defaulting to ` before its name.
2020-03-09Refactoring: remove store from PartInfoDrew DeVault
2020-03-03Reduce size of the password prompt UIDrew DeVault
2020-03-03Yet another revision to PGP UIDrew DeVault
I think this will be the one.
2020-03-03Simplify PGP messagingDrew DeVault
2020-03-03compose: add space between headers and editorDrew DeVault
Until the PGP changes, this was merged into the header widget.
2020-03-03Initial support for PGP decryption & signaturesDrew DeVault
2020-03-03Add move-tab commandJeffas
2020-02-28Only show spinner while sorting if no uidsJeffas
This fixes the problem where we already have messages and then have to sort again.
2020-02-28Don't show empty message while sortingJeffas
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.
2020-02-28Set the store on the message list if it is nilJeffas
2020-02-28Don't set the store on an update to itJeffas
Updates to a store can be asynchronous so we shouldn't select it just because it had an update. Selection of the stores should be driven by explicit user commands.
2020-02-25widgets/dirlist: Fix total message countReto Brunner
This fixes an issue with the updated count logic, where only fetched messages where counted to the exists string of the rue count. Note that the count is still broken (we only count read / unread messages we fetched, but that is the same behaviour as prior to the commit 66b68f35b3f3f3b97ec9951397fd75afeb0d0995)
2020-02-25Fix crash on mouse scrolling between message partsAmir Yalon
2020-02-22Fix crash on mouse scrolling before messages loadWiktor Kwapisiewicz
Using mouse scroll before messages load will trigger a panic as `ml.store` has not been assigned yet and is `nil`.
2020-02-19fix missing importReto Brunner
2020-02-19Revert "Only fetch the directory contents when we are switching directories"Reto Brunner
This reverts commit bd4df530095ee343778a59120a9e641c01010b0f. I did not properly untangle the opening / dirlist update of each other. This interferes with the imap worker, hence the revert
2020-02-16dirlist: actually honor the DirInfoReto Brunner
Currently the dirlist ignores the counts provided by the dirInfo. However some of the workers can actually provide accurate counts much quicker than if we count the flags. Eventually we will also want to enable displaying counts for background folders, where the brute force counting won't work as none of the headers are fetched yet. This commit models it in an opt-in manner, if the flag isn't set then we still count the messages manually.
2020-02-16Only fetch the directory contents when we are switching directoriesReto Brunner
Previously, sending a DirectoryInfo assumed that a directory change happened. However we don't want that if we only want to update the unread message count.
2020-02-07Ensure we aren't selecting negative directoriesAndreas Rammhold
When the list of directories is empty trying to navigate in the directory list did previously lead to a crash. With this change we instead return early before trying to change the directory. Example backtrace: > panic: runtime error: index out of range [-1] > > goroutine 1 [running]: > git.sr.ht/~sircmpwn/aerc/widgets.(*DirectoryList).NextPrev(0xc000160680, 0xffffffffffffffff) > source/aerc/widgets/dirlist.go:285 +0xd4 > git.sr.ht/~sircmpwn/aerc/commands/account.NextPrevFolder.Execute(0xc000191040, 0xc00025c210, 0x1, 0x1, 0x0, 0xc00016f420) > source/aerc/commands/account/next-folder.go:44 +0xe0 > git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0xc0000101a8, 0xc000191040, 0xc00025c210, 0x1, 0x1, 0xc000020070, 0xb46d01) > source/aerc/commands/commands.go:66 +0xa7 > main.execCommand(0xc000191040, 0xc0001ca190, 0xc00025c210, 0x1, 0x1, 0xc00025c210, 0xc0003fb080) > source/aerc/aerc.go:60 +0xc7 > main.main.func3(0xc00025c210, 0x1, 0x1, 0x1, 0x1) > source/aerc/aerc.go:162 +0x57 > git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1(0xc000201db0, 0xb) > source/aerc/widgets/aerc.go:382 +0x83 > git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0xc0003be100, 0xb475a0, 0xc00023cba0, 0xc00023cba0) > source/aerc/widgets/exline.go:79 +0x131 > git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000191040, 0xb475a0, 0xc00023cba0, 0x99ee01) > source/aerc/widgets/aerc.go:202 +0x4c1 > git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).simulate(0xc000191040, 0xc000036f00, 0xd, 0x10) > source/aerc/widgets/aerc.go:195 +0x8d > git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000191040, 0xb475a0, 0xc00023c9c0, 0x9c5a60) > source/aerc/widgets/aerc.go:218 +0x3e8 > git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc0001ca190, 0xa99d00) > source/aerc/lib/ui/ui.go:92 +0x190 > main.main() > source/aerc/aerc.go:192 +0x5f2
2020-01-28dirlist: adapt to dynamic UIconfigReto Brunner
2020-01-28dirlist: remove not needed sort functionReto Brunner
The docs of strings.Compare state: > Compare is included only for symmetry with package bytes. It is usually > clearer and always faster to use the built-in string comparison operators > ==, <, >, and so on. So let's do that.
2020-01-24config: Strongly type context typeReto Brunner
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.
2020-01-24Contextual UI ConfigurationSrivathsan Murali
+ 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
2020-01-20Display the mimetype when offering to pipe or saveLuke Drummond
2020-01-16Switch back to upstream pty libraryBen Fiedler
The relevant change was merged upstream, and thus allows us to clean up unneeded forks.
2020-01-16Correct spellingReto Brunner
2020-01-09remove Original* checkLeszek Cimała
2020-01-09create OriginalMail structLeszek Cimała
2020-01-05FetchBodyParts: decode source in the workersReto Brunner
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