projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
76c0720
)
* fix next dropdown
author
Wilfried Göesgens
<willi@citadel.org>
Sun, 11 Oct 2009 18:07:25 +0000
(18:07 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Sun, 11 Oct 2009 18:07:25 +0000
(18:07 +0000)
webcit/msg_renderers.c
patch
|
blob
|
history
diff --git
a/webcit/msg_renderers.c
b/webcit/msg_renderers.c
index b0a1fde1ca279144f45a470c06fdbe4aa12c99d3..cc594541379e48b5135079a6aa62864746c3db00 100644
(file)
--- a/
webcit/msg_renderers.c
+++ b/
webcit/msg_renderers.c
@@
-1106,11
+1106,11
@@
long DrawMessageDropdown(StrBuf *Selector, long maxmsgs, long startmsg, int nMes
long ret;
long hklen;
const char *key;
long ret;
long hklen;
const char *key;
- int done = 0;
int nItems;
HashPos *At;
long vector[16];
WCTemplputParams SubTP;
int nItems;
HashPos *At;
long vector[16];
WCTemplputParams SubTP;
+ int wantmore = 1;
memset(&SubTP, 0, sizeof(WCTemplputParams));
SubTP.Filter.ContextType = CTX_LONGVECTOR;
memset(&SubTP, 0, sizeof(WCTemplputParams));
SubTP.Filter.ContextType = CTX_LONGVECTOR;
@@
-1125,9
+1125,14
@@
long DrawMessageDropdown(StrBuf *Selector, long maxmsgs, long startmsg, int nMes
vector[3] = 0;
vector[7] = starting_from;
vector[3] = 0;
vector[7] = starting_from;
- while (!done) {
+ while (wantmore)
+ {
+
vector[3] = abs(nMessages);
lo = GetHashPosCounter(WCC->summ, At);
vector[3] = abs(nMessages);
lo = GetHashPosCounter(WCC->summ, At);
+ wantmore = GetNextHashPos(WCC->summ, At, &hklen, &key, &vMsg);
+ if (!wantmore)
+ break;
if (nMessages > 0) {
if (lo + nMessages >= nItems) {
hi = nItems - 1;
if (nMessages > 0) {
if (lo + nMessages >= nItems) {
hi = nItems - 1;
@@
-1155,7
+1160,6
@@
long DrawMessageDropdown(StrBuf *Selector, long maxmsgs, long startmsg, int nMes
hi = lo + nMessages;
}
}
hi = lo + nMessages;
}
}
- done = !GetNextHashPos(WCC->summ, At, &hklen, &key, &vMsg);
/*
* Bump these because although we're thinking in zero base, the user
/*
* Bump these because although we're thinking in zero base, the user