Commit graph

4592 commits

Author SHA1 Message Date
Christopher Davis
44bc5c5cda toolbar: Use HdyHeaderBar
This was forgotten when porting to HdyWindow,
but is needed for making the window draggable.
2021-02-06 04:07:28 -08:00
Michael Gratton
83a97f3102 Merge branch 'only-hdy-window' into 'mainline'
main-window: replace GtkApplicationWindow with HdyApplicaitonWindow

See merge request GNOME/geary!656
2021-02-03 22:13:07 +00:00
Michael Gratton
534c780999 Merge branch 'mjog/attachment-download-dir' into 'mainline'
Default attachment save file chooser to XDG_DOWNLOADS

See merge request GNOME/geary!654
2021-02-03 22:09:59 +00:00
Michael Gratton
013e4c3947 Merge branch 'mjog/webkit-sandbox-print-to-pdf' into 'mainline'
Components.WebView: Fix printing to PDF with WebKitGTK sandbox enabled

See merge request GNOME/geary!655
2021-02-03 22:01:11 +00:00
Julian Sparber
dc6fb34422 main-window: replace GtkApplicationWindow with HdyApplicaitonWindow
HdyApplicationWindow moves the titlebar into the content area of the
window which allows us to split the current main-titlebar and move the
parts directly into the leaflets without the need of swipe groups nor
size groups.
2021-02-03 17:06:45 +01:00
Michael Gratton
67e5047816 ConversationEmail: Print to XDG_DOWNLOADS by default
We know that location is writable under Flatpak at the moment, so
default to it.
2021-02-03 23:53:06 +11:00
Michael Gratton
2b5ef5ea52 Application.AttachmentManager: Default save chooser to XDG_DOWNLOADS
We know that location is writable under Flatpak at the moment, so
default to it.
2021-02-03 23:52:20 +11:00
Michael Gratton
5a54e470b2 Components.WebView: Fix printing to PDF with WebKitGTK sandbox enabled
Add all of `~` as writable to the sandbox so it can actually write the
PDF.
2021-02-03 23:28:15 +11:00
Michael Gratton
77897cbe18 Merge branch 'mjog/pinned_cert_dir' into 'mainline'
Application.Controller: Fix directory used for locally pinned certs

See merge request GNOME/geary!652
2021-02-02 21:47:48 +00:00
Michael Gratton
f0d169e0d4 Components.AttachmentPane: Remove unneeded debug logging 2021-02-03 08:44:50 +11:00
Michael Gratton
c4fae24262 Application.Controller: Fix directory used for locally pinned certs
Fix defect introduced in commit e8061379.
2021-02-01 22:07:16 +11:00
Jeremias Ortega
c524e17798
application-client: Check for null when getting os info
This caused a crash in the inspector system view when the os info wasn't
available.

Related to https://gitlab.gnome.org/GNOME/geary/-/issues/1123
2021-01-30 18:38:43 -06:00
Michael Gratton
e99115e99f Merge branch 'mjog/1126-dot-stuffing' into 'mainline'
Fix email being sent truncated after a line starting with a dot.

Closes #1126

See merge request GNOME/geary!647
2021-01-28 11:32:10 +00:00
Michael Gratton
cc5d4ffa62 Geary.Smtp.ClientSession: Ensure SMTP data is sent dot-stuffed
Fixes #1126
2021-01-28 22:10:03 +11:00
Michael Gratton
1987582bca Geary.Smtp.ClientConnection: Documentation fixes 2021-01-28 22:09:43 +11:00
Michael Gratton
bc7ec8dd2e Geary.Smtp.ClientService: Get default Message-Id domain from From
Use From header as the default message id domain part, not Sender.

Fixes #1079
2021-01-27 23:55:21 +11:00
Michael Gratton
220eb42e5e client: Show keyboard shortcuts in the composer with the correct section
Enable keyboard shortcuts shortcut in the composer, ensure the composer
section is visible when activated (and vice versa).

Fixes #1122
2021-01-27 22:35:25 +11:00
Michael Gratton
e6ab0f754f Composer.Widget: Rework to use common header row widget
Add private HeaderRow and EntryHeaderRow widgets for displaying editable
headers in the composer, convert to using that to wrap up common
properties and functionality for each of the header rows.
2021-01-27 12:05:49 +11:00
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
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
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
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
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
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
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
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