Commit Graph

34 Commits (94152f7336030502a850b1a1a690f1fceff23391)

Author SHA1 Message Date
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 97e20b22a8
ui: update PlainListing
Remake PlainListing after CompactListing to add columns, filtering,
selection.
2019-11-10 23:04:11 +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 9c3284d3fe
ui/listings: add set_movement method to ListingComponent
Page movements is an enum that describes the movements of the keyboard
keys "Home, End, PageUp, PageDown". Some mail listing Components
interpret these keys as changes to their cursors.
2019-10-15 23:47:37 +03:00
Manos Pitsidianakis ea3f47fa44
ui: clear all state in Listing::set_coordinates
If a listing lists search results, ie when "filtering" with a filter
term, it sets up its state in filtered_selection, filtered_order etc.
set_coordinates() should reset that state.
2019-10-07 16:47:05 +03:00
Manos Pitsidianakis b25f10f92a
conf: add a light theme option 2019-10-06 11:31:53 +03:00
Manos Pitsidianakis 828718141a
ui: return valid values in ListingTrait::coordinates
By convention the valid values at any time of a cursor_pos in mail
listings is in self.new_cursor_pos, which the listing compares with
self.cursor_pos to detect position changes. Returning
self.cursor_pos values with coordinates() is invalid.
2019-09-20 09:12:53 +03:00
Manos Pitsidianakis 1845b046fa
ui: add attribute support
bold/italic etc
2019-08-18 15:47:09 +03:00
Manos Pitsidianakis 714f8255fc
ui: fix pageup/dn behaviour 2019-08-02 01:00:54 +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 bb292486f4
ui: expand Listing trait with draw_list and highlight_line
In the course of making the Listing trait a generic way for any kind of
listing (eg. NNTP, RSS, et all)
2019-06-21 12:02:11 +03:00
Manos Pitsidianakis 24831b3c13
Fix warnings, lints, and 2018 errors 2019-06-18 21:14:14 +03:00
Manos Pitsidianakis 831ec97d64
ui: add columns in PlainListing 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 7de075df49
ui: add Home/End movements 2019-06-10 19:40:49 +03:00
Manos Pitsidianakis fb406667ab
add debug! macro to replace eprintlns 2019-06-10 19:40:46 +03:00
Manos Pitsidianakis 4ae8cbadbf
ui: reassign listing shortcuts
after `312011c ui: move account menu functions to Listing`, shortcuts like prev_folder etc should be generic over all listing types.
2019-06-10 19:40:45 +03:00
Manos Pitsidianakis 87adc6dd19
melib/ui: refer to Folders by FolderHash 2019-06-10 19:40:44 +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 4bf1f6b9c9
ui: make Composer account specific 2019-06-10 19:40:43 +03:00
Manos Pitsidianakis ee4462881e
run cargo fmt 2019-06-10 19:40:42 +03:00
Manos Pitsidianakis ff821e4fca
ui: don't set seen flag in Plainlisting 2019-06-10 19:40:42 +03:00
Manos Pitsidianakis c91f0d73a5
ui: add ListingTrait to get/set coordinates 2019-06-10 19:40:42 +03:00
Manos Pitsidianakis dcb62798f8
ui: properly update cursor on refresh_mailbox in PlainListing 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 551db51b00
ui: avoid full renders when worker threads return StartupChecks
Now listings only re-render when their folder gets a StartupCheck event,
account menu always re-renders to update new mail counts

closes #76
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
Manos Pitsidianakis e285d1006b
Open Contacts list from accounts tab 2019-06-10 19:40:38 +03:00
Manos Pitsidianakis 9b58908f6f
melib: add per-folder hash indexes in maildir backend 2019-06-10 19:40:36 +03:00
Manos Pitsidianakis fae1cdd33e
melib: Re-implement JWZ threading algorithm 2019-06-10 19:40:34 +03:00
Manos Pitsidianakis bcef22b3f3
ui: add Listing component with 3 modes: compact plain and threaded 2019-06-10 19:40:33 +03:00