+2002-06-19
+
+ * src/compose.c: if the Content-Type of a file is text/*, check
+ its content and set the optimal Content-Transfer-Encoding (thanks
+ to Yoichi Yuasa).
+
+2002-06-18
+
+ * src/textview.c: textview_key_pressed(): pass key press event to
+ main window to activate menu shortcuts (thanks to Alfons).
+
2002-06-18
* src/folder.c: folder_build_tree(): use strtoul() instead of atoi()
-2002-06-18 [paul] 0.7.8claws8
+2002-06-19 [paul] 0.7.8claws9
+
+ * sync with 0.7.8claws9
+ see ChangeLog 2002-06-18 and 2002-06-19
+
+2002-06-19 [paul] 0.7.8claws8
* sync with 0.7.8cvs1
see ChangeLog 2002-06-18
+2002-06-19
+
+ * src/compose.c: ¥Õ¥¡¥¤¥ë¤Î Content-Type ¤¬ text/* ¤Î¾ì¹ç¤Ï¡¢¤½¤Î
+ ÆâÍƤò¥Á¥§¥Ã¥¯¤·¤ÆºÇŬ¤Ê Content-Transfer-Encoding ¤ò»ØÄê
+ (ÅòÀõ¤µ¤ó thanks)¡£
+
+2002-06-18
+
+ * src/textview.c: textview_key_pressed(): ¥á¥Ë¥å¡¼¥·¥ç¡¼¥È¥«¥Ã¥È¤ò
+ ºîÆ°¤µ¤»¤ë¤¿¤á¤Ë¥¡¼¥×¥ì¥¹¥¤¥Ù¥ó¥È¤ò¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤ËÅϤ¹¤è¤¦¤Ë
+ ¤·¤¿(Alfons ¤µ¤ó thanks)¡£
+
2002-06-18
* src/folder.c: folder_build_tree(): ·«¤ê²¼¤²¤òËɤ°¤¿¤á¤Ë mtime ¤Ë
MICRO_VERSION=8
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws8
+EXTRA_VERSION=claws9
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
(_("Message: %s"),
g_basename(filename ? filename : file));
} else {
- ainfo->encoding = ENC_BASE64;
+ if (!g_strncasecmp(content_type, "text", 4))
+ ainfo->encoding =
+ procmime_get_encoding_for_file(file);
+ else
+ ainfo->encoding = ENC_BASE64;
ainfo->name = g_strdup
(g_basename(filename ? filename : file));
}
} else {
ainfo->content_type = procmime_get_mime_type(file);
- if (!ainfo->content_type)
+ if (!ainfo->content_type) {
ainfo->content_type =
g_strdup("application/octet-stream");
- ainfo->encoding = ENC_BASE64;
+ ainfo->encoding = ENC_BASE64;
+ } else if (!g_strncasecmp(ainfo->content_type, "text", 4))
+ ainfo->encoding = procmime_get_encoding_for_file(file);
+ else
+ ainfo->encoding = ENC_BASE64;
ainfo->name = g_strdup(g_basename(filename ? filename : file));
}
ainfo->size = size;
/* return ENC_QUOTED_PRINTABLE; */
}
+EncodingType procmime_get_encoding_for_file(const gchar *file)
+{
+ FILE *fp;
+ guchar buf[BUFSIZ];
+ size_t len;
+
+ if ((fp = fopen(file, "rb")) == NULL) {
+ FILE_OP_ERROR(file, "fopen");
+ return ENC_UNKNOWN;
+ }
+
+ while ((len = fread(buf, sizeof(gchar), sizeof(buf), fp)) > 0) {
+ guchar *p;
+ gint i;
+
+ for (p = buf, i = 0; i < len; p++, i++) {
+ if (*p & 0x80) {
+ fclose(fp);
+ return ENC_BASE64;
+ }
+ }
+ }
+
+ fclose(fp);
+ return ENC_7BIT;
+}
+
const gchar *procmime_get_encoding_str(EncodingType encoding)
{
static const gchar *encoding_str[] = {
GList *procmime_get_mime_type_list (void);
EncodingType procmime_get_encoding_for_charset (const gchar *charset);
+EncodingType procmime_get_encoding_for_file (const gchar *file);
const gchar *procmime_get_encoding_str (EncodingType encoding);
void renderer_read_config(void);
case GDK_y:
case GDK_t:
case GDK_l:
- if (messageview->type == MVIEW_MIME) {
+ if (messageview->type == MVIEW_MIME &&
+ textview == messageview->mimeview->textview) {
KEY_PRESS_EVENT_STOP();
mimeview_pass_key_press_event(messageview->mimeview,
event);
}
/* fall through */
default:
- if (summaryview)
- summary_pass_key_press_event(summaryview, event);
+ if (summaryview &&
+ event->window != messageview->mainwin->window->window) {
+ GdkEventKey tmpev = *event;
+
+ tmpev.window = messageview->mainwin->window->window;
+ KEY_PRESS_EVENT_STOP();
+ gtk_widget_event(messageview->mainwin->window,
+ (GdkEvent *)&tmpev);
+ }
break;
}