Commit graph

2381 commits

Author SHA1 Message Date
Michael James Gratton
095049f849 Don't rely on a the GEdit app icon for the draft folder. Bug 753672.
Themes may change the app icon, which would also change the draft folder
icon in Geary. Import Adawaita's to match current use, install, use, and
update copyright.
2016-07-13 22:45:37 +10:00
Michael James Gratton
a81cc78bb0 Fix some build issues arising from user config/data dir split. Bug 741883. 2016-07-12 15:55:27 +10:00
Oskar Viljasaar
7b5473cc69 Make use of the "primary_email" field in the config file 2016-07-12 15:47:43 +10:00
Oskar Viljasaar
d389102127 Use geary.ini in ~/.config/geary. Bug 741883
Untangle the configuration and storage directory variables by doing so.
2016-07-12 15:45:15 +10:00
Oskar Viljasaar
b3b2d58c76 Add a helper function to copy over configuration and use it. Bug 741883
The function is called just before the engine gets started, so
hopefully just before any files are read by Geary.
2016-07-12 15:45:11 +10:00
Andika Triwidada
34f216ece6 Updated Indonesian translation 2016-07-08 12:27:35 +00:00
Rico Tzschichholz
f2d392bed5 Fix compile warnings with vala git 2016-07-08 09:56:42 +02:00
Michael James Gratton
6a15b0ca4c Don't munge from header when restoring composer from a draft. Bug 768419.
* src/client/composer/composer-widget.vala
  (ComposerWidget::ComposerWidget): Set the from property for
  ComposeType.NEW_MESSAGE when the referred email is not null - i.e. it's
  a draft, call ::update_from_field afterwards so that is taken into
  account.
  (ComposerWidget::add_recipients_and_ids): Merge body of
  ::set_preferred_from_address here since it's the only call site, update
  that to only munge the from property only if not composing a new email
  - i.e. a draft, so that ::restore_draft_state_async does not clobber it
  when calling this method with referred messages that aren't the draft.
2016-07-07 12:34:08 +10:00
Michael James Gratton
cc8b79ba35 Fix ConversationViewer crit assertion displaying messages with no body.
Bug 767438

* src/client/conversation-viewer/conversation-viewer.vala
  (::set_message_html): Body text may be null if there's no HTML or plain
  body parts, so allow for it and check before passing to
  ::insert_html_markup.
2016-07-06 17:31:44 +10:00
Michael James Gratton
e9a0b2aa77 Don't crash when LIST on the INBOX returns a NIL delim. Bug 766509.
* src/engine/imap/api/imap-account.vala (Account::list_inbox): Check
  hierarchy_delimiter after doing a LIST on INBOX, if null then list its
  siblings and use the first returned by it.

* src/engine/imap/api/imap-folder.vala (Folder): Add delim property,
  set it via the constructors, so we don't need to use the possibly-
  null MailboxInformation.delim property. Update ctor call sites.
2016-07-05 10:22:53 +10:00
Oskar Viljasaar
f80f52fbe6 Use built-in GTK signals for the search bar
- Make use of the "search-changed" signal to handle user input, this
lets us get rid of the built-in timeout mechanism. This reduces the
timeout from 250ms to 150ms after user input before doing the search
though.

- Use the "activate" and "stop-search" signals for the entry. This
lets us remove our handling of key events.

https://bugzilla.gnome.org/show_bug.cgi?id=720993
2016-07-05 01:08:08 +10:00
Piotr Drąg
6d4ce9af98 Updated Polish help translation 2016-07-04 02:48:56 +02:00
Michael James Gratton
da96e96c70 Fix format=flowed when sending Base64 encoded text/plain. Bug 753528.
Sending a message with a text/plain body containing many wide chars will
usually result in it being encoded as Base64. This was breaking
format=flowed since Geary was doing the LF=>CRLF conversion only when
serialisaing for transmission, so the LF's in the unencoded text were not
getting converted to CRLF, and hence all the line breaks were interpreted
as hard breaks under F=F.

* src/engine/rfc822/rfc822-message.vala (Message.from_composed_email):
  When setting the RFC822 message body/body part from the composed
  message, apply a CRLF filter first iff it will be encoded with Base64.
2016-06-30 17:35:16 +10:00
Michael James Gratton
f10f898ab0 Always use UTF-8 for encoding non-ASCII/ISO-8859-1 headers. Bug 753870.
While message bodies are always sent as UTF-8, non ASCII/ISO-8859-1
headers were being encoded using GMime's default heuristics. This
uses some less-well-supported charsets and causing some rendering
issues in other less tolerant client.

Since we assume UTF-8 support for the body, assume it for headers as
well.

* src/engine/rfc822/rfc822.vala (Geary.RFC822.init): Set GMime user
  charsets to UTF-8.

* bindings/vapi/gmime-2.6.vapi (GMime): Fix binding for
  g_mime_set_user_charsets.
2016-06-30 15:29:39 +10:00
Heiko Becker
7166c15ea3 Use PKG_CONFIG_EXECUTABLE provided by find_package(PkgConfig)
find_package(PkgConfig} respects the PKG_CONFIG environment variable
when trying to find pkg-config. This is helpful with a differently
named pkg-config executable, for example an arch-prefixed one.
2016-06-29 10:56:53 +10:00
Timo Kluck
5045ff0443 Composer address bar: prevent doubling spaces after address autocomplete
The composer splits addresses on "," and later joins them on ", ". This means
that separating spaces are doubled after every autocomplete. This patch fixes
that by stripping whitespace after splitting. We do this in a separate loop at
the end of the function as opposed to directly after splitting in order not to
upset the cursor positioning logic.

This does not fix the problem that an address like

    "Kluck, Timo" <tkluck@infty.nl>

are split on the comma. Before this patch, the space would be doubled.  After
this patch, it will always be reduced to a single space. A better solution
would ideally leave the quoted part as-is. I think this will also lead to
better auto-complete behaviour when the cursor is in the quoted part.  Better
parsing of the quoted part is beyond the scope of this patch.
2016-06-29 10:33:33 +10:00
Michael James Gratton
a2519ff30e Enable fatal warnings for valac.
Doesn't catch anything at the moment, but good to have in case it does in
the future.
2016-06-27 21:19:35 +10:00
Federico Bruni
99283d4ec9 Updated Italian translation 2016-06-26 16:22:51 +00:00
Daniel Șerbănescu
d5e060547d Updated Romanian translation 2016-06-24 16:34:30 +00:00
Mario Blättermann
fda7efdf58 Updated German translation 2016-06-23 18:28:24 +00:00
Alexandre Franke
819a70ea05 Updated French translation
(cherry picked from commit 37a63f43d700f11e744688be5acb43db65760b40)
2016-06-23 06:47:53 +00:00
Mario Blättermann
4cbd1e9c85 Updated German translation
(cherry picked from commit dd524ac5f68ad6fef42914419d313749a4d803f1)
2016-06-22 11:46:02 +00:00
E T
8db4ea337f Updated Turkish translation 2016-06-22 09:19:55 +00:00
Dušan Kazik
c86ab90921 Updated Slovak translation 2016-06-20 20:32:04 +00:00
Daniel Mustieles
e01c8b4761 Updated Spanish translation 2016-06-20 20:09:45 +02:00
Daniel Mustieles
97e95b14ab Updated Spanish translation 2016-06-20 20:09:36 +02:00
Daniel Mustieles
8d3c4437dc Updated Spanish translation
(cherry picked from commit babbb89703bffa5c1507cca0baf024aef621d930)
2016-06-20 13:12:38 +00:00
Piotr Drąg
309006f9ae Updated POTFILES.in 2016-06-20 14:22:00 +02:00
Daniel Mustieles
b4a22b2233 Updated Spanish translation
(cherry picked from commit 5ceeb795e3cdcabe11fda533167b989e41f7e16b)
2016-06-20 11:40:50 +00:00
Daniel Mustieles
108a4f351d Updated Spanish translation 2016-06-20 11:39:28 +00:00
Daniel Mustieles
43a7e8dc0b Updated Spanish translation
(cherry picked from commit 58011fdb62bc8cda3f83028bc531c6d7777973fc)
2016-06-20 11:37:00 +00:00
Rafael Fontenelle
35c8e12a10 Updated Brazilian Portuguese translation 2016-06-20 11:08:35 +00:00
Rafael Fontenelle
bd7dd30532 Added Brazilian Portuguese translation for help files 2016-06-20 08:05:45 -03:00
Rafael Fontenelle
275fb392fb Updated Brazilian Portuguese translation 2016-06-20 11:00:47 +00:00
Michael James Gratton
0eafdac1d1 Remove folder-menu.vala from POTFILES.in. Bug 767431 2016-06-20 15:36:05 +10:00
Niels De Graef
7e446b1580 Use Popover for Move/Label menu. Bug 767431.
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>
2016-06-20 15:27:41 +10:00
Laudivan Freire de Almeida
4c20d90bac Updated Brazilian Portuguese translation 2016-06-20 05:11:53 +00:00
Piotr Drąg
b3ab0202f4 Updated Polish translation 2016-06-19 15:08:56 +02:00
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