Commit Graph

56 Commits (a365a846b8e8bca8f053e8f7152604e0103a7181)

Author SHA1 Message Date
Manos Pitsidianakis a365a846b8
Replace StackVec with smallvec::SmallVec
SmallVec has a less buggy and better implementation.
5 years ago
Manos Pitsidianakis b6403f486b
ui: Remove RefreshMailbox event
Leftover from older versions, it wasn't used  anywhere
5 years ago
Manos Pitsidianakis c0ac643f05
melib: add datetime module
Datetime module adds POSIX time functions interface
5 years ago
Manos Pitsidianakis 8f63572584
Small refactors to avoid implicit unwrap() panics 5 years ago
Manos Pitsidianakis ab3e01359a
ui/Component: change set_dirty() to set_dirty(value)
Next commit will need to set a child component as not dirty so we need
set_dirty(value) instead of set_dirty() that always sets is to true.
5 years ago
Manos Pitsidianakis f632bc4c08
ui: update rows on TagAdd/TagRemove
Except for threadlisting
5 years ago
Manos Pitsidianakis e5da10093d
ui/listing: use MailListingTrait instead of ListingTrait 5 years ago
Manos Pitsidianakis 6cf73b4238
Remove Option<EnvelopeHash> from ListingTrait
It was never used.
5 years ago
Manos Pitsidianakis 424b244bb7
fixup some TODO and FIXMEs 5 years ago
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.
5 years ago
Manos Pitsidianakis aeb9d046a2
ui/ThreadListing: fix uninitialized array entry crash
If ThreadListing is uninitialized, self.locations is empty and
coordinates() would panic.
5 years ago
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.
5 years ago
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.
5 years ago
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.
5 years ago
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.
5 years ago
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.
5 years ago
Manos Pitsidianakis ecb3fd7f3d
Add dyn keyword to Trait objects
And fix some unused var warnings as well
5 years ago
Manos Pitsidianakis 1845b046fa
ui: add attribute support
bold/italic etc
5 years ago
Manos Pitsidianakis 714f8255fc
ui: fix pageup/dn behaviour 5 years ago
Manos Pitsidianakis 8a0e702127
melib,ui: add MailboxEntry enum
Use an enum to describe a mailbox's state in ui::conf::Account instead
of Result.
5 years ago
Manos Pitsidianakis a62f1d6c01
add read-only option in accounts 5 years ago
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)
5 years ago
Manos Pitsidianakis 24831b3c13
Fix warnings, lints, and 2018 errors 5 years ago
Manos Pitsidianakis 6088705745
ui: add PageMovements in ThreadListing 5 years ago
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
5 years ago
Manos Pitsidianakis 7de075df49
ui: add Home/End movements 5 years ago
Manos Pitsidianakis 22d868f499
save Account to disk
closes #114
5 years ago
Manos Pitsidianakis 4582bcd5ae
fix warnings and lints 5 years ago
Manos Pitsidianakis 3bc22abdff
ui: draw thread arrows correctly in other sortings
thread arrows in ThreadListing weren't drawn correctly when subsorting
was changed (eg date -> subject)

has_sibling was delegated to ThreadsIterator.
5 years ago
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
5 years ago
Manos Pitsidianakis fb406667ab
add debug! macro to replace eprintlns 5 years ago
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.
5 years ago
Manos Pitsidianakis 87adc6dd19
melib/ui: refer to Folders by FolderHash 5 years ago
Manos Pitsidianakis 04eb8d926f
ui: remove debug_log feature, add log positions 5 years ago
Manos Pitsidianakis 188e359301
ui: fix nil default ComponentId 5 years ago
Manos Pitsidianakis 9bc76e3bcb
ui: unwrap UIEventType 5 years ago
Manos Pitsidianakis 106744c7ca
ui: remove Entity 5 years ago
Manos Pitsidianakis 4bf1f6b9c9
ui: make Composer account specific 5 years ago
Manos Pitsidianakis ee4462881e
run cargo fmt 5 years ago
Manos Pitsidianakis c91f0d73a5
ui: add ListingTrait to get/set coordinates 5 years ago
Manos Pitsidianakis dcb62798f8
ui: properly update cursor on refresh_mailbox in PlainListing 5 years ago
Manos Pitsidianakis 11b2abd1d1
ui: fix seen property of threads on open, add env rename events 5 years ago
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
5 years ago
Manos Pitsidianakis 4629e6a22f
meli: add debug_logs feature
Conditional print of debug logs in stderr. Previously they were always
printed
5 years ago
Manos Pitsidianakis 9522508a92
Update broken reply_context drawing
concerns #38
5 years ago
Manos Pitsidianakis bf038428c2
Run rustfmt 5 years ago
Manos Pitsidianakis e285d1006b
Open Contacts list from accounts tab 5 years ago
Manos Pitsidianakis 4ee5447cf9
Add FormWidget/ButtonWidget and use them in Contacts 5 years ago
Manos Pitsidianakis 62168e9183
Add contact view page, edit headers in compose, index style in conf 5 years ago
Manos Pitsidianakis d5c0f113d8
Accept future dates in format_date
closes #49
5 years ago