+2003-10-20 [paul] 0.9.6claws36
+
+ * src/compose.[ch]
+ src/filtering.c
+ src/messageview.c
+ fix crash when using Forward in Filtering when
+ external editor option is set
+
+ Patch submitted by Simon 'corecode' Schubert
+ <corecode@corecode.ath.cx>
+
2003-10-20 [paul] 0.9.6claws35
* src/pixmaps/mime_gpg_expired.xpm ** REMOVED **
case COMPOSE_FORWARD_INLINE:
/* check if we reply to more than one Message */
if (list_len == 1) {
- compose_forward(NULL, msginfo, FALSE, body);
+ compose_forward(NULL, msginfo, FALSE, body, FALSE);
break;
}
/* more messages FALL THROUGH */
}
Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
- gboolean as_attach, const gchar *body)
+ gboolean as_attach, const gchar *body,
+ gboolean no_extedit)
{
Compose *compose;
GtkSText *text;
#endif
gtk_widget_grab_focus(compose->header_last->entry);
- if (prefs_common.auto_exteditor)
+ if (!no_extedit && prefs_common.auto_exteditor)
compose_exec_ext_editor(compose);
/*save folder*/
return TRUE;
case MATCHACTION_FORWARD:
- account = account_find_from_id(action->account_id);
- compose = compose_forward(account, info, FALSE, NULL);
- if (compose->account->protocol == A_NNTP)
- compose_entry_append(compose, action->destination,
- COMPOSE_NEWSGROUPS);
- else
- compose_entry_append(compose, action->destination,
- COMPOSE_TO);
-
- val = compose_send(compose);
- if (val == 0) {
- gtk_widget_destroy(compose->window);
- return TRUE;
- }
-
- gtk_widget_destroy(compose->window);
- return FALSE;
-
case MATCHACTION_FORWARD_AS_ATTACHMENT:
-
account = account_find_from_id(action->account_id);
- compose = compose_forward(account, info, TRUE, NULL);
- if (compose->account->protocol == A_NNTP)
- compose_entry_append(compose, action->destination,
- COMPOSE_NEWSGROUPS);
- else
- compose_entry_append(compose, action->destination,
- COMPOSE_TO);
+ compose = compose_forward(account, info,
+ action->type == MATCHACTION_FORWARD ? FALSE : TRUE,
+ NULL, TRUE);
+ compose_entry_append(compose, action->destination,
+ compose->account->protocol == A_NNTP
+ ? COMPOSE_NEWSGROUPS
+ : COMPOSE_TO);
val = compose_send(compose);
- if (val == 0) {
- gtk_widget_destroy(compose->window);
- return TRUE;
- }
gtk_widget_destroy(compose->window);
- return FALSE;
+
+ return val == 0 ? TRUE : FALSE;
case MATCHACTION_REDIRECT:
account = account_find_from_id(action->account_id);
COMPOSE_TO);
val = compose_send(compose);
- if (val == 0) {
- gtk_widget_destroy(compose->window);
- return TRUE;
- }
-
gtk_widget_destroy(compose->window);
- return FALSE;
+
+ return val == 0 ? TRUE : FALSE;
case MATCHACTION_EXECUTE:
cmd = matching_build_command(action->unesc_destination, info);
}
break;
case COMPOSE_FORWARD_INLINE:
- compose_forward(NULL, msginfo, FALSE, text);
+ compose_forward(NULL, msginfo, FALSE, text, FALSE);
break;
case COMPOSE_FORWARD_AS_ATTACH:
compose_forward_multiple(NULL, mlist);