+Thu Oct 13 15:30:08 EDT 2005 Art Cancro <ajc@uncensored.citadel.org>
+* <tr> and </tr> tags for each row in a mailbox summary view, are now
+ output by display_summarized() instead of by readloop(). This makes the
+ code easier to read and refactors it slightly in preparation for some evil
+ plans...
+
Wed Oct 12 23:58:15 EDT 2005 Art Cancro <ajc@uncensored.citadel.org>
* Rooms view -- render properly when empty floors exist
[fixes bugzilla issue # 156]
void display_summarized(int num) {
char datebuf[64];
+ wprintf("<tr bgcolor=\"#%s\" ",
+ ((num % 2) ? "DDDDDD" : "FFFFFF")
+ );
+
+
+
+ wprintf("onClick=\" new Ajax.Updater('preview_pane', '/msg', { method: 'get', parameters: 'msgnum=%ld' } ); \" ", WC->summ[num].msgnum);
+ wprintf(">");
+
wprintf("<TD>");
if (WC->summ[num].is_new) wprintf("<B>");
escputs(WC->summ[num].subj);
"</TD>\n",
WC->summ[num].msgnum
);
+
+ wprintf("</tr>");
}
long pn_previous = 0L;
long pn_current = 0L;
long pn_next = 0L;
- int bg = 0;
struct addrbookent *addrbook = NULL;
int num_ab = 0;
char *sortby = NULL;
if (a > 0) pn_previous = WC->msgarr[a-1];
if (a < (nummsgs-1)) pn_next = WC->msgarr[a+1];
- /* If a tabular view, set up the line */
- if (is_summary) {
- bg = 1 - bg;
- wprintf("<tr bgcolor=\"#%s\" ",
- (bg ? "DDDDDD" : "FFFFFF")
- );
-
- wprintf("onClick=\" new Ajax.Updater('preview_pane', '/msg', { method: 'get', parameters: 'msgnum=%ld' } ); \" ", WC->summ[a].msgnum);
-
- wprintf(">");
- }
-
/* Display the message */
if (is_summary) {
display_summarized(a);
read_message(WC->msgarr[a], 0);
}
- /* If a tabular view, finish the line */
- if (is_summary) {
- wprintf("</TR>\n");
- }
-
if (lowest_displayed < 0) lowest_displayed = a;
highest_displayed = a;