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.
This commit is contained in:
Leonardo Robol 2016-05-16 19:10:24 +02:00 committed by Michael James Gratton
parent 32a7f76360
commit cae4b443c6
10 changed files with 651 additions and 16 deletions

View file

@ -0,0 +1,34 @@
[CCode (cheader_filename = "enchant.h")]
namespace Enchant {
public delegate void BrokerDescribeFn (string provider_name, string provider_desc, string provider_dll_file);
public delegate void DictDescribeFn (string lang_tag, string provider_name, string provider_desc, string provider_file);
[Compact]
[CCode (free_function = "enchant_broker_free")]
public class Broker {
[CCode (cname = "enchant_broker_init")]
public Broker ();
public unowned Dict request_dict (string tag);
public unowned Dict request_pwl_dict (string pwl);
public void free_dict (Dict dict);
public int dict_exists (string tag);
public void set_ordering (string tag, string ordering);
public void describe (BrokerDescribeFn fn);
public void list_dicts (DictDescribeFn fn);
public unowned string get_error ();
}
[Compact]
public class Dict {
public int check (string word, long len = -1);
public unowned string[] suggest (string word, long len = -1);
public void free_string_list ([CCode (array_length = false)] string[] string_list);
public void add_to_session (string word, long len = -1);
public int is_in_session (string word, long len = -1);
public void store_replacement ( string mis, long mis_len, string cor, long cor_len);
public void add_to_pwl ( string word, long len = -1);
public void describe (DictDescribeFn fn);
public unowned string get_error ();
}
}