static void 
set_language_cb (PlumaSpellChecker               *checker,
		 const PlumaSpellCheckerLanguage *lang,
		 PlumaAutomaticSpellChecker      *spell)
{
	pluma_automatic_spell_checker_recheck_all (spell);
}
Example #2
0
static void
set_auto_spell (PlumaWindow   *window,
		PlumaDocument *doc,
		gboolean       active)
{
	PlumaAutomaticSpellChecker *autospell;
	PlumaSpellChecker *spell;

	spell = get_spell_checker_from_document (doc);
	g_return_if_fail (spell != NULL);

	autospell = pluma_automatic_spell_checker_get_from_document (doc);

	if (active)
	{
		if (autospell == NULL)
		{
			PlumaView *active_view;

			active_view = pluma_window_get_active_view (window);
			g_return_if_fail (active_view != NULL);

			autospell = pluma_automatic_spell_checker_new (doc, spell);

			if (doc == pluma_window_get_active_document (window))
			{
				pluma_automatic_spell_checker_attach_view (autospell, active_view);
			}

			pluma_automatic_spell_checker_recheck_all (autospell);
		}
	}
	else
	{
		if (autospell != NULL)
			pluma_automatic_spell_checker_free (autospell);
	}
}
static void 
clear_session_cb (PlumaSpellChecker          *checker,
		  PlumaAutomaticSpellChecker *spell)
{
	pluma_automatic_spell_checker_recheck_all (spell);
}