Commit graph

6576 commits

Author SHA1 Message Date
Michael Gratton
430f8abe9a client: Convert main composer widgets to use proper CSS names 2021-01-26 23:23:45 +11:00
Michael Gratton
f281b5ca2e Composer.Widget: Rename some structural widgets to make more sense 2021-01-26 21:54:14 +11:00
Michael Gratton
63c3024f12 Merge branch 'make_conversion_view_round' into 'mainline'
Conversation view: rounded containers

See merge request GNOME/geary!612
2021-01-25 23:05:30 +00:00
Julian Sparber
95f75f789c conversation-list-box: remove shadow and make the rows rounded
This also makes the expander row look like in HdyExpander row.
2021-01-25 22:20:15 +01:00
Julian Sparber
b978f69341 conversation-email-row: use is-expanded to add/remove css class 2021-01-25 22:20:15 +01:00
Michael Gratton
edf2bb43f3 Merge branch 'auto-fill-hostname' into 'mainline'
accounts-editor-add-pane: Autofill hostname

See merge request GNOME/geary!641
2021-01-25 12:13:51 +00:00
Michael Gratton
8b9d96fd4a Merge branch 'fix-add-pane-row' into 'mainline'
accounts-editor-add-pane: Fix bug on AddPaneRow constructor

See merge request GNOME/geary!642
2021-01-25 12:09:05 +00:00
Jeremias Ortega
f5825c2b34
accounts-editor-add-pane: Fix bug on AddPaneRow constructor
AddPaneRow constructor created a new `Gtk.Entry` instead of using the
parameter provided.
2021-01-24 22:39:03 -06:00
Jeremias Ortega
be0a2f78dc
accounts-editor-add-pane: Autofill hostname
Related to https://gitlab.gnome.org/GNOME/geary/-/issues/180
2021-01-24 22:33:10 -06:00
Piotr Drąg
3df48b3482 Update Polish translation 2021-01-24 13:17:58 +01:00
Daniel Șerbănescu
b14d94a1a3 Update Romanian translation 2021-01-21 19:39:35 +00:00
Michael Gratton
29014624dc Merge branch 'ThamiMemel/geary-sandboxing_issue_#842' into 'mainline'
WebKitGTK WebProcess updates

Closes #842

See merge request GNOME/geary!639
2021-01-20 12:27:41 +00:00
Michael Gratton
5421ea4662 Components.WebView: Switch to WebProcess document browser cache model
Now we're using a single long-lived WebProcess for displaying multiple
email, it makes sense to enable some caching.
2021-01-20 23:07:00 +11:00
Michael Gratton
a63ede9ead Components.WebView: Ensure WebKitGTK sandbox can access web extension 2021-01-20 23:06:58 +11:00
Thami Memel
174023dd23 Enabling WebKitGTK sandboxing
Changed to enable WebKitGTK sandboxing

https://gitlab.gnome.org/GNOME/geary/-/issues/842
2021-01-20 23:06:39 +11:00
Michael Gratton
7bec8e4969 Merge branch 'mjog/fix-missing-widget-destroy-chainups' into 'mainline'
client: Ensure Gtk.Widget::destroy overrides are correct

See merge request GNOME/geary!638
2021-01-20 11:54:49 +00:00
Michael Gratton
1732166da3 client: Ensure Gtk.Widget::destroy overrides are correct
Remove unneeded override in `Composer.Box`, add missing chain up in
`Components.InfoBar`. The former may fix an occasional warning with
composers on the command stack, the latter does fix a crash when
MainWindow is destroyed.
2021-01-20 22:27:05 +11:00
Michael Gratton
1be691ef5f Merge branch 'mjog/beta-icon' into 'mainline'
icons: Add icon for beta profile

See merge request GNOME/geary!637
2021-01-20 11:26:10 +00:00
Michael Gratton
612a1e857e Merge branch 'mjog/1125-file-choosers-app-wide-modal' into 'mainline'
client: Ensure modal dialogs only block their associated main window

Closes #1125

See merge request GNOME/geary!636
2021-01-20 09:36:47 +00:00
Michael Gratton
5bb0cb9abb icons: Add icon for beta profile 2021-01-20 20:28:07 +11:00
Michael Gratton
2de1e19a14 client: Ensure modal dialogs only block their associated main window
Create new window groups for each main window and composer window, so
modal dialogs (about, file choosers, etc) don't block other windows.

Same as #932 but for all windows.

Fixes #1125
2021-01-20 20:08:34 +11:00
Michael Gratton
3c4d5c5e9d Geary.RFC822.MailboxAddress: Handle long headers being folded
Remove "\n " sequences from RFC822 text before decoding so that any
long mailboxes/mailbox lists folded before the 80 char limit are
unfolded.

Fixes #1009
2021-01-20 19:24:17 +11:00
Michael Gratton
b51b933b6d Geary.RFC822.Subject: Handle long headers being folded
Remove "\n " sequences from RFC822 text before decoding so that any
long subject lines folded before the 80 char limit are unfolded.

Fixes #895
2021-01-20 19:20:30 +11:00
Yuri Chornoivan
900b51004b Update Ukrainian translation 2021-01-19 15:08:34 +00:00
Michael Gratton
851f13d47f Merge branch 'mjog/upgrade-dialog-cleanup' into 'mainline'
client: Clean up database upgrade dialog implementation

Closes #1007

See merge request GNOME/geary!634
2021-01-19 13:43:02 +00:00
Michael Gratton
c331145fd3 client: Clean up database upgrade dialog implementation
Rename `UpgradeDialog` to `DatabaseManager` since it's not actually a
dialog, move it into the APplication package. Replace old Glade UI file
with a custom built dialog since it's trivial and so we can make it
modal for a main window.

Fixes #1007
2021-01-19 23:50:29 +11:00
Michael Gratton
55081b008c desktop/org.gnome.Geary.appdata.xml.in.in: Mention search in relnotes 2021-01-19 22:02:50 +11:00
Michael Gratton
9af0a2ded2 Merge branch 'mjog/search-update' into 'mainline'
Search implementation update

Closes #838, #814, #756, #474, and #121

See merge request GNOME/geary!616
2021-01-19 10:11:00 +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
2f81fdf146 build: Add minimal ICU VAPI for UBreakIterator 2021-01-19 20:49:01 +11:00
Michael Gratton
58cae0ae40 Geary.ImapDB.Account: Drop post-search stemmed term greedy match removal
Stop post-processing search results by dropping results that contain a
matched term that is longer by some criterion than a stemmed term.

Since this cannot be specified by SQLite's FTS queries, it has to be
done outside of the search, which can have a substantial impact on
performance, and either means running multiple queries outside of a
transaction to get the required number of search results (potentially
a large number of times), running the pruning within a transaction
(potentially blocking the DB for a large length of time), or returning
the wrong number of search results (potentially confusing the caller).

Because of these disadvantages, and since SearchQuery's maximum
difference in lengths between term and stemmed variant helps to prevent
greedy matching anyway, just drop the post processing.
2021-01-19 20:49:01 +11:00
Michael Gratton
24140c07cd Geary.App.RemoveOperation: Queue a window count check after executing
Since when removing messages from the conversation monitor (especially
when a search is changed) the window might get smaller, queue a check
to re-fill if needed.
2021-01-19 20:49:01 +11:00
Michael Gratton
d98467a3f4 Geary.ImapDB.Account: Print SQL for search statements before executing
Helps to debug what the expression generator is doing.
2021-01-19 20:49:01 +11:00
Michael Gratton
d74c024bc9 Geary.FtsSearchQuery: Re-introduce FTS search optimisations
Per commit 9a137699, ensure we tell SQLite what index it should be
using, and are doing the FTS search in a sub-select. Without these,
FTS search is an order of magnitude slower.
2021-01-19 20:49:01 +11:00
Michael Gratton
67af1b2064 po/POFILES.in: Add missing files 2021-01-19 20:49:01 +11:00
Michael Gratton
36ba76b83b src/engine/imap-db/imap-db-fts5-*.c: Fix build warnings 2021-01-19 20:49:01 +11:00
Michael Gratton
7e38198287 ImapDb.Database: Register new ICU-based tokeniser for FTS
The SQLite tokeniser does not deal with scripts that do not use spaces
for word breaking (CJK, Thai, etc), thus searching in those languages
does not work well.

This adds a custom SQLite tokeniser based on ICU that breaks words for
all languages supported by that library, and uses NFKC_Casefold
normalisation to handle normalisation, case folding, and dropping of
ignorable characters.

Fixes #121
2021-01-19 20:48:59 +11:00
Douglas Fuller
90711f234e Geary.App.FillWindowOperation: detect stale FillWindowOperations
When a user types in the search box, there may still be oustanding
FillWindowOperations queued on previous instances of SearchFolder
from previous keystrokes. This can result in a FillWindowOperation
with a stale value of ConversationMonitor.window_lowest from a previous
search executing on the current one. Detect this and return immediately.

Fixes: #838
2021-01-19 20:48:17 +11:00
Michael Gratton
bb02e157c6 Geary.App.SearchFolder: Substantial implementation rework
This does the following:

 * Makes updating the search query a non-async call, so that apps can
   call it and forget about it
 * Makes updating search results only update the folder's contents
   when finished, and not if cancelled
 * Cancels any existing search tasks if the query is updated
 * Swaps sending removed signals before inserted signals to make the
   conversation viewer happier
2021-01-19 20:48:17 +11:00
Michael Gratton
f560707271 Geary.FtsSearchQuery: Fixes for email text disjunctions
Ensure OR is actually used to separate disjuncts, don't prefix match
non-stemmed terms when a stemmed version exists or when EXACT is
specified. Ensure column is correctly specified per disjunct.
2021-01-19 20:48:17 +11:00
Michael Gratton
9bd2359464 Geary.Account: Make new_search_query synchronous
Constructing a new query should be fast, and it no longer needs to be
done async, so remove async from the method and simplify callers.
2021-01-19 20:48:17 +11:00
Michael Gratton
9cb3a0d98c Geary.FtsSearchQuery: Fix build with vala ~ <= 0.48 2021-01-19 20:48:17 +11:00
Michael Gratton
4c911f5be7 Geary.App.SearchFolder: Only update search if query is different
This prevents re-running a search for e.g. whitespace-only changes.
2021-01-19 20:48:17 +11:00
Michael Gratton
092d117c8c Geary.SearchQuery: Enable checking queries and terms for equality
Add `SearchQuery.equal_to` method and virtual `Term.equal_to` method,
overriding it as needed in subclasses.
2021-01-19 20:48:17 +11:00
Michael Gratton
20a4fd3ed2 Geary.ImapDb.SearchQuery: Rename to Geary.FtsSearchQuery
There's nothing IMAP-specific about the class, so move it to common
and rename to reflect what it is actually used for.
2021-01-19 20:48:17 +11:00
Michael Gratton
2ab7b2c39e Geary.ImapDb.SearchQuery: Handle queries with some/all negated terms
SQLite FTS5 doesn't allow all negated terms in matches, and since NOT
is a binary operator (rather than unary) negated terms should be listed
after any positive terms.
2021-01-19 20:48:17 +11:00
Michael Gratton
6ffbfcf5d4 Geary.ImapDb.SearchQuery: Handle folder and deleted message exclusions
Ensure designated excluded folders, folderless messages, and
marked-for-deletion messages are excluded from FTS search results.
2021-01-19 20:48:17 +11:00
Michael Gratton
6a614adf73 Geary.ImapDb.SearchQuery: Use expression to generate FTS5 queries
Move SQL generation for FTS search from ImapDb.Account to SearchQuery.
Convert to use Geary.SearchQuery.Term instances to generate SQL, rather
than parsing the expression. Simplify the generated SQL substantially
and generate MATCH values that work with SQLite FTS5.
2021-01-19 20:48:17 +11:00
Michael Gratton
e0396c322e Geary.ImapDb.SearchQuery: Require stemmer to be passed in to ctor
Since constructing a libstemmer object is non trivial, this allows a
per-account instance to be created just once, and improves testability.
2021-01-19 20:48:17 +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