summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-11 14:56:21 +0000
committertron <tron@openttd.org>2006-06-11 14:56:21 +0000
commit88f9473c85661a3ca7a53d2d3d71efd2dc0b242b (patch)
tree7c1dccd5040688868c9052309c20a360153406e5
parent0f5453d95b9ba0105fa504be68b782dd0c8c5987 (diff)
downloadopenttd-88f9473c85661a3ca7a53d2d3d71efd2dc0b242b.tar.xz
(svn r5225) Some windows periodically check if their parent exists - if not they close themselves
This is unnecessary, because their parents already close them when they get closed Therefore remove the code for the periodic checks
-rw-r--r--aircraft_gui.c11
-rw-r--r--order_gui.c5
-rw-r--r--roadveh_gui.c11
-rw-r--r--ship_gui.c11
-rw-r--r--train_gui.c11
5 files changed, 0 insertions, 49 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index a76acd34f..204f5ad48 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -179,12 +179,6 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e)
}
break;
- case WE_4:
- if (w->window_number != 0 && !FindWindowById(WC_VEHICLE_DEPOT, w->window_number)) {
- DeleteWindow(w);
- }
- break;
-
case WE_ON_EDIT_TEXT: {
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
@@ -432,11 +426,6 @@ do_change_service_int:
}
} break;
- case WE_4:
- if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
- DeleteWindow(w);
- break;
-
case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
diff --git a/order_gui.c b/order_gui.c
index 21f151218..f8f895288 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -487,11 +487,6 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
}
} break;
- case WE_4: {
- if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
- DeleteWindow(w);
- } break;
-
case WE_PLACE_OBJ: {
OrdersPlaceObj(GetVehicle(w->window_number), e->place.tile, w);
} break;
diff --git a/roadveh_gui.c b/roadveh_gui.c
index 714215c46..5dd5cdcc1 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -256,11 +256,6 @@ do_change_service_int:
}
} break;
- case WE_4:
- if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
- DeleteWindow(w);
- break;
-
case WE_ON_EDIT_TEXT: {
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
@@ -561,12 +556,6 @@ static void NewRoadVehWndProc(Window *w, WindowEvent *e)
}
break;
- case WE_4:
- if (w->window_number != 0 && !FindWindowById(WC_VEHICLE_DEPOT, w->window_number)) {
- DeleteWindow(w);
- }
- break;
-
case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
diff --git a/ship_gui.c b/ship_gui.c
index 72873bd22..dd88b960b 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -251,11 +251,6 @@ do_change_service_int:
}
} break;
- case WE_4:
- if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
- DeleteWindow(w);
- break;
-
case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
@@ -394,12 +389,6 @@ static void NewShipWndProc(Window *w, WindowEvent *e)
}
break;
- case WE_4:
- if (w->window_number != 0 && !FindWindowById(WC_VEHICLE_DEPOT, w->window_number)) {
- DeleteWindow(w);
- }
- break;
-
case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
diff --git a/train_gui.c b/train_gui.c
index be6c147d9..0efc818c1 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -284,12 +284,6 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e)
}
} break;
- case WE_4:
- if (w->window_number != 0 && !FindWindowById(WC_VEHICLE_DEPOT, w->window_number)) {
- DeleteWindow(w);
- }
- break;
-
case WE_ON_EDIT_TEXT: {
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
@@ -1292,11 +1286,6 @@ do_change_service_int:
}
} break;
- case WE_4:
- if (FindWindowById(WC_VEHICLE_VIEW, w->window_number) == NULL)
- DeleteWindow(w);
- break;
-
case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;