Index: configure.ac =================================================================== --- configure.ac (revision 14307) +++ configure.ac (working copy) @@ -14,6 +14,10 @@ XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.2.0]) +dnl Spell checking support +XDT_CHECK_OPTIONAL_PACKAGE([GTKSPELL], [gtkspell-2.0], [2.0.10], + [gtkspell], [gtkspell library], [no]) + BM_DEBUG_SUPPORT XDT_I18N([ca cs de es fr hu it ja lt pl ru sk sv ta zh_CN zh_TW]) Index: src/window.c =================================================================== --- src/window.c (revision 14306) +++ src/window.c (working copy) @@ -95,20 +95,25 @@ // GTK_SHADOW_IN); // remove_scrollbar_spacing(GTK_SCROLLED_WINDOW(sw)); gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); - + textview = gtk_text_view_new(); gtk_container_add(GTK_CONTAINER(sw), textview); - + +#ifdef HAVE_GTKSPELL + /* spell checking with GtkSpell */ + gtkspell_new_attach(GTK_TEXT_VIEW(textview), NULL, NULL); +#endif /* HAVE_GTKSPELL */ + textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); /* //Following code has possibility of confliction if scroll policy of GTK changed GtkAdjustment *hadj = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(sw)); GtkAdjustment *vadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)); - + g_signal_connect_after(G_OBJECT(hadj), "value-changed", G_CALLBACK(cb_scroll_event), textview); g_signal_connect_after(G_OBJECT(vadj), "value-changed", G_CALLBACK(cb_scroll_event), textview); -*/ +*/ g_signal_connect(G_OBJECT(textbuffer), "mark-set", G_CALLBACK(cb_mark_set), menubar); g_signal_connect(G_OBJECT(textbuffer), "mark-deleted", Index: src/mousepad.h =================================================================== --- src/mousepad.h (revision 14306) +++ src/mousepad.h (working copy) @@ -31,6 +31,7 @@ /* gettext */ /* Shared Libraries */ + #include #include #include @@ -38,7 +39,12 @@ #include #include #include + #include +#ifdef HAVE_GTKSPELL +#include +#endif + #include #include