Commit graph

3544 commits

Author SHA1 Message Date
Michael James Gratton
ffb4befdd8 Merge branch 'wip/795906-turkish-locale'. Fixes Bug 795906. 2018-05-17 15:43:16 +10:00
Michael James Gratton
967e401c21 Replace custom and extern functions in Geary.Ascii with stdlib equivs.
This partially re-instates commit 1d8c4aea, without breaking anything
when running the client using the tr_TR.UTF-8 locale.
2018-05-17 15:41:28 +10:00
Michael James Gratton
ba861b8ed1 Fix failing RFC822.Mailbox test.
Reverting commit 1d8c4aea broke the mailbox class a bit. This fixes the
issue, introduces Ascii.last_index_of which is needed by Mailbox anyway,
and adds some test for it. Also 'optimises' Ascii.index_of bit as well.
2018-05-17 15:41:28 +10:00
Michael James Gratton
40d9b77999 Revert "Remove a number of redundant fns in Engine.Util.Ascii."
This reverts commit 1d8c4aea80.

Fixes Bug 795906.
2018-05-10 15:18:32 +10:00
Michael James Gratton
01a43bbe07 Fix ContentTypeTest.guess_type_from_buf occasionally failing. 2018-05-03 17:01:18 +10:00
Michael James Gratton
7a9960c037 Fix crash if the login session's secret service has no password keyring.
Bug 795328.
2018-05-03 11:16:47 +10:00
Michael James Gratton
598f1a5e89 Increase len of non-truncated strs that TestCase.assert_string reports. 2018-04-27 12:37:13 +10:00
Michael James Gratton
057e733eb1 Fix a crash saving an attachment with unknown content type.
* src/engine/api/geary-attachment.vala (Attachment): Add a null check for
  the extension before using it, add a test case to cover it.
2018-04-27 12:29:06 +10:00
Michael James Gratton
5d58f165e6 Update Appsteam metainfo to point to new help page. 2018-04-27 12:13:14 +10:00
Rico Tzschichholz
d619d99d4c Drop default value of non-automatic property for newer vala 2018-04-19 19:45:04 +02:00
Nathan Follens
963ac79d0e Update Dutch translation 2018-04-17 20:52:26 +00:00
Michael James Gratton
a37d8605c2 Fix a crash editing a draft that refers to a message with no message-id. 2018-04-17 18:55:30 +10:00
Michael James Gratton
339b2b6153 Tweak offset used when scrolling to messages mid-conversation. 2018-04-17 18:55:30 +10:00
Michael James Gratton
101075d1ed Ensure embedded composer is always scrolled to when opened.
Fixes Bug 778027.

* src/client/conversation-viewer/conversation-viewer.vala
  (ConversationViewer): Disable disable kinetic scrolling before showing
  an embedded composer so that if it still has some momentum when the
  composer is inserted and scrolled to, it won't jump away again.
2018-04-17 18:55:30 +10:00
Jordi Mas
4740ffa724 Update Catalan translation 2018-04-17 07:08:27 +02:00
Michael James Gratton
adf168218e Ensure composer overlay widget isn't visible by default.
Followup for commit 07b4a784.
2018-04-16 11:46:00 +10:00
Michael James Gratton
f84368574f Fix glib warning introduced by commit 5a9075b3. 2018-04-16 11:33:35 +10:00
Michael James Gratton
9e2a2f03b4 Fix compilation error with valac < 0.38.1-ish.
* src/engine/imap/command/imap-create-command.vala (Command): Rename
  atom consts so they do not collide with GObject property names defines
  generated by older version of valac.
2018-04-16 10:52:35 +10:00
Michael James Gratton
07b4a7842f Replace some deprecated style calls in the composer with CSS rules. 2018-04-15 22:03:35 +10:00
Michael James Gratton
33150b22c6 Remove C warning suppression hack from meson build.
Meson suppresses all cpp warnings anyway, and valac has recently improved
on the amount of warning spew its c code generates.
2018-04-15 21:56:02 +10:00
Michael James Gratton
c7c138dbdf Fix meson warning about use of version kwarg in find_library(). 2018-04-14 22:18:00 +10:00
Michael James Gratton
589c9da3eb Fix warning introduced by commit 7954a224. 2018-04-14 21:02:20 +10:00
Michael James Gratton
e0020ff6a7 Only save a draft if we should save it, not if we can save it. 2018-04-14 13:57:29 +10:00
Michael James Gratton
4c7688af36 Ensure composer draft is marked as changed when attachments are updated. 2018-04-14 13:57:01 +10:00
Michael James Gratton
67f6bf201d Fix being unable to remove attachments from a draft. Fixes Bug 792555.
* src/client/composer/composer-widget.vala (ComposerWidget): When
  removing an attachment, check for existing pending attachments
  afterwards but don't add them, just enable the button instead.
2018-04-14 13:54:03 +10:00
Michael James Gratton
7b12c47b8b Remove some unwanted debug statements. 2018-04-14 13:34:43 +10:00
Michael James Gratton
7fa755f0b7 Work around composer info label being too long. Fixes Bug 790435.
* ui/composer-widget.ui: Make the info label esliipsisable, but give it a
  reasonable minimum size.

* src/client/composer/composer-widget.vala (ComposerWidget): Set the info
  label's tooltip with the text so it can still be read when ellipsed.
2018-04-14 12:46:55 +10:00
Michael James Gratton
5a9075b345 Fix TRUE/FALSE listed as composer drafts status.
* src/client/composer/composer-widget.vala (Composer): Replace use of
  inappropriate public properties and obtuse property bindings with a
  subject_changed signal and private properties that update the info
  label in their setter, so it's obvious how the whole thing works. Move
  code for managing a detached compoer's window title to the
  ComposerWindow class.
2018-04-14 12:37:22 +10:00
Michael James Gratton
7954a224cc Ensure drafts are removed when composer from address changes accounts.
This also ensure that if the user causes the from account quickly, that
there isn't any undesirable interleaving of drafts managers as multiple
instances are possibly opened and closed.

Fixes 778976.

* src/client/composer/composer-widget.vala (ComposerWidget): When
  reopening the draft manager and one exists already, discard its draft
  first. When opening a new draft manager, use a cancellable to stop any
  existing draft manager being opened, and to close any being opened when
  the widget is destroyed. Use a private var when opening/closing the
  draft managers so the class field is only updated when the instance has
  fully opened and as soon as it starts to be closed.
2018-04-14 09:35:26 +10:00
Michael James Gratton
77d33d7346 Don't display quote expander buttons when printing a message.
Fixes Bug 795216.

* ui/conversation-web-view.css: Fix syntax error in CSS, make
  geary-button elements display: none for print.
2018-04-13 16:54:57 +10:00
Stas Solovey
8c5d170c1d Update Russian translation 2018-04-12 20:03:12 +00:00
Stas Solovey
27a5c05197 Update Russian translation
(cherry picked from commit 1e93d4366d8b1f5f154c461210ec51f60e824c08)
2018-04-12 19:49:36 +00:00
Michael James Gratton
67e8a8ab93 Fix composer detach button position & visibility on custom setups.
Fixes Bug 793710.

* src/client/composer/composer-headerbar.vala (ComposerHeaderbar): Ensure
  we actually get notified when the user changes their decoration prefs
  and update detach button location correctly.

* ui/composer-headerbar.ui: Make start detach button's image visible by
  default.
2018-04-12 11:36:18 +10:00
Michael James Gratton
65f6c1127f Fix second multipart/digest message body not being displayed.
* src/client/conversation-viewer/conversation-email.vala
  (MessageViewIterator): Fix class to actually obey Gee.Iterator and
  Gee.Traversable.foreach contracts, so the first attached message has
  its body loaded when the email is loaded.
2018-04-11 16:41:30 +10:00
Michael James Gratton
3da72b2f76 Fix message body quote button styling under WebKitGTK 2.20.
* ui/conversation-web-view.css: Replace bogus ">>" with simple descendent
  selector.
2018-04-11 14:01:54 +10:00
Michael James Gratton
cfaee5cb58 Further work around issues presenting windows under gnome-shell.
Follow-up to Bug 776881 and commit e333794f, fixes Bug 794264.

* src/client/application/geary-application.vala,
  src/client/composer/composer-container.vala: Use
  GLib.get_monotonic_time() instead of get_real_time() when calling
  Gtk.Window.present_with_time to avoid issues with mutter/gnome-shell
  alt-tabbing.
2018-04-11 12:02:42 +10:00
Michael James Gratton
71d05b6ce0 Reduce CPU use when idle.
It looks like Gtk.Spinner triggers repaints when running, even when the
widget is not visible. This ensures the conversation is stopped when not
visible.

Fix for Bug 783025.

* src/client/conversation-viewer/conversation-viewer.vala
  (ConversationViewer): Start the conversation spinner when showing it,
  stop the conversation spinner when it is hidden.
2018-04-09 12:31:39 +10:00
Michael James Gratton
2149f74c99 Merge branch 'wip/794174-conversation-monitor-max-cpu'. Fixes Bug 794174. 2018-04-07 10:04:20 +10:00
Michael James Gratton
3bf2ac181a Add unit tests for ConversationMonitor, fix a few issues.
* src/engine/app/app-conversation-monitor.vala (ConversationMonitor):
  Don't check the folder blacklist for external folder signals when the
  signal is received, do it when the operation is executed so it's fresh.

* src/engine/app/conversation-monitor/app-fill-window-operation.vala
  (FillWindowOperation): Only re-fill the conversation if we get a full
  load, anything else means we hit the end of the folder.

* test/engine/app/app-conversation-monitor-test.vala: New unit tests
  for ConversationMonitor.

* test/engine/api/geary-account-mock.vala,
  test/engine/api/geary-folder-mock.vala: Mix in MockObject mock up all
  method calls.

* test/engine/api/geary-email-identifier-mock.vala: Fix the comparator
  method when the other instance is null.
2018-04-07 10:02:24 +10:00
Michael James Gratton
0ea1fe6c35 Don't use the database for internal ConversationMonitor bookkeeping.
This replaces the use of Geary.Folder.find_boundaries_async in
ConversationMonitor with a simple sorted set of known in-folder message
ids. This is both easy and fast, reduces needless DB load when loading
conversations, and also allows allows removing what is otherwise
single-use implementation overhead in classes deriving from Folder.

* src/engine/app/app-conversation-monitor.vala (ConversationMonitor):
  Replace get_lowest_email_id_async() with window_lowest property, update
  call sites. Implement the property by using a sorted set of known
  listed email ids from the base folder. Update the set as messages in
  the base folder are listed. Rename notify_emails_removed to just
  removed and remove ids from the set if any messages from the base
  folder are removed.

* src/engine/api/geary-folder.vala (Folder): Remove
  get_lowest_email_id_async since it is now unused, do same for all
  subclasses.
2018-04-07 10:02:24 +10:00
Michael James Gratton
712088061b Add a mock object mixin that can check call expectations on mocks.
* test/mock-object.vala: Add initial mock object implementation.

* test/test-case.vala; Add some useful high level assertion functions.
2018-04-07 10:02:18 +10:00
Michael James Gratton
15748cef03 Tidy up unit test infrastructure and mock classes.
* test/api/*.vala: Renamed files that contained mock objects to *-mock.vala,
  not *-test.vala.

* test/testcase.vala: Renamed to test-case.vala for consistency, remove
  TestCase class from Gee package since that's really not true. Clean up
  code for consistency.

* test/meson.build, test/CMakeLists.txt: Split TestCase compilation out
  into a separate test lib.
2018-04-07 09:41:18 +10:00
Michael James Gratton
50f73ff252 Allow test fixtures and test methods to throw errors by default.
* test/testcase.vala (TestCase): Add a generic throws clause to both
  TestMethod and set_up and tear_down, update subclasses.
2018-04-07 09:41:18 +10:00
Marek Černocký
6b24e07e56 Updated Czech translation 2018-03-25 08:16:29 +02:00
Dušan Kazik
d0c611d48e Update Slovak translation 2018-03-18 20:56:20 +00:00
Piotr Drąg
4e9ca65d3a Update Polish translation 2018-03-18 17:40:09 +01:00
Andre Klapper
507da1abb5 Remove non-existing anchor link (target removed in 6b88f82) 2018-03-18 14:52:34 +01:00
Kukuh Syafaat
fa87133fdd Update Indonesian translation 2018-03-16 03:40:09 +00:00
Balázs Meskó
f401037581 Update Hungarian translation 2018-03-15 14:14:08 +00:00
Alan Mortensen
23d9214cd7 Updated Danish translation 2018-03-12 11:58:46 +01:00