Ticket #117691

GTK4: counters/city dialog

Open Date: 2024-05-24 00:43 Last Update: 2024-08-16 00:02

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
5

Details

Related to: https://osdn.net/projects/freeciv/ticket/47887 . This ticket is similar to above, but addressed to implement counters' tab in city dialog for GTK+-4 client.

Ticket History (3/23 Histories)

2024-05-24 00:43 Updated by: lachu
  • New Ticket "GTK4: counters/city dialog" created
2024-05-24 00:46 Updated by: lachu
  • File 0001-OSDN-117691-S-awomir-Lach-nintyfan19-gmail.com.patch (File ID: 13766) is attached
2024-05-24 00:47 Updated by: lachu
  • File 0001-OSDN-117691-S-awomir-Lach-nintyfan19-gmail.com.patch (File ID: 13766) is deleted
2024-05-24 00:50 Updated by: lachu
Comment
0001-OSDN-117691-S-awomir-Lach-nintyfan19-gmail.com.patch(7KB)
Implementation for GTK4

Probably done. It is tested in simple way. Implementation is very similar to GTK3, but makes thinks compiles without warnings/errors and other minor changes was made.

2024-05-25 02:33 Updated by: cazfi
  • Component Update from Gtk-next (gtk4x/gtk5) to Gtk4-client
2024-05-25 02:42 Updated by: cazfi
  • Owner Update from cazfi to (None)
  • Milestone Update from (None) to 3.2.0
  • Priority Update from 3 to 5 - Medium
Comment

- Separate patch is needed for S3_2. This didn't apply there.

- I created a new version of main patch where the same change is applied also to client/gui-gtk-5.0

2024-05-26 18:44 Updated by: lachu
  • File 0001-OSDN-117691-Slawomir-Lach-nintyfan19-gmail.com.patch (File ID: 13770) is attached
2024-05-26 18:44 Updated by: lachu
  • File 0001-OSDN-117691-Slawomir-Lach-nintyfan19-gmail.com.patch (File ID: 13770) is deleted
2024-05-26 18:45 Updated by: lachu
Comment

Reply To cazfi

- Separate patch is needed for S3_2. This didn't apply there. - I created a new version of main patch where the same change is applied also to client/gui-gtk-5.0

0001-OSDN-117691-Slawomir-Lach-nintyfan19-gmail.com.patch(7KB)

S3.2 branch/without gtk5, since it is missing on branch
(Edited, 2024-05-26 18:46 Updated by: lachu)
2024-05-30 21:57 Updated by: cazfi
Comment

Comparing your main branch patch to S3_2 one, there's a couple of suspicious differences:

    city_dialog_update_building(pdialog);
-   city_dialog_update_improvement_list(pdialog);
-   city_dialog_update_supported_units(pdialog);
-   city_dialog_update_present_units(pdialog);
-+  city_dialog_update_counters(pdialog);
- 
-   if (!client_has_player() || city_owner(pcity) == client_player()) {
-     bool have_present_units = (unit_list_size(pcity->tile->units) > 0);
      N_("Overview page"),
      N_("Production page"),
-+    N_("Counters Page"),
      N_("Happiness page"),
++    N_("Counters Page"),
      N_("Governor page"),
      N_("This Settings page"),
2024-06-04 03:25 Updated by: lachu
  • File 0001-OSDN-117691-S-awomir-Lach-nintyfan19-gmail.com.patch (File ID: 13777) is attached
2024-06-04 03:26 Updated by: lachu
  • File 0001-OSDN-117691-S-awomir-Lach-nintyfan19-gmail.com.patch (File ID: 13777) is deleted
2024-06-04 03:27 Updated by: lachu
Comment

Reply To cazfi

Comparing your main branch patch to S3_2 one, there's a couple of suspicious differences: {{{ city_dialog_update_building(pdialog); - city_dialog_update_improvement_list(pdialog); - city_dialog_update_supported_units(pdialog); - city_dialog_update_present_units(pdialog); -+ city_dialog_update_counters(pdialog); - - if (!client_has_player() || city_owner(pcity) == client_player()) { - bool have_present_units = (unit_list_size(pcity->tile->units) > 0); }}} {{{ N_("Overview page"), N_("Production page"), -+ N_("Counters Page"), N_("Happiness page"), ++ N_("Counters Page"), N_("Governor page"), N_("This Settings page"), }}}

0001-OSDN-117691-S-awomir-Lach-nintyfan19-gmail.com.patch(7KB)
Remove differences with 3.2 branch (use for main branch)
2024-06-06 08:51 Updated by: cazfi
Comment

gtk4x-client (gui-gtk-5.0) part missing from the new main branch version.

Likely you can just use 'patch' with appropriate -p (i.e. '-p3') to apply current patch to client/gui-gtk-5.0, and then combine the result with the gtk4-client part.

2024-06-15 19:51 Updated by: lachu
Comment

I've got from client: ** Gsk:ERROR:../gsk/gl/gskglcommandqueue.c:599:gsk_gl_command_queue_begin_draw: assertion failed: (height <= G_MAXUINT16) Bail out! Gsk:ERROR:../gsk/gl/gskglcommandqueue.c:599:gsk_gl_command_queue_begin_draw: assertion failed: (height <= G_MAXUINT16)

Put entire log somewhere?

I do not commit changes made by patch, do stash, build again and the same error.

2024-08-11 15:56 Updated by: cazfi
Comment

Reply To cazfi

gtk4x-client (gui-gtk-5.0) part missing from the new main branch version. Likely you can just use 'patch' with appropriate -p (i.e. '-p3') to apply current patch to client/gui-gtk-5.0, and then combine the result with the gtk4-client part.

I did just that. Full patch attached.

2024-08-11 15:57 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2024-08-16 00:02 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Attachment File List

Edit

Please login to add comment to this ticket » Login