Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #872815

Add the city's size to the Info Panel of the City dialog.

Added by John Robertson over 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Category:
gui-gtk-3.22
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:

872815-CitySizeInInfoPanel.patch (12.9 KB) 872815-CitySizeInInfoPanel.patch John Robertson, 2020-05-11 11:48 PM
872815-CitySizeInInfoPanel-S2_6-gtk3.x.patch (20 KB) 872815-CitySizeInInfoPanel-S2_6-gtk3.x.patch gtk3.0 and gtk3.22 patch file for S2_6 John Robertson, 2020-05-13 02:27 AM
872815-CitySizeInInfoPanel-3.2.0-gtk3.x.patch (21.6 KB) 872815-CitySizeInInfoPanel-3.2.0-gtk3.x.patch gtk3.0 and gtk3.22 patch file for 3.2.0 John Robertson, 2020-05-13 03:58 AM
872815-CitySizeInInfoPanel-master(3.0.92.1-dev)-gtk3-4.patch (38.5 KB) 872815-CitySizeInInfoPanel-master(3.0.92.1-dev)-gtk3-4.patch gtk3-4 from 'master' branch John Robertson, 2020-05-20 02:40 AM
872815-CitySizeInInfoPanel-S2_6(2.6.2+)-gtk3.x.patch (24.3 KB) 872815-CitySizeInInfoPanel-S2_6(2.6.2+)-gtk3.x.patch gtk3.0 and gtk3.22 patch file for S2_6(2.6.2+) John Robertson, 2020-05-20 04:01 AM
0011-Gtk-Add-the-city-s-size-to-the-Info-Panel-of-the-Cit.patch (24.8 KB) 0011-Gtk-Add-the-city-s-size-to-the-Info-Panel-of-the-Cit.patch S3_0, S2_6 Marko Lindqvist, 2020-05-20 06:17 AM
872815[gui-qt]-added-population-and-specialists-to-city-info-pannel.patch (11.1 KB) 872815[gui-qt]-added-population-and-specialists-to-city-info-pannel.patch John Robertson, 2020-11-30 03:10 AM

Related issues

Related to Freeciv - Feature #697693: Tooltip for citizen bar showing numeric city size, number of happy/unhappy/etc citizens, etcNew

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by John Robertson over 1 year ago

Keyed all array indexes off of the first declared enum `enum { FIELD_...`. and removed the redundant enum for the FIELD_xxx indexes.

Replaced hard coded indexes with enumerations (e.g. `case 2:` with `case FIELD_TRADE:`).

Expanded the NUM_INFO_FIELDS define by one and added FIELD_SIZE to the fields enumeration.

Added expressions and margins for the City Size field on the Info Panel of the City Dialog.

#3 Updated by Zoltán Žarkov over 1 year ago

  • Category changed from Client to gui-gtk-3.22

It looks like there is nothing preventing this from going into 2.6, do you want to make a similar patch for that?

#4 Updated by John Robertson over 1 year ago

I have ported the changes, but need to set up the 2.6 build environment to proof them. A similar case could be made for a port to the other graphic clients.

#5 Updated by John Robertson over 1 year ago

Added .patch file for 2.6, both gtk3.0 and gtk3.22

#6 Updated by John Robertson over 1 year ago

Combined gtk-3.0 with gtk-3.22 in 3.2.0 patch.

#7 Updated by Marko Lindqvist over 1 year ago

Sorry I've not found time to look at this yet. A quick note meanwhile; the obvious question is how much screen real estate this takes on various setups. There's an existing feature request (will search for its number later, if you don't yourself earlier) about showing information like this in a tooltip on where citizen icons are. Maybe it would be better to implement that?

#8 Updated by John Robertson over 1 year ago

Marko Lindqvist wrote:

feature request ... about showing [city size] information like this in a tooltip on where citizen icons are.

Whether you take the FIELD_SIZE portions or not, you should consolidate the usage of the array indexes from the two enums and hard numbers into the single enumeration.

#9 Updated by John Robertson over 1 year ago

Would the following be going too far?

#define NUM_INFO_FIELDS 16 /* number of fields in city_info */

enum { FIELD_SIZE, FIELD_FOOD, FIELD_SHIELD, FIELD_TRADE, FIELD_GOLD,
       FIELD_LUXURY, FIELD_SCIENCE, FIELD_GRANARY, FIELD_GROWTH,
       FIELD_CORRUPTION, FIELD_WASTE, FIELD_CULTURE, FIELD_POLLUTION,
       FIELD_ILLNESS, FIELD_STEAL, FIELD_AIRLIFT,
    NUM_INFO_FIELDS, /* number of fields in city_info */
};

or even renaming the FIELD_ enumerations throughout

enum { INFO_SIZE, INFO_FOOD, INFO_SHIELD, INFO_TRADE, INFO_GOLD,
       INFO_LUXURY, INFO_SCIENCE, INFO_GRANARY, INFO_GROWTH,
       INFO_CORRUPTION, INFO_WASTE, INFO_CULTURE, INFO_POLLUTION,
       INFO_ILLNESS, INFO_STEAL, INFO_AIRLIFT,
       NUM_INFO_FIELDS /* number of fields in city_info */
};

#10 Updated by Marko Lindqvist over 1 year ago

Marko Lindqvist wrote:

There's an existing feature request (will search for its number later, if you don't yourself earlier) about showing information like this in a tooltip on where citizen icons are. Maybe it would be better to implement that?

The request is Feature #697693

#11 Updated by John Robertson over 1 year ago

In 3.0.92, where the population can exceed 70, the whole citizen bar becomes unusable. At around 28 the specialists start being cropped out of view and can no longer be toggled. More than a tool-tip is required, the whole citizen bar needs to be redesigned. E.g.:

  • collapsing longer runs of graphic icons with ellipses (HH...25...HHNNNEES)
  • encoding the citizens numerically (52 - 25H, 15N, 5E, 7S)
  • scrolling the citizens display area ([<]HHHHHHHNNNNE[>])
  • crop the beginning instead of the end (...NNNNEEESSSS)
  • overflow to multiple lines

#12 Updated by Marko Lindqvist over 1 year ago

  • Related to Feature #697693: Tooltip for citizen bar showing numeric city size, number of happy/unhappy/etc citizens, etc added

#13 Updated by Marko Lindqvist over 1 year ago

  • Sprint/Milestone changed from 3.2.0 to 2.6.3

John Robertson wrote:

Would the following be going too far?

#define NUM_INFO_FIELDS 16 /* number of fields in city_info */

[...]

or even renaming the FIELD_ enumerations throughout

[...]

That's what I was about to suggest after reading the patch.
Master version should change gui-gtk-4.0 too. Don't worry if you can't test compile of that. I'll test that it compiles before pushing the patch.

#14 Updated by John Robertson over 1 year ago

Certainly, I'll remaster the patches for the 'S2_6' and 'master' branches to include gtk3, gtk3.22, and gtk4.

To avoid confusion, could you remove the previous patches? I do not have a gtk4 environment, and so will be relying upon you for the proof of that patch.

#17 Updated by Marko Lindqvist over 1 year ago

S3_0/S2_6 version with end-of-line space removed

#18 Updated by Marko Lindqvist over 1 year ago

  • Status changed from Resolved to Closed

#20 Updated by Marko Lindqvist 11 months ago

John Robertson wrote:

Added patch for `gui-qt`

Opened a new ticket - Feature #901393 - as this ticket has been closed for some time already.

Also available in: Atom PDF