Bug #1578 » 0081-gtk4-x-Fix-goto-dialog-Show-All-Cities-toggle.patch
client/gui-gtk-4.0/gotodlg.c | ||
---|---|---|
struct tile *original_tile;
|
||
static bool gotodlg_updating = FALSE;
|
||
static void update_goto_dialog(GtkToggleButton *button);
|
||
static void update_goto_dialog(GtkCheckButton *button);
|
||
static void update_source_label(void);
|
||
static void refresh_airlift_column(void);
|
||
static void refresh_airlift_button(void);
|
||
... | ... | |
original_tile = get_center_tile_mapcanvas();
|
||
update_source_label();
|
||
update_goto_dialog(GTK_TOGGLE_BUTTON(all_toggle));
|
||
update_goto_dialog(GTK_CHECK_BUTTON(all_toggle));
|
||
gtk_tree_view_focus(GTK_TREE_VIEW(view));
|
||
}
|
||
... | ... | |
/**********************************************************************//**
|
||
Refresh city list (in response to "all cities" checkbox changing).
|
||
**************************************************************************/
|
||
static void update_goto_dialog(GtkToggleButton *button)
|
||
static void update_goto_dialog(GtkCheckButton *button)
|
||
{
|
||
bool nonempty = FALSE;
|
||
... | ... | |
gtk_list_store_clear(goto_list_store);
|
||
if (gtk_toggle_button_get_active(button)) {
|
||
if (gtk_check_button_get_active(button)) {
|
||
players_iterate(pplayer) {
|
||
nonempty |= list_store_append_player_cities(goto_list_store, pplayer);
|
||
} players_iterate_end;
|
client/gui-gtk-5.0/gotodlg.c | ||
---|---|---|
struct tile *original_tile;
|
||
static bool gotodlg_updating = FALSE;
|
||
static void update_goto_dialog(GtkToggleButton *button);
|
||
static void update_goto_dialog(GtkCheckButton *button);
|
||
static void update_source_label(void);
|
||
static void refresh_airlift_column(void);
|
||
static void refresh_airlift_button(void);
|
||
... | ... | |
original_tile = get_center_tile_mapcanvas();
|
||
update_source_label();
|
||
update_goto_dialog(GTK_TOGGLE_BUTTON(all_toggle));
|
||
update_goto_dialog(GTK_CHECK_BUTTON(all_toggle));
|
||
gtk_tree_view_focus(GTK_TREE_VIEW(view));
|
||
}
|
||
... | ... | |
/**********************************************************************//**
|
||
Refresh city list (in response to "all cities" checkbox changing).
|
||
**************************************************************************/
|
||
static void update_goto_dialog(GtkToggleButton *button)
|
||
static void update_goto_dialog(GtkCheckButton *button)
|
||
{
|
||
bool nonempty = FALSE;
|
||
... | ... | |
gtk_list_store_clear(goto_list_store);
|
||
if (gtk_toggle_button_get_active(button)) {
|
||
if (gtk_check_button_get_active(button)) {
|
||
players_iterate(pplayer) {
|
||
nonempty |= list_store_append_player_cities(goto_list_store, pplayer);
|
||
} players_iterate_end;
|