for (ContentIterator iter = this->infos.Begin(); iter != this->infos.End(); iter++) delete *iter;
_network_content_client.RemoveCallback(this);
}
virtual void OnPaint()
@@ -452,7 +226,7 @@ public:
uint filesize = 0;
bool show_select_all = false;
bool show_select_update = false;
for (ContentIterator iter = this->infos.Begin(); iter != this->infos.End(); iter++) {
for (ConstContentIterator iter = _network_content_client.Begin(); iter != _network_content_client.End(); iter++) {
const ContentInfo *ci = *iter;
switch (ci->state) {
case ContentInfo::SELECTED:
@@ -480,7 +254,7 @@ public:
/* Fill the matrix with the information */
uint y = this->widget[NCLWW_MATRIX].top + 3;
int cnt = 0;
for (ContentIterator iter = this->infos.Get(this->vscroll.pos); iter != this->infos.End() && cnt < this->vscroll.cap; iter++, cnt++) {
for (ConstContentIterator iter = _network_content_client.Get(this->vscroll.pos); iter != _network_content_client.End() && cnt < this->vscroll.cap; iter++, cnt++) {
const ContentInfo *ci = *iter;
if (ci == this->selected) GfxFillRect(this->widget[NCLWW_CHECKBOX].left + 1, y - 2, this->widget[NCLWW_NAME].right - 1, y + 9, 10);
@@ -557,17 +331,14 @@ public:
ContentID cid = this->selected->dependencies[i];
/* Try to find the dependency */
ContentIterator iter = this->infos.Begin();
for (; iter != this->infos.End(); iter++) {
ConstContentIterator iter = _network_content_client.Begin();
for (; iter != _network_content_client.End(); iter++) {
const ContentInfo *ci = *iter;
if (ci->id != cid) continue;
p += seprintf(p, lastof(buf), p == buf ? "%s" : ", %s", (*iter)->name);
break;
}
/* We miss the dependency, but we'll only request it if not done before. */
if (iter == this->infos.End()) DownloadContentInfo(cid);
}
SetDParamStr(0, buf);
y += DrawStringMultiLine(this->widget[NCLWW_DETAILS].left + 5, y, STR_CONTENT_DETAIL_DEPENDENCIES, this->widget[NCLWW_DETAILS].right - this->widget[NCLWW_DETAILS].left - 5, max_y - y);
@@ -586,13 +357,13 @@ public:
if (this->selected->IsSelected()) {
/* When selected show all manually selected content that depends on this */