Show spell checking preferences unconditionally
This commit is contained in:
parent
e04a078de4
commit
f905420967
1 changed files with 14 additions and 39 deletions
|
@ -220,6 +220,7 @@ midori_preferences_add_toolbutton (GtkWidget* toolbar,
|
|||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
midori_preferences_list_dicts_cb (const gchar* lang_tag,
|
||||
const gchar* provider_name,
|
||||
|
@ -233,33 +234,13 @@ midori_preferences_list_dicts_cb (const gchar* lang_tag,
|
|||
static GList*
|
||||
midori_preferences_get_spell_languages (void)
|
||||
{
|
||||
static gpointer (*enchant_broker_init) (void) = NULL;
|
||||
static void (*enchant_broker_list_dicts) (gpointer, GCallback, gpointer) = NULL;
|
||||
static void (*enchant_broker_free) (gpointer) = NULL;
|
||||
gpointer broker;
|
||||
GList* dicts = NULL;
|
||||
|
||||
if (!enchant_broker_list_dicts && g_module_supported ())
|
||||
{
|
||||
GModule* module;
|
||||
if (!(module = g_module_open ("libenchant.so.1", G_MODULE_BIND_LOCAL)))
|
||||
return NULL;
|
||||
if (!g_module_symbol (module, "enchant_broker_init",
|
||||
(void*) &enchant_broker_init))
|
||||
return NULL;
|
||||
if (!g_module_symbol (module, "enchant_broker_list_dicts",
|
||||
(void*) &enchant_broker_list_dicts))
|
||||
return NULL;
|
||||
if (!g_module_symbol (module, "enchant_broker_free",
|
||||
(void*) &enchant_broker_free))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
broker = enchant_broker_init ();
|
||||
gpointer broker = enchant_broker_init ();
|
||||
enchant_broker_list_dicts (broker, (GCallback)midori_preferences_list_dicts_cb, &dicts);
|
||||
enchant_broker_free (broker);
|
||||
return dicts;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* midori_preferences_set_settings:
|
||||
|
@ -282,9 +263,6 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
|||
GtkWidget* label;
|
||||
GtkWidget* button;
|
||||
GtkWidget* entry;
|
||||
#if WEBKIT_CHECK_VERSION (1, 1, 6)
|
||||
GList* languages;
|
||||
#endif
|
||||
|
||||
g_return_if_fail (MIDORI_IS_PREFERENCES (preferences));
|
||||
g_return_if_fail (MIDORI_IS_WEB_SETTINGS (settings));
|
||||
|
@ -429,9 +407,8 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
|||
button = katze_property_proxy (settings, "find-while-typing", NULL);
|
||||
SPANNED_ADD (button);
|
||||
#if WEBKIT_CHECK_VERSION (1, 1, 6)
|
||||
if ((languages = midori_preferences_get_spell_languages ()))
|
||||
{
|
||||
FRAME_NEW (_("Spell Checking"));
|
||||
/* FIXME: Provide a nice dictionary selection */
|
||||
button = katze_property_proxy (settings, "enable-spell-checking", NULL);
|
||||
gtk_button_set_label (GTK_BUTTON (button), _("Enable Spell Checking"));
|
||||
gtk_widget_set_tooltip_text (button, _("Enable spell checking while typing"));
|
||||
|
@ -441,8 +418,6 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
|||
gtk_widget_set_tooltip_text (entry, _("A comma separated list of "
|
||||
"languages to be used for spell checking, for example \"en_GB,de_DE\""));
|
||||
SPANNED_ADD (entry);
|
||||
g_list_free (languages);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Page "Interface" */
|
||||
|
|
Loading…
Reference in a new issue