aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-03-10 02:51:15 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-03-10 02:51:15 +0000
commit3803fc8d9845990819eefdcfd6c46c31658aa1b3 (patch)
tree285876dc6d94151e5b3bdfb86972fad5cd9ccff3
parenta8dd8ec8af07826434cf28bca75b5261528f806d (diff)
printing messages now follows 'Show all headers'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1038 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.ja7
-rw-r--r--libsylph/procmsg.c9
-rw-r--r--libsylph/procmsg.h3
-rw-r--r--src/mainwindow.c6
-rw-r--r--src/messageview.c8
-rw-r--r--src/summaryview.c5
7 files changed, 35 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index c33bb442..cdeb5cad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-10
+
+ * libsylph/procmsg.[ch]
+ src/messageview.c
+ src/summaryview.c: printing messages now follows 'Show all headers'
+ status.
+
2006-03-09
* libsylph/procmime.c: procmime_execute_open_file(): parse ~/.mailcap
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 640d2b53..2262efd1 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,10 @@
+2006-03-10
+
+ * libsylph/procmsg.[ch]
+ src/messageview.c
+ src/summaryview.c: メッセージの印刷を「すべてのヘッダを表示」の状態
+ に従うようにした。
+
2006-03-09
* libsylph/procmime.c: procmime_execute_open_file():
diff --git a/libsylph/procmsg.c b/libsylph/procmsg.c
index 00a3b9c9..3a47da3d 100644
--- a/libsylph/procmsg.c
+++ b/libsylph/procmsg.c
@@ -1280,7 +1280,8 @@ gint procmsg_save_to_outbox(FolderItem *outbox, const gchar *file)
return 0;
}
-void procmsg_print_message(MsgInfo *msginfo, const gchar *cmdline)
+void procmsg_print_message(MsgInfo *msginfo, const gchar *cmdline,
+ gboolean all_headers)
{
static const gchar *def_cmd = "lpr %s";
static guint id = 0;
@@ -1315,7 +1316,11 @@ void procmsg_print_message(MsgInfo *msginfo, const gchar *cmdline)
return;
}
- headers = procheader_get_header_array_for_display(msgfp, NULL);
+ if (all_headers)
+ headers = procheader_get_header_array_asis(msgfp, NULL);
+ else
+ headers = procheader_get_header_array_for_display(msgfp, NULL);
+
fclose(msgfp);
for (i = 0; i < headers->len; i++) {
diff --git a/libsylph/procmsg.h b/libsylph/procmsg.h
index 19de310e..f61b6f9b 100644
--- a/libsylph/procmsg.h
+++ b/libsylph/procmsg.h
@@ -297,7 +297,8 @@ void procmsg_remove_all_cached_messages
gint procmsg_save_to_outbox (FolderItem *outbox,
const gchar *file);
void procmsg_print_message (MsgInfo *msginfo,
- const gchar *cmdline);
+ const gchar *cmdline,
+ gboolean all_headers);
MsgInfo *procmsg_msginfo_copy (MsgInfo *msginfo);
MsgInfo *procmsg_msginfo_get_full_info (MsgInfo *msginfo);
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 83b54dee..15f3fe4d 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -705,7 +705,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
{N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_View/Open in new _window"), "<control><alt>N", open_msg_cb, 0, NULL},
{N_("/_View/Mess_age source"), "<control>U", view_source_cb, 0, NULL},
- {N_("/_View/Show all _header"), "<control>H", show_all_header_cb, 0, "<ToggleItem>"},
+ {N_("/_View/Show all _headers"), "<control>H", show_all_header_cb, 0, "<ToggleItem>"},
{N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_View/_Update summary"), "<control><alt>U", update_summary_cb, 0, NULL},
@@ -1938,7 +1938,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
{"/View/Go to/Prev labeled message", M_MSG_EXIST},
{"/View/Go to/Next labeled message", M_MSG_EXIST},
{"/View/Open in new window" , M_SINGLE_TARGET_EXIST},
- {"/View/Show all header" , M_SINGLE_TARGET_EXIST},
+ {"/View/Show all headers" , M_SINGLE_TARGET_EXIST},
{"/View/Message source" , M_SINGLE_TARGET_EXIST},
{"/Message/Receive/Get from current account"
@@ -2065,7 +2065,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
(item != NULL));
}
- SET_CHECK_MENU_ACTIVE("/View/Show all header",
+ SET_CHECK_MENU_ACTIVE("/View/Show all headers",
mainwin->messageview->textview->show_all_headers);
SET_CHECK_MENU_ACTIVE("/View/Thread view", (state & M_THREADED) != 0);
diff --git a/src/messageview.c b/src/messageview.c
index 4365778b..508ff097 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -242,7 +242,8 @@ static GtkItemFactoryEntry msgview_entries[] =
{N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_View/Mess_age source"), NULL, view_source_cb, 0, NULL},
- {N_("/_View/Show all _header"), NULL, show_all_header_cb, 0, "<ToggleItem>"},
+ {N_("/_View/Show all _headers"),
+ NULL, show_all_header_cb, 0, "<ToggleItem>"},
{N_("/_Message"), NULL, NULL, 0, "<Branch>"},
{N_("/_Message/Compose _new message"),
@@ -547,7 +548,7 @@ static void messageview_set_menu_state(MessageView *messageview)
messageview->menu_locked = TRUE;
ifactory = gtk_item_factory_from_widget(messageview->menubar);
menuitem = gtk_item_factory_get_widget
- (ifactory, "/View/Show all header");
+ (ifactory, "/View/Show all headers");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
messageview->textview->show_all_headers);
messageview->menu_locked = FALSE;
@@ -770,7 +771,8 @@ static void print_cb(gpointer data, guint action, GtkWidget *widget)
return;
}
- procmsg_print_message(messageview->msginfo, cmdline);
+ procmsg_print_message(messageview->msginfo, cmdline,
+ messageview->textview->show_all_headers);
}
static void close_cb(gpointer data, guint action, GtkWidget *widget)
diff --git a/src/summaryview.c b/src/summaryview.c
index 14cda4ed..a49864ca 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -3448,6 +3448,7 @@ void summary_print(SummaryView *summaryview)
GSList *mlist, *cur;
const gchar *cmdline;
gchar *msg;
+ gboolean all_headers;
if (gtk_tree_selection_count_selected_rows(summaryview->selection) == 0)
return;
@@ -3471,11 +3472,13 @@ void summary_print(SummaryView *summaryview)
return;
}
+ all_headers = summaryview->messageview->textview->show_all_headers;
+
mlist = summary_get_selected_msg_list(summaryview);
for (cur = mlist; cur != NULL; cur = cur->next) {
msginfo = (MsgInfo *)cur->data;
if (msginfo)
- procmsg_print_message(msginfo, cmdline);
+ procmsg_print_message(msginfo, cmdline, all_headers);
}
g_slist_free(mlist);
}