From 753b5724001079c3352d23a911488044884dcf5b Mon Sep 17 00:00:00 2001 From: belugas Date: Tue, 3 Oct 2006 02:08:15 +0000 Subject: (svn r6619) -Codechange: Use accessors for disabled_state. Another step toward merging XTDwidget. The only two files not converted (window.h and widget.c) will be done at the very last commit) --- station_gui.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'station_gui.c') diff --git a/station_gui.c b/station_gui.c index 4c4dad665..c687e5b2e 100644 --- a/station_gui.c +++ b/station_gui.c @@ -541,13 +541,11 @@ static void DrawStationViewWindow(Window *w) } SetVScrollCount(w, num); - w->disabled_state = st->owner == _local_player ? 0 : (1 << 9); - - if (!(st->facilities & FACIL_TRAIN)) SETBIT(w->disabled_state, 10); - if (!(st->facilities & FACIL_TRUCK_STOP) && - !(st->facilities & FACIL_BUS_STOP)) SETBIT(w->disabled_state, 11); - if (!(st->facilities & FACIL_AIRPORT)) SETBIT(w->disabled_state, 12); - if (!(st->facilities & FACIL_DOCK)) SETBIT(w->disabled_state, 13); + SetWindowWidgetDisabledState(w, 9, st->owner != _local_player); + SetWindowWidgetDisabledState(w, 10, !(st->facilities & FACIL_TRAIN)); + SetWindowWidgetDisabledState(w, 11, !(st->facilities & FACIL_TRUCK_STOP) && !(st->facilities & FACIL_BUS_STOP)); + SetWindowWidgetDisabledState(w, 12, !(st->facilities & FACIL_AIRPORT)); + SetWindowWidgetDisabledState(w, 13, !(st->facilities & FACIL_DOCK)); SetDParam(0, st->index); SetDParam(1, st->facilities); -- cgit v1.2.3-54-g00ecf