diff options
author | Marinus Schraal <foser@gentoo.org> | 2006-11-22 11:05:43 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2006-11-22 11:05:43 +0000 |
commit | 20fc038704cebfc35f41e439248f45d3afa31aaa (patch) | |
tree | 0d6b8f44997f825038d5eccba441a27e9f62450e /app-text/gtkspell | |
parent | add patch to support non-nls systems (#134467) (diff) | |
download | gentoo-2-20fc038704cebfc35f41e439248f45d3afa31aaa.tar.gz gentoo-2-20fc038704cebfc35f41e439248f45d3afa31aaa.tar.bz2 gentoo-2-20fc038704cebfc35f41e439248f45d3afa31aaa.zip |
add patch to support non-nls systems (#134467)
(Portage version: 2.1.1-r2)
(Unsigned Manifest commit)
Diffstat (limited to 'app-text/gtkspell')
-rw-r--r-- | app-text/gtkspell/Manifest | 46 | ||||
-rw-r--r-- | app-text/gtkspell/files/digest-gtkspell-2.0.4-r1 | 3 | ||||
-rw-r--r-- | app-text/gtkspell/files/gtkspell-2.0.4-docbookx.patch | 11 | ||||
-rw-r--r-- | app-text/gtkspell/files/gtkspell-2.0.4-enchant.patch | 387 | ||||
-rw-r--r-- | app-text/gtkspell/gtkspell-2.0.4-r1.ebuild | 53 |
5 files changed, 12 insertions, 488 deletions
diff --git a/app-text/gtkspell/Manifest b/app-text/gtkspell/Manifest index 88455204e7f1..c24895e4f093 100644 --- a/app-text/gtkspell/Manifest +++ b/app-text/gtkspell/Manifest @@ -1,32 +1,20 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX gtkspell-2.0.11-enchant.patch 8904 RMD160 5109a1b1fda7d8af38a0d1fbac7ebeb3a51a5697 SHA1 7e18c24b75f0dfdae334cf5b0cc7a697893360de SHA256 9df42ce7c21e548d083e7970a98944225ac54d5db4fef091ecca0e7d1108ae4f MD5 56272bca2bff7fda0bfe8be7ff9808b5 files/gtkspell-2.0.11-enchant.patch 8904 RMD160 5109a1b1fda7d8af38a0d1fbac7ebeb3a51a5697 files/gtkspell-2.0.11-enchant.patch 8904 SHA256 9df42ce7c21e548d083e7970a98944225ac54d5db4fef091ecca0e7d1108ae4f files/gtkspell-2.0.11-enchant.patch 8904 -AUX gtkspell-2.0.4-docbookx.patch 582 RMD160 8e4ffb7ea0ae52bc894d6f104f7810d37677612c SHA1 99b50e87c691c752ccb720d4de5dbcbbc8ceadd5 SHA256 da00bf5eed3ed12d022f155c8fd5fe71f0eeee1491f9aef79c35f71114049c42 -MD5 7b72f96acd5c9a16b6a6284de819f4aa files/gtkspell-2.0.4-docbookx.patch 582 -RMD160 8e4ffb7ea0ae52bc894d6f104f7810d37677612c files/gtkspell-2.0.4-docbookx.patch 582 -SHA256 da00bf5eed3ed12d022f155c8fd5fe71f0eeee1491f9aef79c35f71114049c42 files/gtkspell-2.0.4-docbookx.patch 582 -AUX gtkspell-2.0.4-enchant.patch 11806 RMD160 f6716ab044fb9ecda7e57193a3d658a82ddd10f7 SHA1 9e56e098a24ed8eb0e79d0ba8d920ad094bfe7a0 SHA256 5ebcef66a303147e81e30e65cc396e25f91cb29c410bd670859ff847661e3f6d -MD5 2c687dc22e69904275ba8afee73f55a9 files/gtkspell-2.0.4-enchant.patch 11806 -RMD160 f6716ab044fb9ecda7e57193a3d658a82ddd10f7 files/gtkspell-2.0.4-enchant.patch 11806 -SHA256 5ebcef66a303147e81e30e65cc396e25f91cb29c410bd670859ff847661e3f6d files/gtkspell-2.0.4-enchant.patch 11806 +AUX gtkspell-2.0.11-nonls.patch 580 RMD160 fad56a6ef417d3528ac09693894cd5e17cf12122 SHA1 e437078f78deaa240ac2881a3b602673ebdf0729 SHA256 337d9fb1d2501cf7cc54ae4f910cbdafec70d6dc2ed0ee533a1c8ba10fbf88da +MD5 3fa0663d3d2ee09c936cb62fe3b0f261 files/gtkspell-2.0.11-nonls.patch 580 +RMD160 fad56a6ef417d3528ac09693894cd5e17cf12122 files/gtkspell-2.0.11-nonls.patch 580 +SHA256 337d9fb1d2501cf7cc54ae4f910cbdafec70d6dc2ed0ee533a1c8ba10fbf88da files/gtkspell-2.0.11-nonls.patch 580 DIST gtkspell-2.0.11.tar.gz 347172 RMD160 c5ca1804807f445e246de2b384448a7c7c76855f SHA1 d0e288b2d1456e33083dc7d7c61f013688c5cc65 SHA256 521d6be1e1236706cd491305b10f01d989bf47787ca97242c56c0d2b038e6a12 -DIST gtkspell-2.0.4.tar.gz 197288 RMD160 61b1e62b843b2604045ed9e8a05e8e92070d6f87 SHA256 e3bed8d2a1c5cbb572680cb23fd5f858c7b302e947dca353318959f6a1153e13 -EBUILD gtkspell-2.0.11-r1.ebuild 1024 RMD160 9629b71c30632a4e01f2c66bd1dbd67545f4590a SHA1 17b5607503f24c3d097860faaa733f21a1de6929 SHA256 69d57c39b34de2179a74d11b1ab68c73755213d915e71c8c2e8618e0202e5719 -MD5 fcd5fe14182b554abbd0e1218d50327e gtkspell-2.0.11-r1.ebuild 1024 -RMD160 9629b71c30632a4e01f2c66bd1dbd67545f4590a gtkspell-2.0.11-r1.ebuild 1024 -SHA256 69d57c39b34de2179a74d11b1ab68c73755213d915e71c8c2e8618e0202e5719 gtkspell-2.0.11-r1.ebuild 1024 -EBUILD gtkspell-2.0.4-r1.ebuild 1169 RMD160 232c6fcc296a7fcaac1c3923f596c3d176d20a7d SHA1 a3c6e009ac69ad32ef8203cf1e97c338c7adfaa9 SHA256 4752435dfe92a92575d8bb2c5ed63fb76c88351cf526bc218bda163d4d859e2d -MD5 837c8b2c0504f33feacb22c9eebacabe gtkspell-2.0.4-r1.ebuild 1169 -RMD160 232c6fcc296a7fcaac1c3923f596c3d176d20a7d gtkspell-2.0.4-r1.ebuild 1169 -SHA256 4752435dfe92a92575d8bb2c5ed63fb76c88351cf526bc218bda163d4d859e2d gtkspell-2.0.4-r1.ebuild 1169 -MISC ChangeLog 5575 RMD160 1144a6fc4ac8858ba79e4a2d6a13cb106f52ce15 SHA1 86f4204ba824a6837863885e2cb8a2918ac14d54 SHA256 023516135fd5cba8dfa337e10003715499ad385db7d226971a55cee20cd232b0 -MD5 7a6adfc60f06537100280aeafb866017 ChangeLog 5575 -RMD160 1144a6fc4ac8858ba79e4a2d6a13cb106f52ce15 ChangeLog 5575 -SHA256 023516135fd5cba8dfa337e10003715499ad385db7d226971a55cee20cd232b0 ChangeLog 5575 +EBUILD gtkspell-2.0.11-r1.ebuild 1112 RMD160 5479e9d615ac37d19e0081e851b7b89a6cdd30d8 SHA1 a0f5b2f192cba1e319a0f615451b902aba9e0f67 SHA256 397d322b623bfcb65e9ba61c28bceb342630216ca607d5a0eba65c166c0558d3 +MD5 b460bc4bc718cecbe41f4b2c90c195f9 gtkspell-2.0.11-r1.ebuild 1112 +RMD160 5479e9d615ac37d19e0081e851b7b89a6cdd30d8 gtkspell-2.0.11-r1.ebuild 1112 +SHA256 397d322b623bfcb65e9ba61c28bceb342630216ca607d5a0eba65c166c0558d3 gtkspell-2.0.11-r1.ebuild 1112 +MISC ChangeLog 5766 RMD160 05c03bd2d82357afb6b1d551a82523d2aafb361e SHA1 5fdbfcfd96af2dd715795dcfa93f0981379c9758 SHA256 fa1bd020486a552368161f0f3ea1a3405e976de3c4d309c2a52c83bfa88df118 +MD5 a7a26a083f4463830a8375a7b84445e7 ChangeLog 5766 +RMD160 05c03bd2d82357afb6b1d551a82523d2aafb361e ChangeLog 5766 +SHA256 fa1bd020486a552368161f0f3ea1a3405e976de3c4d309c2a52c83bfa88df118 ChangeLog 5766 MISC metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e SHA1 38f78e9790bcd4382b4a49aa226aa6dda1d3a3d7 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1 MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e metadata.xml 158 @@ -34,13 +22,3 @@ SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1 metadata MD5 45980e49cfff969d1e77692cd314dde2 files/digest-gtkspell-2.0.11-r1 247 RMD160 0fc169fdb8ce61fe22d0bdcdb8a34f5448a49206 files/digest-gtkspell-2.0.11-r1 247 SHA256 d06d845c0253ce2c3e1db75cec2be4a8b15619b3591c772add15488d8803f684 files/digest-gtkspell-2.0.11-r1 247 -MD5 53fdc733323c78ef534ae2a7ae7a262c files/digest-gtkspell-2.0.4-r1 244 -RMD160 61ec00cc67195db8496365b5feba80c727ab368f files/digest-gtkspell-2.0.4-r1 244 -SHA256 804dd0d6d0e5cbac7dc0b3c6195e74eeac36a889a09b0bc4f93791de16ff411c files/digest-gtkspell-2.0.4-r1 244 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.5-ecc0.1.6 (GNU/Linux) - -iD8DBQFFXfvyomPajV0RnrERAhqZAJ9yHzz/LmLf7D3SsMvKVX3bqWtZ9gCdEQ/w -OAotf2sErexVc4y9N9kcoxI= -=7Z/q ------END PGP SIGNATURE----- diff --git a/app-text/gtkspell/files/digest-gtkspell-2.0.4-r1 b/app-text/gtkspell/files/digest-gtkspell-2.0.4-r1 deleted file mode 100644 index 68088077054e..000000000000 --- a/app-text/gtkspell/files/digest-gtkspell-2.0.4-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 4ded985b8eefdf9ac6fbf79cad69ccbd gtkspell-2.0.4.tar.gz 197288 -RMD160 61b1e62b843b2604045ed9e8a05e8e92070d6f87 gtkspell-2.0.4.tar.gz 197288 -SHA256 e3bed8d2a1c5cbb572680cb23fd5f858c7b302e947dca353318959f6a1153e13 gtkspell-2.0.4.tar.gz 197288 diff --git a/app-text/gtkspell/files/gtkspell-2.0.4-docbookx.patch b/app-text/gtkspell/files/gtkspell-2.0.4-docbookx.patch deleted file mode 100644 index 10010e2d1eca..000000000000 --- a/app-text/gtkspell/files/gtkspell-2.0.4-docbookx.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gtkspell-2.0.4/docs/gtkspell-docs.sgml 2002-12-17 09:41:08.000000000 +0000 -+++ gtkspell-2.0.4/docs/gtkspell-docs.sgml 2003-07-02 10:23:04.000000000 +0100 -@@ -1,6 +1,6 @@ - <?xml version="1.0"?> --<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" -- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ -+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" -+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ - <!ENTITY gtkspell-gtkspell SYSTEM "xml/gtkspell.xml"> - <!ENTITY gtkspell-tutorial SYSTEM "tutorial.sgml"> - ]> diff --git a/app-text/gtkspell/files/gtkspell-2.0.4-enchant.patch b/app-text/gtkspell/files/gtkspell-2.0.4-enchant.patch deleted file mode 100644 index 4ee978023093..000000000000 --- a/app-text/gtkspell/files/gtkspell-2.0.4-enchant.patch +++ /dev/null @@ -1,387 +0,0 @@ -? Makefile -? Makefile.in -? aclocal.m4 -? autom4te-2.53.cache -? config.h -? config.h.in -? config.log -? config.status -? configure -? gtkspell-2.0.pc -? gtkspell-enchant.diff -? gtkspell-enchant.diff.gz -? gtkspell.spec -? libtool -? stamp-h -? stamp-h.in -? docs/Makefile -? docs/Makefile.in -? docs/gtkspell-decl-list.txt -? docs/gtkspell-decl.txt -? docs/gtkspell-undocumented.txt -? docs/gtkspell-unused.txt -? docs/gtkspell.args -? docs/gtkspell.hierarchy -? docs/gtkspell.interfaces -? docs/gtkspell.prerequisites -? docs/gtkspell.signals -? docs/html -? docs/html-build.stamp -? docs/html.stamp -? docs/scan-build.stamp -? docs/sgml-build.stamp -? docs/sgml.stamp -? docs/tmpl-build.stamp -? docs/tmpl.stamp -? docs/xml -? docs/tmpl/gtkspell-unused.sgml -? examples/.deps -? examples/.libs -? examples/Makefile -? examples/Makefile.in -? examples/advanced -? examples/simple -? gtkspell/.deps -? gtkspell/.libs -? gtkspell/Makefile -? gtkspell/Makefile.in -? gtkspell/deprecated.lo -? gtkspell/gtkspell.lo -? gtkspell/libgtkspell.la -Index: ChangeLog -=================================================================== -RCS file: /cvsroot/gtkspell/gtkspell2/ChangeLog,v -retrieving revision 1.8 -diff -u -r1.8 ChangeLog ---- ChangeLog 2 Jan 2003 02:20:29 -0000 1.8 -+++ ChangeLog 30 Aug 2003 21:23:33 -0000 -@@ -1,3 +1,9 @@ -+Mon Aug 25 21:13:55 EDT 2003 Dom Lachowicz <cinamod@hotmail.com> -+ -+ * configure.ac: Drop Pspell/Aspell checks, add Enchant one -+ * src/gtkspell.c: Replace Pspell/Aspell backend in favor of an Enchant -+ one -+ - Wed, 01 Jan 2003 18:20:07 -0800 Evan Martin <martine@cs.washington.edu> - - * 2.0.4. -Index: configure.ac -=================================================================== -RCS file: /cvsroot/gtkspell/gtkspell2/configure.ac,v -retrieving revision 1.6 -diff -u -r1.6 configure.ac ---- configure.ac 2 Jan 2003 02:20:29 -0000 1.6 -+++ configure.ac 30 Aug 2003 21:23:33 -0000 -@@ -4,18 +4,12 @@ - AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) - AM_CONFIG_HEADER(config.h) - --AC_CHECK_HEADER(aspell.h, [AC_DEFINE(HAVE_ASPELL_H,1, -- [Define to 1 if you have the <aspell.h> header file.] )] ) --AC_CHECK_HEADER(pspell/pspell.h, [AC_DEFINE(HAVE_PSPELL_H,1, -- [Define to 1 if you have the <pspell/pspell.h> header file.] )] ) --AC_CHECK_LIB(aspell, new_aspell_speller, SPELLER_LIB="-laspell", -- [AC_CHECK_LIB(pspell, new_pspell_manager, SPELLER_LIB="-lpspell", -- [AC_MSG_ERROR([You must have the aspell or pspell dev libraries to build gtkspell.]) ] ) ] ) -- -+SPELLER_LIB=-lenchant - AC_SUBST(SPELLER_LIB) -+ - GTKSPELL_PACKAGES=gtk+-2.0 - AC_SUBST(GTKSPELL_PACKAGES) --PKG_CHECK_MODULES(GTKSPELL, $GTKSPELL_PACKAGES) -+PKG_CHECK_MODULES(GTKSPELL, $GTKSPELL_PACKAGES enchant >= 0.4.0) - AC_SUBST(GTKSPELL_CFLAGS) - AC_SUBST(GTKSPELL_LIBS) - -Index: gtkspell/gtkspell.c -=================================================================== -RCS file: /cvsroot/gtkspell/gtkspell2/gtkspell/gtkspell.c,v -retrieving revision 1.3 -diff -u -r1.3 gtkspell.c ---- gtkspell/gtkspell.c 12 Dec 2002 05:18:49 -0000 1.3 -+++ gtkspell/gtkspell.c 30 Aug 2003 21:25:34 -0000 -@@ -8,44 +8,21 @@ - #include "../config.h" - #include "gtkspell.h" - --#ifdef HAVE_ASPELL_H -- #define USING_ASPELL -- #include <aspell.h> --#elif defined HAVE_PSPELL_H -- #define USING_PSPELL -- #include <pspell/pspell.h> -- #define AspellSpeller PspellManager -- #define speller manager -- #define aspell_speller_check pspell_manager_check -- #define aspell_speller_add_to_session pspell_manager_add_to_session -- #define aspell_speller_store_replacement pspell_manager_store_replacement -- #define AspellWordList PspellWordList -- #define AspellStringEnumeration PspellStringEmulation -- #define aspell_speller_suggest pspell_manager_suggest -- #define aspell_word_list_elements pspell_word_list_elements -- #define aspell_string_enumeration_next pspell_string_emulation_next -- #define delete_aspell_string_enumeration delete_pspell_string_emulation -- #define AspellConfig PspellConfig -- #define AspellCanHaveError PspellCanHaveError -- #define new_aspell_config new_pspell_config -- #define aspell_config_replace pspell_config_replace -- #define new_aspell_speller new_pspell_manager -- #define delete_aspell_config delete_pspell_config -- #define aspell_error_message pspell_error_message -- #define delete_aspell_speller delete_pspell_manager -- #define to_aspell_speller to_pspell_manager -- #define aspell_error_number pspell_error_number -- #define aspell pspell --#endif -+#include <enchant.h> -+ -+/* prepare for gettext internationalization */ -+#undef _ -+#define _(x) x - - const int debug = 0; - const int quiet = 0; - - struct _GtkSpell { -- GtkTextView *view; -- GtkTextTag *tag_highlight; -- GtkTextMark *mark_insert; -- AspellSpeller *speller; -+ GtkTextView *view; -+ GtkTextTag *tag_highlight; -+ GtkTextMark *mark_insert; -+ EnchantBroker *broker; -+ EnchantDict *speller; - }; - - static void gtkspell_free(GtkSpell *spell); -@@ -113,9 +90,13 @@ - check_word(GtkSpell *spell, GtkTextBuffer *buffer, - GtkTextIter *start, GtkTextIter *end) { - char *text; -+ -+ if (!spell->speller) -+ return; -+ - text = gtk_text_buffer_get_text(buffer, start, end, FALSE); - if (debug) g_print("checking: %s\n", text); -- if (aspell_speller_check(spell->speller, text, -1) == FALSE) -+ if (enchant_dict_check(spell->speller, text, strlen(text)) != 0) - gtk_text_buffer_apply_tag(buffer, spell->tag_highlight, start, end); - g_free(text); - } -@@ -233,12 +214,15 @@ - GtkTextIter start, end; - GtkTextBuffer *buffer; - -+ if (!spell->speller) -+ return; -+ - buffer = gtk_text_view_get_buffer(spell->view); - - get_cur_word_extents(buffer, &start, &end); - word = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); - -- aspell_speller_add_to_session(spell->speller, word, strlen(word)); -+ enchant_dict_add_to_session(spell->speller, word, strlen(word)); - - gtk_text_buffer_remove_tag(buffer, spell->tag_highlight, &start, &end); - -@@ -251,6 +235,9 @@ - const char *newword; - GtkTextIter start, end; - GtkTextBuffer *buffer; -+ -+ if (!spell->speller) -+ return; - - buffer = gtk_text_view_get_buffer(spell->view); - -@@ -267,30 +254,32 @@ - gtk_text_buffer_delete(buffer, &start, &end); - gtk_text_buffer_insert(buffer, &start, newword, -1); - -- aspell_speller_store_replacement(spell->speller, -- oldword, strlen(oldword), -- newword, strlen(newword)); -+ enchant_dict_store_replacement(spell->speller, -+ oldword, strlen(oldword), -+ newword, strlen(newword)); - - g_free(oldword); - } - --GtkWidget* -+static GtkWidget* - build_suggestion_menu(GtkSpell *spell, GtkTextBuffer *buffer, - const char *word) { - const char *suggestion; - GtkWidget *topmenu, *menu; - GtkWidget *mi; - GtkWidget *hbox; -- int count = 0; - void *spelldata; -- const AspellWordList *suggestions; -- AspellStringEnumeration *elements; -+ char ** suggestions; -+ size_t n_suggs, i; - char *label; - - topmenu = menu = gtk_menu_new(); - -+ if (!spell->speller) -+ return topmenu; -+ - /* + Add to Dictionary */ -- label = g_strdup_printf("Add \"%s\" to Dictionary", word); -+ label = g_strdup_printf(_("Add \"%s\" to Dictionary"), word); - mi = gtk_image_menu_item_new_with_label(label); - g_free(label); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), -@@ -305,15 +294,13 @@ - gtk_widget_show(mi); - gtk_menu_shell_append(GTK_MENU_SHELL(topmenu), mi); - -- suggestions = aspell_speller_suggest(spell->speller, word, -1); -- elements = aspell_word_list_elements(suggestions); -+ suggestions = enchant_dict_suggest(spell->speller, word, strlen(word), &n_suggs); - -- suggestion = aspell_string_enumeration_next(elements); -- if (suggestion == NULL) { -+ if (suggestions == NULL || !n_suggs) { - /* no suggestions. put something in the menu anyway... */ - GtkWidget *label; - label = gtk_label_new(""); -- gtk_label_set_markup(GTK_LABEL(label), "<i>(no suggestions)</i>"); -+ gtk_label_set_markup(GTK_LABEL(label), _("<i>(no suggestions)</i>")); - - mi = gtk_menu_item_new(); - gtk_container_add(GTK_CONTAINER(mi), label); -@@ -321,31 +308,29 @@ - gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); - } else { - /* build a set of menus with suggestions. */ -- while (suggestion != NULL) { -- if (count == 10) { -- mi = gtk_menu_item_new(); -- gtk_widget_show(mi); -- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); -- -- mi = gtk_menu_item_new_with_label("More..."); -- gtk_widget_show(mi); -- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); -- -- menu = gtk_menu_new(); -- gtk_menu_item_set_submenu(GTK_MENU_ITEM(mi), menu); -- count = 0; -- } -- mi = gtk_menu_item_new_with_label(suggestion); -- g_signal_connect(G_OBJECT(mi), "activate", -- G_CALLBACK(replace_word), spell); -- gtk_widget_show(mi); -- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); -- count++; -- suggestion = aspell_string_enumeration_next(elements); -- } -+ for (i = 0; i < n_suggs; i++) { -+ if (i % 10 == 0 && i != 0) { -+ mi = gtk_menu_item_new(); -+ gtk_widget_show(mi); -+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); -+ -+ mi = gtk_menu_item_new_with_label(_("More...")); -+ gtk_widget_show(mi); -+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); -+ -+ menu = gtk_menu_new(); -+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(mi), menu); -+ } -+ -+ mi = gtk_menu_item_new_with_label(suggestions[i]); -+ g_signal_connect(G_OBJECT(mi), "activate", -+ G_CALLBACK(replace_word), spell); -+ gtk_widget_show(mi); -+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); -+ } - } - -- delete_aspell_string_enumeration(elements); -+ enchant_dict_free_suggestions (spell->speller, suggestions); - - return topmenu; - } -@@ -372,7 +357,7 @@ - - /* then, on top of it, the suggestions menu. */ - img = gtk_image_new_from_stock(GTK_STOCK_SPELL_CHECK, GTK_ICON_SIZE_MENU); -- mi = gtk_image_menu_item_new_with_label("Spelling Suggestions"); -+ mi = gtk_image_menu_item_new_with_label(_("Spelling Suggestions")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), img); - - word = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); -@@ -408,9 +393,6 @@ - - static gboolean - gtkspell_set_language_internal(GtkSpell *spell, const gchar *lang, GError **error) { -- AspellConfig *config; -- AspellCanHaveError *err; -- AspellSpeller *speller; - - if (lang == NULL) { - lang = g_getenv("LANG"); -@@ -422,26 +404,23 @@ - } - } - -- config = new_aspell_config(); -- if (lang) -- aspell_config_replace(config, "language-tag", lang); -- aspell_config_replace(config, "encoding", "utf-8"); -- err = new_aspell_speller(config); -- delete_aspell_config(config); -+ if (!spell->broker) -+ spell->broker = enchant_broker_init (); - -- if (aspell_error_number(err) != 0) { --#ifdef USING_ASPELL -- g_set_error(error, GTKSPELL_ERROR, GTKSPELL_ERROR_BACKEND, -- "aspell: %s", aspell_error_message(err)); --#elif defined USING_PSPELL -+ if (spell->speller) { -+ enchant_broker_free_dict (spell->broker, spell->speller); -+ spell->speller = NULL; -+ } -+ -+ if (!lang) -+ lang = "en"; -+ -+ spell->speller = enchant_broker_request_dict (spell->broker, lang); -+ if (!spell->speller) { - g_set_error(error, GTKSPELL_ERROR, GTKSPELL_ERROR_BACKEND, -- "pspell: %s", aspell_error_message(err)); --#endif -+ _("enchant error for language: %s"), lang); - return FALSE; - } -- if (spell->speller) -- delete_aspell_speller(spell->speller); -- spell->speller = to_aspell_speller(err); - - return TRUE; - } -@@ -575,8 +554,12 @@ - - gtk_text_buffer_delete_mark(buffer, spell->mark_insert); - -- delete_aspell_speller(spell->speller); -- -+ if (spell->broker) { -+ if (spell->speller) -+ enchant_broker_free_dict (spell->broker, spell->speller); -+ enchant_broker_free (spell->broker); -+ } -+ - g_signal_handlers_disconnect_matched(spell->view, - G_SIGNAL_MATCH_DATA, - 0, 0, NULL, NULL, diff --git a/app-text/gtkspell/gtkspell-2.0.4-r1.ebuild b/app-text/gtkspell/gtkspell-2.0.4-r1.ebuild deleted file mode 100644 index fa3bde1604a5..000000000000 --- a/app-text/gtkspell/gtkspell-2.0.4-r1.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/gtkspell/gtkspell-2.0.4-r1.ebuild,v 1.17 2005/01/01 16:18:02 eradicator Exp $ - -inherit libtool eutils - -DESCRIPTION="Spell checking widget for GTK2" -HOMEPAGE="http://gtkspell.sourceforge.net/" -SRC_URI="http://${PN}.sourceforge.net/download/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc sparc x86 ppc64" -IUSE="doc" - -RDEPEND=">=x11-libs/gtk+-2 - >=app-text/enchant-1" -DEPEND="${RDEPEND} - sys-devel/autoconf - doc? ( >=dev-util/gtk-doc-0.6 )" - -src_unpack() { - - unpack ${A} - - # fix the config script's gtkdoc check (bug #16997) - cd ${S} - libtoolize --copy --force # See bug #73563, comment #9 - sed -i "s:GTKDOC=true::" configure - - # workaround missing docbook 4.2 xml dtd in /etc/xml/docbook - epatch ${FILESDIR}/${P}-docbookx.patch - - # use enchant as backend - epatch ${FILESDIR}/${P}-enchant.patch - - autoconf || die - -} - -src_compile() { - - econf $(use_enable doc gtk-doc) || die - emake || die "compile failure" - -} - -src_install() { - - einstall || die - dodoc AUTHORS ChangeLog NEWS README - -} |