static void reset_theword_data (GtkAspell *gtkaspell);
static void free_checkers (gpointer elt,
gpointer data);
-static gint find_gtkaspeller (gconstpointer aa,
- gconstpointer bb);
static void destroy_menu(GtkWidget *widget, gpointer user_data);
GtkAspell *gtkaspell)
{
gint pos;
- GtkTextBuffer *textbuf = gtk_text_view_get_buffer(text_view);
cm_return_val_if_fail(gtkaspell->gtkaspeller->speller, FALSE);
case GDK_KEY_Page_Down:
case GDK_KEY_End:
case GDK_KEY_Begin:
- pos = get_textview_buffer_offset(text_view);
+ pos = get_textview_buffer_offset(GTK_TEXT_VIEW(text_view));
if (pos > 0)
check_at(gtkaspell, pos - 1);
else
/* Checker creation */
static GtkAspeller *gtkaspeller_new(Dictionary *dictionary)
{
- GSList *exist;
GtkAspeller *gtkaspeller = NULL;
GtkAspeller *tmp;
Dictionary *dict;
tmp = g_new0(GtkAspeller, 1);
tmp->dictionary = dict;
- exist = g_slist_find_custom(gtkaspellcheckers->checkers, tmp,
- find_gtkaspeller);
-
g_free(tmp);
if ((gtkaspeller = gtkaspeller_real_new(dict)) != NULL) {
gtkaspeller_real_delete(gtkaspeller);
}
-static gint find_gtkaspeller(gconstpointer aa, gconstpointer bb)
-{
- Dictionary *a = ((GtkAspeller *) aa)->dictionary;
- Dictionary *b = ((GtkAspeller *) bb)->dictionary;
-
- if (a && b && a->fullname && b->fullname)
- return strcmp(a->fullname, b->fullname);
-
- return 1;
-}
-
gchar *gtkaspell_get_default_dictionary(GtkAspell *gtkaspell)
{
if (gtkaspell && gtkaspell->gtkaspeller &&