diff options
author | smatz <smatz@openttd.org> | 2009-05-22 15:23:47 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-22 15:23:47 +0000 |
commit | 10d1ef5447b94d17024dc0f4bdd1b7b017431a23 (patch) | |
tree | a9563d19933124547ccd3d6c0e53c44876bdc144 /src/toolbar_gui.cpp | |
parent | 62a7948af0ca9eb3b190a54918201e1075edcbbc (diff) | |
download | openttd-10d1ef5447b94d17024dc0f4bdd1b7b017431a23.tar.xz |
(svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r-- | src/toolbar_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index fffe40ad9..871ef6907 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1036,7 +1036,7 @@ struct MainToolbarWindow : Window { * Since enabled state is the default, just disable when needed */ this->SetWidgetsDisabledState(_local_company == COMPANY_SPECTATOR, TBN_RAILS, TBN_ROADS, TBN_WATER, TBN_AIR, TBN_LANDSCAPE, WIDGET_LIST_END); /* disable company list drop downs, if there are no companies */ - this->SetWidgetsDisabledState(ActiveCompanyCount() == TBN_PAUSE, TBN_STATIONS, TBN_FINANCES, TBN_TRAINS, TBN_ROADVEHS, TBN_SHIPS, TBN_AIRCRAFTS, WIDGET_LIST_END); + this->SetWidgetsDisabledState(Company::GetNumItems() == TBN_PAUSE, TBN_STATIONS, TBN_FINANCES, TBN_TRAINS, TBN_ROADVEHS, TBN_SHIPS, TBN_AIRCRAFTS, WIDGET_LIST_END); this->SetWidgetDisabledState(TBN_RAILS, !CanBuildVehicleInfrastructure(VEH_TRAIN)); this->SetWidgetDisabledState(TBN_AIR, !CanBuildVehicleInfrastructure(VEH_AIRCRAFT)); |