Commit graph

13 commits

Author SHA1 Message Date
Cédric Bellegarde
3daa44276a client: Unused since we moved to libfolks 2023-03-01 10:43:40 +00:00
Michael Gratton
642bf00e88 Util.Email.SearchExpressionFactory: Use ICU for work breaking
Implement search query text word segmentaion using ICU, so that
languages that don't use spaces for word delimiters are correctly
tokenised.
2021-01-19 20:49:01 +11:00
Michael Gratton
0112c8192c Geary.SearchQuery: Allow client apps to build search queries
Adds classes that allow building arbitrary query expressions and require
an instance to be provided to Geary.SearchQuery, to be set as a
property.

This enables query expressions to be parsed by clients instead of the
engine, in which ever whay they choose.
2021-01-19 20:48:17 +11:00
Michael Gratton
0609fbc3d7 Util.JS: Remove now-unused code 2020-10-13 00:02:09 +11:00
Michael Gratton
89453931bf Util.Js: Improve JSC Value to GLib.Variant conversion
Stop needlessly wrapping object members and array elements in
variant variants.

Don't wrap object values in variants since the code is already using
vardicts for these. Return a variant array if a JS array contains values
of all the same type and don't wrap these in variants, else return
a tuple, which don't need to be wrapped either.
2020-10-13 00:02:09 +11:00
Michael Gratton
1ba2bd0f5b Util.JS: Support converting between JSC.Value and GLib.Variant objects
Add `variant_to_value` and `value_to_variant` methods, document them
and add tests.
2020-10-13 00:02:09 +11:00
Michael Gratton
2030b2dec7 test: Break out engine mock objects into their own name-space
Engine mocks don't need to be in the `Geary` namespace, and including
them there makes it difficult to use them in client tests, so put them
all in their own name-space and corresponding directory.
2020-08-13 19:51:33 +10:00
Michael Gratton
0ae633d88f Update existing tests to work with ValaUnit 2020-06-30 17:31:07 +10:00
Michael Gratton
cfa414f08c Util.Avatar::extract_initials_from_name: Don't strip diacritics
Normalise to composed forms rather than decomposed forms, which would
replace diacritics on characters with combining chars, making them
disappear from the generated initials.

Fixes #735
2020-03-17 22:43:50 +11:00
Michael Gratton
da6ac828bd Move Geary.JS package into client as Util.JS
The only reason it was in the engine was so it could be used by both
the client and the web extension, without worrying about the
webkit2gtk and webkit2gtk_web_extension packages conflicting. However
it didn't really belong there, and added a dependency for the engine
on javascriptcoregtk which doesn't belong. So this fixes all that.
2019-07-21 10:00:32 +10:00
Michael Gratton
73159ba091 Add new generic LRU cache to the client 2019-04-08 10:26:04 +10:00
Michael Gratton
6c8f192148 Attempt to de-mangle From names from Mailman, GitLab, etc
Some software like the above will mangle From mailbox names by appending
"via Some Service" to the From mailbox name. This messes up generating
default avatars for the actual people sending these messages, so
attempt to de-mangle the names.

This involves moving primary originator determination from the engine
to the client, since it's now a policy thing. Add unit tests.
2019-03-09 20:17:01 +11:00
Michael Gratton
76ee07595d Make avatar code a bit more robust in the face of bad input
Don't try to dray null initials, actually return null per API contract
when no initials can be found, don't include non-alphanumerics in the
initials. Add test case.
2019-03-09 20:17:01 +11:00