/************************************************************************** Callback from city name dialog for new city. **************************************************************************/ static void name_new_city_popup_callback(gpointer data, gint response, const char *input) { int idx = GPOINTER_TO_INT(data); switch (response) { case GTK_RESPONSE_OK: finish_city(index_to_tile(idx), input); break; case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_DELETE_EVENT: cancel_city(index_to_tile(idx)); break; } }
void cancel_city_at_unit(long unit) { struct unit* u = (struct unit*)unit; cancel_city(u->tile); }