client gui : Nation report : add many columns, gov, gold, research ...
The patch does not apply on S2_6, due to "player" type.
On S3_0 it does work (show the wanted informations in nation report) for the following clients :
Other clients does not compile or crash at startup or have not been tested. Other branches have not been tested.
I get some complaints about applying it.
chippo@chiphund:~/github/freeciv/S3_0/src$ git apply ~/Downloads/gtk3.22_F3_Nation_report__add_many_columns.patch /home/chippo/Downloads/gtk3.22_F3_Nation_report__add_many_columns.patch:26: trailing whitespace. /* 'contact' gives the knowledge of other's government */ /home/chippo/Downloads/gtk3.22_F3_Nation_report__add_many_columns.patch:27: trailing whitespace. if (me==them /home/chippo/Downloads/gtk3.22_F3_Nation_report__add_many_columns.patch:28: trailing whitespace. || player_has_embassy(me, them) /home/chippo/Downloads/gtk3.22_F3_Nation_report__add_many_columns.patch:102: trailing whitespace. /* 'contact' gives the knowledge of other's gold */ /home/chippo/Downloads/gtk3.22_F3_Nation_report__add_many_columns.patch:103: trailing whitespace. if (me==them warning: squelched 6 whitespace errors warning: 11 lines add whitespace errors.
It works for me in the QT client, and it's pretty sweet. You can even turn the columns on and off. Like the Cities page, it has it's own diabolical ideas about the best column widths and will quickly dispose of any changes that you make manually.
Reply To chippo
I get some complaints about applying it. {{{ chippo@chiphund:~/github/freeciv/S3_0/src$ git apply ~/Downloads/gtk3.22_F3_Nation_reportadd_many_columns.patch /home/chippo/Downloads/gtk3.22_F3_Nation_reportadd_many_columns.patch:26: trailing whitespace. ... warning: squelched 6 whitespace errors warning: 11 lines add whitespace errors. }}}
I ll fix trailing white spaces in next revision of the patch.
It works for me in the QT client, and it's pretty sweet. You can even turn the columns on and off. Like the Cities page, it has it's own diabolical ideas about the best column widths and will quickly dispose of any changes that you make manually.
Yes, it is like a kind of magic. I find amazing that it works so nicely for gtk and QT (and sdl2) . :-)
Currently i try to factorise the code, which is mostly 6x copy/paste (but i was a fortran programmer , not a C one ... )
- Read doc/CodingStyle
- Most player_has_embassy() calls should probably be replaced by team_has_embassy() as team members automatically share information between them, starting from S3_0.
I wannu vote for this patch to go into mainline.
To me it's very useful and every time I'm forced to do a 'git reset --hard' (because some other patch I'm testing has made it in), I painfully forget to apply this one, only to miss it later.
It works (at least) in gtk and qt guis. If configured appropriately, it doesn't change anything. It's so useful if you, at a glance, want to see what the AIs are up to.
Reply To chippo
I wannu vote for this patch to go into mainline.
When alain has followed cazfi's coding style advice.
I have not looked the patch in detail yet. Waiting for the known issues to get fixed first. But I assume that it will get to S3_1 & master only (at least for d3f reasons).
Reply To chippo
To me it's very useful and every time I'm forced to do a 'git reset --hard' (because some other patch I'm testing has made it in)
Maybe I should write a tutorial about how I handle my stack of 40 - 60 patches.
Reply To cazfi
Maybe I should write a tutorial about how I handle my stack of 40 - 60 patches.
Maybe there is a way to tell git, "Please do a 'git pull' and if any of the patches/updates are already in my worktree, consider that OK", 'cos that's my usual problem - I'm running a test patch and it gets accepted.
The last column in your patch, should (in English) say 'Researching'. You've got 'Science' twice (again, in English - dunno what it says in French).
- Read doc/CodingStyle, and adjust the style accordingly
- In later branches you should use team_has_embassy() instead of player_has_embassy()
Reply To cazfi
- Read doc/CodingStyle, and adjust the style accordingly
- In later branches you should use team_has_embassy() instead of player_has_embassy()
If there's no activity before we get 3.0.1 out of the way, I assume there's no new version coming, and will steal this to myself to get it handled in 3.0.2 cycle.
This changes client settings file contents. Can't have in S3_0. For S3_1 I'd still want to include this (despite that meaning that we go from zero d3f things left to implement back to active implementation). From the file format change point of view this is a small and relatively safe change.
I should have a new version of this ready tonight.
- Coding Style refresh
- Provide proper function headers for doxygen to process
- Use team_has_embassy() instead of player_has_embassy(), for showing information shared by team members
- Handle global observers
- Refactored functions to write the output buffer just once instead of overwriting it in consecutive "if {} if {}" -blocks. I think this fixed some bugs where the buffer got overwritten even when it should have not. Hopefully did not add too many new bugs in the logic changes.
- Do not try to show current research when have only contact - it's not known at that situation
- Renamed current research column as "Research" to avoid having two "Science" columns
S3_0 , gui-gtk3.22
This patch add columns in the Nation report (F3 in gtk3 and QT clients)
Maybe the code could/should be moved/splitted elsewhere, but i believe it is an honest starting point