Project

General

Profile

Bug #1289 » 1289-gtk5.patch

Dean Brown, 04/16/2025 01:57 AM

View differences:

client/gui-gtk-5.0/citydlg.c
/******************** Callbacks for: Close, Prev, Next. *******************/
/***********************************************************************//**
User has clicked rename city-button
User has closed city dialog
***************************************************************************/
static void close_callback(GtkWidget *w, gpointer data)
{
......
}
/***********************************************************************//**
User has closed rename city dialog
User has closed city dialog
***************************************************************************/
static void city_destroy_callback(GtkWidget *w, gpointer data)
{
struct city_dialog *pdialog;
int width, height;
pdialog = (struct city_dialog *) data;
gtk_window_get_default_size (GTK_WINDOW(w), &width, &height);
pdialog = (struct city_dialog *) data;
gtk_widget_set_visible(pdialog->shell, FALSE);
if (game.info.citizen_nationality) {
......
/* Save size of the city dialog. */
GUI_GTK_OPTION(citydlg_xsize)
= CLIP(GUI_GTK5_CITYDLG_MIN_XSIZE,
gtk_widget_get_allocated_width(pdialog->shell),
width,
GUI_GTK5_CITYDLG_MAX_XSIZE);
GUI_GTK_OPTION(citydlg_ysize)
= CLIP(GUI_GTK5_CITYDLG_MIN_XSIZE,
gtk_widget_get_allocated_height(pdialog->shell),
GUI_GTK5_CITYDLG_MAX_XSIZE);
= CLIP(GUI_GTK5_CITYDLG_MIN_YSIZE,
height,
GUI_GTK5_CITYDLG_MAX_YSIZE);
last_page
= gtk_notebook_get_current_page(GTK_NOTEBOOK(pdialog->notebook));
(2-2/2)