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

closed

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

Added by John Robertson over 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:

Files


Related issues

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

Actions
Actions #1

Updated by John Robertson over 4 years 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.

Actions #3

Updated by Zoltán Žarkov over 4 years 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?

Actions #4

Updated by John Robertson over 4 years 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.

Actions #5

Updated by John Robertson over 4 years ago

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

Actions #6

Updated by John Robertson over 4 years ago

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

Actions #7

Updated by Marko Lindqvist over 4 years 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?

Actions #8

Updated by John Robertson over 4 years 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.

Actions #9

Updated by John Robertson over 4 years 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 */
};
Actions #10

Updated by Marko Lindqvist over 4 years 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

Actions #11

Updated by John Robertson over 4 years 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
Actions #12

Updated by Marko Lindqvist over 4 years ago

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

Updated by Marko Lindqvist over 4 years 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.

Actions #14

Updated by John Robertson over 4 years 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.

Actions #17

Updated by Marko Lindqvist over 4 years ago

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

Actions #18

Updated by Marko Lindqvist over 4 years ago

  • Status changed from Resolved to Closed
Actions #20

Updated by Marko Lindqvist about 4 years 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