Commit graph

4752 commits

Author SHA1 Message Date
Mete Can Eris
e2896f303c Move undo to in app notifications 2019-06-26 03:35:27 +00:00
Michael Gratton
86465bf331 Merge branch 'wip/composer-folks' into 'mainline'
Autocomplete email addresses in the composer from folks and the engine

See merge request GNOME/geary!244
2019-06-26 03:23:53 +00:00
Michael Gratton
7b124abd2e Fix engine test failure under flatpak
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
2019-06-26 12:46:08 +10:00
Michael Gratton
bed41855a4 Keep meson test logs in GitLab CI for Fedora and Ubunut builds
This should help debug build problems.
2019-06-23 14:37:37 +10:00
Michael Gratton
56e0fb7543 Make search update process optional when ImapDB.Account opened
This allows ImapDB unit tests to avoid running the process when it
really doesn't need to be run. Should fix anther criticial about
ImapDB being null (see previous commit).
2019-06-23 13:26:07 +10:00
Michael Gratton
0f4eda5f45 Make ImapDb.GC's ref to the database strong
This shoud fix Geary.ImapDb.DatabaseTest test failing with a critical:

```
geary-CRITICAL **: 05:02:51.688: geary_db_database_get_is_open:
assertion 'GEARY_DB_IS_DATABASE (self)' failed
```

Doing so constitutes a circular ref, but since it is broken once GC is
complete anyway, it shouldn't be a problem.
2019-06-23 12:49:39 +10:00
Michael Gratton
3ffa7dcd25 Trivial code cleanup 2019-06-22 16:50:10 +10:00
Michael Gratton
4e1aa32514 Ensure Geary.ContactStoreImpl handles non english searches
Fix DB impl actually do UTF-8 case-insensitive search matching. Add
some unit tests.
2019-06-22 14:11:10 +10:00
Michael Gratton
788a06144f Ensure test drivers all have sane locales set 2019-06-22 14:08:03 +10:00
Daniel Mustieles
bdb206af7d Updated Spanish translation 2019-06-19 12:20:03 +02:00
Michael Gratton
5a0c105220 Composer contact autocomplete tweaks
Add workaround for autocomplete not showing up if query doesn't finish
fast enough. Add some padding around autocomplete cells. Show an icon
for desktop contacts and favourites. Replace whole model rather than
clearing and re-populating to avoid the entries flashing in the UI.
2019-06-16 00:27:23 +10:00
Michael Gratton
dd9d066405 Ensure Geary.ContactStoreImpl validates UTF-8 strings 2019-06-15 16:53:17 +10:00
Michael Gratton
6db466e866 Convert ContactEntryCompletion to use app contacts
Remove ContactListStore, replace with Gtk.ListStore updated directly
from within the completion class. Use Application.Contact and store
rather than Geary.Contact objects and store for searching for contacts
for the completion model.
2019-06-15 16:47:34 +10:00
Michael Gratton
f49f885739 Add Application.ContactStore.search method
This supports search for contacts over both Folks and engine contact
sources.
2019-06-15 16:45:10 +10:00
Michael Gratton
7c4d71131e Decouple Application.Contact from Geary.Contact
Update Application.Contact to have specific constructors for both
Folks-based and engine-based construction, remove the requirement for
the class to have a Geary.Contact field, and add a set of email
addresses as a property so that things like setting remote resource
loading prefs still works. This allows application contact to be
constructed from a Folks individual directly, without having to also
load an engine contact.

Update Application.ContactStore to cache Geary.Contact instances now
that they are always loaded from the database, rework loading code to
take advantage of the changes above.
2019-06-15 16:42:23 +10:00
Michael Gratton
ef54509350 Clean up context objects passed to ComposerWidget's constructor
Pass an instance of GearyApplication to ComposerWidget instead of just
the config object. This allows removing a number of uses of both the
app and engine singleton properties and will provide a means of
accessing the app's contact store for addresss completion (i.e. Folks).
2019-06-15 00:04:39 +10:00
Michael Gratton
7a14f54c79 Remove now unused ContactListStoreCache class 2019-06-13 16:56:03 +10:00
Michael Gratton
cc27bae792 Convert composer email autocomplete to use search for matching
Populate ContactListStore using Geary.ContactStore.search. Simplify
ContactEntryCompletion greatly.
2019-06-13 16:56:03 +10:00
Michael Gratton
3007ac51da Do prefix-only searching in ContactStoreImpl to impove results 2019-06-13 16:56:03 +10:00
Michael Gratton
71cb7fcdfe Add Geary.ContactStore.search method, impementation and tests 2019-06-13 16:56:03 +10:00
Michael Gratton
66a664f98d Clean up ImapDB.Account ctor/open API a bit
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.
2019-06-13 16:55:23 +10:00
Michael Gratton
5e13dd0abd Replace Db.PrepareDelegate with a subclass virtual function hook
While slightly less flexible, it fits the Engine's needs and simplifies
the DB API.
2019-06-13 16:35:17 +10:00
Michael Gratton
03b5fcee8a Pass email to a contact harvester instance when persisting it
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.
2019-06-13 16:33:44 +10:00
Michael Gratton
65ab37938f Implement new contact harvester for the engine
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.
2019-06-13 16:32:47 +10:00
Michael Gratton
96cbb83f83 Ensure Geary.Contact real names are distinct from their address
This avoids presenting contacts as "name@example.com" <name@example.com>
2019-06-13 16:32:08 +10:00
Michael Gratton
91caff487b Add support for uint args in expected calls in MockObject 2019-06-13 16:31:26 +10:00
Michael Gratton
bc64cd9847 Provide a way to access actual args for an expected mock call 2019-06-13 16:30:42 +10:00
Michael Gratton
5ab35da47b Clean up contact importance API
Move Importance enum into Contact since it's only used there, simplify
members and clean up call sites.
2019-06-13 16:29:49 +10:00
Michael Gratton
cb8150ce03 Remove existing contact harvesting mechanism
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.
2019-06-13 16:28:59 +10:00
Michael Gratton
809f664319 ContactStoreImpl unit tests 2019-06-13 16:28:55 +10:00
Michael Gratton
2ff2d2421f Clean up ContactFlag API
Move ContactFlag class into Contact class, rename Contact.flags property
to avoid redundancy and make it non-nullable to be able to simplify its
use.
2019-06-13 16:28:51 +10:00
Michael Gratton
0b734f7ba2 Don't load all engine contacts on startup
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.
2019-06-13 16:28:35 +10:00
Federico Bruni
adcad491ff Update Italian translation 2019-06-11 08:19:38 +00:00
Michael Gratton
5a87cf5436 Merge branch '439-appstream-glib' into 'mainline'
add appstream-glib dependency

Closes #439

See merge request GNOME/geary!243
2019-06-03 10:31:52 +00:00
Federico Bruni
7c42c5d803 add appstream-glib dependency
appdata.its, needed to extract all the strings of appdata xml file,
is actively maintained in appstream-glib.

Fix issue #439.
2019-06-03 10:31:52 +00:00
Piotr Drąg
dc6788eef3 Update Polish translation 2019-05-27 18:38:51 +02:00
Michael Gratton
304377c787 Merge branch 'wip/spellcheck-subject' into 'mainline'
Spellcheck composer subject

See merge request GNOME/geary!240
2019-05-24 13:10:08 +00:00
Michael Gratton
bb872b28e4 Add support for spell checking the subject line 2019-05-24 14:29:41 +02:00
Michael Gratton
4dd08389df Add Gspell to dependencies and the build 2019-05-24 14:29:41 +02:00
Michael Gratton
10af58a5f1 Merge branch 'wip/default-spellcheck-lang' into 'mainline'
Enable a spellcheck language by default

Closes #443

See merge request GNOME/geary!239
2019-05-24 10:55:09 +00:00
Michael Gratton
0eb9fdb934 Merge branch 'wip/fix-warnings' into 'mainline'
Fix misc warnings

See merge request GNOME/geary!238
2019-05-24 10:53:28 +00:00
Michael Gratton
1de61ca4e7 Clean up SpellCheckPopover to avoid accessing config as much 2019-05-24 12:37:19 +02:00
Michael Gratton
f27f2fb91f Try harder to ensure a spell checker is enabled by default
When no spell checker langauges are explicitly set, use the set of
preferred languages for spell checking. Make spell-check-languages
setting nullable so we can differenciate between "use default"
and "disable spellchecking".
2019-05-24 12:37:19 +02:00
Michael Gratton
adea4618d6 Add some doc comments for Util.International functions 2019-05-24 12:37:19 +02:00
Michael Gratton
275c585d37 Put International package under Util per naming convention. 2019-05-24 12:37:19 +02:00
Michael Gratton
3fb74e6e56 Fix valac warning 2019-05-24 12:30:12 +02:00
Michael Gratton
d56aa10ff6 Fix valadoc issues 2019-05-24 12:30:12 +02:00
Rafael Fontenelle
3718856df4 Update Brazilian Portuguese translation 2019-05-23 15:13:50 +00:00
Michael Gratton
b4e3835434 Merge branch 'controler_locking' into 'mainline'
Correct locking in create_controler

See merge request GNOME/geary!237
2019-05-23 12:49:14 +00:00
Jiří Černý
246bb3ce2a Cleanup to meet source code conventions 2019-05-23 08:04:51 +02:00