Blob Blame History Raw
diff -up purple-plugin_pack-2.3.0/configure.enchant purple-plugin_pack-2.3.0/configure
--- purple-plugin_pack-2.3.0/configure.enchant	2008-04-06 12:33:13.000000000 -0400
+++ purple-plugin_pack-2.3.0/configure	2008-04-06 12:38:06.000000000 -0400
@@ -23809,18 +23809,18 @@ fi
 
 BUILD_SWITCH_SPELL=no
 if test x"$gtkspell" = x"yes" ; then
-	if test "${ac_cv_header_aspell_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for aspell.h" >&5
-echo $ECHO_N "checking for aspell.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_aspell_h+set}" = set; then
+	if test "${ac_cv_header_enchant_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for enchant.h" >&5
+echo $ECHO_N "checking for enchant.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_enchant_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_aspell_h" >&5
-echo "${ECHO_T}$ac_cv_header_aspell_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_enchant_h" >&5
+echo "${ECHO_T}$ac_cv_header_enchant_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking aspell.h usability" >&5
-echo $ECHO_N "checking aspell.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking enchant.h usability" >&5
+echo $ECHO_N "checking enchant.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23828,7 +23828,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <aspell.h>
+#include <enchant/enchant.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -23860,15 +23860,15 @@ rm -f core conftest.err conftest.$ac_obj
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking aspell.h presence" >&5
-echo $ECHO_N "checking aspell.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking enchant.h presence" >&5
+echo $ECHO_N "checking enchant.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <aspell.h>
+#include <enchant/enchant.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -23901,25 +23901,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: aspell.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: aspell.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: aspell.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: aspell.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: enchant.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: enchant.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: enchant.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: enchant.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: aspell.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: aspell.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: aspell.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: aspell.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: aspell.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: aspell.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: aspell.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: aspell.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: aspell.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: aspell.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: aspell.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: aspell.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: enchant.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: enchant.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: enchant.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: enchant.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: enchant.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: enchant.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: enchant.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: enchant.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: enchant.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: enchant.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: enchant.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: enchant.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## --------------------------------------------------- ##
 ## Report this to plugins-devel@lists.guifications.org ##
@@ -23928,18 +23928,18 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for aspell.h" >&5
-echo $ECHO_N "checking for aspell.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_aspell_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for enchant.h" >&5
+echo $ECHO_N "checking for enchant.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_enchant_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_aspell_h=$ac_header_preproc
+  ac_cv_header_enchant_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_aspell_h" >&5
-echo "${ECHO_T}$ac_cv_header_aspell_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_enchant_h" >&5
+echo "${ECHO_T}$ac_cv_header_enchant_h" >&6; }
 
 fi
-if test $ac_cv_header_aspell_h = yes; then
+if test $ac_cv_header_enchant_h = yes; then
   HAVE_ASPELL_H=yes
 else
   HAVE_ASPELL_H=no
@@ -23947,13 +23947,13 @@ fi
 
 
 	if test x"$HAVE_ASPELL_H" = x"yes" ; then
-		{ echo "$as_me:$LINENO: checking for new_aspell_config in -laspell" >&5
-echo $ECHO_N "checking for new_aspell_config in -laspell... $ECHO_C" >&6; }
-if test "${ac_cv_lib_aspell_new_aspell_config+set}" = set; then
+		{ echo "$as_me:$LINENO: checking for enchant_broker_init in -lenchant" >&5
+echo $ECHO_N "checking for enchant_broker_init in -lenchant... $ECHO_C" >&6; }
+if test "${ac_cv_lib_enchant_enchant_broker_init+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-laspell  $LIBS"
+LIBS="-lenchant  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23967,11 +23967,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char new_aspell_config ();
+char enchant_broker_init ();
 int
 main ()
 {
-return new_aspell_config ();
+return enchant_broker_init ();
   ;
   return 0;
 }
@@ -23994,21 +23994,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_aspell_new_aspell_config=yes
+  ac_cv_lib_enchant_enchant_broker_init=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_aspell_new_aspell_config=no
+	ac_cv_lib_enchant_enchant_broker_init=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_aspell_new_aspell_config" >&5
-echo "${ECHO_T}$ac_cv_lib_aspell_new_aspell_config" >&6; }
-if test $ac_cv_lib_aspell_new_aspell_config = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_enchant_enchant_broker_init" >&5
+echo "${ECHO_T}$ac_cv_lib_enchant_enchant_broker_init" >&6; }
+if test $ac_cv_lib_enchant_enchant_broker_init = yes; then
   BUILD_SWITCH_SPELL=yes
 else
   BUILD_SWITCH_SPELL=no
diff -up purple-plugin_pack-2.3.0/switchspell/switchspell.c.enchant purple-plugin_pack-2.3.0/switchspell/switchspell.c
--- purple-plugin_pack-2.3.0/switchspell/switchspell.c.enchant	2008-03-12 21:47:57.000000000 -0400
+++ purple-plugin_pack-2.3.0/switchspell/switchspell.c	2008-04-06 12:31:44.000000000 -0400
@@ -35,7 +35,7 @@
 #include <gtkconv.h>
 #include <gtkplugin.h>
 
-#include <aspell.h>
+#include <enchant/enchant.h>
 #include <gtkspell/gtkspell.h>
 #include <string.h>
 
@@ -97,10 +97,7 @@ regenerate_switchspell_menu(PidginConver
 	GtkWidget *menu;
 	GtkWidget *mitem;
 	GSList *group = NULL;
-	AspellConfig * config;
-	AspellDictInfoList * dlist;
-	AspellDictInfoEnumeration * dels;
-	const AspellDictInfo * entry;
+	EnchantBroker * eb;
 
 	if (gtkconv == NULL)
 		return;
@@ -122,24 +119,25 @@ regenerate_switchspell_menu(PidginConver
 	menu = gtk_menu_new();
 	gtk_menu_item_set_submenu(GTK_MENU_ITEM(mitem), menu);
 
-	config = new_aspell_config();
-	dlist = get_aspell_dict_info_list(config);
-	delete_aspell_config(config);
-
-	dels = aspell_dict_info_list_elements(dlist);
-	aspell_dict_info_list_empty(dlist);
-	while ((entry = aspell_dict_info_enumeration_next(dels)) != 0) {
-		GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, entry->name);
+	void enchDictDescCb(const char * const lang_tag,
+		const char * const provider_name,
+		const char * const provider_desc,
+		const char * const provider_file,
+		void * user_data)
+	{
+		GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, lang_tag);
 		group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem));
 		g_object_set_data(G_OBJECT(menuitem), "user_data", win);
-		g_object_set_data(G_OBJECT(menuitem), "lang", (gchar *)entry->name);
+		g_object_set_data(G_OBJECT(menuitem), "lang", (gchar *)lang_tag);
 		g_signal_connect(G_OBJECT(menuitem), "activate",
 					G_CALLBACK(menu_conv_use_dict_cb), NULL);
 		gtk_widget_show(menuitem);
 		gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
 	}
 
-	delete_aspell_dict_info_enumeration(dels);
+	eb = enchant_broker_init();
+	enchant_broker_list_dicts(eb, enchDictDescCb, NULL);
+	enchant_broker_free(eb);
 	gtk_widget_show_all(menu);
 }