summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-01-17 17:35:59 +0000
committerfrosch <frosch@openttd.org>2008-01-17 17:35:59 +0000
commit35f342184294ffba039afbdec759d74e0c52027a (patch)
tree7d1289e80fd9d4f17ba3f5d7f2900125bd64cc32 /src
parentc579bffed24d639357fe98a78da5f338f6e514e5 (diff)
downloadopenttd-35f342184294ffba039afbdec759d74e0c52027a.tar.xz
(svn r11899) -Cleanup: Remove ShowReplaceVehicleWindow() as it is basically a duplicate of ShowReplaceGroupVehicleWindow().
Diffstat (limited to 'src')
-rw-r--r--src/autoreplace_gui.cpp32
-rw-r--r--src/autoreplace_gui.h1
-rw-r--r--src/vehicle_gui.cpp2
3 files changed, 1 insertions, 34 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 1160c074d..8d835ea38 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -506,38 +506,6 @@ static const WindowDesc _replace_ship_aircraft_vehicle_desc = {
};
-void ShowReplaceVehicleWindow(VehicleType vehicletype)
-{
- Window *w;
-
- DeleteWindowById(WC_REPLACE_VEHICLE, vehicletype);
-
- switch (vehicletype) {
- case VEH_TRAIN:
- w = AllocateWindowDescFront(&_replace_rail_vehicle_desc, vehicletype);
- w->vscroll.cap = 8;
- w->resize.step_height = 14;
- WP(w, replaceveh_d).wagon_btnstate = true;
- break;
- case VEH_ROAD:
- w = AllocateWindowDescFront(&_replace_road_vehicle_desc, vehicletype);
- w->vscroll.cap = 8;
- w->resize.step_height = 14;
- break;
- case VEH_SHIP:
- case VEH_AIRCRAFT:
- w = AllocateWindowDescFront(&_replace_ship_aircraft_vehicle_desc, vehicletype);
- w->vscroll.cap = 4;
- w->resize.step_height = 24;
- break;
- default: return;
- }
-
- w->caption_color = _local_player;
- w->vscroll2.cap = w->vscroll.cap; // these two are always the same
- WP(w, replaceveh_d).sel_group = DEFAULT_GROUP;
- }
-
void ShowReplaceGroupVehicleWindow(GroupID id_g, VehicleType vehicletype)
{
Window *w;
diff --git a/src/autoreplace_gui.h b/src/autoreplace_gui.h
index f34a4cd5e..1d2b05582 100644
--- a/src/autoreplace_gui.h
+++ b/src/autoreplace_gui.h
@@ -13,7 +13,6 @@
*/
void AddRemoveEngineFromAutoreplaceAndBuildWindows(VehicleType type);
void InvalidateAutoreplaceWindow(EngineID e, GroupID id_g);
-void ShowReplaceVehicleWindow(VehicleType vehicletype);
void ShowReplaceGroupVehicleWindow(GroupID group, VehicleType veh);
#endif /* AUTOREPLACE_GUI_H */
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index f90a06c48..5a94394d1 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1125,7 +1125,7 @@ void PlayerVehWndProc(Window *w, WindowEvent *e)
switch (e->we.dropdown.index) {
case 0: /* Replace window */
- ShowReplaceVehicleWindow(vl->vehicle_type);
+ ShowReplaceGroupVehicleWindow(DEFAULT_GROUP, vl->vehicle_type);
break;
case 1: /* Send for servicing */
DoCommandP(0, GB(w->window_number, 16, 16) /* StationID or OrderID (depending on VLW) */,