[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
alex at webkit.org
alex at webkit.org
Wed Dec 22 18:24:49 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 45662cb09d63267b024af273e8be0b4e2a38df31
Author: alex at webkit.org <alex at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 10 17:36:58 2010 +0000
2010-12-10 Alejandro G. Castro <alex at igalia.com>
Reviewed by Martin Robinson.
[GTK] Choose a dictionary in case there is no one defined or the
env LANG does not propose one
https://bugs.webkit.org/show_bug.cgi?id=50738
In case no dict is set and we can not find one using the
environment just get the first dictionary installed in the list.
* webkit/webkitwebsettings.cpp:
(getAvilableDictionariesCallback):
(webkit_web_settings_set_property):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index e4cbdc3..1f548bb 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,18 @@
+2010-12-10 Alejandro G. Castro <alex at igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Choose a dictionary in case there is no one defined or the
+ env LANG does not propose one
+ https://bugs.webkit.org/show_bug.cgi?id=50738
+
+ In case no dict is set and we can not find one using the
+ environment just get the first dictionary installed in the list.
+
+ * webkit/webkitwebsettings.cpp:
+ (getAvilableDictionariesCallback):
+ (webkit_web_settings_set_property):
+
2010-12-10 Martin Robinson <mrobinson at igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp
index c91049b..cd31c80 100644
--- a/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -961,6 +961,13 @@ static void webkit_web_settings_finalize(GObject* object)
G_OBJECT_CLASS(webkit_web_settings_parent_class)->finalize(object);
}
+static void getAvilableDictionariesCallback(const char* const languageTag, const char* const, const char* const, const char* const, void* data)
+{
+ Vector<CString>* dicts = static_cast<Vector<CString>*>(data);
+
+ dicts->append(languageTag);
+}
+
static void webkit_web_settings_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
WebKitWebSettings* web_settings = WEBKIT_WEB_SETTINGS(object);
@@ -1075,6 +1082,14 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
if (enchant_broker_dict_exists(broker, language)) {
dict = enchant_broker_request_dict(broker, language);
spellDictionaries = g_slist_append(spellDictionaries, dict);
+ } else {
+ // No dictionaries selected, we get one from the list
+ Vector<CString> allDictionaries;
+ enchant_broker_list_dicts(broker, getAvilableDictionariesCallback, &allDictionaries);
+ if (!allDictionaries.isEmpty()) {
+ dict = enchant_broker_request_dict(broker, allDictionaries[0].data());
+ spellDictionaries = g_slist_append(spellDictionaries, dict);
+ }
}
}
g_slist_foreach(priv->enchant_dicts, free_spell_checking_language, 0);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list