Commit Graph

68 Commits (2199726b2c0971fd41df54c6fae809548302c830)

Author SHA1 Message Date
Manos Pitsidianakis 2199726b2c
Retidy shortcuts 2019-11-27 17:42:11 +02:00
Manos Pitsidianakis 1063bb73b5
shortcuts tidiness
- Unflatten shortcuts configuration table.
  Shortcuts now have to be defined in levels:
  [shortcuts.general]
  ...
  [shortcuts.pager]
  ...

- Add shortcuts for thread view
- Sort alphabetically in help view
2019-11-22 16:34:35 +02:00
Manos Pitsidianakis 678889d706
ui/threadview: add show_thread shortcut
Press 't' by default to toggle thread visibility
2019-11-22 16:22:52 +02:00
Manos Pitsidianakis f1588f6002
ui: shortcuts refactoring 2019-11-18 22:20:18 +02:00
Manos Pitsidianakis 995e70e009
ui: change line_break meaning in write_string_to_grid
Change line_break parameter from bool flag (whether to break in the end
of a line or not) to an Option<usize>, where the value is the x_offset
of the left side of the area. Thus if line_break == Some(_) when a line
ends its value is set as x to continue in the next line properly.
2019-11-18 14:49:50 +02:00
Manos Pitsidianakis 62f3d12253
ui/view: move reply and edit to view.rs
reply and edit actions where only in view/thread.rs, so simple envelope
views had no way to reply. view.rs is used standalone or within
view/thread.rs so it is the appropriate place for the actions.
2019-11-17 12:05:57 +02:00
Manos Pitsidianakis 94152f7336
ui: add multiplier shortcuts to cursor movements
Prepend a cursor movement (Up/Down/PageUp/PageDown) with a multiplier
(e.g 23+Down, that is '2' then '3' then 'Down') to increase the
movement's length.
2019-11-12 22:14:44 +02:00
Manos Pitsidianakis 78eecbb104
melib: Hide Envelope behind RwLock
Envelope can now only be accessed from within a RwLock. Two new structs
are introduced: EnvelopeRef and EnvelopeRefMut. These hold a reference
to an Envelope and the mutex guard that keeps them alive.

This change allows sharing of the envelopes hash map amongst threads.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 6f816d29c5
conf: add ascii_drawing option
If set to true, box drawing is done with ascii characters.
2019-10-06 11:32:35 +03:00
Manos Pitsidianakis 91ae539de1
Small fixes 2019-09-26 13:11:49 +03:00
Manos Pitsidianakis ad01101b9b
ui: fix ThreadView drawing artifacts 2019-09-15 23:38:31 +03:00
Manos Pitsidianakis af38b7e7cb
ui: add envelope views in new tab action 2019-09-15 23:38:31 +03:00
Manos Pitsidianakis 335a1011de
imap: add watch 2019-09-15 13:21:14 +03:00
Manos Pitsidianakis 1845b046fa
ui: add attribute support
bold/italic etc
2019-08-18 15:47:09 +03:00
Manos Pitsidianakis 2610e9c055
ui: don't check terminal size in ThreadView 2019-08-17 12:56:11 +03:00
Manos Pitsidianakis c0dcd7254a
ui: bound check in draw_horz in ThreadView 2019-08-17 12:26:32 +03:00
Manos Pitsidianakis 16a5d9b28a
ui, ThreadView: update seen flag in ThreadEntries
Update seen flag when receiving EnvelopeRename events.
2019-08-04 00:30:40 +03:00
Manos Pitsidianakis 8a0e702127
melib,ui: add MailboxEntry enum
Use an enum to describe a mailbox's state in ui::conf::Account instead
of Result.
2019-07-28 20:15:41 +03:00
Manos Pitsidianakis 24831b3c13
Fix warnings, lints, and 2018 errors 2019-06-18 21:14:14 +03:00
Manos Pitsidianakis b6c0236d24
ui: make EnvelopeRename event not folder specific
And pass EnvelopeRename events to subviews
2019-06-10 19:40:51 +03:00
Manos Pitsidianakis 85d1aaaa69
ui: add PageMovements and colors to ThreadView 2019-06-10 19:40:50 +03:00
Manos Pitsidianakis 42654410e3
ui: move Collection to Account
Each account had one mailbox per folder, which had one associated
collection. Now each Account has one Collection for all folders and each
Mailbox object holds only the hashes of each message.

Collection also gets Threads for each folder in order to mix messages
(ie from/to Sent folder).

Insert Sent emails in chronological order

if inserted unsorted, mails a, b with a happened-before b, might never
  get added.

Fix multiple insertions in ThreadTree upon insert_reply

insert_reply was creating multiple copies in threading
2019-06-10 19:40:50 +03:00
Manos Pitsidianakis 06b96449c1
ui: add history and autocomplete in execute bar
closes #116 and #117
2019-06-10 19:40:49 +03:00
Manos Pitsidianakis 22d868f499
save Account to disk
closes #114
2019-06-10 19:40:49 +03:00
Manos Pitsidianakis 4582bcd5ae
fix warnings and lints 2019-06-10 19:40:49 +03:00
Manos Pitsidianakis 4c88422d71
ui: fix scrollbar calculations 2019-06-10 19:40:48 +03:00
Manos Pitsidianakis 5d6c4ee2c8
ui: remove useless padding from ThreadView items 2019-06-10 19:40:48 +03:00
Manos Pitsidianakis bf35894a18
ui: distinct shortcut maps with description
put shortcuts in different maps according to their source component
instead of bagging them all in the same one, and then print each
shortcut section on its own in the shortcut window
2019-06-10 19:40:48 +03:00
Manos Pitsidianakis d231865f88
ui: add scrollbar widget in view/thread.rs 2019-06-10 19:40:48 +03:00
Manos Pitsidianakis 8b23ddb920
ui: correct mailview visibility toggle
Grid wasn't updated when user toggles mailview's visibility in
view/thread.rs.
2019-06-10 19:40:48 +03:00
Manos Pitsidianakis fb406667ab
add debug! macro to replace eprintlns 2019-06-10 19:40:46 +03:00
Manos Pitsidianakis 9143b2e791
ui: view: small fixes 2019-06-10 19:40:46 +03:00
Manos Pitsidianakis b104a71544
ui: highlight entries in ThreadView within grid boundaries
If entry string length + indentation was more than available width an
out of index panic occurs when opening the thread.
2019-06-10 19:40:45 +03:00
Manos Pitsidianakis 1e44089d84
ui: Refer to child/parents with FolderHash in BackendFolder
- use a stack to build folder order list in conf/accounts.rs
- update side menu print
2019-06-10 19:40:45 +03:00
Manos Pitsidianakis 04eb8d926f
ui: remove debug_log feature, add log positions 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis 188e359301
ui: fix nil default ComponentId 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis 9bc76e3bcb
ui: unwrap UIEventType 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis 106744c7ca
ui: remove Entity 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis adb3123c57
ui: reverse visible entries if self.reversed in ThreadView 2019-06-10 19:40:44 +03:00
Manos Pitsidianakis 7fa599d13e
ui: clear threadview properly 2019-06-10 19:40:43 +03:00
Manos Pitsidianakis ada0950854
ui: retain hidden properties in ThreadView 2019-06-10 19:40:43 +03:00
Manos Pitsidianakis e3d0ad9170
ui: fix paging in ThreadView 2019-06-10 19:40:43 +03:00
Manos Pitsidianakis 4be1b52089
ui: add hide option in ThreadView 2019-06-10 19:40:43 +03:00
Manos Pitsidianakis ee4462881e
run cargo fmt 2019-06-10 19:40:42 +03:00
Manos Pitsidianakis d7a4bd24c3
ui: do not recreate ThreadView on envelope update event 2019-06-10 19:40:42 +03:00
Manos Pitsidianakis db6e83b755
ui: highlight unseen thread entries in ThreadView
closes #78
2019-06-10 19:40:42 +03:00
Manos Pitsidianakis 11b2abd1d1
ui: fix seen property of threads on open, add env rename events 2019-06-10 19:40:41 +03:00
Manos Pitsidianakis f36cb111b5
ui: add reverse order option in ThreadView
closes #70
2019-06-10 19:40:41 +03:00
Manos Pitsidianakis a774aaebf6
ui: fix boundary drawing in Thread view 2019-06-10 19:40:41 +03:00
Manos Pitsidianakis 4629e6a22f
meli: add debug_logs feature
Conditional print of debug logs in stderr. Previously they were always
printed
2019-06-10 19:40:40 +03:00