static void activate_privacy_system (Compose *compose,
PrefsAccount *account,
gboolean warn);
-static void compose_use_signing(Compose *compose, gboolean use_signing);
-static void compose_use_encryption(Compose *compose, gboolean use_encryption);
static void compose_toggle_return_receipt_cb(GtkToggleAction *action,
gpointer data);
static void compose_toggle_remove_refs_cb(GtkToggleAction *action,
else
gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
g_free(tmp);
}
gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), buf);
compose_attach_from_list(compose, quote_fmt_get_attachments_list(), FALSE);
quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
g_free(subject);
g_free(tmp);
if (privacy_avail && g_slist_length(privacy_avail)) {
privacy = (gchar *)(privacy_avail->data);
}
+ g_slist_free_full(privacy_avail, g_free);
}
if (privacy != NULL) {
if (system) {
else
gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
g_free(tmp);
}
else
gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
g_free(tmp);
procmsg_msginfo_free(&full_msginfo);
else
gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
g_free(tmp);
}
compose_check_all(NULL, compose);
break;
#endif
+ case A_PRIVACY_SIGN:
+ break;
+ case A_PRIVACY_ENCRYPT:
+ break;
default:
break;
}
if (msginfo->inreplyto && *msginfo->inreplyto)
compose->inreplyto = g_strdup(msginfo->inreplyto);
- if (msginfo->msgid && *msginfo->msgid)
+ if (msginfo->msgid && *msginfo->msgid &&
+ compose->folder != NULL &&
+ compose->folder->stype == F_DRAFT)
compose->msgid = g_strdup(msginfo->msgid);
} else {
if (msginfo->msgid && *msginfo->msgid)
quote_fmt_parse();
buf = quote_fmt_get_buffer();
+
if (buf == NULL)
alertpanel_error(_("The \"Quotation mark\" of the template is invalid."));
else
}
buf = quote_fmt_get_buffer();
+
if (buf == NULL) {
gint line = quote_fmt_get_line();
alertpanel_error(err_msg, line);
+
goto error;
}
+
} else
buf = "";
return TRUE;
}
-static void compose_use_signing(Compose *compose, gboolean use_signing)
+void compose_use_signing(Compose *compose, gboolean use_signing)
{
compose->use_signing = use_signing;
cm_toggle_menu_set_active_full(compose->ui_manager, "Menu/Options/Sign", use_signing);
}
-static void compose_use_encryption(Compose *compose, gboolean use_encryption)
+void compose_use_encryption(Compose *compose, gboolean use_encryption)
{
compose->use_encryption = use_encryption;
cm_toggle_menu_set_active_full(compose->ui_manager, "Menu/Options/Encrypt", use_encryption);
GTK_STOCK_CANCEL, button_label, NULL, TRUE, NULL,
ALERT_QUESTION, G_ALERTDEFAULT);
g_free(message);
+ g_free(button_label);
if (aval & G_ALERTDISABLE) {
aval &= ~G_ALERTDISABLE;
prefs_common.warn_empty_subj = FALSE;
if (*chars != '\n') {
gtk_text_buffer_insert(buffer, &end, "\n", 1);
}
+ g_free(chars);
}
/* get all composed text */
cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Options/Sign", can_sign);
cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Options/Encrypt", can_encrypt);
+ if (compose->toolbar->privacy_sign_btn != NULL) {
+ gtk_widget_set_sensitive(
+ GTK_WIDGET(compose->toolbar->privacy_sign_btn),
+ can_sign);
+ gtk_toggle_tool_button_set_active(
+ GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_sign_btn),
+ can_sign ? compose->use_signing : FALSE);
+ }
+ if (compose->toolbar->privacy_encrypt_btn != NULL) {
+ gtk_widget_set_sensitive(
+ GTK_WIDGET(compose->toolbar->privacy_encrypt_btn),
+ can_encrypt);
+ gtk_toggle_tool_button_set_active(
+ GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_encrypt_btn),
+ can_encrypt ? compose->use_encryption : FALSE);
+ }
}
static void compose_update_privacy_system_menu_item(Compose * compose, gboolean warn)
cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Options/Sign", can_sign);
cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Options/Encrypt", can_encrypt);
-}
-
+ if (compose->toolbar->privacy_sign_btn != NULL) {
+ gtk_widget_set_sensitive(
+ GTK_WIDGET(compose->toolbar->privacy_sign_btn),
+ can_sign);
+ }
+ if (compose->toolbar->privacy_encrypt_btn != NULL) {
+ gtk_widget_set_sensitive(
+ GTK_WIDGET(compose->toolbar->privacy_encrypt_btn),
+ can_encrypt);
+ }
+}
+
static void compose_set_out_encoding(Compose *compose)
{
CharSet out_encoding;
compose_template_apply_fields(compose, tmpl);
compose_attach_from_list(compose, quote_fmt_get_attachments_list(), FALSE);
quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
+
compose_changed_cb(NULL, compose);
#ifdef USE_ENCHANT
} else {
gtk_entry_set_text(GTK_ENTRY(compose->from_name), buf);
}
+
+ quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
}
if (tmpl->to && *tmpl->to != '\0') {
} else {
compose_entry_append(compose, buf, COMPOSE_TO, PREF_TEMPLATE);
}
+
+ quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
}
if (tmpl->cc && *tmpl->cc != '\0') {
} else {
compose_entry_append(compose, buf, COMPOSE_CC, PREF_TEMPLATE);
}
+
+ quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
}
if (tmpl->bcc && *tmpl->bcc != '\0') {
} else {
compose_entry_append(compose, buf, COMPOSE_BCC, PREF_TEMPLATE);
}
+
+ quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
}
if (tmpl->replyto && *tmpl->replyto != '\0') {
} else {
compose_entry_append(compose, buf, COMPOSE_REPLYTO, PREF_TEMPLATE);
}
+
+ quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
}
/* process the subject */
} else {
gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), buf);
}
+
+ quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
}
procmsg_msginfo_free( &dummyinfo );
Compose *compose = (Compose *)data;
compose->use_signing = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+ gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_sign_btn), compose->use_signing);
}
static void compose_toggle_encrypt_cb(GtkToggleAction *action, gpointer data)
Compose *compose = (Compose *)data;
compose->use_encryption = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+ gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_encrypt_btn), compose->use_encryption);
}
static void activate_privacy_system(Compose *compose, PrefsAccount *account, gboolean warn)