1
0
Fork 0

(svn r20092) [1.0] -Backport from trunk:

- Fix: Do not close the sort dropdown in the (original) vehicle list when there are no vehicles. That code is meant for the "actions" dropdown [FS#3881] (r20014)
- Fix: When joining a company with a password you could only enter 20 characters of the password (r20012)
- Fix: Sign sorting was unstable [FS#3893] (r20009)
- Fix: Trains should also have running cost while slowing down for stop (r20006)
- Fix: [NewGRF] Stringcodes 82, 83 and 84 were not properly converted to openttd codes so they did not work (r20004)
release/1.0
rubidium 2010-07-08 19:44:00 +00:00
parent 8ed3cde783
commit 82450356fd
6 changed files with 10 additions and 6 deletions

View File

@ -1984,7 +1984,7 @@ struct CompanyWindow : Window
MarkWholeScreenDirty(); MarkWholeScreenDirty();
} else if (NetworkCompanyIsPassworded(company)) { } else if (NetworkCompanyIsPassworded(company)) {
/* ask for the password */ /* ask for the password */
ShowQueryString(STR_EMPTY, STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION, 20, 180, this, CS_ALPHANUMERAL, QSF_NONE); ShowQueryString(STR_EMPTY, STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION, NETWORK_PASSWORD_LENGTH, 180, this, CS_ALPHANUMERAL, QSF_NONE);
} else { } else {
/* just send the join command */ /* just send the join command */
NetworkClientRequestMove(company); NetworkClientRequestMove(company);

View File

@ -2259,7 +2259,7 @@ void ShowNetworkNeedPassword(NetworkPasswordType npt)
case NETWORK_GAME_PASSWORD: caption = STR_NETWORK_NEED_GAME_PASSWORD_CAPTION; break; case NETWORK_GAME_PASSWORD: caption = STR_NETWORK_NEED_GAME_PASSWORD_CAPTION; break;
case NETWORK_COMPANY_PASSWORD: caption = STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION; break; case NETWORK_COMPANY_PASSWORD: caption = STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION; break;
} }
ShowQueryString(STR_EMPTY, caption, 20, 180, w, CS_ALPHANUMERAL, QSF_NONE); ShowQueryString(STR_EMPTY, caption, NETWORK_PASSWORD_LENGTH, 180, w, CS_ALPHANUMERAL, QSF_NONE);
} }

View File

@ -245,7 +245,7 @@ char *TranslateTTDPatchCodes(uint32 grfid, const char *str)
} }
case 0x82: case 0x82:
case 0x83: case 0x83:
case 0x84: d += Utf8Encode(d, SCC_NEWGRF_PRINT_WORD_SPEED + c - 0x82); break; case 0x84: d += Utf8Encode(d, SCC_NEWGRF_PRINT_DATE + c - 0x82); break;
case 0x85: d += Utf8Encode(d, SCC_NEWGRF_DISCARD_WORD); break; case 0x85: d += Utf8Encode(d, SCC_NEWGRF_DISCARD_WORD); break;
case 0x86: d += Utf8Encode(d, SCC_NEWGRF_ROTATE_TOP_4_WORDS); break; case 0x86: d += Utf8Encode(d, SCC_NEWGRF_ROTATE_TOP_4_WORDS); break;
case 0x87: d += Utf8Encode(d, SCC_NEWGRF_PRINT_WORD_LITRES); break; case 0x87: d += Utf8Encode(d, SCC_NEWGRF_PRINT_WORD_LITRES); break;

View File

@ -65,7 +65,9 @@ struct SignList {
GetString(buf_cache, STR_SIGN_NAME, lastof(buf_cache)); GetString(buf_cache, STR_SIGN_NAME, lastof(buf_cache));
} }
return strcasecmp(buf, buf_cache); int r = strcasecmp(buf, buf_cache);
return r != 0 ? r : ((*a)->index - (*b)->index);
} }
void SortSignsList() void SortSignsList()

View File

@ -4080,7 +4080,7 @@ bool Train::Tick()
this->tick_counter++; this->tick_counter++;
if (this->IsFrontEngine()) { if (this->IsFrontEngine()) {
if (!(this->vehstatus & VS_STOPPED)) this->running_ticks++; if (!(this->vehstatus & VS_STOPPED) || this->cur_speed > 0) this->running_ticks++;
this->current_order_time++; this->current_order_time++;

View File

@ -1087,7 +1087,9 @@ public:
this->BuildVehicleList(this->owner, GB(this->window_number, 16, 16), window_type); this->BuildVehicleList(this->owner, GB(this->window_number, 16, 16), window_type);
this->SortVehicleList(); this->SortVehicleList();
if (this->vehicles.Length() == 0) HideDropDownMenu(this); if (this->vehicles.Length() == 0 && this->IsWidgetLowered(VLW_WIDGET_MANAGE_VEHICLES_DROPDOWN)) {
HideDropDownMenu(this);
}
/* Hide the widgets that we will not use in this window /* Hide the widgets that we will not use in this window
* Some windows contains actions only fit for the owner */ * Some windows contains actions only fit for the owner */