aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2009-08-09 12:15:27 +0800
committerrafan <rafan@FreeBSD.org>2009-08-09 12:15:27 +0800
commitd22222da799b8d5f89821cde6c843328e9fdd2ff (patch)
tree6191bb23ea968b5c9a3b33770b4fd2c81109a8d4 /mail
parent3fb8177778ff963888d905b210d6713105de60cf (diff)
downloadfreebsd-ports-gnome-d22222da799b8d5f89821cde6c843328e9fdd2ff.tar.gz
freebsd-ports-gnome-d22222da799b8d5f89821cde6c843328e9fdd2ff.tar.zst
freebsd-ports-gnome-d22222da799b8d5f89821cde6c843328e9fdd2ff.zip
- Add missing optional patches
PR: ports/137582 Submitted by: Milan Obuch <bsd at dino.sk> (maintainer)
Diffstat (limited to 'mail')
-rw-r--r--mail/courier/files/extra-patch-webmail__folder.c102
-rw-r--r--mail/courier/files/extra-patch-webmail__images__sqwebmail.css28
-rw-r--r--mail/courier/files/extra-patch-webmail__maildir.c75
-rw-r--r--mail/courier/files/extra-patch-webmail__maildir.h18
4 files changed, 223 insertions, 0 deletions
diff --git a/mail/courier/files/extra-patch-webmail__folder.c b/mail/courier/files/extra-patch-webmail__folder.c
new file mode 100644
index 000000000000..d1a6139cbcd3
--- /dev/null
+++ b/mail/courier/files/extra-patch-webmail__folder.c
@@ -0,0 +1,102 @@
+--- webmail/folder.c.orig 2008-07-20 19:00:33.000000000 +0200
++++ webmail/folder.c 2009-06-04 08:32:54.000000000 +0200
+@@ -247,6 +247,18 @@
+ return (maildir_msgmovefile(folder, file, cgi("moveto"), pos));
+ }
+
++static int groupmark(const char *folder, const char *file, size_t pos)
++{
++ maildir_msgmarkfile(folder, file, pos);
++ return (0);
++}
++
++static int groupunmark(const char *folder, const char *file, size_t pos)
++{
++ maildir_msgunmarkfile(folder, file, pos);
++ return (0);
++}
++
+ void folder_delmsgs(const char *dir, size_t pos)
+ {
+ int rc=0;
+@@ -317,6 +329,16 @@
+ rc=group_movedel( dir, &groupmove );
+ maildir_savefoldermsgs(dir);
+ }
++ else if (*cgi("cmdmark"))
++ {
++ rc=group_movedel( dir, &groupmark );
++ maildir_savefoldermsgs(dir);
++ }
++ else if (*cgi("cmdunmark"))
++ {
++ rc=group_movedel( dir, &groupunmark );
++ maildir_savefoldermsgs(dir);
++ }
+
+ maildir_cleanup();
+
+@@ -441,7 +463,7 @@
+
+ folder_navigate(dir, pos, highend, morebefore, moreafter);
+
+- printf("<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr class=\"folder-index-header\"><th align=\"center\">%s</th><th>&nbsp;</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n",
++ printf("<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr class=\"folder-index-header\"><th align=\"center\">%s</th><th>&nbsp;</th><th>&nbsp;</th><th>&nbsp;</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n",
+ getarg("NUM"),
+ getarg("DATE"),
+ (strncmp(dir, INBOX "." SENT, sizeof(INBOX)+sizeof(SENT)-1) &&
+@@ -486,12 +508,13 @@
+ if ((q=strrchr(p, '/')) != 0)
+ p=q+1;
+
+- printf("<tr class=\"folder-index-bg-%d\" id=\"row%d\"><td align=\"right\" class=\"message-number\">%s%ld.%s</td><td class=\"message-status\"><input type=\"checkbox\" name=\"MOVE-%ld\" id=\"MOVE-%ld",
++ printf("<tr class=\"folder-index-bg-%d\" id=\"row%d\"><td align=\"right\" class=\"message-number\">%s%ld.%s</td><td class=\"message-flag\">%s</td><td class=\"message-select\"><input type=\"checkbox\" name=\"MOVE-%ld\" id=\"MOVE-%ld",
+ (i & 1)+1,
+ i,
+ folder_index_entry_start,
+ (long)(i+pos+1),
+ folder_index_entry_end,
++ maildirfile_flag(MSGINFO_FILENAME(contents[i])) ? "<font color=\"red\">!</font>" : "",
+ (long) (pos+i),
+ (long) (pos+i));
+ printf("\" onchange=\"setsel('MOVE-%ld', 'row%d', 'folder-index-bg-%d');\"%s /><input type=\"hidden\" name=\"MOVEFILE-%ld\" value=\"",
+@@ -499,7 +522,7 @@
+ (type[0] == MSGTYPE_DELETED ? " disabled=\"disabled\"":""),
+ (long)(pos+i));
+ output_attrencoded(p);
+- printf("\" />&nbsp;%s%s%s</td><td class=\"message-date\">%s",
++ printf("\" /></td><td class=\"message-status\">%s%s%s</td><td class=\"message-date\">%s",
+ folder_index_entry_start,
+ type,
+ folder_index_entry_end,
+@@ -545,9 +568,9 @@
+
+ if (found)
+ {
+- puts("<tr class=\"folder-index-bg-1\"><td colspan=\"6\"><hr /></td></tr>");
+- puts("<tr class=\"folder-index-bg-2\"><td>&nbsp;</td>");
+- puts("<td colspan=\"5\">");
++ puts("<tr class=\"folder-index-bg-3\"><td colspan=\"8\"><hr /></td></tr>");
++ puts("<tr class=\"folder-index-bg-4\"><td>&nbsp;</td>");
++ puts("<td colspan=\"7\">");
+
+ puts("<script type=\"text/javascript\">");
+ puts("/* <![CDATA[ */");
+@@ -578,7 +601,7 @@
+ }
+ if (!found && nomsg)
+ {
+- puts("<tr class=\"folder-index-bg-1\"><td colspan=\"6\" align=\"left\"><p>");
++ puts("<tr class=\"folder-index-bg-1\"><td colspan=\"8\" align=\"left\"><p>");
+ puts(nomsg);
+ puts("<br /></p></td></tr>");
+ printf("</table>\n");
+@@ -3364,7 +3387,7 @@
+ if ((strcmp(sqwebmail_folder, INBOX "." TRASH) == 0) && (strlen(getarg("PURGEALL"))))
+ printf("<input type=\"submit\" name=\"cmdpurgeall\" value=\"%s\" onclick=\"javascript: return deleteAll();\" />",
+ getarg("PURGEALL"));
+- printf("<input type=\"submit\" name=\"cmddel\" value=\"%s\" />%s<select name=\"moveto\">",
++ printf("<input type=\"submit\" name=\"cmddel\" value=\"%s\" />, <input type=\"submit\" name=\"cmdmark\" value=\"Mark\" />, <input type=\"submit\" name=\"cmdunmark\" value=\"Unmark\" />%s<select name=\"moveto\">",
+ strcmp(sqwebmail_folder, INBOX "." TRASH) == 0
+ ? purgelab:deletelab,
+ movelab);
diff --git a/mail/courier/files/extra-patch-webmail__images__sqwebmail.css b/mail/courier/files/extra-patch-webmail__images__sqwebmail.css
new file mode 100644
index 000000000000..62bb52989227
--- /dev/null
+++ b/mail/courier/files/extra-patch-webmail__images__sqwebmail.css
@@ -0,0 +1,28 @@
+--- webmail/images/sqwebmail.css.orig 2009-06-04 08:27:30.000000000 +0200
++++ webmail/images/sqwebmail.css 2009-06-04 08:33:54.000000000 +0200
+@@ -142,6 +142,9 @@
+ .folder-index-bg-1:hover { background-color: #bbbbbb }
+ .folder-index-bg-2 { background-color: #ddddbb }
+ .folder-index-bg-2:hover { background-color: #bbbbbb }
++/* for <HR> and buttons under message list */
++.folder-index-bg-3 { background-color: #ffffff }
++.folder-index-bg-4 { background-color: #eeeecc }
+
+ /* Selected message */
+
+@@ -159,11 +162,13 @@
+ */
+
+ .message-number { }
+-.message-status { }
++.message-flag { padding: 0}
++.message-select { padding: 0 }
++.message-status { padding: 0 }
+ .message-date { }
+ .message-from { }
+ .message-subject { }
+-.message-size { font-family: monospace}
++.message-size { font-family: monospace }
+
+ /***************************** Folder permissions ***********************/
+
diff --git a/mail/courier/files/extra-patch-webmail__maildir.c b/mail/courier/files/extra-patch-webmail__maildir.c
new file mode 100644
index 000000000000..dfd1f2a1e132
--- /dev/null
+++ b/mail/courier/files/extra-patch-webmail__maildir.c
@@ -0,0 +1,75 @@
+--- webmail/maildir.c.orig 2008-07-20 05:15:08.000000000 +0200
++++ webmail/maildir.c 2009-06-03 22:41:49.000000000 +0200
+@@ -1091,6 +1091,42 @@
+ return (rc);
+ }
+
++void maildir_msgmarkfile(const char *folder, const char *file, size_t pos)
++{
++char *filename=maildir_find(folder, file);
++char *new_filename;
++
++ if (filename)
++ {
++ if ((new_filename=maildir_addflagfilename(filename, 'F')) != 0)
++ {
++ rename(filename, new_filename);
++ update_foldermsgs(folder, new_filename, pos);
++ free(new_filename);
++ }
++
++ free(filename);
++ }
++}
++
++void maildir_msgunmarkfile(const char *folder, const char *file, size_t pos)
++{
++char *filename=maildir_find(folder, file);
++char *new_filename;
++
++ if (filename)
++ {
++ if ((new_filename = strdup(filename)) != 0)
++ {
++ maildir_remflagname(new_filename, 'F');
++ rename(filename, new_filename);
++ update_foldermsgs(folder, new_filename, pos);
++ free(new_filename);
++ }
++ free(filename);
++ }
++}
++
+ static char *foldercountfilename(const char *folder)
+ {
+ char *f=malloc(sizeof(MAILDIRCURCACHE "/cnt.") + strlen(folder));
+@@ -1604,6 +1640,29 @@
+ return (MSGTYPE_NEW);
+ }
+
++/*
++** maildirfile_flag(directory, filename) - boolean:
++**
++*/
++
++int maildirfile_flag(const char *p)
++{
++const char *q=strrchr(p, '/');
++int seen_flag=0;
++
++ if (q) p=q;
++
++ if ( !(p=strchr(p, ':')) || *++p != '2' || *++p != ',')
++ return (0); /* No :2,info */
++
++ ++p;
++ while (p && isalpha((int)(unsigned char)*p))
++ if (*p++ == 'F')
++ seen_flag=1;
++
++ return (seen_flag);
++}
++
+ static int docount(const char *fn, unsigned *new_cnt, unsigned *other_cnt)
+ {
+ const char *filename=strrchr(fn, '/');
diff --git a/mail/courier/files/extra-patch-webmail__maildir.h b/mail/courier/files/extra-patch-webmail__maildir.h
new file mode 100644
index 000000000000..71d4700415cc
--- /dev/null
+++ b/mail/courier/files/extra-patch-webmail__maildir.h
@@ -0,0 +1,18 @@
+--- webmail/maildir.h.orig 2004-02-17 01:58:24.000000000 +0100
++++ webmail/maildir.h 2009-06-04 08:40:43.000000000 +0200
+@@ -35,12 +35,15 @@
+ extern int maildir_name2pos(const char *, const char *, size_t *);
+
+ extern char maildirfile_type(const char *);
++extern int maildirfile_flag(const char *);
+ extern void maildir_markread(const char *, size_t);
+ extern void maildir_markreplied(const char *, const char *);
+ extern void maildir_msgdeletefile(const char *, const char *, size_t);
+ extern void maildir_msgpurge(const char *, size_t);
+ extern void maildir_msgpurgefile(const char *, const char *);
+ extern void maildir_purgemimegpg();
++extern void maildir_msgmarkfile(const char *, const char *, size_t);
++extern void maildir_msgunmarkfile(const char *, const char *, size_t);
+
+ extern int maildir_msgmove(const char *, size_t, const char *);
+ extern int maildir_msgmovefile(const char *, const char *, const char *, size_t);