Commit Graph

30 Commits (65357625eaaf725e76f95a00d626c286b7993566)

Author SHA1 Message Date
Manos Pitsidianakis 65357625ea
conf: impl DotAddressable for NotificationsSettings 2020-09-10 21:19:38 +03:00
Manos Pitsidianakis 3eadaba34e
Replace old pseudo-async code with blocking rust async 2020-08-26 00:54:06 +03:00
Manos Pitsidianakis 8a6bf3b217
Preserve Account order from configuration file
Use IndexMap to preserve the order of accounts in the UI from the
account definitions.
2020-08-26 00:54:05 +03:00
Manos Pitsidianakis 52bcecfd4a
conf.rs: reject unknown configuration options
Closes #11
2020-08-03 22:53:06 +03:00
Manos Pitsidianakis b5530860d2
conf/DotAddressable: impls for more types 2020-07-26 16:09:35 +03:00
Manos Pitsidianakis 0d198dbb56
conf.rs: fix struct decl/impl order in file
Impls and type declarations were out of order
2020-07-26 15:38:11 +03:00
Manos Pitsidianakis 7fd511e149
conf/shortcuts.rs: implement DotAddressable for Shortcuts 2020-07-26 15:38:11 +03:00
Manos Pitsidianakis 996abd323f
Add print setting action
Add experimental print setting action. The command is of the form:

  print account_name listing.index_style

account_name is currently ignored.

The path, e.g. listing.index_style is split by "." and fed to
DotAddressable lookup trait method. The method checks the first segment
in the path if it matches any of the struct's fields, and then calls the
field's lookup method.
2020-07-17 13:33:40 +03:00
Manos Pitsidianakis 5ef62a39b8
conf: Rename cache_type to search_backend 2020-07-16 23:57:00 +03:00
Manos Pitsidianakis 9db6b07b71
Remove some needless clones and stuff (thanks to Clippy) 2020-07-13 21:36:55 +03:00
Manos Pitsidianakis edfd2b1fef
conf.rs: accept default action "Y" when asking to create config
Reported by: bronsen
2020-07-10 15:55:15 +03:00
Manos Pitsidianakis f48343ca89
conf/accounts: add is_{async,remote} fields 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis a38764f490
Add somewhat-working async IMAP backend 2020-07-06 15:12:05 +03:00
Manos Pitsidianakis 0169025d50
build.rs: add proc-macro to generate Override structs for configuration 2020-06-20 23:58:53 +03:00
Manos Pitsidianakis d7e4bd9379
conf: set default override value to None 2020-06-13 12:48:15 +03:00
Manos Pitsidianakis e97cf98b3b
Add `view` subcommand
Add subcommand to view standalone e-mail files in meli's pager without
instantiating any accounts.
2020-06-10 18:07:56 +03:00
Manos Pitsidianakis 05c6c19889
src/conf.rs: Remove debug! prints 2020-06-09 17:20:30 +03:00
Manos Pitsidianakis 4bc8ff2ce9
Use structopt for command line parsing 2020-06-08 00:55:29 +03:00
Manos Pitsidianakis 5366888dff
Add samples/ directory with config and themes 2020-06-02 18:31:07 +03:00
Manos Pitsidianakis eca8a30c3f
themes: Add Theme struct
Wrap HashMap<Cow<'static, str>, ThemeAttributeInner> into a struct, in
order to add more fields in the future.
2020-06-02 18:31:07 +03:00
Manos Pitsidianakis 9c0ee76ff4
themes: Rename Theme struct to Themes 2020-06-02 18:31:07 +03:00
Manos Pitsidianakis fad8820868
Make serde default for manual_refresh = false 2020-05-29 20:43:39 +03:00
Manos Pitsidianakis bfff0e4feb
conf: add options for logging
Add options for log file location and maximum log level. Also add
manpage entries for these options in `meli.conf.5`
2020-05-28 21:02:49 +03:00
Manos Pitsidianakis 9ff54f236b
Add conf_override! macro
conf_override! wraps struct definitions and defines a secondary Override
struct that wraps each field in an Option. The macro mailbox_settings!
is used to select settings from an account & mailbox index. If a user defines an overriding setting, the macro returns the override instead of the immediately next in the hierarchy setting.

The selection is done for a specific field as follows:

  if per-folder override is defined, return per-folder override
    else if per-account override is defined, return per-account override
      else return global setting field value.
2020-03-18 19:13:07 +02:00
Manos Pitsidianakis 106dae3334
Add config overrides to mailbox filter
If per-folder config filter is defined, it overrides the app-wide
filter.
2020-03-01 22:51:58 +02:00
Manos Pitsidianakis 4ac52d9d5b
Replace every use of Folder with Mailbox
Use Mailbox for consistency.
2020-02-26 10:54:10 +02:00
Manos Pitsidianakis cadb1e1613
ui/conf: expand include() paths in config
Expand variables and `~` in included paths in user configuration.
2020-02-08 23:56:08 +02:00
Manos Pitsidianakis 0b4109dfdb
ui: fix wrong subscription status in folders
Subscription status was checked/modified in various places, whereas now
the universal truth is the `BackendFolder::is_subscribed()` method set
by the backend when a folder is created. The `Account` struct passes a
closure to the backend constructor that determines whether the folder is subscribed or not according to the user configuration.

- If subscribed_folders field is empty, then all folders are subscribed.
- OR check explicit folder configuration
- OR check if folder path matches to a glob in subscribed_folders.
2020-02-08 23:56:08 +02:00
Manos Pitsidianakis 05b91f1c02
Remove text_processing
Unwrap text_processing into melib

In preparation for uploading meli as a separate crate on crates.io.
2020-02-04 17:29:55 +02:00
Manos Pitsidianakis 8b6ea8de9a
Remove ui crate
Merge ui crate with root crate.

In preparation for uploading `meli` as a separate crate on crates.io.

Workspace crates will need to be published as well and having a separate
`ui` crate and binary perhaps doesn't make sense anymore.
2020-02-04 17:29:55 +02:00