aboutsummaryrefslogtreecommitdiff
path: root/widgets
AgeCommit message (Collapse)Author
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
2020-01-05msgviewer: decode headers prior to displaying themReto Brunner
2020-01-05msgviewer: bypass filter for headersReto Brunner
2020-01-05msgviewer: do not anchor ansi escape to start of lineReto Brunner
2019-12-27msgviewer: Add Labels as a virtual headerReto Brunner
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.
2019-12-21add LabelList eventReto Brunner
2019-12-21msglist: highlight marked messagesReto Brunner
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
2019-12-21msgviewer: implement ProvidesMessages interfaceReto Brunner
2019-12-21AccountView: implement ProvidesMessagesReto Brunner
2019-12-21widgets: add msgInfoFromUids helperReto Brunner
2019-12-21add ProvidesMessages interfaceReto Brunner
2019-12-21Add address book completion in composerBen Burwell
Complete email address fields in the message composer with an external address book command, compatible with mutt's query_cmd.
2019-12-21Show textinput completions in popoversBen Burwell
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.
2019-12-19Use timestamp-format in msgviewerBen Burwell
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.
2019-12-12Composer: fix EOF errorsDrew DeVault
PrepareHeaders generated a fresh message ID and Date header every time. This instead generates those headers in advance.
2019-12-09Add custom sorting for foldersMichele Finotto
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.
2019-12-08remove garbage headers in reply messageLeszek Cimała
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.
2019-12-07failback to Content-Type filename when encoded Content-Disposition is usedLeszek Cimała
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
2019-12-07fix non-utf8 encoding in msgviewerernierasta
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
2019-12-07Parse headers from templateRobert Günzler
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.
2019-12-04Revert "Parse headers from template"Drew DeVault
This reverts commit 31e3e9f56e0b8123f0238537112496b407055aef.
2019-12-04Parse headers from templateRobert Günzler
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.
2019-11-21widgets/terminal: Reap more zombiesKevin Kuehler
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>
2019-11-17Allow fields in compose widget to be clickedGreg Anders
When the mouse is enabled, clicking on a header field switches focus to that field (likewise for the terminal).
2019-11-17Complete the F rune.Srivathsan Murali
%F now shows the auth name or recepient name/address if the message is from you.
2019-11-17Add UI options to save/pipe messages with unsupported mimetypesGreg Anders
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.
2019-11-17Check for terminal before forwarding mouse eventGreg Anders
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.
2019-11-10Add some defaults for template optionsDrew DeVault
2019-11-10Add Templates with ParsingSrivathsan Murali
+ 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.