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,
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) {
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)
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);
}
clen = g_unichar_to_utf8(wc, ch);
- if (clen != 1)
- return 0;
-
- if (!strchr("*-+", ch[0]))
+ if (!((clen == 1 && strchr("*-+", ch[0])) ||
+ (clen == 3 && (
+ wc == 0x2022 || /* BULLET */
+ wc == 0x2023 || /* TRIANGULAR BULLET */
+ wc == 0x2043 || /* HYPHEN BULLET */
+ wc == 0x204c || /* BLACK LEFTWARDS BULLET */
+ wc == 0x204d || /* BLACK RIGHTWARDS BULLET */
+ wc == 0x2219 || /* BULLET OPERATOR */
+ wc == 0x25d8 || /* INVERSE BULLET */
+ wc == 0x25e6 || /* WHITE BULLET */
+ wc == 0x2619 || /* REVERSED ROTATED FLORAL HEART BULLET */
+ wc == 0x2765 || /* ROTATED HEAVY BLACK HEART BULLET */
+ wc == 0x2767 || /* ROTATED FLORAL HEART BULLET */
+ wc == 0x29be || /* CIRCLED WHITE BULLET */
+ wc == 0x29bf /* CIRCLED BULLET */
+ ))))
return 0;
gtk_text_iter_forward_char(&iter);
get_rfc822_date_hide_tz(date, sizeof(date));
else
get_rfc822_date(date, sizeof(date));
- err |= (fprintf(fp, "Resent-Date: %s\n", buf) < 0);
+ err |= (fprintf(fp, "Resent-Date: %s\n", date) < 0);
/* Resent-From */
if (compose->account->name && *compose->account->name) {
tmp = end;
/* We make sure that there is a newline at the end. */
- if (gtk_text_iter_backward_char(&tmp)) {
+ if (action == COMPOSE_WRITE_FOR_SEND && gtk_text_iter_backward_char(&tmp)) {
chars = gtk_text_buffer_get_text(buffer, &tmp, &end, FALSE);
if (*chars != '\n') {
gtk_text_buffer_insert(buffer, &end, "\n", 1);
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);
+ gtk_widget_set_sensitive(compose->toolbar->privacy_sign_btn, can_sign);
+ gtk_widget_set_sensitive(compose->toolbar->privacy_encrypt_btn, can_encrypt);
+ gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(compose->toolbar->privacy_sign_btn), can_sign ? compose->use_signing : FALSE);
+ 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)
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)