Commit graph

3300 commits

Author SHA1 Message Date
Michael James Gratton
2642119c3b Add RTL versions of list icons. 2017-12-12 23:32:43 +11:00
Michael James Gratton
12cea4eb93 Convert ordered list icon use paths for text, increase number size. 2017-12-12 23:32:43 +11:00
Nikolas Tapia
63521d8566 Added support for lists in composer
This attempts to solve bug
[#714921](https://bugzilla.gnome.org/show_bug.cgi?id=714921).

They are available as two buttons on the format bar, next to font
options. The icons I used are taken from a free icons site just for demo
purposes and should be replaced by new icons. Also I did not include
hotkeys mainly because I could not come up with a good one, also they
are pretty uncommon I think.

Also added new icons to icons/CMakeLists.txt
2017-12-12 23:32:28 +11:00
Michael James Gratton
473a0b8859 Fix some warnings showing up when compiling under Meson. 2017-12-12 15:56:31 +11:00
Michael James Gratton
ee28f153e4 Ensure console and mailer are built w/ same args as client under Meson. 2017-12-12 15:56:31 +11:00
Michael James Gratton
c25f254de8 Treat POODLE and REF_TRACKING defines per others in Meson build. 2017-12-12 15:56:31 +11:00
Michael James Gratton
a38a450ae5 Fix compiling tests under Meson.
* test/meson.build: Client tests need both the complied GSettings schema
  and GResources, also common Geary compilation arguments.
2017-12-12 15:56:31 +11:00
Michael James Gratton
763ccd2f7c Fix compiling and using GSettings schema when built by Meson.
* desktop/meson.build: Make sure the schema is re-compiled with the
  source XML changes.

* meson.build: Make compiling the schema mandatory, since both running
  the client locally and unit tests require it. Fix path to compiled
  schema so the client can find it.
2017-12-12 15:56:31 +11:00
Michael James Gratton
afb236517f Fix meson build when libmessaging-menu is available.
Since libmessaging-menu has a either a broken pkg_config file or a dumb
VAPI name, we need to detect the library and the VAPI in two steps, then
add them both as dependencies.
2017-12-12 15:56:31 +11:00
Michael James Gratton
cba778d6f7 RTL UI fixes for ConversationMessage. 2017-12-12 15:56:31 +11:00
Niels De Graef
01c13f726f Port build system to Meson. Bug 777044.
Some remarks:

* Note that Meson adds a hard dependency on Python 3.

* All dependencies and defines are now listed together.

* Some build files were put in their respective subdirectories, e.g. the Geary
  engine library will be built from the Meson file in `src/engine`.

* `--fatal-warnings` is no longer an explicit flag, as Meson provides
  `-Dwerror=true` for this.

* An explicit resource file needs to be used. The issue to support this from
  Meson itself can be found at https://github.com/mesonbuild/meson/issues/706 .

* The `gnome.yelp()` function parses a LINGUAS file so we no longer need to keep
  track of all languages in our build system.

* There are no Debian scripts defined in the meson.build files to keep them
  clean, but they can be kept as separate scripts in `build-aux`.

* Left out the `dist` target as there is now `ninja dist`

* `geary-docs` is disabled by default, as valadoc-0.38.3 returns errors.

https://bugzilla.gnome.org/show_bug.cgi?id=777044
2017-12-12 00:27:46 +01:00
Michael James Gratton
b627fd4fc6 Fix another avatar-related critical.
* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage.load_avatar): We are very occasionally getting
  crashes calling Gtk.Image.get_pixel_size() due to the image is null -
  maybe a race? This obviates the problem by hard-coding the size instead
  of dynamically getting it.
2017-12-08 00:00:48 +11:00
Michael James Gratton
b2f0ecab1b Merge branch 'wip/778720-soup-avatar-crash'. Fixes Bug 778720. 2017-12-05 15:06:00 +11:00
Michael James Gratton
923db7c91b Improve ImapDB.Folder debug logging for duplicate search field check. 2017-12-05 15:00:01 +11:00
Michael James Gratton
8afca7fb2e Fix a critical error invoking popup on conversation list.
* src/client/conversation-list/conversation-list-view.vala,
  src/client/conversation-viewer/conversation-message.vala,
  src/client/sidebar/sidebar-tree.vala (TreeView): Use
  Gtk.Menu.popup_at_pointer() rather than deprecated popup() method.

* src/client/util/util-gtk.vala (GtkUtil): Remove unused menu-related
  code.
2017-12-05 14:34:48 +11:00
Michael James Gratton
b6980a2f37 Allow email address with "localhost" as the domain part. Fixes Bug 714299. 2017-12-04 16:42:04 +11:00
Michael James Gratton
bbbded81df Work around ongoing crashes in SoupCache when loading avatars.
This ensures that only a single request for a resource is made at once,
to work around crashes in SoupCache when multiple requests for the same
resource.

Hopefully fixes Bug 778720 once and for all.

* src/client/conversation-viewer/conversation-list-box.vala
  (ConversationListBox): Add new AvatarStore class and internal
  AvatarLoader class to manage avatar loads for the
  conversation. Construct an instance of the store in the
  constructor and pass it to ConversationEmail::start_loading so its
  messages can use it for loading their sender avatars. Update call
  sites.

* src/client/conversation-viewer/conversation-message.vala
  (ConversationMessage::load_avatar): Add AvatarLoader param for loading
  avatars, use that rather than making the Soup calls directly. Update
  call sites.
2017-12-04 11:00:25 +11:00
Kukuh Syafaat
735c53085c Update Indonesian translation 2017-12-03 08:41:20 +00:00
Michael James Gratton
9a89d7e037 Fix Flatpak build.
* org.gnome.Geary.json: Add libunwind dep, point libgee back to master
  while we're here.
2017-12-02 22:10:36 +11:00
Michael James Gratton
b1d3d494bc Merge branch 'wip/713530-background-sync'. Fixes Bug 713530. 2017-12-02 12:18:57 +11:00
Michael James Gratton
7c5d89bdb9 Only prefetch messages that have not been seen before.
* src/engine/imap-engine/imap-engine-email-prefetcher.vala
  (EmailPrefetcher): Connect to email_locally_{appended,inserted} rather
  than email_{appended,inserted}.
2017-12-02 01:15:45 +11:00
Michael James Gratton
926aae4ef2 Enforce a an API contract clause for Geary.Folder.list_email_by_id_async.
* src/engine/imap-engine/replay-ops/imap-engine-list-email-by-id.vala
  (AbstractListEmail): Throw an error if asking for a specific message,
  asking for it to be included in the results, but the message not
  actually appearing in the results.
2017-12-02 01:15:45 +11:00
Michael James Gratton
f55cdc33ed Add some debugging so we know when a background sync has completed. 2017-12-02 01:15:45 +11:00
Michael James Gratton
a74dfb5f64 Ensure duplicate messages are still added to local folders.
Previously when appending new messages to a local folder we were ignoring
messages in the same folder with the same internal date and RFC822
size. This changes the ImapDB::Folder's behaviour in this case to use the
same message object but re-associate it with the folder, meaning on
re-sync, we don't find a hole in the message sequence again and go
searching for it over and over.

* src/engine/imap-db/imap-db-folder.vala
  (Folder::do_search_for_duplicates): Break out UID check to simplify
  call semantics and fast-path finding obvious duplicates. Look for
  duplicate messages, but simply return them and let caller determine
  policy.
  (Folder::do_create_or_merge_email): Do UID duplicate check up front
  before searching for dupe messages, if duplicate message is found,
  append to the folder anyway and merge. Rework to be explicit about
  param prerequisites up front and throw and error rather than asserting
  if not met. Unify common calls in both create and merge cases.
2017-12-02 01:15:45 +11:00
Michael James Gratton
8db48f8242 Ensure the account synchroniser actually does some vector expansion.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
  (AccountSynchronizer::sync_folder_async): For the last-ditch sync,
  ensure we list newest-to-oldest and for int.MAX count to make sure the
  folder is fully expanded.

* src/engine/imap-engine/replay-ops/imap-engine-abstract-list-email.vala
  (AbstractListEmail): Update doc comments,
  (AbstractListEmail::expand_vector_async): Document, re-work to simplify
  the implementation and make it a bit more obvious how and why the lower
  and higher bounds are calculated, and make sure they conform to the API
  docs and use by existing call sites.

* src/engine/imap/api/imap-folder.vala (Account::uid_to_position_async):
  Make caller's life easier by throwing an error if the results from the
  server are obviously bogus and never return null.
2017-12-02 01:15:45 +11:00
Michael James Gratton
6c6737d2ad Replace client call to Gtk.show_uri() with show_uri_on_window().
Former is deprecated, latter works better with Flatpak.

* src/client/application/geary-application.vala: Use show_uri_on_window.
2017-12-02 01:03:51 +11:00
Michael James Gratton
fd91eee46d Add to docs for the IMAP CREATE command. 2017-12-02 00:56:06 +11:00
Michael James Gratton
d66e4526bd Fix some engine build warnings.
* src/engine/imap/command/imap-create-command.vala: Enums can't be null?

* src/engine/rfc822/rfc822-message.vala: Gee.Map has deprecated contains?!
2017-12-02 00:55:33 +11:00
Michael James Gratton
5387bd87ba Don't use local/remote counts to determine if folder should be sync'ed.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
  (AccountSynchronizer::process_folder_async): Since the folder might
  not have opened yet, the counts may be wrong, so don't rely on them.
2017-12-01 23:01:28 +11:00
Michael James Gratton
4e0b1d8ff3 Update doc comments for Geary.Folder and ::list_email_by_id_async. 2017-12-01 11:42:31 +11:00
Michael James Gratton
f8dc87cb36 Ensure EmailStore always closes folders when executing an operation. 2017-11-28 17:40:15 +11:00
Michael James Gratton
12adbbdcb1 Fix magnitude of connectivity check timeout. 2017-11-24 16:16:58 +11:00
Michael James Gratton
b8304b594b Update unit tests after recent changes. 2017-11-23 09:37:59 +11:00
Michael James Gratton
f42a5d4f12 Fix compile error with vala git master. Fixes Bug 790567.
* src/engine/imap/response/imap-namespace-response.vala
  (NamespaceResponse): Don't try to use arrays as properties. Fix call
  sites.
2017-11-21 10:42:25 +11:00
Michael James Gratton
c1a19dfa80 Make GenericAccount::enumerate_folders_async debug PERIODIC as well. 2017-11-21 10:42:25 +11:00
Michael James Gratton
a24de61242 Turn down default debug logging from the account synchroniser a bit.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
  (AccountSynchronizer): Log periodic aspects of the account synchroniser
  as PERIODIC.

* src/engine/imap-engine/imap-engine-minimal-folder.vala
  (MinimalFolder::find_earliest_email_async): Remove two debug calls that
  were getting triggered for every sync pass. These should be in the
  synchroniser instead.
2017-11-21 10:42:25 +11:00
Michael James Gratton
7ad941be8e Try harder to ensure Geary always shuts down cleanly.
* src/engine/imap-engine/imap-engine-generic-account.vala
  (GenericAccount): When closing, wait for each folder to close before
  shutting down the local and remote connections.

* src/client/application/geary-controller.vala
  (GearyController::close_async): Close both inboxes and accounts in
  parallel. Don't wait for conversation monitor or inboxes to close
  before closing the account now that the accound does so. The account
  needs to start closing so that the background synchroniser stops, and
  that needs to stop before any open folder will close. Otherwise if the
  background synchroniser is currently synchronising an inbox or any open
  folder, then the account will not close until the synchroniser
  finishes, which could block for a long time.

* src/engine/api/geary-abstract-local-folder.vala (Folder),
  src/engine/imap-engine/imap-engine-minimal-folder.vala (MinimalFolder):
  Notify the close semaphore in the classes' ctors so that if they are
  never opened, calling wait_for_close_async() does not block.
2017-11-21 10:42:25 +11:00
Michael James Gratton
01259104e1 Actually fire Geary.Account::closed signal when closing accounts. 2017-11-21 10:42:25 +11:00
Michael James Gratton
ae5f6a4d31 Document and tweak IMAP keep-alive periods and TCP socket timeouts. 2017-11-21 10:42:25 +11:00
Michael James Gratton
5906b4618f Fix critical warning when deleting an account.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
  (AccountSynchronizer): Don't try to disconnect from account signals in
  dtor, the instance may already be gone.
2017-11-21 10:42:25 +11:00
Michael James Gratton
69a4e631c1 Minor fix and code cleanup for Geary.Imap.Account.
* src/engine/imap/api/imap-account.vala (Account): Replace camel case
  methods names with underscores per style guide, fix sense of
  is_no_select test in fetch_folder_cached_async() to account for the
  double nagative, and clean up the resulting if/else clause a bit.
2017-11-21 10:42:25 +11:00
Daniel Mustieles
d8d4af7eda Update Spanish translation 2017-11-20 15:50:26 +00:00
Marek Cernocky
e050ecbfd1 Updated Czech translation 2017-11-20 07:55:37 +01:00
Emin Tufan Çetin
14e415bef2 Update Turkish translation 2017-11-20 06:38:53 +00:00
Piotr Drąg
dde4fd2210 Update Polish translation 2017-11-19 20:05:39 +01:00
Michael James Gratton
412549a3f7 Don't try to install the contractor file if disabled. Bug 790382.
Patch courtesy Jiri Cerny.
2017-11-19 21:55:03 +11:00
Michael James Gratton
a46feb24af Fix namespace error listing "[GMail]" mailbox. Bug 790544.
Thanks to Torben for bug report and inital patch.

* src/engine/imap/transport/imap-client-session.vala
  (ImapClientSession::get_delimiter_for_path): If the folder root does
  not exist as a namespace, look for an empty namespace, then default to
  the personal namespace.
2017-11-19 21:49:45 +11:00
Michael James Gratton
d1d8d6411e Merge branch 'wip/713006-better-error-reporting'. Fixes Bug 713006. 2017-11-19 18:35:06 +11:00
Michael James Gratton
8c2a4fc2a5 Add licensing info for libunwind binding, based on convention. 2017-11-19 12:07:14 +11:00
Mario Blättermann
a226d0cebf Update German translation 2017-11-18 20:06:55 +00:00