Commit graph

117 commits

Author SHA1 Message Date
Drew DeVault
3376f926ed Refactor message part into dedicated widget 2019-05-20 15:03:47 -04:00
Drew DeVault
98da4c9509 s/aerc2/aerc/g 2019-05-17 20:57:10 -04:00
Drew DeVault
6c36e04c1f Add :send-message, prepares & writes email to /tmp 2019-05-14 13:07:48 -04:00
Simon Ser
5685a17674 lib/ui: introduce Invalidatable
Many Drawable implementations have their own Invalidate and OnInvalidate
functions, with an unexported onInvalidate field. However OnInvalidate and
Invalidate are usually not called in the same goroutine. This results in a race
on this field, e.g.:

    Read at 0x00c000094748 by goroutine 7:
      git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1()
          /home/simon/src/aerc2/widgets/dirlist.go:85 +0x56
      git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1()
          /home/simon/src/aerc2/widgets/spinner.go:93 +0x1bb

    Previous write at 0x00c000094748 by main goroutine:
      [failed to restore the stack]

    Goroutine 7 (running) created at:
      git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start()
          /home/simon/src/aerc2/widgets/spinner.go:46 +0x8f
      git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList()
          /home/simon/src/aerc2/widgets/dirlist.go:37 +0x286
      git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView()
          /home/simon/src/aerc2/widgets/account.go:50 +0x5ca
      git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc()
          /home/simon/src/aerc2/widgets/aerc.go:60 +0x800
      main.main()
          /home/simon/src/aerc2/aerc.go:65 +0x33e

To fix this, introduce a new type, Invalidatable, which protects the field.
Unfortunately the Drawable must be passed to the callback function in
Invalidate, so we still need to re-implement this in each Invalidatable user.
2019-04-27 14:30:28 -04:00
Gokberk Yaltirakli
ec09ec8b0e Lowercase MIME types while matching filters 2019-04-07 14:12:19 -04:00
Drew DeVault
315cdf308a Remove extra debug statement 2019-03-31 15:21:33 -04:00
Drew DeVault
36419d85aa Use shell to execute filters, fix non-determinism 2019-03-31 15:21:04 -04:00
Drew DeVault
8e5ed2a161 Implement header-regex-match filters 2019-03-31 14:42:18 -04:00
Drew DeVault
f9262e4b06 Improve error handling in message viewer
Still not great but at least it tells you when something went wrong
2019-03-31 14:32:26 -04:00
Drew DeVault
bbdf9df75e Add basic filter implementation 2019-03-31 14:24:53 -04:00
Drew DeVault
711d22891b Decode messages before rendering them 2019-03-31 13:36:37 -04:00
Drew DeVault
0abafa60e1 Make message viewer real, part two 2019-03-31 12:35:51 -04:00
Drew DeVault
27b25174e2 Make the message viewer real, part one 2019-03-31 12:14:37 -04:00
Drew DeVault
4bdc0f3715 Minor refactoring to header view 2019-03-30 16:50:14 -04:00
Drew DeVault
78db7ccafa Use bold instead of inverted for header names 2019-03-30 15:59:42 -04:00
Drew DeVault
337dd18c9c Add multipart selector mockup to msgviewer 2019-03-30 15:55:21 -04:00
Drew DeVault
fa04a1e036 Add basic message viewer mockup 2019-03-30 14:12:04 -04:00