Commit graph

2343 commits

Author SHA1 Message Date
Michael James Gratton
13dbfb363e Look a bit harder for special folders by name. Bug 748183.
Check for both lower-case names and Outlook-specific Sent and Deleted
folder names. Don't require translations to also include the English
names in the translated strings.

* src/engine/imap-engine/imap-engine-generic-account.vala (Account):
  Compile the special name list only once, in the constructor. Cache the
  names in new special_search_names property.
  (::compile_special_search_names): Replace the compilation
  ::get_mailbox_search_names, compile both upper case and lower case
  versions of each name. Check for empty names.
  (::get_special_search_names): Replace the translation part of
  ::get_mailbox_search_names. Include both localised and unlocalised
  versions of the names so translators don't need to keep the english
  versions. Add Outlook names for sent and deleted separately so as to
  not break existing translations.
  (::ensure_special_folder_async): Use new pre-compiled
  special_search_names property to guess names.
2016-06-19 22:21:59 +10:00
Michael James Gratton
e5d65222c5 Set correct length modifiers for some format strings with 64-bit values.
This fixes regular crashes from incorrect lengths on i686 arches - see
Vala Bug 767839.

Fixes Geary Bug 758621

* src/engine/imap-engine/imap-engine-minimal-folder.vala: Use "%lld" when
  printing int64 values.
2016-06-19 22:06:20 +10:00
Michael James Gratton
2838631bd5 Add missing copyright header to ui/geary.css. Bug 767814. 2016-06-19 19:25:46 +10:00
Niels De Graef
a4b004b548 Separate CSS file and better parsing errors. Bug 767814
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2016-06-19 19:20:52 +10:00
Michael James Gratton
fd5b451024 Clean up the ConversationViewer::highlight_search_terms method.
* src/client/conversation-viewer/conversation-viewer.vala
  (ConversationViewer::highlight_search_terms): Only do the highlight if
  the current folder is a search folder and it has a query. Cache the
  fetch cancellable so we can avoid setting the highlight on the web view
  if cancelled. Import ::add_literal_matches method impl and remove that
  method since it only gets used here.
2016-06-19 19:17:15 +10:00
Michael James Gratton
b4761a2251 Don't re-hlighlight search matches on search string change.
Since the search folder will cause a re-fetch on search when the search
query has changed such that the results have also changed, the fetch will
launch a highlight search and we don't also need to launch it again when
the search terms have changed. This saves potentially a lot of DB query
time.

* src/client/conversation-viewer/conversation-viewer.vala
  (ConversationViewer): Remove on_search_text_changed and its callers.
2016-06-19 19:17:15 +10:00
Michael James Gratton
5b8ab3dce5 Minor code cleanup. 2016-06-19 19:17:15 +10:00
Michael James Gratton
5354ccb68a Fix missing text displaying an image with text parts and inline images.
When Geary.RFC822.Message::construct_body_from_mime_parts is looking to
build a message body to display, during the first pass that looks for
HTML content the plain text part is ignored but the inline image gets
converted to a HTML IMG element and returned as the body. This makes it
look like an HTML part was found, and hence the second pass looking for
plain text never takes place.

Fix this by not taking a wild stab at the body type - check to see if it
has HTML parts and if so just het them, if not then get plain text parts.

Bug 767438.

* src/engine/rfc822/rfc822-message.vala (Message): Add ::has_html_body
  and ::has_plain_body to allow callers to query available body content
  types before attempting to get them. Remove ::get_body since it's
  making a policy decision that callers should be making instead, fix
  call sites.
2016-06-19 19:17:15 +10:00
Michael James Gratton
1d8c4aea80 Remove a number of redundant fns in Engine.Util.Ascii.
* src/engine/util/util-ascii.vala (Geary.Ascii): Remove functions that
  are now supported by Vala 0.26, that are simple statements, or are only
  used once elsewhere. Update call sites.
2016-06-19 19:17:15 +10:00
Andika Triwidada
f4f775c8c2 Updated Indonesian translation
(cherry picked from commit 30893db2d4b152647730863b5cdb51ba0f3e78f3)
2016-06-18 14:05:55 +00:00
Leonardo Robol
1bbf245902 Add dependency on libenchant.
* debian/control Add build dependency on libenchant-dev and
  runtime dependency on libenchant1c2a, to reflect latest
  changes introduced for the spell-checker.
2016-06-15 18:58:49 -04:00
Michael James Gratton
badbf94b0f Update and simplify INSTALL with current version reqs. 2016-06-14 12:38:08 -04:00
Daniel Mustieles
56d0055f96 Updated Spanish translation 2016-06-13 14:26:57 +00:00
Dušan Kazik
fcb4df2728 Updated Slovak translation 2016-06-11 05:54:56 +00:00
Marek Černocký
c0f0489e77 Updated Czech translation 2016-06-10 22:31:06 +02:00
Piotr Drąg
487ba16d34 Updated Polish translation 2016-06-09 15:28:30 +02:00
Piotr Drąg
636c0e81c6 Updated POTFILES.in 2016-06-09 15:23:29 +02:00
Michael James Gratton
5eba6be929 Remove use of tabs from spell-check-popover.vala. 2016-06-09 16:17:26 +10:00
Leonardo Robol
cae4b443c6 Added support to change the spell-checking language.
Bug 720335

* src/client/composer/spell-check-popover.vala
  Implemented a GtkPopover allowing the user to select a
  subset of the currently installed dictionaries for the spell
  checking in the composer widget.

* src/client/util/util-international-vala
  Added detection of installed dictionaries and proper
  translation of the available languages. This requires
  Enchant as an additional dependency.

* src/client/application/geary-config.vala
  Added keys spell-check-visible-languages and
  spell-check-languages in GSettings.
2016-06-09 15:36:39 +10:00
Michael James Gratton
32a7f76360 Hook up attach file shortcut, add it to user guide. Bug 743565. 2016-06-09 00:21:44 +10:00
Robert Schroll
2592d7fceb Add accelerator to attach files to composer
https://bugzilla.gnome.org/show_bug.cgi?id=743565
2016-06-09 00:21:44 +10:00
Piotr Drąg
8ee1bf76f2 Updated Polish translation 2016-06-08 15:00:26 +02:00
Michael James Gratton
314270a0cf Turn some annoying debug logging off. 2016-06-08 16:51:50 +10:00
Michael James Gratton
1a87d0d16d Limit the number of pipelined STATUS commands sent to outloook.com.
Outlook.com's IMAP servers are buggy and will return a bogus BAD if too
many STATUS commands are sent at once. Limit this to 25 since there is at
least one known case of it falling over when ~50 are sent.

Bug 766552.

* src/engine/api/geary-endpoint.vala (Endpoint): Add
  max_pipeline_batch_size property and doc comment.

* src/engine/imap-engine/outlook/imap-engine-outlook-account.vala
  (OutlookAccount): Set max_pipeline_batch_size for IMAP connection to 25.

* src/engine/imap/transport/imap-client-session.vala
  (ClientSession::send_multiple_commands_async): Check
  Endpoint.max_pipeline_batch_size and if non-zero, use multiple batches
  and limite them to that value in size.
2016-06-08 16:45:31 +10:00
Anders Jonsson
44a953ccf4 Updated Swedish translation
(cherry picked from commit d6aacdca8166ebf39b51f4c31475247fe276d704)
2016-06-07 18:34:50 +00:00
Wolfgang Stöggl
7db5a2e37e Updated German translation 2016-06-07 13:09:11 +00:00
Michael James Gratton
0757d43886 Allow search op value "me" to be translated differently for to/from.
Fixes Bug 767291

* src/engine/imap-db/imap-db-account.vala (Geary.ImapDB.Account): Handle
  translation of "me" differently depending on if it is "to/cc/bcc:me" or
  "from:me". Needed for DE at least.
2016-06-07 22:26:42 +10:00
Anders Jonsson
e158807e97 Updated Swedish translation 2016-06-06 23:08:10 +00:00
Federico Bruni
78eb0958c0 Updated Italian translation 2016-06-06 18:31:28 +00:00
Federico Bruni
bff5fd1047 Updated Italian translation 2016-06-06 18:30:25 +00:00
Michael James Gratton
f8acc74eaa Make all account types support archiving. Bug 766912.
Move Geary.FolderSupport.Archive interface and implementation from
OtherFolder to GenericFolder, so both Y! and Outlook services get archive
support.

* src/client/components/main-toolbar.vala
  (MainToolbar::update_trash_button): Renamed from
  update_trash_archive_buttons, only bother to update the archive
  state. Update call sites.

* src/engine/api/geary-account.vala (Geary.Account): Remove
  can_support_archive property and constructor arg, update subclasses to
  not pass it through.

* src/engine/imap-engine/imap-engine-generic-folder.vala (GenericFolder):
  Extend Geary.FolderSupport.Archive, copy implementation from
  OtherFolder.

* src/engine/imap-engine/other/imap-engine-other-folder.vala
  (OtherFolder): Remove Geary.FolderSupport.Archive parent class and
  implementation.
2016-06-05 18:42:10 +10:00
Michael James Gratton
67018ecdac Don't create Archive folders for GMail accounts. Bug 767259.
* src/engine/imap-engine/imap-engine-generic-account.vala
  (GenericAccount): Add a protected virtual 'supported_special_folders'
  property and use that to determine what special folders should be
  created and can be required. Use that in
  ::get_required_special_folder_async and ::ensure_special_folders_async.

* src/engine/imap-engine/gmail/imap-engine-gmail-account.vala
  (GmailAccount): Override supported_special_folders, don't include the
  Archive special folder.
2016-06-05 18:36:57 +10:00
Michael James Gratton
7a26b8de9c Fix composer not displaying RTL languages in the right direction.
Use the HTML dir="auto" algorithm for setting the direction based on the
first strongly LTR or RTL character found in the email.

Proper support should let the user specify the direction, but this is
better for now.

Patch courtesy Oliver <ogtifs@mail.com>

Bug 713607

* src/client/composer/composer-widget.vala (ComposerWidget::HTML_BODY):
  Add dir="auto" for the message body.
2016-06-05 17:36:51 +10:00
Piotr Drąg
703b7245b6 Updated Polish help translation 2016-06-04 14:11:17 +02:00
Piotr Drąg
669cc8d4b9 Add Polish help translation
Just Shortcuts and Search sections for now.
2016-06-04 14:06:17 +02:00
Piotr Drąg
a2c2f4127c Updated Polish translation 2016-06-04 13:18:02 +02:00
Dušan Kazik
c66956dfa7 Updated Slovak translation 2016-06-04 07:53:06 +00:00
Michael James Gratton
dd7372d033 Add a localisation context to search op strings. Bug 766837.
Adding the context will also render the strings fuzzy, so translation
teams know they need to be checked.
2016-06-04 15:27:10 +10:00
Daniel Korostil
9a38a18edd Updated Ukrainian translation 2016-06-01 23:45:00 +03:00
Michael James Gratton
a0ede63b3a Further clarify translator comments for search operators. Bug 766837. 2016-06-01 16:41:39 +10:00
Michael James Gratton
a8a9955b83 Further search localisation cleanup and fixes. Bug 766837
* src/engine/imap-db/imap-db-account.vala (Geary.ImapDB.Account): Move
  search term operator transation to a static initialiser so it isn't
  have to be reconstrcuted for every term. Ensure english operator names
  and values are also accepted as well as translations so if the User
  Guide has not also been translated, the user can still use what the
  docs say. Fix some bugs causing to:*, from:* and *:me to stop working.
2016-06-01 15:56:10 +10:00
Michael James Gratton
95e1cd5e46 Add a bunch of debug statements for search term handling. Bug 766837. 2016-05-31 17:49:43 +10:00
Michael James Gratton
0b1f8cde62 Minor search doc updates. 2016-05-31 17:48:06 +10:00
Michael James Gratton
86ffc4c3b5 Don't bother stemming and generating SQL for valid is:foo search terms.
Further cleanup from Bug 766837.

* src/engine/imap-db/imap-db-account.vala
  (Geary.ImapDB.Account::prepare_search_query): Only stem and generate
  SQL terms that aren't is:foo operators.
2016-05-31 17:45:18 +10:00
Michael James Gratton
a2d32b802e Fix crash when value of is:foo search op has not been translated.
Bug 766837

* src/engine/imap-db/imap-db-account.vala (Geary.ImapDB.Account): Use
  constants for internal, i.e. non-translatable, search op names and
  values so it's clear what they are.
  (::extract_field_from_token): Handle all translation of search op names
  and values here up front. Ensure that the value for the "is:" operator
  is valid, treat the whole thing like a plain string if not. Add some
  translation comments for those values so translators know what's up.
  (::get_removal_conditions): Assume that if we have a "is:" field that
  the values have already been translated to their internal form.
2016-05-31 17:39:50 +10:00
Michael James Gratton
10362b5a64 Tidy up main window accelerator setup.
* src/client/application/geary-controller.vala
  (GearyController::create_actions): Remove uneeded calls to
  add_accelerator - just remove them for dups ot move them to the action
  definition. Ensure they are defined in accelerators.ui so they are
  bound to their accelerators regarcdless of having a visible proxy.
2016-05-30 09:37:12 +10:00
Michael James Gratton
af94c20f9b Sort main window accelerators definition. 2016-05-30 00:40:36 +10:00
Michael James Gratton
c86af16ecf Remove some more artifacts from the old gear menu. Bug 759980. 2016-05-30 00:18:24 +10:00
Michael James Gratton
66928f73f6 Enable L/M keyboard shortcut for label/moving messages. Fixes Bug 731737.
* help/C/shortcuts.page: Document new shortcuts.

* src/client/application/geary-controller.vala: Add shortcuts for copy
  and move actions.

* src/client/components/pill-toolbar.vala (PillBar::create_menu_button):
  Hook up the button's related action to invoke the button's popup menu,
  taking care not to cause an infinte loop.
  (PillBar::setup_button): Connect to the related_action's tooltip notify
  signal via a local variable rather than via the button, so it does not
  get lost when it changes for Gtk.MenuButton actions.
2016-05-29 23:25:49 +10:00
Michael James Gratton
54ba285ab8 Clean up shortcuts and shortcut docs. Closes Bug 766987.
* src/client/application/geary-controller.vala: Remove prefs and accounts
  shortcuts.

* ui/app_menu.interface: Remove prefs and accounts shortcuts

* help/C/shortcuts.page: Capitalise J/K, remove prefs and accounts
  shortcuts.
2016-05-29 22:24:19 +10:00