sync with sylpheed 0.7.2cvs24
This commit is contained in:
parent
c06375a40e
commit
0da21b000b
10 changed files with 103 additions and 100 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
|||
2002-03-03
|
||||
|
||||
* src/mimeview.c: mimeview_create(): set the initial notebook page
|
||||
to 0.
|
||||
* src/folderview.c: folderview_selected(): scroll the view if the
|
||||
selected row is hidden.
|
||||
* src/prefs_filter.c: prefs_filter_register_cb(): scroll the view
|
||||
and select the added row.
|
||||
* src/summaryview.c: fix threading for null message ids.
|
||||
|
||||
2002-03-02
|
||||
|
||||
* src/textview.c: textview_show_message(): follow message/rfc822
|
||||
parts.
|
||||
textview_add_part(): add a caption before the attached text files.
|
||||
textview_show_header(): don't add the newline.
|
||||
* src/messageview.c: enabled message search also in MIME mode.
|
||||
|
||||
2002-03-01
|
||||
|
||||
* src/messageview.c: messageview_show(): set header state of
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2002-03-03 [paul] 0.7.2claws27
|
||||
|
||||
* sync with sylpheed 0.7.2cvs24
|
||||
see ChangeLog entries 2002-03-02 and 2002-03-03
|
||||
|
||||
2002-03-02 [melvin] 0.7.2claws26
|
||||
|
||||
* src/inc.[ch]
|
||||
|
|
19
ChangeLog.jp
19
ChangeLog.jp
|
@ -1,3 +1,22 @@
|
|||
2002-03-03
|
||||
|
||||
* src/mimeview.c: mimeview_create(): 最初のノートブックページを 0
|
||||
にした。
|
||||
* src/folderview.c: folderview_selected(): 選択行が隠れていたら
|
||||
ビューをスクロールさせるようにした。
|
||||
* src/prefs_filter.c: prefs_filter_register_cb(): ビューをスクロール
|
||||
させ、追加された行を選択するようにした。
|
||||
* src/summaryview.c: 空のメッセージ ID のスレッド化を修正。
|
||||
|
||||
2002-03-02
|
||||
|
||||
* src/textview.c: textview_show_message(): message/rfc822 のパートを
|
||||
辿るようにした。
|
||||
textview_add_part(): 添付テキストファイルの前に見出しを付けるよう
|
||||
にした。
|
||||
textview_show_header(): 改行を付加しないようにした。
|
||||
* src/messageview.c: MIME モードでもメッセージ検索ができるようにした。
|
||||
|
||||
2002-03-01
|
||||
|
||||
* src/messageview.c: messageview_show(): MimeView の TextView の
|
||||
|
|
|
@ -8,7 +8,7 @@ MINOR_VERSION=7
|
|||
MICRO_VERSION=2
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=claws26
|
||||
EXTRA_VERSION=claws27
|
||||
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
|
||||
|
||||
dnl set $target
|
||||
|
|
|
@ -1605,8 +1605,12 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
|
|||
if (!opened) {
|
||||
gtkut_ctree_set_focus_row(ctree, folderview->opened);
|
||||
gtk_ctree_select(ctree, folderview->opened);
|
||||
} else
|
||||
} else {
|
||||
folderview->opened = row;
|
||||
if (gtk_ctree_node_is_visible(ctree, row)
|
||||
!= GTK_VISIBILITY_FULL)
|
||||
gtk_ctree_node_moveto(ctree, row, -1, 0.5, 0);
|
||||
}
|
||||
|
||||
folderview->open_folder = FALSE;
|
||||
can_select = TRUE;
|
||||
|
|
|
@ -528,36 +528,13 @@ void messageview_select_all(MessageView *messageview)
|
|||
|
||||
void messageview_set_position(MessageView *messageview, gint pos)
|
||||
{
|
||||
switch (messageview->type) {
|
||||
case MVIEW_TEXT:
|
||||
textview_set_position(messageview->textview, pos);
|
||||
break;
|
||||
case MVIEW_MIME:
|
||||
if (messageview->mimeview->type == MIMEVIEW_TEXT)
|
||||
textview_set_position(messageview->mimeview->textview, pos);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
textview_set_position(messageview->textview, pos);
|
||||
}
|
||||
|
||||
gboolean messageview_search_string(MessageView *messageview, const gchar *str,
|
||||
gboolean case_sens)
|
||||
{
|
||||
switch (messageview->type) {
|
||||
case MVIEW_TEXT:
|
||||
return textview_search_string(messageview->textview,
|
||||
str, case_sens);
|
||||
case MVIEW_MIME:
|
||||
if (messageview->mimeview->type == MIMEVIEW_TEXT)
|
||||
return textview_search_string(messageview->mimeview->textview,
|
||||
str, case_sens);
|
||||
else
|
||||
return FALSE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return textview_search_string(messageview->textview, str, case_sens);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -565,22 +542,9 @@ gboolean messageview_search_string_backward(MessageView *messageview,
|
|||
const gchar *str,
|
||||
gboolean case_sens)
|
||||
{
|
||||
switch (messageview->type) {
|
||||
case MVIEW_TEXT:
|
||||
return textview_search_string_backward(messageview->textview,
|
||||
str, case_sens);
|
||||
case MVIEW_MIME:
|
||||
if (messageview->mimeview->type == MIMEVIEW_TEXT)
|
||||
return textview_search_string_backward(messageview->mimeview->textview,
|
||||
str, case_sens);
|
||||
else
|
||||
return FALSE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return textview_search_string_backward(messageview->textview,
|
||||
str, case_sens);
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
|
||||
GtkWidget *messageview_get_text_widget(MessageView *messageview)
|
||||
|
|
|
@ -198,6 +198,8 @@ MimeView *mimeview_create(void)
|
|||
|
||||
gtk_widget_show_all(notebook);
|
||||
|
||||
gtk_notebook_set_page(GTK_NOTEBOOK(notebook), 0);
|
||||
|
||||
n_entries = sizeof(mimeview_popup_entries) /
|
||||
sizeof(mimeview_popup_entries[0]);
|
||||
popupmenu = menu_create_items(mimeview_popup_entries, n_entries,
|
||||
|
|
|
@ -766,7 +766,14 @@ static void prefs_filter_select_dest_cb(void)
|
|||
|
||||
static void prefs_filter_register_cb(void)
|
||||
{
|
||||
prefs_filter_clist_set_row(-1);
|
||||
GtkCList *clist = GTK_CLIST(filter.cond_clist);
|
||||
gint row;
|
||||
|
||||
row = prefs_filter_clist_set_row(-1);
|
||||
if (gtk_clist_row_is_visible(clist, row) != GTK_VISIBILITY_FULL)
|
||||
gtk_clist_moveto(clist, row, -1, 0.5, 0);
|
||||
gtk_clist_select_row(clist, row, -1);
|
||||
gtkut_clist_set_focus_row(clist, row);
|
||||
}
|
||||
|
||||
static void prefs_filter_substitute_cb(void)
|
||||
|
|
|
@ -1954,7 +1954,7 @@ gboolean summary_insert_gnode_func(GtkCTree *ctree, guint depth, GNode *gnode,
|
|||
GTKUT_CTREE_NODE_SET_ROW_DATA(cnode, msginfo);
|
||||
summary_set_marks_func(ctree, cnode, summaryview);
|
||||
|
||||
if (msgid && msgid[0] != 0)
|
||||
if (msgid && msgid[0] != '\0')
|
||||
g_hash_table_insert(msgid_table, (gchar *)msgid, cnode);
|
||||
|
||||
return TRUE;
|
||||
|
@ -2033,7 +2033,7 @@ static void summary_set_ctree_from_list(SummaryView *summaryview,
|
|||
GTKUT_CTREE_NODE_SET_ROW_DATA(node, msginfo);
|
||||
summary_set_marks_func(ctree, node, summaryview);
|
||||
|
||||
if (msginfo->msgid && msginfo->msgid[0] != 0)
|
||||
if (msginfo->msgid && msginfo->msgid[0] != '\0')
|
||||
g_hash_table_insert(msgid_table,
|
||||
msginfo->msgid, node);
|
||||
|
||||
|
|
|
@ -293,6 +293,7 @@ void textview_update_message_colors(void)
|
|||
void textview_show_message(TextView *textview, MimeInfo *mimeinfo,
|
||||
const gchar *file)
|
||||
{
|
||||
GtkSText *text = GTK_STEXT(textview->text);
|
||||
FILE *fp;
|
||||
const gchar *charset = NULL;
|
||||
GPtrArray *headers = NULL;
|
||||
|
@ -311,11 +312,14 @@ void textview_show_message(TextView *textview, MimeInfo *mimeinfo,
|
|||
textview->body_pos = 0;
|
||||
textview->cur_pos = 0;
|
||||
|
||||
gtk_stext_freeze(text);
|
||||
|
||||
if (fseek(fp, mimeinfo->fpos, SEEK_SET) < 0) perror("fseek");
|
||||
headers = textview_scan_header(textview, fp);
|
||||
if (headers) {
|
||||
textview_show_header(textview, headers);
|
||||
procheader_header_array_destroy(headers);
|
||||
textview->body_pos = gtk_stext_get_length(text);
|
||||
}
|
||||
|
||||
while (mimeinfo != NULL) {
|
||||
|
@ -324,18 +328,18 @@ void textview_show_message(TextView *textview, MimeInfo *mimeinfo,
|
|||
!strcasecmp(mimeinfo->parent->content_type,
|
||||
"multipart/alternative"))
|
||||
mimeinfo = mimeinfo->parent->next;
|
||||
else if (mimeinfo->sub)
|
||||
mimeinfo = mimeinfo->next;
|
||||
else
|
||||
mimeinfo = procmime_mimeinfo_next(mimeinfo);
|
||||
}
|
||||
|
||||
gtk_stext_thaw(text);
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
|
||||
{
|
||||
GtkSText *text;
|
||||
GtkSText *text = GTK_STEXT(textview->text);
|
||||
gchar buf[BUFFSIZE];
|
||||
const gchar *boundary = NULL;
|
||||
gint boundary_len = 0;
|
||||
|
@ -346,16 +350,8 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
|
|||
g_return_if_fail(mimeinfo != NULL);
|
||||
g_return_if_fail(fp != NULL);
|
||||
|
||||
if (mimeinfo->mime_type == MIME_MULTIPART) {
|
||||
if (mimeinfo->sub) {
|
||||
mimeinfo = mimeinfo->sub;
|
||||
if (fseek(fp, mimeinfo->fpos, SEEK_SET) < 0) {
|
||||
perror("fseek");
|
||||
return;
|
||||
}
|
||||
} else
|
||||
return;
|
||||
}
|
||||
if (mimeinfo->mime_type == MIME_MULTIPART) return;
|
||||
|
||||
if (mimeinfo->parent && mimeinfo->parent->boundary) {
|
||||
boundary = mimeinfo->parent->boundary;
|
||||
boundary_len = strlen(boundary);
|
||||
|
@ -417,7 +413,6 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
|
|||
textview_set_font(textview, charset);
|
||||
|
||||
textview_clear(textview);
|
||||
text = GTK_STEXT(textview->text);
|
||||
gtk_stext_freeze(text);
|
||||
|
||||
textview->body_pos = 0;
|
||||
|
@ -425,7 +420,9 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
|
|||
|
||||
if (headers) {
|
||||
textview_show_header(textview, headers);
|
||||
gtk_stext_insert(text, NULL, NULL, NULL, "\n", 1);
|
||||
procheader_header_array_destroy(headers);
|
||||
textview->body_pos = gtk_stext_get_length(text);
|
||||
}
|
||||
|
||||
conv = conv_code_converter_new(charset);
|
||||
|
@ -437,7 +434,7 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
|
|||
|
||||
static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
|
||||
{
|
||||
GtkSText *text;
|
||||
GtkSText *text = GTK_STEXT(textview->text);
|
||||
gchar buf[BUFFSIZE];
|
||||
const gchar *boundary = NULL;
|
||||
gint boundary_len = 0;
|
||||
|
@ -448,21 +445,13 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
|
|||
g_return_if_fail(mimeinfo != NULL);
|
||||
g_return_if_fail(fp != NULL);
|
||||
|
||||
if (mimeinfo->mime_type == MIME_MULTIPART) return;
|
||||
|
||||
if (fseek(fp, mimeinfo->fpos, SEEK_SET) < 0) {
|
||||
perror("fseek");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mimeinfo->mime_type == MIME_MULTIPART) {
|
||||
if (mimeinfo->sub) {
|
||||
mimeinfo = mimeinfo->sub;
|
||||
if (fseek(fp, mimeinfo->fpos, SEEK_SET) < 0) {
|
||||
perror("fseek");
|
||||
return;
|
||||
}
|
||||
} else
|
||||
return;
|
||||
}
|
||||
if (mimeinfo->parent && mimeinfo->parent->boundary) {
|
||||
boundary = mimeinfo->parent->boundary;
|
||||
boundary_len = strlen(boundary);
|
||||
|
@ -471,45 +460,42 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
|
|||
while (fgets(buf, sizeof(buf), fp) != NULL)
|
||||
if (buf[0] == '\r' || buf[0] == '\n') break;
|
||||
|
||||
/* display attached RFC822 single text message */
|
||||
if (mimeinfo->parent && mimeinfo->mime_type == MIME_MESSAGE_RFC822) {
|
||||
if (headers) procheader_header_array_destroy(headers);
|
||||
if (!mimeinfo->sub || mimeinfo->sub->children) return;
|
||||
if (mimeinfo->mime_type == MIME_MESSAGE_RFC822) {
|
||||
headers = textview_scan_header(textview, fp);
|
||||
mimeinfo = mimeinfo->sub;
|
||||
} else if (!mimeinfo->parent &&
|
||||
mimeinfo->mime_type == MIME_MESSAGE_RFC822) {
|
||||
if (headers) procheader_header_array_destroy(headers);
|
||||
if (!mimeinfo->sub) return;
|
||||
headers = textview_scan_header(textview, fp);
|
||||
mimeinfo = mimeinfo->sub;
|
||||
if (headers) {
|
||||
gtk_stext_insert(text, NULL, NULL, NULL, "\n", 1);
|
||||
textview_show_header(textview, headers);
|
||||
procheader_header_array_destroy(headers);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (prefs_common.force_charset)
|
||||
charset = prefs_common.force_charset;
|
||||
else if (mimeinfo->charset)
|
||||
charset = mimeinfo->charset;
|
||||
|
||||
text = GTK_STEXT(textview->text);
|
||||
gtk_stext_freeze(text);
|
||||
|
||||
if (headers) {
|
||||
textview_show_header(textview, headers);
|
||||
procheader_header_array_destroy(headers);
|
||||
}
|
||||
if (mimeinfo->filename || mimeinfo->name)
|
||||
g_snprintf(buf, sizeof(buf), "\n[%s %s (%d bytes)]\n",
|
||||
mimeinfo->filename ? mimeinfo->filename :
|
||||
mimeinfo->name,
|
||||
mimeinfo->content_type, mimeinfo->size);
|
||||
else
|
||||
g_snprintf(buf, sizeof(buf), "\n[%s (%d bytes)]\n",
|
||||
mimeinfo->content_type, mimeinfo->size);
|
||||
|
||||
if (mimeinfo->mime_type != MIME_TEXT &&
|
||||
mimeinfo->mime_type != MIME_TEXT_HTML &&
|
||||
mimeinfo->mime_type != MIME_TEXT_ENRICHED) {
|
||||
if (mimeinfo->filename)
|
||||
g_snprintf(buf, sizeof(buf), "\n[%s %s (%d bytes)]\n",
|
||||
mimeinfo->content_type, mimeinfo->filename,
|
||||
mimeinfo->size);
|
||||
else
|
||||
g_snprintf(buf, sizeof(buf), "\n[%s (%d bytes)]\n",
|
||||
mimeinfo->content_type, mimeinfo->size);
|
||||
gtk_stext_insert(text, NULL, NULL, NULL, buf, -1);
|
||||
} else {
|
||||
if (!mimeinfo->main &&
|
||||
mimeinfo->parent &&
|
||||
mimeinfo->parent->children != mimeinfo)
|
||||
gtk_stext_insert(text, NULL, NULL, NULL, buf, -1);
|
||||
else
|
||||
gtk_stext_insert(text, NULL, NULL, NULL, "\n", 1);
|
||||
if (prefs_common.force_charset)
|
||||
charset = prefs_common.force_charset;
|
||||
else if (mimeinfo->charset)
|
||||
charset = mimeinfo->charset;
|
||||
conv = conv_code_converter_new(charset);
|
||||
textview_write_body(textview, mimeinfo, fp, conv);
|
||||
conv_code_converter_destroy(conv);
|
||||
|
@ -1319,9 +1305,7 @@ static void textview_show_header(TextView *textview, GPtrArray *headers)
|
|||
gtk_stext_insert(text, textview->msgfont, NULL, NULL, "\n", 1);
|
||||
}
|
||||
|
||||
gtk_stext_insert(text, textview->msgfont, NULL, NULL, "\n", 1);
|
||||
gtk_stext_thaw(text);
|
||||
textview->body_pos = gtk_stext_get_length(text);
|
||||
}
|
||||
|
||||
gboolean textview_search_string(TextView *textview, const gchar *str,
|
||||
|
|
Loading…
Reference in a new issue