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.
JSC is WebKitGTK's supported API going forward and is more
straight-forward than the old JS API, so this simplifies the code and
removes a number of deprecated calls.
Avoid doing character encoding conversion and CRLF stripping when saving
text parts to disk. This prevents UTF-8 encoded text attachments from
being broken when base64 encoded and no encoding is specified.
See #362
Just make the `content_type` property non-nullable and set a default
in the ctor instead, since it's unlikely to ever be null despite the
GMime API suggesting it could be. Update call sites to use the property
instead.
RFC822.MailboxAddress.has_distinct_name() really needs to not do
sub-string checks since it will cause addresses like
`"foo-bar@baz" <bar@baz>` to not have a distinct name. To keep the fix
for #491 in effect, also adds special case checking for sinlge quotes.
Add some more tests to cover these cases.
Partially reverts commit 6e137eb649
See discussion in GNOME/geary!252
Geary.ImapDb.Database/utf8_case_insensitive_collation depends on a well
known UTF-8 collation order, but distros only ship C.UTF-8 by default
and Flatpak doesn't ship that, so support en_US.UTF-8 as a fallback.
See https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/812
Move args from open_async to ctor and use these to determine and store
DB file and attachment paths as properties. This allows constructing
the DB instance up front and markig it as non-nullable, simplifies
calling patterns and hence allows removing one use of the deprecated
Engine singleton, and by moving in the local data deletion
implementation from ImapEngine.GenericAccount, also allows removing a
static helper method.
Add a ContactHarvester arg to ImapDB.Folder.create_or_merge_email and
call it on the resulting email. Add and update a new harvester
property to MinimalFolder and pass that in as needed.
Replaces harvesting code in ImapDB code so as to be stand-alone and
reusable. Implement harvesting policy to only harvest from a set of
whitelisted special folder types (so junk and trash is not harvested)
and only harvest valid, non-spoofed, addresses.
Remove contact harvesting from DB version 005 (version 0.1.1), allowing
the implementation of both ContactStoreImpl and ImapDB.Database to be
cleaned up. Remove contact collection from ImapDB.Folder, reducing the
numer of Gee objects created when creating/merging messages. Finally,
remove the MessageAddresses object now that it is unused.
Prepare for doing composer autocomplete via queries by not loading all
contacts at startup in the engine. Update Geary.ContactStore API to that
end, and convert Geary.Account.get_contact_store accessor method to a
property.
Use string.get_next_char() to handle iterating over an
RFC822.MailboxAddress mailbox local part, and explicitly allow UTF-8
2, 3, and 4 byte chars without quoting, per RFC 5322.
This lets us fix the test cases that use UTF-8 chars in the local part.
* org.gnome.Geary.service.in: create, and let it be installed by CMake.
* org.gnome.Geary.desktop.in: add `DBusActivatable=true`.
* geary-autostart.desktop.in: use `--gapplication-service` instead of
hidden.
* Change the way arguments are parsed:
* Use the _command-line_ and _handle-local-options_ signals instead
of _local-command-line_.
* Remove the `--hidden` option (replaced by `--gapplication-service`)
* Use VariantDict (which is a little cleaner)
* Don't use global variables in Arg, but set them in
the config instead.
* We can no longer set a global summary due to the new option handling
in GApplication. On IRC, I got the feedback that info like this should
be going into a manpage.
* Since the QUIT-action can now be called without ever activating the
app, make the necessary changes to the `GearyController`:
* `main_window` and `current_conversations` can be null.
* use `pending_mailtos()` for the compose action as well.
* Don't update the UNDO action if we're closing down.
* More instance variables prefixed with this (we're changing the lines
anyway, might as well do it properly).
* `Environment.set_prgname()` is already executed in GApplication.run(),
so no more need for `GearyApplication.PRGNAME`.
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
Remove CI test workaround
See merge request GNOME/geary!198
(cherry picked from commit 8654c7ae136d2467f7b5b2e85a436d9039bd64bc)
4fc688de Revert "Work around DB tests always failing on gcc150.osuosl.org CI runner"
6b4b598a Add test runner multiplier to account for slow CI runners
If a FillWindowOperation didn't load a full amount of messages, it just
assumed that there were no more to load. This is not true however when
loading locally, the folder's vector isn't fully expanded, and it gets
to the end of the vector.
This patch fixes the operation to also queue another fill if the
monitor's folder message window is smaller than the folder's total
message count.
Fixes#289
In RFC822.Date, don't use duplicate time_t and GLib.DateTime properties
-- just use the latter, fix formatting of half-hour time zones, fix
where the that class refers to ISO 8601 instead of RFC822 strings since
that is just plain wrong, and finally when parsing an RFC 822 string,
take note of the timezone offset and store that in the DateTime object,
so it is round-tripped correctly.
Stop passing time_t around everywhere else, just use the UNIX time from
the DateTimes we store for protocol objects anyway, so the time zone is
obvious.
Add unit tests.