rpms/sylpheed/devel sylpheed-2.4.8-enchant.patch, NONE, 1.1 sylpheed.spec, 1.65, 1.66
Michael Schwendt (mschwendt)
fedora-extras-commits at redhat.com
Mon Dec 24 22:13:24 UTC 2007
Author: mschwendt
Update of /cvs/pkgs/rpms/sylpheed/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18366
Modified Files:
sylpheed.spec
Added Files:
sylpheed-2.4.8-enchant.patch
Log Message:
* Sun Dec 23 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.4.8-1
- Patch spell-checking support. Retrieve list of dictionaries from
Enchant instead of Aspell, because GtkSpell no longer uses Aspell.
- Update to 2.4.8 (accumulated bug-fixes).
sylpheed-2.4.8-enchant.patch:
--- NEW FILE sylpheed-2.4.8-enchant.patch ---
diff -Nur sylpheed-2.4.8-orig/src/compose.c sylpheed-2.4.8/src/compose.c
--- sylpheed-2.4.8-orig/src/compose.c 2007-09-28 07:46:21.000000000 +0200
+++ sylpheed-2.4.8/src/compose.c 2007-12-24 23:06:49.000000000 +0100
@@ -67,7 +67,7 @@
#if USE_GTKSPELL
# include <gtk/gtkradiomenuitem.h>
# include <gtkspell/gtkspell.h>
-# include <aspell.h>
+# include <enchant/enchant.h>
#endif
#include <stdio.h>
@@ -4889,6 +4889,7 @@
#ifdef USE_GTKSPELL
compose->check_spell = prefs_common.check_spell;
compose->spell_lang = g_strdup(prefs_common.spell_lang);
+ compose->spell_dict_list = NULL;
compose->spell_menu = spell_menu;
#endif /* USE_GTKSPELL */
@@ -5320,26 +5321,29 @@
#if USE_GTKSPELL
static void compose_set_spell_lang_menu(Compose *compose)
{
- AspellConfig *config;
- AspellDictInfoList *dlist;
- AspellDictInfoEnumeration *dels;
- const AspellDictInfo *entry;
+ EnchantBroker* eb;
GSList *dict_list = NULL, *menu_list = NULL, *cur;
GtkWidget *menu;
gboolean lang_set = FALSE;
- config = new_aspell_config();
- dlist = get_aspell_dict_info_list(config);
- delete_aspell_config(config);
-
- dels = aspell_dict_info_list_elements(dlist);
- while ((entry = aspell_dict_info_enumeration_next(dels)) != 0) {
- dict_list = g_slist_append(dict_list, (gchar *)entry->name);
- if (compose->spell_lang != NULL &&
- g_ascii_strcasecmp(compose->spell_lang, entry->name) == 0)
- lang_set = TRUE;
+ 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)
+ {
+ dict_list = g_slist_append(dict_list, g_strdup((gchar*)lang_tag));
+ }
+
+ eb = enchant_broker_init();
+ enchant_broker_list_dicts (eb, enchDictDescCb, &dict_list);
+ enchant_broker_free(eb);
+
+ for (cur = dict_list; cur!=NULL; cur = cur->next) {
+ if (compose->spell_lang != NULL &&
+ g_ascii_strcasecmp(compose->spell_lang, cur->data) == 0)
+ lang_set = TRUE;
}
- delete_aspell_dict_info_enumeration(dels);
menu = gtk_menu_new();
@@ -5499,6 +5503,7 @@
AttachInfo *ainfo;
GtkTextBuffer *buffer;
GtkClipboard *clipboard;
+ GSList *cur;
compose_list = g_list_remove(compose_list, compose);
@@ -5510,6 +5515,9 @@
address_completion_end(compose->window);
#if USE_GTKSPELL
+ for (cur = compose->spell_dict_list; cur!=NULL; cur = cur->next) {
+ g_free((gchar*)cur->data);
+ }
g_free(compose->spell_lang);
#endif
diff -Nur sylpheed-2.4.8-orig/src/compose.h sylpheed-2.4.8/src/compose.h
--- sylpheed-2.4.8-orig/src/compose.h 2007-07-12 04:56:58.000000000 +0200
+++ sylpheed-2.4.8/src/compose.h 2007-12-24 23:03:27.000000000 +0100
@@ -135,6 +135,7 @@
#if USE_GTKSPELL
GtkWidget *spell_menu;
gchar *spell_lang;
+ GSList *spell_dict_list;
gboolean check_spell;
#endif
Index: sylpheed.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sylpheed/devel/sylpheed.spec,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- sylpheed.spec 23 Dec 2007 17:49:12 -0000 1.65
+++ sylpheed.spec 24 Dec 2007 22:12:45 -0000 1.66
@@ -24,6 +24,7 @@
Patch2: sylpheed-2.4.7-desktop.patch
Patch3: sylpheed-2.3.1-certsdir.patch
Patch4: sylpheed-2.2.5-prefs_common.patch
+Patch5: sylpheed-2.4.8-enchant.patch
# For xdg-open in patch1.
Requires: xdg-utils
@@ -49,6 +50,7 @@
%patch2 -p1 -b .desktop
%patch3 -p1 -b .certsdir
%patch4 -p1 -b .prefs_common
+%patch5 -p1 -b .enchant
%build
%configure --enable-ssl %{!?_without_gpgme:--enable-gpgme} \
@@ -89,6 +91,8 @@
%changelog
* Sun Dec 23 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.4.8-1
+- Patch spell-checking support. Retrieve list of dictionaries from
+ Enchant instead of Aspell, because GtkSpell no longer uses Aspell.
- Update to 2.4.8 (accumulated bug-fixes).
* Mon Dec 17 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 2.4.7-4
More information about the fedora-extras-commits
mailing list