From: Salvatore De Paolis Date: Thu, 10 Dec 2009 04:19:03 +0000 (+0000) Subject: 2009-12-10 [iwkse] 3.7.3cvs37 X-Git-Tag: rel_3_7_4~22 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=a4e4bd21bd28b56fd29f64847bb86ca10b177186 2009-12-10 [iwkse] 3.7.3cvs37 * src/compose.c Add missing checks for gtkaspell: avoid crashing in some cases when Enchant is enabled but the spell checker is disabled in preferences. --- diff --git a/ChangeLog b/ChangeLog index 1d724bc0f..0582cd8bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-12-10 [iwkse] 3.7.3cvs37 + + * src/compose.c + Add missing checks for gtkaspell: avoid + crashing in some cases when Enchant is + enabled but the spell checker is disabled + in preferences. + 2009-12-09 [colin] 3.7.3cvs36 * src/compose.c diff --git a/PATCHSETS b/PATCHSETS index 0d1eb284a..e75db5feb 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3910,3 +3910,4 @@ ( cvs diff -u -r 1.382.2.531 -r 1.382.2.532 src/compose.c; ) > 3.7.3cvs34.patchset ( cvs diff -u -r 1.382.2.532 -r 1.382.2.533 src/compose.c; ) > 3.7.3cvs35.patchset ( cvs diff -u -r 1.382.2.533 -r 1.382.2.534 src/compose.c; ) > 3.7.3cvs36.patchset +( cvs diff -u -r 1.382.2.534 -r 1.382.2.535 src/compose.c; ) > 3.7.3cvs37.patchset diff --git a/configure.ac b/configure.ac index e34e385ee..13a856552 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=3 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=36 +EXTRA_VERSION=37 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c index c6bf24972..ec7c3034b 100644 --- a/src/compose.c +++ b/src/compose.c @@ -1144,7 +1144,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI g_free(tmp); #ifdef USE_ENCHANT - if (compose->gtkaspell->check_while_typing) + if (compose->gtkaspell && compose->gtkaspell->check_while_typing) gtkaspell_highlight_all(compose->gtkaspell); #endif mfield = BODY_FIELD_PRESENT; @@ -1616,7 +1616,7 @@ static Compose *compose_generic_reply(MsgInfo *msginfo, compose_attach_from_list(compose, quote_fmt_get_attachments_list(), FALSE); quote_fmt_reset_vartable(); #ifdef USE_ENCHANT - if (compose->gtkaspell->check_while_typing) + if (compose->gtkaspell && compose->gtkaspell->check_while_typing) gtkaspell_highlight_all(compose->gtkaspell); #endif } @@ -1812,7 +1812,7 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo, procmsg_msginfo_free(full_msginfo); #ifdef USE_ENCHANT - if (compose->gtkaspell->check_while_typing) + if (compose->gtkaspell && compose->gtkaspell->check_while_typing) gtkaspell_highlight_all(compose->gtkaspell); #endif } @@ -6912,7 +6912,8 @@ static void compose_dict_changed(void *data) { Compose *compose = (Compose *) data; - if(compose->gtkaspell->recheck_when_changing_dict == FALSE) + if(compose->gtkaspell && + compose->gtkaspell->recheck_when_changing_dict == FALSE) return; gtkaspell_highlight_all(compose->gtkaspell); @@ -7525,9 +7526,9 @@ static Compose *compose_create(PrefsAccount *account, } } } - compose->gtkaspell = gtkaspell; compose_spell_menu_changed(compose); claws_spell_entry_set_gtkaspell(CLAWS_SPELL_ENTRY(subject_entry), gtkaspell); + compose->gtkaspell = gtkaspell; #endif compose_select_account(compose, account, TRUE); @@ -8111,7 +8112,7 @@ static void compose_template_apply(Compose *compose, Template *tmpl, compose_changed_cb(NULL, compose); #ifdef USE_ENCHANT - if (compose->gtkaspell->check_while_typing) + if (compose->gtkaspell && compose->gtkaspell->check_while_typing) gtkaspell_highlight_all(compose->gtkaspell); #endif } @@ -9610,7 +9611,8 @@ static void compose_insert_file_cb(GtkAction *action, gpointer data) } #ifdef USE_ENCHANT - if (files_inserted > 0 && compose->gtkaspell->check_while_typing) + if (files_inserted > 0 && compose->gtkaspell && + compose->gtkaspell->check_while_typing) gtkaspell_highlight_all(compose->gtkaspell); #endif } @@ -9894,7 +9896,8 @@ static void compose_paste_cb(GtkAction *action, gpointer data) #ifdef USE_ENCHANT if (GTK_WIDGET_HAS_FOCUS(compose->text) && - compose->gtkaspell->check_while_typing) + compose->gtkaspell && + compose->gtkaspell->check_while_typing) gtkaspell_highlight_all(compose->gtkaspell); #endif } @@ -9943,7 +9946,8 @@ static void compose_paste_no_wrap_cb(GtkAction *action, gpointer data) #ifdef USE_ENCHANT if (GTK_WIDGET_HAS_FOCUS(compose->text) && - compose->gtkaspell->check_while_typing) + compose->gtkaspell && + compose->gtkaspell->check_while_typing) gtkaspell_highlight_all(compose->gtkaspell); #endif } @@ -9965,7 +9969,8 @@ static void compose_paste_wrap_cb(GtkAction *action, gpointer data) #ifdef USE_ENCHANT if (GTK_WIDGET_HAS_FOCUS(compose->text) && - compose->gtkaspell->check_while_typing) + compose->gtkaspell && + compose->gtkaspell->check_while_typing) gtkaspell_highlight_all(compose->gtkaspell); #endif }