Commit graph

6540 commits

Author SHA1 Message Date
Piotr Drąg
32cc96f959 Update Polish translation 2020-10-18 12:32:46 +02:00
Michael Gratton
ec3057daf7 ConversationWebView: Fix plain text emails sometimes being too wide
Using `whitespace: pre-wrap` to format plain text email sometimes
causes additional width to be allocated by the plain text blocks that
then does not get used due to the constraints on the HTML element.
The allocated space remains however and hence an un-needed horizontal
scrollbar appears.

Using `break-spaces` instead seems to help since it allows breaks after
a space character, leading to the additional space not otherwise being
allocated.
2020-10-17 15:08:10 +11:00
Michael Gratton
0e783de5bf ui/conversation-web-view.css: Work around oversized email body height
Sometimes when loading an email body, the viewport for the web view
will be set to 0 (when the web view is hidden or not yet laid out in
the widget hierarchy?). When this happens, since the width of the body
is specified as 100vw, the content width is reduced to the absolute
minimum and hence the content height is stretched right out. Then, when
the web view is displayed, the viewport width increases but the extra
whitespace is never reclaimed (scrollHeight never goes down), so the
height of the web view remains way too large, causing large amounts of
whitespace at the end of the email message (i.e. #283).

To work around this, set a min width for the HTML element so the initial
height of the email body isn't too badly wrong.
2020-10-17 13:55:36 +11:00
Michael Gratton
40f97de745 ui/conversation-web-view.css: Clean up HTML/BODY element lockdowns
Use some more obvious CSS to ensure we can get an accurate idea of the
content height for sizing the web view and that the body fits the
web view's width.
2020-10-17 13:55:36 +11:00
Michael Gratton
0dce103f6b ui/components-web-view.js: Use arrow functions for better this scoping 2020-10-17 13:55:36 +11:00
Michael Gratton
01a0f96b40 ui/components-web-view.js: Use ResizeObserver for watching pref height
Rather than guessing when the height might change by using a number
of different event listeners, use a ResizeObserver to get direct
notifications of any changes to the HTML element's size.
2020-10-17 11:29:05 +11:00
Michael Gratton
e15ece2cde Merge branch 'mjog/334-libstemmer' into 'mainline'
Move to libstemmer, add more languages

Closes #334

See merge request GNOME/geary!580
2020-10-14 22:01:25 +00:00
Marek Černocký
1213320209 Updated Czech translation 2020-10-14 11:15:26 +02:00
Marek Černocký
104b4979a7 Updated Czech translation 2020-10-14 11:11:09 +02:00
Michael Gratton
2e27a06889 build: Fix flatpak CI failing
Build libstemmer as a shared library. Use current mainline since that
at least supports build system args.

Shared lib patch courtesy of Stefano Rivera <stefanor@debian.org>,
updated to current head.
2020-10-14 20:05:15 +11:00
Michael Gratton
4f9df7d74a engine: Remove in-tree unicodesn stemmer
Now that search is using libstemmer, the in-tree stemmer is no longer
needed and can be removed.
2020-10-14 20:05:15 +11:00
Michael Gratton
968bc1a9e8 ImapDb.SearchQuery: Use libstemmer for stemming
Instead of shipping our own forked stemmer via SQLite, add a dependency
on libstemmer and use that instead.
2020-10-14 20:05:12 +11:00
Michael Gratton
7c0ad051bd build: Make comment about system libs with custom VAPI more generic 2020-10-14 20:02:18 +11:00
Michael Gratton
e70783daa4 Merge branch 'mjog/1001-text-line-endings' into 'mainline'
Geary.RFC822.Message: Fix plain text file attachment line ending conversion

Closes #1001

See merge request GNOME/geary!588
2020-10-14 09:00:26 +00:00
Michael Gratton
3aa9eb77a6 Merge branch 'mjog/data-location-migration' into 'mainline'
Automatic config migration and per-build-profile directories

Closes #326

See merge request GNOME/geary!608
2020-10-14 07:26:00 +00:00
Michael Gratton
368a0ced97 Application.Client: Ensure non-release builds don't clobber release data
Append the build profile to Geary's data directories when not running
a release build (or under Flatpak) so that e.g. development builds use
different config, cache and data directories.

This allows us to perform things like database schema updates with
relative abandon, since if we ask people to test development builds
with schema updates, they can always safely go back to their release
builds again.
2020-10-14 09:21:34 +11:00
Michael Gratton
99fc14a4e5 Application.Client: Introduce and use consts for build profiles 2020-10-14 09:21:34 +11:00
Michael Gratton
072156096d Application.Client: Support determining if running under flatpak 2020-10-14 09:21:34 +11:00
Michael Gratton
899834189c org.gnome.Geary.yaml: Enable copying release config for nightlies 2020-10-14 09:21:34 +11:00
Michael Gratton
9658e9e3b4 Geary.Controller: Migrate release config if needed
If the current config directory is empty, go looking for config data
in other well known locations and if found, copy it all across from
the most recently modified directory.

This supports migrating config from non-Flatpak to Flatpak locations,
and release config to devel profile locations.

Fixes #326
2020-10-14 09:21:34 +11:00
Michael Gratton
468ea6df58 Application.Client: Rename app user dirs to home dirs 2020-10-14 09:21:34 +11:00
Michael Gratton
6934841484 Application.Controller: Clean up invoking XDG config migration
Order args to better, create the config dir in the controller since
that is always needed, regardless of any migrations.
2020-10-14 09:21:34 +11:00
Michael Gratton
e8061379ec Application.Controller: Clean up config/data vars in ctor 2020-10-14 09:21:31 +11:00
Michael Gratton
d7e05ab20e client: Move Migrate namespace to be under Util 2020-10-14 09:20:42 +11:00
Emin Tufan Çetin
1f623bf100 Update Turkish translation 2020-10-13 13:48:40 +00:00
Michael Gratton
fac257a273 Merge branch 'mjog/558-webkit-shared-process-redux' into 'mainline'
Webkit shared process redux

See merge request GNOME/geary!565
2020-10-13 08:27:01 +00:00
Michael Gratton
2357f8fd01 Merge branch 'mjog/default-development-build' into 'mainline'
Set default build profile to development

See merge request GNOME/geary!597
2020-10-13 08:00:26 +00:00
Michael Gratton
4db6d01e23 client: Remove perf relnote, it's not really that noteworthy 2020-10-13 18:49:57 +11:00
Yuri Chornoivan
cef6a02953 Update Ukrainian translation 2020-10-12 17:41:48 +00:00
Michael Gratton
6dade0e4f1 Merge branch 'mjog/libhandy-warning-workaround' into 'mainline'
Application.Client: Work around libhandy bug when opening main windows

See merge request GNOME/geary!606
2020-10-12 13:08:27 +00:00
Michael Gratton
3f7c054db0 build: Bump WebKitGTK min version to include UserMessage support 2020-10-13 00:02:09 +11:00
Michael Gratton
1d80ed2034 ComposerPageState: Use CSS for managing focus with composer body parts
Now that the `:focus-within` pseudoclass is supported, use this rather
than some custom JS to update custom HTML classes. This also prevents
spurious mutation events from firing.
2020-10-13 00:02:09 +11:00
Michael Gratton
0609fbc3d7 Util.JS: Remove now-unused code 2020-10-13 00:02:09 +11:00
Michael Gratton
92e842bf08 ConversationViewer.ConversationMessage: Fix valadoc warning 2020-10-13 00:02:09 +11:00
Michael Gratton
47b134a04e Components.WebView: Remove now-unused message handler infrastructure 2020-10-13 00:02:09 +11:00
Michael Gratton
eba82a1fbd GearyWebExtension: Trivial code clean up 2020-10-13 00:02:09 +11:00
Michael Gratton
7950ce50c6 GearyWebExtension: Untangle extension and JS interaction a bit
Move selection changed event listener into JS so it doesn't have to
cross the JS/native boundary twice.

Move sending remote load blocked from JS to the extension since we can
do that directly now and again so the JS/native boundary doesn't need
to be double-crossed again.
2020-10-13 00:02:09 +11:00
Michael Gratton
7b0146274c Conversation.WebView: Convert to using messages for JS → client comms 2020-10-13 00:02:09 +11:00
Michael Gratton
3655f4896f Composer.WebView: Convert to using messages for JS → client comms 2020-10-13 00:02:09 +11:00
Michael Gratton
fb96676fbd Components.WebView: Convert to using messages for JS → client comms 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
6162785d99 GearyWebExtension: Add support for sending messages from JS to client
Define a vala-backed JS class in the extension and make that available
to pages when they are registered. Add some helper JS to PageState for
defining message sending functions. Listen for these in
Components.WebView and dispatch to the registered callback for it.
2020-10-13 00:02:09 +11:00
Michael Gratton
db69807836 GearyWebExtension: Add factory method for error user messages 2020-10-13 00:02:09 +11:00
Michael Gratton
c813aa5707 Components.WebView: Check for pass up exceptions when calling JS code
Update web extension to check for errors when invoking page state
methods and pass a message back if found. Check for this, decode and
throw a vala error in the WebView if found.
2020-10-13 00:02:09 +11:00
Michael Gratton
ff565bc6ef Components.WebView: Convert to using messages for JS method invocation
Use WebKitGTK UserMessage objects for invoking JS methods rather than
serialising to JS strings and running those. This is possibly slightly
less efficient, but removes the onus on serialising to and parsing from
JS and once switched over from message handlers to UserMessage objects
will be using a single uniform IPC interface for both.
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 James Gratton
d7af23201c Revert "Revert "Merge branch 'mjog/558-webkit-shared-process' into 'mainline'""
This reverts commit cbe6e0ba9b, which reinstates
commit e4a5b85698.

See !411 and !374
2020-10-13 00:02:02 +11:00
Michael Gratton
0010550ad6 Application.Client: Work around libhandy bug when opening main windows
GNOME/libhandy#305
2020-10-12 23:24:10 +11:00
Michael Gratton
d0fff267f8 Merge branch 'adaptive' into 'mainline'
Make the main window adaptive

Closes #442

See merge request GNOME/geary!401
2020-10-12 10:41:32 +00:00
Julian Sparber
70a40893a3 action-bar: Add an action bar to the conversations list (2-panel)
This moves the actions from the headerbar to the action bar at the
bottom of the conversations list when multiple conversations are
selected. This changes is needed so that the user can still interact
with the conversations when folded.
This also hides the actions from the Headerbar and action bar when
no conversation is selected.
2020-10-12 11:03:55 +02:00