void org_gnome_evolution_attachment_reminder (EPlugin *ep, EMEventTargetComposer *t) { GByteArray *raw_msg_barray; /* no need to check for content, when there are attachments */ if (check_for_attachment (t->composer)) return; raw_msg_barray = e_msg_composer_get_raw_message_text_without_signature (t->composer); if (!raw_msg_barray) return; /* Set presend_check_status for the composer*/ if (check_for_attachment_clues (raw_msg_barray)) { if (!ask_for_missing_attachment (ep, (GtkWindow *) t->composer)) g_object_set_data ( G_OBJECT (t->composer), "presend_check_status", GINT_TO_POINTER (1)); } g_byte_array_free (raw_msg_barray, TRUE); }
void org_gnome_evolution_attachment_reminder (EPlugin *ep, EMEventTargetComposer *t) { GByteArray *raw_msg_barray; gchar *filtered_str = NULL; raw_msg_barray = e_msg_composer_get_raw_message_text (t->composer); if (!raw_msg_barray) return; raw_msg_barray = g_byte_array_append (raw_msg_barray, (const guint8 *)"", 1); filtered_str = strip_text_msg ((gchar *) raw_msg_barray->data); g_byte_array_free (raw_msg_barray, TRUE); /* Set presend_check_status for the composer*/ if (check_for_attachment_clues (filtered_str) && !check_for_attachment (t->composer)) if (!ask_for_missing_attachment (ep, (GtkWindow *)t->composer)) g_object_set_data ((GObject *) t->composer, "presend_check_status", GINT_TO_POINTER(1)); g_free (filtered_str); }