Subject: news/pan patch-ab for "Follow-Up and Reply" feature restoration
To: None <tech-pkg@netbsd.org>
From: Brian A. Seklecki <lavalamp@spiritual-machines.org>
List: tech-pkg
Date: 01/10/2004 13:22:30
--=-H2nGN/GTnpffHB6MhAdz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

...for some reason the maintainer decided to remove the "Reply and
Follow-Up" feature in 0.14.0.94 or some pre-release snapshot?.

There's a patch to put it back (and relevant discussion between the
Mandrake RPM maintainer and the core pan developer, Charles Kerr) at 

http://mail.gnu.org/archive/html/pan-devel/2003-08/msg00013.html

This particular patch only affects the Reply/Follow-Up fix, not the
thread-sorting-watching code that the discussion gets into detail about;
I removed the rest of the unrelated chunks.  In fact, there's very
little archived discussion on his decision to do so -- just an arbitrary
it seems.

The PR# for this patch is:  pkg/

The SHA1 sum is:

SHA1 (patch-ab) = b236ee9432a3081dc729201ace914a2136db6b7e

I tested it on my -current system (see activity in
comp.unix.bsd.netbsd.misc) .

...thx,
	-lava

--=-H2nGN/GTnpffHB6MhAdz
Content-Disposition: attachment; filename=patch-ab
Content-Type: text/x-patch; name=patch-ab; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: pan/gui.c
--- pan/gui.c	2003-08-09 01:07:59.000000000 +0200
+++ pan/gui.c	2003-08-16 23:36:58.000000000 +0200
@@ -136,7 +136,7 @@
 **/
 
 /* remember to subtract 1 for the Windows #ifdef! */
-#define MAIN_MENU_ENTRIES_QTY 155
+#define MAIN_MENU_ENTRIES_QTY 157
 static GtkItemFactoryEntry main_menu_entries[MAIN_MENU_ENTRIES_QTY];
 GtkItemFactory * _main_menu_factory;
 
@@ -299,6 +299,7 @@
 	/* post menu */
 	menu_set_sensitive (gif, "/Post/Followup to Newsgroup...", have_read_article);
 	menu_set_sensitive (gif, "/Post/Reply by Email...", have_read_article);
+	menu_set_sensitive (gif, "/Post/Followup and Reply...", have_read_article);
 	menu_set_sensitive (gif, "/Post/Forward by Email...", have_read_article);
 	menu_set_sensitive (gif, "/Post/Send Pending Messages", TRUE);
 
@@ -1860,6 +1863,7 @@
 	/* p */ {N_("/_Post/_Post to Newsgroup..."), "P", menu_cb, ACTION_COMPOSE_NEW, "<ImageItem>", icon_compose_post},
 	/* f */ {N_("/_Post/_Followup to Newsgroup..."), "F", menu_cb, ACTION_COMPOSE_FOLLOWUP, "<ImageItem>", icon_compose_followup},
 	/* r */ {N_("/_Post/_Reply by Email..."), "R", message_reply_window, 0, "<ImageItem>", icon_stock_mail_reply},
+	/* a */ {N_("/_Post/Followup _and Reply..."), NULL, message_followup_reply_window, 0, "<ImageItem>", icon_stock_mail_reply},
 	/* w */ {N_("/_Post/For_ward by Email..."), NULL, message_forward_window, 0, "<ImageItem>", icon_stock_mail_forward},
 	/*   */ {N_("/_Post/---"), NULL, NULL, 0, "<Separator>"},
 	/* m */ {N_("/_Post/Send Pending _Messages"), NULL, flush_sendlater_messages, 0, "<ImageItem>", icon_compose_send},

Index: pan/message-window.h
--- pan/message-window.h	2003-08-04 17:35:13.000000000 +0200
+++ pan/message-window.h	2003-08-16 23:37:19.000000000 +0200
@@ -22,6 +22,8 @@
 
 #include <gmime/gmime-message.h>
 
+void message_followup_reply_window  (void);
+
 void message_followup_window        (void);
 
 void message_reply_window           (void);

Index: pan/message-window.c
--- pan/message-window.c	2003-08-12 16:25:55.000000000 +0200
+++ pan/message-window.c	2003-08-16 23:37:19.000000000 +0200
@@ -71,6 +71,7 @@
 	NNTP_POST,
 	NNTP_REPLY,
 	EMAIL_REPLY,
+	EMAIL_AND_POST_REPLY,
 	EMAIL_FORWARD,
 	EDIT_ORIGINAL
 }
@@ -489,7 +490,9 @@
 static gboolean
 is_posting (ComposeType type)
 {
-	return type==NNTP_POST || type==NNTP_REPLY;
+	return type==NNTP_POST
+		|| type==NNTP_REPLY
+		|| type==EMAIL_AND_POST_REPLY;
 }
 
 static gboolean
@@ -1914,7 +1917,7 @@
 		}
 
 		/* are we sending mail? */
-		if (mw->type==EMAIL_REPLY)
+		if (mw->type==EMAIL_REPLY || mw->type==EMAIL_AND_POST_REPLY)
 		{
 			/* figure out who to send mail to by checking reply-to: and from: */
 			if (m!=NULL)
@@ -2050,6 +2053,7 @@
 	/* sanity clause */
 	g_return_if_fail (type==EMAIL_REPLY
 	               || type==NNTP_REPLY
+	               || type==EMAIL_AND_POST_REPLY
 	               || type==EMAIL_FORWARD);
 
 	/* get current message */
@@ -2074,6 +2078,11 @@
 	make_reply_window (EMAIL_REPLY);
 }
 void
+message_followup_reply_window (void)
+{
+	make_reply_window (EMAIL_AND_POST_REPLY);
+}
+void
 message_followup_window (void)
 {
 	make_reply_window (NNTP_REPLY);
@@ -2148,6 +2157,7 @@
 
 		case NNTP_REPLY:
 		case EMAIL_REPLY:
+		case EMAIL_AND_POST_REPLY:
 		case EMAIL_FORWARD:
 			message_reply_window_create (compose);
 			break;
@@ -2348,7 +2358,8 @@
 	g_free (pch);
 
 	/* references (for posting articles) */
-	if ((mw->type==NNTP_REPLY || mw->type==EMAIL_REPLY) && (mw->message != NULL))
+	if ((mw->type==NNTP_REPLY || mw->type==EMAIL_REPLY || mw->type==EMAIL_AND_POST_REPLY)
+	    && (mw->message != NULL))
 	{
 		const char * refs = g_mime_message_get_header (mw->message, HEADER_REFERENCES);
 		const char * msg_id = g_mime_message_get_message_id (mw->message);

--=-H2nGN/GTnpffHB6MhAdz--