Patch: Close airports

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

All right, thanks for the feedback. I didn't know there was a consensus that the Right Thing (tm) was to hide the button (no one cared to tell me :roll:). I'll make a patch that hides the button in the following days.
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

Here it is. The attached patch hides the 'close airport' button for airportless stations, instead of just disabling it.
Attachments
airport-close-v7-r14648.patch
(8.53 KiB) Downloaded 163 times
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

Rebased against r14876. The patch named 'v6' disables the 'close airport' button for airportless stations; the other one hides it instead.
Attachments
airport-close-v6-r14876.patch
This patch disables the close button if the station does not have an airport.
(10.1 KiB) Downloaded 131 times
airport-close-v7-r14876.patch
This patch hides the close button if the station does not have an airport.
(8.56 KiB) Downloaded 163 times
Chico008
Traffic Manager
Traffic Manager
Posts: 143
Joined: 05 Mar 2008 10:56
Location: France

Re: Patch: Close airports

Post by Chico008 »

Hi, have this error when i tried to compile.
(using V7 for the last trunk)
Attachments
Clipboard.jpg
Clipboard.jpg (38.41 KiB) Viewed 4716 times
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

Could you try this new version?

By the way, did the patch apply cleanly? Messages from patch saying 'HUNK FAILED' are clear indications that the patch is not likely to work...
Attachments
airport-close-v6-r15177.patch
(10.14 KiB) Downloaded 125 times
airport-close-v7-r15177.patch
(8.6 KiB) Downloaded 142 times
Chico008
Traffic Manager
Traffic Manager
Posts: 143
Joined: 05 Mar 2008 10:56
Location: France

Re: Patch: Close airports

Post by Chico008 »

tried with the new patch, but still same bug when compiling.

but this patch is not ok for Tortoise SVN, so i patched it hand made, with the power of copy/paste keys :p
(i already done this way with previous version of this patch, with no errors at compiling)

plus, i have a small question, what difference is there between v6 and v7
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Patch: Close airports

Post by Conditional Zenith »

Could you copy/paste rather than screenshot when posting compile errors please.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Patch: Close airports

Post by Yexo »

Chico008 wrote:plus, i have a small question, what difference is there between v6 and v7
Just read a few posts up:
cirdan wrote:The patch named 'v6' disables the 'close airport' button for airportless stations; the other one hides it instead.
Chico008
Traffic Manager
Traffic Manager
Posts: 143
Joined: 05 Mar 2008 10:56
Location: France

Re: Patch: Close airports

Post by Chico008 »

Conditional Zenith wrote:Could you copy/paste rather than screenshot when posting compile errors please.
i'd like to, but i can't copy paste from Cygwin.
i tried a "make > file.txt" but errors doesn't appears in the output file.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Patch: Close airports

Post by Conditional Zenith »

I see.

You can fix that by doing

Code: Select all

make > file.txt 2>&1
to get both output and errors into the file

Also, if you just want the errors in a file, then you can do

Code: Select all

make 2> file.txt
Chico008
Traffic Manager
Traffic Manager
Posts: 143
Joined: 05 Mar 2008 10:56
Location: France

Re: Patch: Close airports

Post by Chico008 »

thx, i'll try this.

so, got this error :

Code: Select all

make[1]: Entering directory `/cygdrive/f/compil_ttd/r14736/objs/lang'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cygdrive/f/compil_ttd/r14736/objs/lang'
make[1]: Entering directory `/cygdrive/f/compil_ttd/r14736/objs/release'
[SRC] Compiling station_gui.cpp
/cygdrive/f/compil_ttd/r14736/src/station_gui.cpp: In member function `virtual void StationViewWindow::OnClick(Point, int)':
/cygdrive/f/compil_ttd/r14736/src/station_gui.cpp:962: error: invalid conversion from `int' to `void (*)(bool, TileIndex, uint32, uint32)'
/cygdrive/f/compil_ttd/r14736/src/command_func.h:61: error: too few arguments to function `bool DoCommandP(TileIndex, uint32, uint32, void (*)(bool, TileIndex, uint32, uint32), uint32, bool)'
/cygdrive/f/compil_ttd/r14736/src/station_gui.cpp:962: error: at this point in file 
make[1]: *** [station_gui.o] Error 1
make[1]: Leaving directory `/cygdrive/f/compil_ttd/r14736/objs/release'
make: *** [all] Error 2
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: Close airports

Post by planetmaker »

Chico008 wrote:

Code: Select all

make[1]: Leaving directory `/cygdrive/f/compil_ttd/r14736/objs/release'
make: *** [all] Error 2
Your path information hints that you're using release r14736 while the latest patches are made for r15177. Is 15177 the trunk version which you tried to compile the patch for? For all other versions it might fail.
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Patch: Close airports

Post by sulai »

Hey guys,

I like this patch a lot, the only thing: the close airport button is way too large ;)
Maybe put a little "close" button next to the "rename" button?
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

I'd rather not make that decision myself. I think the position/size/shape of the button is a last-minute detail (it's trivial to change), so I'd rather let the devs decide on that, should the patch ever hit trunk.
Lord_BoNes
Engineer
Engineer
Posts: 3
Joined: 28 Feb 2009 04:09

Re: Patch: Close airports

Post by Lord_BoNes »

Just my 2 cents:
I think that the button shouldn't be a "close airport" button, but one of those flags that the vehicles use (just one flag that toggles red or green).
"To kill 1 is a tragedy... To kill 10,000,000 is a statistic."
- Joseph Stalin
User avatar
atalantino
Traffic Manager
Traffic Manager
Posts: 155
Joined: 01 Jan 2009 11:30

Re: Patch: Close airports

Post by atalantino »

Does this patch work for ottd 0.63?(sorry, I dont like the r###### thingys, I'm classic)
FORZA BERGAMASCA CALCIO ATALANTA
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Patch: Close airports

Post by Eddi »

look in the first post, there is a patch for 0.6.1, it should usually apply to 0.6.3, too.
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

Lord_BoNes wrote:Just my 2 cents:
I think that the button shouldn't be a "close airport" button, but one of those flags that the vehicles use (just one flag that toggles red or green).
Thanks for your suggestion. Unfortunately, the GUI seems to be the only part of this patch where an agreement hasn't been reached, ie, I haven't heard of anyone opposing the feature itself, but everyone appears to have their own idea of how it should look. As it is, I'm reluctant to introduce changes in the patch unless I have a clear indication that such a change would increase the probability of landing in trunk--periodically syncing the patch is already enough work.
atalantino wrote:Does this patch work for ottd 0.63?(sorry, I dont like the r###### thingys, I'm classic)
Eddi wrote:look in the first post, there is a patch for 0.6.1, it should usually apply to 0.6.3, too.
In fact, I stopped updating the patch for the 0.6.x series because the patch for 0.6.1 applies (possibly with some offsets) to 0.6.2 and 0.6.3 as well. Complain loudly if it doesn't. ;-)

While at it, here are updated versions against current trunk. I'm now using git for managing my patches, so you should apply them with -p1 instead of -p0.
Attachments
airport-close-v6-r15594.patch
(10.19 KiB) Downloaded 117 times
airport-close-v7-r15594.patch
(8.65 KiB) Downloaded 129 times
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: Close airports

Post by pavel1269 »

friendly update
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Close airports

Post by cirdan »

Updates against 0.7.0.
Attachments
airport-close-v6-0.7.0.patch
This patch disables the close button if the station does not have an airport.
(10.18 KiB) Downloaded 653 times
airport-close-v7-0.7.0.patch
This patch hides the close button if the station does not have an airport.
(8.64 KiB) Downloaded 646 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 16 guests