

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
3 messages in net.sourceforge.lists.courier-sqwebmail[sqwebmail] Flag message display enha...| From | Sent On | Attachments |
|---|---|---|
| Milan Obuch | Jun 4, 2009 7:55 am | .c, .css, .c, 1 more |
| Sam Varshavchik | Jun 4, 2009 5:47 pm | |
| Milan Obuch | Jun 4, 2009 10:05 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [sqwebmail] Flag message display enhancement | Actions... |
|---|---|---|
| From: | Milan Obuch (cour...@dino.sk) | |
| Date: | Jun 4, 2009 7:55:02 am | |
| List: | net.sourceforge.lists.courier-sqwebmail | |
| Attachments: | ||
Hi,
there is lack of display of message flag in sqwebmail. Message could be flagged with R (replied to), S (seen), T (tag for deletion) and F (flag). Last one is often available in mail programs as 'important message' flag or some such. I use IMAP client normally (KMail with IMAP account set up), but at times, webmail comes handy. As I use F flag sometimes, it would help me if its presence could be seen in webmail too.
Luckily, it was not that hard to patch this feature in. I decide to show F flag presence with red exclamation mark put before message selection checkbox. I did not succeed to align checboxes properly other way, so I put in two new table cells and adjusted styles and colspans accordingly.
Please review and comment attached patches. Ignore naming - I tested it as an optional FreeBSD port feature, thus the 'extra-' prefix (and I was lazy to make another copy of it just for thicase :) )
Regards, Milan
--- 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> </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> </th><th> </th><th> </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("\" /> %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> </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> </td>"); + puts("<td colspan=\"7\">");
puts("<script type=\"text/javascript\">");
puts("/* <







.c, .css, .c, 1 more