2012-09-19 [colin] 3.8.1cvs64
[claws.git] / src / gtk / gtkaspell.c
index 717396d227bb4724ff77734dc0b051c96c50c6d0..fce20c4bc3422bde138593bfb4ef81739a06249b 100644 (file)
@@ -191,8 +191,6 @@ static Dictionary * dictionary_dup                  (const Dictionary *dict);
 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);       
 
@@ -491,7 +489,6 @@ static gboolean key_press_cb                        (GtkWidget    *text_view,
                                                  GtkAspell    *gtkaspell)
 {
        gint pos;
-       GtkTextBuffer *textbuf = gtk_text_view_get_buffer(text_view);
 
        cm_return_val_if_fail(gtkaspell->gtkaspeller->speller, FALSE);
 
@@ -508,7 +505,7 @@ static gboolean key_press_cb                        (GtkWidget    *text_view,
                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
@@ -649,7 +646,6 @@ static void button_press_intercept_cb(GtkTextView *gtktext,
 /* Checker creation */
 static GtkAspeller *gtkaspeller_new(Dictionary *dictionary)
 {
-       GSList          *exist;
        GtkAspeller     *gtkaspeller = NULL;
        GtkAspeller     *tmp;
        Dictionary      *dict;
@@ -669,9 +665,6 @@ static GtkAspeller *gtkaspeller_new(Dictionary *dictionary)
        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) {
@@ -2389,17 +2382,6 @@ static void free_checkers(gpointer elt, gpointer data)
        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 &&