Bug #230

Predefined Subject field per folder.

Added by John Coppens over 2 years ago. Updated over 2 years ago.

Status:NewStart date:03/10/2015
Priority:NormalDue date:
Assignee:Hiroyuki Yamamoto% Done:

0%

Category:SylpheedSpent time:-
Target version:-

Description

Currently, it's possible to define To:, Cc:, Bcc: fields per folder. Some mailing list have subforums (eg. piclist) which require [PIC], [EE] or other tags in the subject.

It would be nice to have those tags filled in automatically. I could try to implement it myself, if there is interest in this, and if it would be acceptable.

subject.patch Magnifier - Patch to add predefined Subject per folder (8.12 KB) John Coppens, 03/18/2015 02:17 PM

History

#1 Updated by John Coppens over 2 years ago

I attached a patch which adds the possibility of predefined Subject fields per folder. It can be applied to the current stable version.

#2 Updated by Hiroyuki Yamamoto over 2 years ago

Thanks for the patch.

I have briefly checked it.

diff -u -r sylpheed-3.4.2/libsylph/folder.h sylpheed-3.4.2-new/libsylph/folder.h
--- sylpheed-3.4.2/libsylph/folder.h    2014-06-10 01:06:35.000000000 -0300
+++ sylpheed-3.4.2-new/libsylph/folder.h    2015-03-09 15:12:59.732506911 -0300
@@ -311,6 +311,7 @@
     gchar *auto_cc;
     gchar *auto_bcc;
     gchar *auto_replyto;
+    gchar *auto_subject;

Adding a member to public libsylph structs will break ABI for plugins,
So it should be achived in other ways (such as private members like Folder struct).

+    if (item->auto_subject)
+        compose_entry_set(compose, item->auto_subject,
+                  COMPOSE_ENTRY_REPLY_TO);

Isn't the correct one COMPOSE_ENTRY_SUBJECT ?

Other than the above, I think your patch is basically OK.

#3 Updated by John Coppens over 2 years ago

Isn't the correct one COMPOSE_ENTRY_SUBJECT ?

Yes, that is correct... I noticed this only yesterday, as it only appears when doing a reply to a message. I did not have time to debug it yet.

Adding a member to public libsylph structs will break ABI for plugins,
So it should be achived in other ways (such as private members like Folder struct).

I'm afraid I am not very familiar with the workings of Sylpheed. I will look into it. Still,
would it not be more logical to have auto_subject treated at the same level as the other fields? Maybe in a future revision?

Thank you for your comments.

John

Also available in: Atom PDF