Commit graph

3185 commits

Author SHA1 Message Date
Piotr Drąg
bfef27ed88 Add translator comments to .desktop files 2017-11-02 17:20:01 +01:00
Alan Mortensen
3e2389311c Updated Danish translation 2017-11-02 13:00:58 +01:00
Michael James Gratton
2a0fa4c746 Merge branch 'wip/771643-replace-intltool'. Fixes Bug 771643. 2017-11-02 19:15:08 +11:00
Michael James Gratton
e9bf7da63a Merge branch 'wip/784300-unlock-keyring'. Fixes Bug 784300. 2017-11-02 19:12:41 +11:00
Michael James Gratton
5dc8ace41c Merge branch 'wip/781488-aliyun-greeting-error'. Fixes Bug 781488. 2017-11-02 19:12:14 +11:00
Michael James Gratton
9ac2b05a23 Ensure syntax errors are always reported by the deserialiser.
Add unit tests.

* src/engine/imap/transport/imap-deserializer.vala (Deserialiser): Add a
  new EOL even handler to the FAILED state that is the one place where
  the deserialize_failure() signal is fired and that any existing params
  are reset.
  (Deserialiser::push_line): Remove signal calls and unused return
  value. Don't use EOS to detect NUL to avoid some confusion. Ensure an
  EOL event is always fired so that the FAILED EOF handler is always run.
  (Deserialiser::push_data): Remove signal calls and unused return value.
  (Deserialiser::flush_params): Don't bother returning a state, since we
  now always know what the next one should be when calling it. Only
  trigger the parameters_ready() signal if there is a valid
  parameter. Make logging consistent with the rest of the class.
  (Deserialiser::reset_params): New common method for resetting any
  existing deserialised message.
  (Deserialiser::on_literal_char): Minor tidy up.
  (Deserialiser::on_eos): Ensure that any existing param is sent on EOS
  so that any BYE+EOS sent by the server is picked up.
2017-11-02 19:10:29 +11:00
Michael James Gratton
25e700d22a Allow IMAP atoms to be terminated by an atom-special w/o needing a space.
Fixes Bug 781488.

* src/engine/imap/transport/imap-deserializer.vala (Deserializer): Update
  char handling in START_PARAM state to be more explict and to handle all
  possible chars, not just a subset. Then, simply defer to START_PARAM to
  determine what to do when an invalid atom char is encountered when in
  the ATOM state. Rename SYSTEM_FLAG state to just FLAG since it also
  handles extension flags, and only use it for handling the first char in
  the flag so "\*" can be treated appropriately, then defer to the ATOM
  state, so flag keywords are treated in the same way as regular
  atoms. Add unit tests.
2017-11-02 19:10:29 +11:00
Michael James Gratton
8adddddad3 Tidy up deserialiser source a bit.
* src/engine/imap/transport/imap-deserializer.vala: Remove unused object
  attr, reorder signals based on priority, make is_halted() public so
  test cases can call it, put public methods up the top.
2017-11-02 19:10:29 +11:00
Michael James Gratton
bbcf57c8eb Add test case stub for Geary.Imap.Deserializer to the build. 2017-11-02 19:10:29 +11:00
Michael James Gratton
4224c52683 Assorted async test case fixes.
* test/testcase.vala (TestCase): Make the test case's main loop
  accessible to subclasses so they are using the same one we are.
  (TestCase::async_result): Use GLib main context rather than GTK+ main
  loop so that test cases with async methods work even when GTK+ not
  present.
  (TestCase::async_complete): Ensure the main loop is woken when an async
  test completes so the test case doesn't block if it loses the race with
  async_result();
2017-11-02 19:10:29 +11:00
Michael James Gratton
3157fb7952 Workaround a xgettext warning about a Vala verbatim comment. 2017-11-02 19:10:29 +11:00
Michael James Gratton
e05de4ccec Workaround xgettext not recognising Elementary Contractor files.
We can't just simply run xgettext twice (once as normal, once with just
the contractor file and passing "--desktop" as an arg, since
l10n.gnome.org won't pick up the second pass and the contract will remain
untranslated.

So work around by renaming the contractor file such that it is
recognised, then rename it back to normal when translating it.

* desktop/geary-attach.contract.in: Renamed to
  desktop/geary-attach.contract.desktop.in.

* desktop/CMakeLists.txt: Undo the rename when translating.

* po/CMakeLists.txt, po/Makevars: Add a xgettext keyword for the
  contractor Description field.

* po/POTFILES.in: Chase the file rename.
2017-11-02 19:10:29 +11:00
Michael James Gratton
643c65a954 Remove obsolete X-GNOME-FullName key from desktop files. 2017-11-02 19:10:29 +11:00
Michael James Gratton
a8d3b21f05 Re-enable top level cmake/Makefile "pot_file" target for po/geary.pot. 2017-11-02 19:10:29 +11:00
Michael James Gratton
66b83f7eaa Add po/Makevars hint for Damned Lies (a.k.a. l10n.gnome.org). 2017-11-02 19:10:29 +11:00
Niels De Graef
39ef8e3e2d Replace intltool with gettext. Bug 771643.
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-11-02 19:10:29 +11:00
Michael James Gratton
97f880b190 Fix move and copy menu button ids in the main toolbar. 2017-11-02 19:09:30 +11:00
Michael James Gratton
ee567ed205 Restore Archive toolbar label.
* ui/main-toolbar.ui: Update min GTK version, add label to Archive button.
2017-11-02 19:09:30 +11:00
Niels De Graef
97ce3d09cd Start the final part of bug 713991.
* Ported Gtk.Action to GLib.Action in the GearyController.
* Removed Gtk.AccelGroups (handled through Gtk.Application now).
* Got rid of Gtk.UiManager (now all is done through Gtk.Builder).
* Throw away workaround for conflicting Gtk.Actions in ComposerContainer.
* Aggregate zoom in/out/normal into one parameterized zoom action.

Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-11-02 19:07:01 +11:00
Michael James Gratton
ddd9aabcf1 Fix HTML signatures that are single IMG tags not recognised as HTML.
* src/engine/util/util-html.vala (smart_escape): Don't bother attempting
  to match a pair of tags, just something that looks like an opening tag,
  since IMG is an empty element and it is valid to not have a closing
  slash in HTML. Also, closing tags in HTML are optional anwyay. Add some
  unit tests.
2017-11-02 19:05:26 +11:00
Michael James Gratton
aebdfd6b82 Attempt to unlock the libsecret keyring before accessing secrets.
Fixes Bug 784300.

* src/client/application/secret-mediator.vala (SecretMediator): Add
  check_unlocked() method, call that up front from the public mediate API
  methods.
2017-11-02 19:05:26 +11:00
Michael James Gratton
157a109e7f Remove custom libsecret VAPI in favour of the system-provided one.
This gives us access to the full libsecret API.

* bindings/vapi/libsecret-1.vapi: Deleted.

* src/client/application/secret-mediator.vala (Object): Use an internal
  binding to the missing SCHEMA_COMPAT_NETWORK constant.
2017-11-02 19:05:26 +11:00
Michael James Gratton
492ae7b8fe Ensure syntax errors are always reported by the deserialiser.
Add unit tests.

* src/engine/imap/transport/imap-deserializer.vala (Deserialiser): Add a
  new EOL even handler to the FAILED state that is the one place where
  the deserialize_failure() signal is fired and that any existing params
  are reset.
  (Deserialiser::push_line): Remove signal calls and unused return
  value. Don't use EOS to detect NUL to avoid some confusion. Ensure an
  EOL event is always fired so that the FAILED EOF handler is always run.
  (Deserialiser::push_data): Remove signal calls and unused return value.
  (Deserialiser::flush_params): Don't bother returning a state, since we
  now always know what the next one should be when calling it. Only
  trigger the parameters_ready() signal if there is a valid
  parameter. Make logging consistent with the rest of the class.
  (Deserialiser::reset_params): New common method for resetting any
  existing deserialised message.
  (Deserialiser::on_literal_char): Minor tidy up.
  (Deserialiser::on_eos): Ensure that any existing param is sent on EOS
  so that any BYE+EOS sent by the server is picked up.
2017-10-31 18:19:28 +11:00
Michael James Gratton
db4c4f785f Allow IMAP atoms to be terminated by an atom-special w/o needing a space.
Fixes Bug 781488.

* src/engine/imap/transport/imap-deserializer.vala (Deserializer): Update
  char handling in START_PARAM state to be more explict and to handle all
  possible chars, not just a subset. Then, simply defer to START_PARAM to
  determine what to do when an invalid atom char is encountered when in
  the ATOM state. Rename SYSTEM_FLAG state to just FLAG since it also
  handles extension flags, and only use it for handling the first char in
  the flag so "\*" can be treated appropriately, then defer to the ATOM
  state, so flag keywords are treated in the same way as regular
  atoms. Add unit tests.
2017-10-31 18:19:28 +11:00
Michael James Gratton
1f973bfdd3 Tidy up deserialiser source a bit.
* src/engine/imap/transport/imap-deserializer.vala: Remove unused object
  attr, reorder signals based on priority, make is_halted() public so
  test cases can call it, put public methods up the top.
2017-10-31 18:19:28 +11:00
Michael James Gratton
fc68c0d7d5 Add test case stub for Geary.Imap.Deserializer to the build. 2017-10-31 18:19:28 +11:00
Michael James Gratton
019499619b Assorted async test case fixes.
* test/testcase.vala (TestCase): Make the test case's main loop
  accessible to subclasses so they are using the same one we are.
  (TestCase::async_result): Use GLib main context rather than GTK+ main
  loop so that test cases with async methods work even when GTK+ not
  present.
  (TestCase::async_complete): Ensure the main loop is woken when an async
  test completes so the test case doesn't block if it loses the race with
  async_result();
2017-10-31 18:19:28 +11:00
Michael James Gratton
0237644397 Workaround a xgettext warning about a Vala verbatim comment. 2017-10-31 09:57:54 +11:00
Michael James Gratton
bdbe1d6a28 Workaround xgettext not recognising Elementary Contractor files.
We can't just simply run xgettext twice (once as normal, once with just
the contractor file and passing "--desktop" as an arg, since
l10n.gnome.org won't pick up the second pass and the contract will remain
untranslated.

So work around by renaming the contractor file such that it is
recognised, then rename it back to normal when translating it.

* desktop/geary-attach.contract.in: Renamed to
  desktop/geary-attach.contract.desktop.in.

* desktop/CMakeLists.txt: Undo the rename when translating.

* po/CMakeLists.txt, po/Makevars: Add a xgettext keyword for the
  contractor Description field.

* po/POTFILES.in: Chase the file rename.
2017-10-31 09:57:52 +11:00
Michael James Gratton
49e33cb979 Remove obsolete X-GNOME-FullName key from desktop files. 2017-10-31 09:57:43 +11:00
Michael James Gratton
67daf4a048 Re-enable top level cmake/Makefile "pot_file" target for po/geary.pot. 2017-10-31 09:57:40 +11:00
Michael James Gratton
fa1de0245e Add po/Makevars hint for Damned Lies (a.k.a. l10n.gnome.org). 2017-10-31 09:55:56 +11:00
Niels De Graef
ff755c1f7d Replace intltool with gettext. Bug 771643.
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-31 09:48:53 +11:00
Niels De Graef
bf7c2ec454 Use https:// by default for links
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-31 09:48:53 +11:00
Niels De Graef
7d15b746aa Use a horizontal icon row for message actions, bug 782931.
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-31 09:48:53 +11:00
Michael James Gratton
610b2e3130 Fix move and copy menu button ids in the main toolbar. 2017-10-31 09:48:53 +11:00
Michael James Gratton
992e019b29 Restore Archive toolbar label.
* ui/main-toolbar.ui: Update min GTK version, add label to Archive button.
2017-10-31 09:48:53 +11:00
Niels De Graef
114ed09dda Start the final part of bug 713991.
* Ported Gtk.Action to GLib.Action in the GearyController.
* Removed Gtk.AccelGroups (handled through Gtk.Application now).
* Got rid of Gtk.UiManager (now all is done through Gtk.Builder).
* Throw away workaround for conflicting Gtk.Actions in ComposerContainer.
* Aggregate zoom in/out/normal into one parameterized zoom action.

Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2017-10-31 09:48:53 +11:00
Emin Tufan Çetin
895a4cbdd3 Update Turkish translation 2017-10-29 06:07:34 +00:00
Michael James Gratton
449e7c4958 Fix HTML signatures that are single IMG tags not recognised as HTML.
* src/engine/util/util-html.vala (smart_escape): Don't bother attempting
  to match a pair of tags, just something that looks like an opening tag,
  since IMG is an empty element and it is valid to not have a closing
  slash in HTML. Also, closing tags in HTML are optional anwyay. Add some
  unit tests.
2017-10-28 16:55:29 +11:00
Michael James Gratton
6fe8f27cf3 Attempt to unlock the libsecret keyring before accessing secrets.
Fixes Bug 784300.

* src/client/application/secret-mediator.vala (SecretMediator): Add
  check_unlocked() method, call that up front from the public mediate API
  methods.
2017-10-26 22:06:13 +11:00
Michael James Gratton
7aaf650de9 Remove custom libsecret VAPI in favour of the system-provided one.
This gives us access to the full libsecret API.

* bindings/vapi/libsecret-1.vapi: Deleted.

* src/client/application/secret-mediator.vala (Object): Use an internal
  binding to the missing SCHEMA_COMPAT_NETWORK constant.
2017-10-26 22:03:24 +11:00
Michael James Gratton
504b1fbf93 Merge branch 'bug/727679-save-sent-queue'. Fixes Bug 727679. 2017-10-26 18:35:14 +11:00
Alex Henrie
5e55587e6d Remove nonfunctional "Try Again" button for saving sent emails. Bug 727679. 2017-10-26 18:03:56 +11:00
Michael Gratton
08a706b05a Prefill postman queue only after account has been opened. Bug 727679.
* src/engine/imap-db/outbox/smtp-outbox-folder.vala
  (Geary.SmtpOutboxFolder.SmtpOutboxFolder): Prefil on account start.
  (Geary.SmtpOutboxFolder.do_postman_async): Split queue prefil code into
  new fill_outbox_queue method.
2017-10-26 18:03:56 +11:00
Michael Gratton
10120b816b Don't ignore sent messages in postman queue, try to save them. Bug 727679.
* src/engine/imap-db/outbox/smtp-outbox-folder.vala
  (Geary.SmtpOutboxFolder.do_postman_async): Flag sent messages rather
  than skipping them, only try sending messages that are unsent, always
  try saving all messages, re-queue if unsent or unsaved.
2017-10-26 18:03:56 +11:00
Michael Gratton
f36d6804e0 When filling postmaster queue, include all messages, not just unsent. Bug 727679.
* src/engine/imap-db/outbox/smtp-outbox-folder.vala: Remove where clause
  from prefill query.
2017-10-26 18:03:56 +11:00
Alex Henrie
d5277fea3b Fix assertion failure if there are messages in the outbox on startup. Bug 727679.
* src/engine/imap/api/imap-account.vala
  (Geary.Imap.Account.create_folder_async): Ensure that
  this.hierarchy_delimiter has been initialized before using it.
2017-10-26 18:03:56 +11:00
Kacper Bielecki
2c980036bd Cache contact list store per account. Bug 771903
This implements new cache for ContactListStore.

ContactListStore is created only once per account when account is opened
with GearyController::open_account. It is destroyed in
GearyController::close_account.

ContactListStoreCache class is introduced to manage ContactListStore
instances.

ComposerWidget receives ContactListStoreCache instance instead of
ContactListStore directly in constructor.

To increase performance, backwards compatibility breaking changes are
introduced to Engine API Geary.ContactStore. Signals:

* Gee.ContactStore::contact_added(Contact)
* Gee.ContactStore::contact_updated(Contact)

are replaced with batch equivalents:

* Gee::ContactStore::contacts_added(Gee.Collection<Contact>)
* Gee::ContactStore::contacts_updated(Gee.Collection<Contact>)

Geary.ComposerWidget::load_entry_completions is no longer async as it does
not involve time consuming ContactListStore creation.

CONTACT_MARKUP_NAME column is removed from ContactListStore as it used to keep
state about highlighted areas of text. This is not possible anymore as
ContactListStore is shared between multiple ComposerWidgets.

Highlight implementation has been moved to Geary.ContactEntryCompletion instead.

Additionally contacts_loaded signal is emitted from Geary.ImapEngine.GenericAccount
and propagated to Geary.Account

Geary.ContactListStore sort function is set upon receiving contacts_loaded
signal instead of after initial contacts are loaded. This speeds up Geary
startup for users with long contact lists.
2017-10-24 22:08:36 +11:00
Jiri Cerny
c1de366210 Remember size of dettached composer window 2017-10-24 20:38:30 +11:00