Commit graph

4586 commits

Author SHA1 Message Date
John Renner
1e9e976efb Use native separators for conversation list 2021-04-06 19:48:23 -07:00
Michael Gratton
39aa9bd222 client: Fix build warning 2021-04-06 12:30:09 +10:00
Michael Gratton
68f860a723 Merge branch 'mjog/1170-webview-remote-resource-loading' into 'mainline'
Update remote resource loading

Closes #1170

See merge request GNOME/geary!684
2021-04-05 05:05:41 +00:00
Michael Gratton
946f6d786f client: Fix remote images not being loaded for remembered senders/email
Since commit 6a0ad721 landed the client can no longer reply on
pre-filling JS page state before loading the message body HTML, since
it would be cleared when the JS page state is initialised in the
window-object-cleared handler.

Instead, set the load remote flag as a GObject data property on the
WebKit.WebPage object in the web process via the extension, and consult
that when determining whether to allow loading remote content.

Fixes #1170
2021-04-05 14:14:46 +10:00
Michael Gratton
bf2aa12978 client: Improve email remote resource loading feedback
Ensure a progress meter is shown even for remote resources loading
after the page load has completed, but don't bother showing it for the
page load itself.
2021-04-05 11:12:18 +10:00
Thomas Lauerman
e55f0857bd engine: Allow zero UIDValidity value for IMAP
At least one IMAP server has been observed to send a UIDVALIDITY 0 value,
for example, iCloud. This change allows Geary to work with such servers,
even though it's technically in violation of RFC 3501.

Fixes #1183
2021-04-04 18:44:49 -05:00
Michael Gratton
1be5dec877 client: Update Components.WebView terminology around resource loading
Refer uniformly to remote resource loading instead of that and remote
image loading.
2021-04-04 18:04:41 +10:00
Michael Gratton
cd77ba4e8e Merge branch 'mjog/1163-email-drag-crash' into 'mainline'
client: Decouple folder list entry DND from both main and GDK windows

Closes #1163

See merge request GNOME/geary!683
2021-04-04 06:27:36 +00:00
Michael Gratton
4e97cd6ea7 client: Decouple folder list entry DND from both main and GDK windows
Pass an instance of the owning `Sidebar.Tree` through to `Sidebar.Entry`
when calling `internal_drop_received` instead of a
`Application.MainWindow` to remove a bidi relationship between the two.

Use the high level GTK API for determining the DnD action in
`FolderList.Entry`'s implementation of this method, rather than attempt,
to divine it from keyboard modifiers via the associated GDK window,
since under Wayland that will be null.

Fixes #1163
2021-04-04 14:30:19 +10:00
Michael Gratton
044c77325a Merge branch 'mjog/rfc-reply-refs-critical' into 'mainline'
engine: Fix critical when replying to an email with zero message ids

See merge request GNOME/geary!681
2021-04-04 03:55:29 +00:00
Michael Gratton
ee50f03af0 Merge branch 'Community/Purism/geary-hdy-avatar' into 'mainline'
use HdyAvatar

See merge request GNOME/geary!680
2021-04-04 03:03:17 +00:00
Michael Gratton
388414c232 engine: Fix critical when replying to an email with zero message ids
Don't ever return null from `Geary.RFC822.Utils.reply_references`
return null, since its one call site in the client expects it to be
non-null.
2021-04-04 12:50:16 +10:00
Julian Sparber
6a052031df avatar: Use HdyAvatar for displaying avatars 2021-04-04 12:44:32 +10:00
Michael Gratton
b9dc7eebc4 Geary.Imap.ClientConnection: Fix command timeout mid-literal
On slow connections and/or for large literal data blocks, commands can
time out while still reading literal data.

Ensure that command timeouts are updated whenever we also notify
higher level components of data being received.
2021-04-04 09:29:07 +10:00
Michael Gratton
2091431ef0 Geary.Imap.ClientConnection: Coalesce received_bytes signal emmission
Since `received_bytes` is emitted whenever a complete line is received
from the server, it can be emitted a *lot*. To reduce the CPU overhead
of this, and since it's only used for timekeeping at higher levels,
coalesce emission to only occur at most once a second.
2021-04-04 09:29:07 +10:00
Michael Gratton
7172bdc041 Geary.Imap.ClientSession: Avoid redundant timekeeping calls
Since `ClientConnection` emits `received_bytes` whenever *any* data is
received, updating the keep-alive and last-seen when data is received
and when higher level constructs are received is redundant.
2021-04-04 09:29:07 +10:00
Michael Gratton
43c2fa4342 Merge branch 'update-libhandy' into 'mainline'
Update libhandy

Closes #305

See merge request GNOME/geary!622
2021-04-03 23:16:00 +00:00
Michael Catanzaro
6a0ad72182 web-process-extension: register GearyWebExtension JS in the right place
We need to register our JS when the window-object-cleared signal is
emitted. Previously we did this when the WebPage object is created, but
this only worked due to luck. Since WebKit r271642, it no longer works.
window-object-cleared is emitted right after page-created, meaning that
right after Geary registers its JS, it all gets wiped away. Oops.

Fixes #1168
2021-03-04 17:31:56 -06:00
Michael Gratton
75d770472a client: Update copyright in UI for 2021 2021-03-03 21:18:20 +11:00
Michael Gratton
831cd0f476 Geary.Imap.FolderSession: Use the SILENT option when sending IMAP STORE
Not having the server echo the command back saves a useless round-trip,
and prevents undesirable interleaving when executing multiple STORE
commands in quick succession.'

Fixes #790
2021-02-25 08:45:10 +11:00
Michael Gratton
4b5fe54d64 Geary.Imap.StoreCommand: Update to support the SILENT command option
This option prevents the IMAP server echoing stored values back to the
client.
2021-02-25 08:45:10 +11:00
Michael Gratton
7f0bb08c54 Merge branch 'preview-crash' into 'mainline'
Geary.Imap.FolderSession: Don't crash on empty preview

See merge request GNOME/geary!667
2021-02-24 12:42:42 +00:00
Michael Gratton
746a1e5bdc Merge branch 'media-keys-navigation' into 'mainline'
Improve navigation using XF86Forward/Back keys

Closes #1129

See merge request GNOME/geary!666
2021-02-24 12:28:32 +00:00
Guido Günther
b57567ff9e Geary.Imap.FolderSession: Don't crash on empty preview
If we didn't set a preview we crash like

    *[wrn] 12:54:59.0908 geary:application-certificate-manager.vala:74: No GCR slot URIs found, GCR certificate pinning unavailable
    *[wrn] 12:55:10.0501 Geary: [goa_account_1614080076_2] [imap] [GearyImapClientSession(selected:INBOX selected RW, GearyImapClientConnection(0001/imap.example.com:993/up)), Imap.Folder(>INBOX), ro: false, permanent_flags: \Answered \Flagged \* \Seen \Deleted \Draft, accepts_user_flags: true] GearyImapFolderSession: No preview specifiers "body.peek[1]<0.256>" and "body.peek[1.mime]" found
    *[wrn] 12:55:10.0502 Geary: [goa_account_1614080076_2] [imap] [GearyImapClientSession(selected:INBOX selected RW, GearyImapClientConnection(0001/imap.example.com:993/up)), Imap.Folder(>INBOX), ro: false, permanent_flags: \Answered \Flagged \* \Seen \Deleted \Draft, accepts_user_flags: true] GearyImapFolderSession:  - has body[1.mime]
    *[wrn] 12:55:10.0502 Geary: [goa_account_1614080076_2] [imap] [GearyImapClientSession(selected:INBOX selected RW, GearyImapClientConnection(0001/imap.example.com:993/up)), Imap.Folder(>INBOX), ro: false, permanent_flags: \Answered \Flagged \* \Seen \Deleted \Draft, accepts_user_flags: true] GearyImapFolderSession:  - has body[header.fields (references)]
    *[wrn] 12:55:10.0502 Geary: [goa_account_1614080076_2] [imap] [GearyImapClientSession(selected:INBOX selected RW, GearyImapClientConnection(0001/imap.example.com:993/up)), Imap.Folder(>INBOX), ro: false, permanent_flags: \Answered \Flagged \* \Seen \Deleted \Draft, accepts_user_flags: true] GearyImapFolderSession:  - has body[1]<0>
    ![crt] 12:55:10.0502 GLib:Did not see expected message GLib-GObject-WARNING **: g_object_weak_unref: couldn't find weak ref *
    ![crt] 12:55:10.0502 geary:geary_email_set_message_preview: assertion 'GEARY_RF_C822_IS_PREVIEW_TEXT (preview)' failed

    (gdb) bt
    #0  __GI_raise (sig=sig@entry=5) at ../sysdeps/unix/sysv/linux/raise.c:50
    #1  0x0000ffff919a71d8 in _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
    #2  g_logvPython Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x8:
     (log_domain=0xffff91f1d908 "geary", log_level=10, format=<optimized out>, args=#3  0x0000ffff919a7440 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>)
        at ../../../glib/gmessages.c:1415
    #4  0x0000ffff91eabaf8 in geary_imap_folder_session_fetched_data_to_email
        (error=0xffff11aeb2f0, preview_charset_specifier=0xaaaafe108120 [GearyImapFetchBodyDataSpecifier], preview_specifier=0xaaaafe0ec070 [GearyImapFetchBodyDataSpecifier], body_specifier=0x0, header_specifiers_length1=<optimized out>, header_specifiers=0x0, required_fields=927, fetched_data=<optimized out>, uid=0xaaaafe48de90 [GearyImapUID], self=0xaaaafe1059b0 [GearyImapFolderSession])
        at src/engine/libgeary-engine.a.p/imap/api/imap-folder-session.c:6795
    #5  __lambda103_ (error=0xffff11aeb360, _data28_=0xaaaafdf2d760) at src/engine/libgeary-engine.a.p/imap/api/imap-folder-session.c:4541
    #6  ___lambda103__geary_nonblocking_concurrent_concurrent_callback (cancellable=<optimized out>, self=0xaaaafdf2d760, error=0xffff11aeb360) at src/engine/libgeary-engine.a.p/imap/api/imap-folder-session.c:4640
    #7  0x0000ffff91e412d0 in geary_nonblocking_concurrent_concurrent_operation_execute (self=0xaaaafe48f6d0 [GearyNonblockingConcurrentConcurrentOperation])
        at src/engine/libgeary-engine.a.p/nonblocking/nonblocking-concurrent.c:672
    #8  geary_nonblocking_concurrent_on_work_ready (op=0xaaaafe48f6d0 [GearyNonblockingConcurrentConcurrentOperation], self=<optimized out>)
        at src/engine/libgeary-engine.a.p/nonblocking/nonblocking-concurrent.c:501
    #9  _geary_nonblocking_concurrent_on_work_ready_gfunc (data=0xaaaafe48f6d0, self=<optimized out>) at src/engine/libgeary-engine.a.p/nonblocking/nonblocking-concurrent.c:296
    #10 0x0000ffff919ca3c8 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../glib/gthreadpool.c:354
    #11 0x0000ffff919c98f4 in g_thread_proxy (data=0xaaaafde2e120) at ../../../glib/gthread.c:820
    #12 0x0000ffff8b437628 in start_thread (arg=0xffff11aeb520) at pthread_create.c:477
    #13 0x0000ffff916a801c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

Create an empty preview to avoid that.
2021-02-24 13:18:50 +01:00
Michał Kopeć
6caf26b15a Enable activating Gtk.ListBox items using XF86Forward and Alt+Right 2021-02-24 01:08:33 +01:00
Michael Gratton
de3946d4a2 Geary.App.ConversationMonitor: Check for email deleted flags on change
Ensure an email's deleted flag is appropriately set (or not) before
re-adding or evaporating conversations based on them.
2021-02-24 10:10:15 +11:00
Michael Gratton
224dbf08d3 Geary.ImapEngine: Ensure actual replay ops interleave correctly
Ensure `ReplayAppend`, `ReplayUpdate` and `ReplayRemoval` ops all
run as remote-only ops, so that they can't be incorrectly interleaved.
For example an update queued after a remove can't be executed first
in the local queue.
2021-02-24 10:08:35 +11:00
Michael Gratton
aa6cf9474c Merge branch 'fix-empty-body-null-fault' into 'mainline'
Geary.RFC822.Message: Handle 0 size of body and header in from_parts().

Closes #1137

See merge request GNOME/geary!665
2021-02-23 21:47:40 +00:00
Michael Gratton
67d68d083d Merge branch 'mjog/folder-load-sync-race' into 'mainline'
Folder load/sync race

See merge request GNOME/geary!663
2021-02-23 21:28:20 +00:00
Michał Kopeć
42f5eb2ff2 Enable navigation between 3 main panes using XF86Forward/Back 2021-02-19 23:40:38 +01:00
Marek Benc
0bffbd2c5d Geary.RFC822.Message: Handle 0 size of body and header in from_parts().
Fixes #1137
2021-02-15 13:43:25 +01:00
James Westman
40dd92e8c3
composer-headerbar: Use HdyHeaderBar
This allows the headerbar to be draggable with HdyApplicationWindow.
2021-02-11 01:14:04 -06:00
Michael Gratton
a9aa736f67 Application.Controller: Ignore file not found for e8061379 2021-02-10 22:20:24 +11:00
Michael Gratton
7100598c56 Geary.Util.Files.recursive_delete_async: Throw rather than log errors 2021-02-10 22:19:33 +11:00
Michael Gratton
7f110bfa58 Geary.Account: Remove now unused, internal-only signals. 2021-02-09 01:06:24 +11:00
Michael Gratton
0f6c38be4c Geary.ImapEngine.GenericAccount: Use account sync API for db cleanup
Replace use of signals with direct method calls.
2021-02-09 01:05:50 +11:00
Michael Gratton
41359e2d4a Geary.ImapEngine.GenericAccount: Start both remote services later
Start both IMAP and SMTP services only after local folders have
fully loaded, to avoid a race between folders being first updated from
the remote, and full sync's being attempted on them.
2021-02-09 01:03:39 +11:00
Michael Gratton
3e264e2cd4 Geary.ImapEngine.GenericAccount: Call new account sync API as needed
Call the appropriate methods on AccountSynchronizer when folders need
to be refreshed or fully synced.

Ensure all remote folders are fully sync'ed when a connection is
first/re-established so that any changes made are also picked up on
re-connect.
2021-02-09 01:00:16 +11:00
Michael Gratton
efca5fb021 Geary.ImapEngine.AccountProcessor: Support dequeing account ops 2021-02-09 00:59:00 +11:00
Michael Gratton
2ec23bac76 Geary.ImapEngine.AccountSychronizer: Clean up implementation
This does a few things:

 * Adds a high-level API for queuing different kinds of sync's instead
   of listening to account signals
 * Splits out background GC work into a third type of concrete sync
   op so it can be executed when offline
 * Ensures refresh and full sync ops are only executed when online, so
   they don't needlessly jam up the account processor's queue
 * Clean up sync op class hierarchy a bit to accommodate new ops
2021-02-09 00:44:14 +11:00
Michael Gratton
a5ce9d8434 Components.WebView: Disable WebKitGTK sandboxing again
It breaks print-to-pdf, and the workaround effectively disables the
sandbox.

See #842 and https://bugs.webkit.org/show_bug.cgi?id=202363
2021-02-07 18:22:52 +11:00
Michael Gratton
72499c182a Merge branch 'mainline' into 'mjog/fix-build-warnings'
Fix conflicts with switch to Hdy.HeaderBar

# Conflicts:
#   src/client/components/main-toolbar.vala
2021-02-07 03:53:34 +00:00
Michael Gratton
f218328210 Application.Controller: Fix build warning
Fixes build warning introduced in commit c4fae242.
2021-02-07 14:23:13 +11:00
Michael Gratton
ef9613b9f2 client: Ensure all [GtkChild] properties/fields are unowned
See GNOME/vala#1121
2021-02-07 12:36:55 +11:00
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