Re: Moving spellcheckers into the Gtk+ stack
- From: Paolo Bacchilega <paolo bacchilega libero it>
- To: Paolo Maggi <paolo maggi polito it>
- Cc: desktop-devel-list <desktop-devel-list gnome org>
- Subject: Re: Moving spellcheckers into the Gtk+ stack
- Date: Fri, 08 Dec 2006 14:41:27 +0100
Paolo Maggi ha scritto:
Hi,
1. Use a subclass of GtkEntry -- not only does this make porting
easier (since SexySpellEntry is implemented as such), but most of the
entry boxes inside UIs don't need spell-checking. There are some
improvements I'd like to make if porting SexySpellEntry directly,
which I'm happy to talk about with interested parties.
Suppose we have a GSpellChecker class similar to GeditSpellChecker (you can
see it as a GObject-class wrapping EnchantDict).
What about adding to GtkEntry the following functions:
/*
* Add a new spell checker to the list of spell checkers (multiple
* checkers are used to support multiple languages)
* Returns: the number of spell checker in the list
*/
gint gtk_entry_add_spell_checker (GtkEntry *entry,
GSpellChecker *checker);
/*
* Remove a spell checker from the list
* Returns: TRUE if the checker has been removed, FALSE otherwise
*/
gboolen gtk_entry_remove_spell_checker (GtkEntry *entry,
GSpellChecker *checker);
/*
* Returns the list of spell checkers. List must be freed with g_slist_free.
*/
GSList *gtk_entry_get_spell_checkers (GtkEntry *entry);
Note that we can add a similar set of functions to GtkTextView too.
I think GtkTextView should implement the GtkEditable interface so you
can add these functions to the interface and avoid to duplicate them.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]