|
@@ -1123,17 +1123,15 @@ struct NewGRFWindow : public Window, New
|
|
|
|
|
|
case WID_NS_CONTENT_DOWNLOAD:
|
|
|
case WID_NS_CONTENT_DOWNLOAD2:
|
|
|
if (!_network_available) {
|
|
|
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
|
|
|
} else {
|
|
|
#if defined(ENABLE_NETWORK)
|
|
|
this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window
|
|
|
|
|
|
ShowMissingContentWindow(this->actives);
|
|
|
#endif
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
case WID_NS_RESCAN_FILES:
|
|
|
case WID_NS_RESCAN_FILES2:
|
|
|
ScanNewGRFFiles(this);
|
|
@@ -1540,13 +1538,12 @@ private:
|
|
|
this->avails.ForceRebuild();
|
|
|
this->InvalidateData(GOID_NEWGRF_LIST_EDITED);
|
|
|
return true;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
#if defined(ENABLE_NETWORK)
|
|
|
/**
|
|
|
* Show the content list window with all missing grfs from the given list.
|
|
|
* @param list The list of grfs to check for missing / not exactly matching ones.
|
|
|
*/
|
|
|
void ShowMissingContentWindow(const GRFConfig *list)
|
|
|
{
|
|
@@ -1562,13 +1559,12 @@ void ShowMissingContentWindow(const GRFC
|
|
|
ci->unique_id = BSWAP32(c->ident.grfid);
|
|
|
memcpy(ci->md5sum, HasBit(c->flags, GCF_COMPATIBLE) ? c->original_md5sum : c->ident.md5sum, sizeof(ci->md5sum));
|
|
|
*cv.Append() = ci;
|
|
|
}
|
|
|
ShowNetworkContentListWindow(cv.Length() == 0 ? NULL : &cv, CONTENT_TYPE_NEWGRF);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
Listing NewGRFWindow::last_sorting = {false, 0};
|
|
|
Filtering NewGRFWindow::last_filtering = {false, 0};
|
|
|
|
|
|
NewGRFWindow::GUIGRFConfigList::SortFunction * const NewGRFWindow::sorter_funcs[] = {
|
|
|
&NameSorter,
|