Actions
Bug #1289
openGTK client remember size of the city dlog
Status:
New
Priority:
Normal
Assignee:
-
Category:
gtk3.22-client
Target version:
-
Start date:
04/06/2025
Due date:
% Done:
0%
Estimated time:
Description
Similar to #1287 & #1288, there is already code to do this, but it is not working.
In file client/gui-gtk-3.22/citydlg.c , routine create_city_dialog(), this code -
/* Restore size of the city dialog. */
gtk_window_set_default_size(GTK_WINDOW(pdialog->shell),
GUI_GTK_OPTION(citydlg_xsize),
GUI_GTK_OPTION(citydlg_ysize));
does nothing. Changing the width/height param values or leaving out the call altogether makes no difference to size of the dialog. In the routine city_destroy_callback(), this code -
/* Save size of the city dialog. */
GUI_GTK_OPTION(citydlg_xsize)
= CLIP(GUI_GTK3_22_CITYDLG_MIN_XSIZE,
gtk_widget_get_allocated_width(pdialog->shell),
GUI_GTK3_22_CITYDLG_MAX_XSIZE);
GUI_GTK_OPTION(citydlg_ysize)
= CLIP(GUI_GTK3_22_CITYDLG_MIN_XSIZE,
gtk_widget_get_allocated_height(pdialog->shell),
GUI_GTK3_22_CITYDLG_MAX_XSIZE);
the gtk_widget_get_allocated_xxx() both always return 1. And the CLIP for the height has typos XSIZE should be YSIZE.
Files
Actions