+2005-09-13 [colin] 1.9.14cvs23
+
+ * src/compose.c
+ Test utf8 compliance before inserting to
+ buffer, and try to convert if necessary
+ * src/procmime.c
+ If no charset is present, use the locale
+ one instead of us-ascii
+ * src/procmsg.c
+ Add Sender, List-Post and To in the checked
+ headers for automatic rules creation
+ (thanks to wwp)
+ * src/prefs_themes.c
+ * src/gtk/gtkaspell.c
+ Remove deprecated functions.
+ patch by Daniel Gustafson
+
2005-09-12 [colin] 1.9.14cvs22
* src/compose.c
( cvs diff -u -r 1.382.2.165 -r 1.382.2.166 src/compose.c; cvs diff -u -r 1.213.2.55 -r 1.213.2.56 src/folder.c; cvs diff -u -r 1.5.2.10 -r 1.5.2.11 src/prefs_spelling.c; cvs diff -u -r 1.1.4.11 -r 1.1.4.12 src/common/xml.c; ) > 1.9.14cvs20.patchset
( cvs diff -u -r 1.100.2.25 -r 1.100.2.26 AUTHORS; cvs diff -u -r 1.1.4.9 -r 1.1.4.10 src/gtk/logwindow.c; ) > 1.9.14cvs21.patchset
( cvs diff -u -r 1.382.2.166 -r 1.382.2.167 src/compose.c; cvs diff -u -r 1.274.2.64 -r 1.274.2.65 src/mainwindow.c; cvs diff -u -r 1.395.2.122 -r 1.395.2.123 src/summaryview.c; cvs diff -u -r 1.68.2.11 -r 1.68.2.12 src/summaryview.h; ) > 1.9.14cvs22.patchset
+( cvs diff -u -r 1.382.2.167 -r 1.382.2.168 src/compose.c; cvs diff -u -r 1.3.2.25 -r 1.3.2.26 src/prefs_themes.c; cvs diff -u -r 1.49.2.58 -r 1.49.2.59 src/procmime.c; cvs diff -u -r 1.150.2.43 -r 1.150.2.44 src/procmsg.c; cvs diff -u -r 1.9.2.21 -r 1.9.2.22 src/gtk/gtkaspell.c; ) > 1.9.14cvs23.patchset
MICRO_VERSION=14
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=22
+EXTRA_VERSION=23
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
lastp = strchr(p, '\n');
len = lastp ? lastp - p + 1 : -1;
- gtk_text_buffer_insert(buffer, &iter, p, len);
+ if (g_utf8_validate(p, -1, NULL)) {
+ gtk_text_buffer_insert(buffer, &iter, p, len);
+ } else {
+ gchar *tmpin = g_strdup(p);
+ gchar *tmpout = NULL;
+ tmpin[len] = '\0';
+ tmpout = conv_codeset_strdup
+ (tmpin, conv_get_locale_charset_str(),
+ CS_INTERNAL);
+ gtk_text_buffer_insert(buffer, &iter, tmpout, -1);
+ g_free(tmpin);
+ g_free(tmpout);
+ }
if (lastp)
p = lastp + 1;
{
char *themode;
- gtk_label_get(GTK_LABEL(GTK_BIN(w)->child), (gchar **) &themode);
+ themode = (char *) gtk_label_get_text(GTK_LABEL(GTK_BIN(w)->child));
+ themode = g_strdup(themode);
set_real_sug_mode(gtkaspell, themode);
+ g_free(themode);
if (gtkaspell->config_menu)
populate_submenu(gtkaspell, gtkaspell->config_menu);
GtkAspell *gtkaspell = (GtkAspell *) data;
GdkEvent *e= (GdkEvent *) gtk_get_current_event();
- gtk_label_get(GTK_LABEL(GTK_BIN(w)->child), (gchar**) &newword);
+ newword = (unsigned char *) gtk_label_get_text(GTK_LABEL(GTK_BIN(w)->child));
+ newword = g_strdup(newword);
replace_real_word(gtkaspell, newword);
gtk_menu_shell_deactivate(GTK_MENU_SHELL(w->parent));
set_point_continue(gtkaspell);
+ g_free(newword);
}
static void replace_real_word(GtkAspell *gtkaspell, gchar *newword)
GTK_WIDGET_SET_FLAGS (btn_more, GTK_CAN_DEFAULT);
/* make it look like an uri */
gtk_button_set_relief(GTK_BUTTON(btn_more), GTK_RELIEF_NONE);
- gtk_label_get(GTK_LABEL(GTK_BIN(btn_more)->child), &buf);
+ buf = gtk_label_get_text(GTK_LABEL(GTK_BIN(btn_more)->child));
buf = g_strdup(buf);
for (i = 0; buf[i] != '\0'; buf[i++] = '_');
gtk_label_set_pattern(GTK_LABEL(GTK_BIN(btn_more)->child), buf);
oldout = dup(1);
dup2(fileno(outfp), 1);
-
+
p = popen(renderer->renderer, "w");
if (p != NULL) {
size_t count;
"charset") == NULL)
g_hash_table_insert(mimeinfo->typeparameters,
g_strdup("charset"),
- g_strdup("us-ascii"));
+ g_strdup(conv_get_locale_charset_str()));
} else {
gchar *type, *subtype, *params;
mimeinfo->subtype = g_strdup("plain");
if (g_hash_table_lookup(mimeinfo->typeparameters,
"charset") == NULL)
- g_hash_table_insert(mimeinfo->typeparameters, g_strdup("charset"), g_strdup("us-ascii"));
+ g_hash_table_insert(mimeinfo->typeparameters, g_strdup("charset"),
+ g_strdup(conv_get_locale_charset_str()));
}
if (content_encoding != NULL) {
{"X-Mailing-list:", NULL, TRUE},
{"List-Id:", NULL, TRUE},
{"X-Sequence:", NULL, TRUE},
+ {"Sender:", NULL, TRUE},
+ {"List-Post:", NULL, TRUE},
{NULL, NULL, FALSE}};
enum
{
H_X_LIST = 2,
H_X_MAILING_LIST = 3,
H_LIST_ID = 4,
- H_X_SEQUENCE = 5
+ H_X_SEQUENCE = 5,
+ H_SENDER = 6,
+ H_LIST_POST = 7
};
FILE *fp;
}
}
g_strstrip(*key);
+ } else if (hentry[H_SENDER].body != NULL) {
+ SET_FILTER_KEY("header \"Sender\"", H_SENDER);
+ } else if (hentry[H_LIST_POST].body != NULL) {
+ SET_FILTER_KEY("header \"Sender\"", H_LIST_POST);
+ } else if (msginfo->to) {
+ *header = g_strdup("to");
+ *key = g_strdup(msginfo->to);
} else if (msginfo->subject) {
*header = g_strdup("subject");
*key = g_strdup(msginfo->subject);
hentry[H_X_MAILING_LIST].body = NULL;
g_free(hentry[H_LIST_ID].body);
hentry[H_LIST_ID].body = NULL;
+ g_free(hentry[H_SENDER].body);
+ hentry[H_SENDER].body = NULL;
+ g_free(hentry[H_LIST_POST].body);
+ hentry[H_LIST_POST].body = NULL;
break;
case FILTER_BY_FROM: