Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-gtk-3.0/gotodlg.c File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Enumerations | Functions | Variables
gotodlg.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <gtk/gtk.h>`
`#include <gdk/gdkkeysyms.h>`
`#include "astring.h"`
`#include "fcintl.h"`
`#include "log.h"`
`#include "support.h"`
`#include "game.h"`
`#include "map.h"`
`#include "packets.h"`
`#include "player.h"`
`#include "unit.h"`
`#include "unitlist.h"`
`#include "client_main.h"`
`#include "control.h"`
`#include "goto.h"`
`#include "options.h"`
`#include "text.h"`
`#include "plrdlg.h"`
`#include "dialogs.h"`
`#include "gui_main.h"`
`#include "gui_stuff.h"`
`#include "mapview.h"`
`#include "gotodlg.h"`

Go to the source code of this file.

## Enumerations

enum | { CMD_AIRLIFT = 1 , CMD_GOTO }
enum | { GD_COL_CITY_ID = 0 , GD_COL_CITY_NAME , GD_COL_FLAG , GD_COL_NATION , GD_COL_AIRLIFT , GD_COL_NUM }

## Functions

static void | update_goto_dialog (GtkToggleButton *button)
static void | update_source_label (void)
static void | refresh_airlift_column (void)
static void | refresh_airlift_button (void)
static void | goto_selection_callback (GtkTreeSelection *selection, gpointer data)
static struct city * | get_selected_city (void)
static void | goto_cmd_callback (GtkWidget *dlg, gint arg)
static void | create_goto_dialog (void)
void | popup_goto_dialog (void)
static bool | list_store_append_player_cities (GtkListStore *store, const struct player *pplayer)
void | goto_dialog_focus_units_changed (void)

## Variables

static GtkWidget * | dshell = NULL
static GtkWidget * | view
static GtkWidget * | source
static GtkWidget * | all_toggle
static GtkListStore * | goto_list_store
static GtkTreeSelection * | goto_list_selection
struct tile * | original_tile
static bool | gotodlg_updating = FALSE

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
CMD_AIRLIFT |
CMD_GOTO |

Definition at line 73 of file gotodlg.c.

## ◆ anonymous enum

anonymous enum

Enumerator
GD_COL_CITY_ID |
GD_COL_CITY_NAME |
GD_COL_FLAG |
GD_COL_NATION |
GD_COL_AIRLIFT |
GD_COL_NUM |

Definition at line 77 of file gotodlg.c.

## Function Documentation

## ◆ create_goto_dialog()

static void create_goto_dialog | ( | void |  | ) |

static

Create goto -dialog for gotoing or airlifting unit

Definition at line 134 of file gotodlg.c.

Referenced by popup_goto_dialog().

## ◆ get_selected_city()

static struct city * get_selected_city | ( | void |  | ) |

static

Return currently selected city

Definition at line 273 of file gotodlg.c.

Referenced by goto_cmd_callback(), goto_selection_callback(), and refresh_airlift_button().

## ◆ goto_cmd_callback()

static void goto_cmd_callback | ( | GtkWidget * | dlg,
|  | gint | arg
| ) |  |

static

User has responded to goto dialog

Definition at line 90 of file gotodlg.c.

Referenced by create_goto_dialog().

## ◆ goto_dialog_focus_units_changed()

void goto_dialog_focus_units_changed | ( | void |  | ) |

Called when the set of units in focus has changed; updates airlift info

Definition at line 540 of file gotodlg.c.

Referenced by real_focus_units_changed().

## ◆ goto_selection_callback()

static void goto_selection_callback | ( | GtkTreeSelection * | selection,
|  | gpointer | data
| ) |  |

static

Update goto dialog. button tells if cities of all players or just client's player should be listed.

Definition at line 520 of file gotodlg.c.

Referenced by create_goto_dialog().

## ◆ list_store_append_player_cities()

static bool list_store_append_player_cities | ( | GtkListStore * | store,
|  | const struct player * | pplayer
| ) |  |

static

Appends the list of the city owned by the player in the goto dialog.

Definition at line 293 of file gotodlg.c.

Referenced by update_goto_dialog().

## ◆ popup_goto_dialog()

void popup_goto_dialog | ( | void |  | ) |

Popup the dialog

Definition at line 257 of file gotodlg.c.

Referenced by mr_menu::slot_airlift(), unit_goto_city_callback(), unit_goto_city_callback(), and unit_order_callback().

## ◆ refresh_airlift_button()

static void refresh_airlift_button | ( | void |  | ) |

static

Refresh the state of the "Airlift" button for the currently selected unit(s) and city.

Definition at line 492 of file gotodlg.c.

Referenced by goto_dialog_focus_units_changed(), goto_selection_callback(), and update_goto_dialog().

## ◆ refresh_airlift_column()

static void refresh_airlift_column | ( | void |  | ) |

static

Refresh airlift column in city list (without tearing everything down).

Definition at line 466 of file gotodlg.c.

Referenced by goto_dialog_focus_units_changed(), and update_goto_dialog().

## ◆ update_goto_dialog()

static void update_goto_dialog | ( | GtkToggleButton * | button | ) |

static

Refresh city list (in response to "all cities" checkbox changing).

Definition at line 431 of file gotodlg.c.

## ◆ update_source_label()

static void update_source_label | ( | void |  | ) |

static

Refresh the label that shows where the selected unit(s) currently are (and the relevant cities' airlift capacities, if relevant).

Definition at line 326 of file gotodlg.c.

Referenced by create_goto_dialog(), and goto_dialog_focus_units_changed().

## Variable Documentation

## ◆ all_toggle

GtkWidget* all_toggle

static

Definition at line 59 of file gotodlg.c.

Referenced by create_goto_dialog().

## ◆ dshell

GtkWidget* dshell = NULL

static

Definition at line 56 of file gotodlg.c.

Referenced by choice_dialog_add(), choice_dialog_end(), choice_dialog_set_hide(), choice_dialog_start(), create_goto_dialog(), goto_cmd_callback(), goto_dialog_focus_units_changed(), popup_choice_dialog(), popup_goto_dialog(), and refresh_airlift_button().

## ◆ goto_list_selection

GtkTreeSelection* goto_list_selection

static

Definition at line 61 of file gotodlg.c.

Referenced by create_goto_dialog(), and get_selected_city().

## ◆ goto_list_store

GtkListStore* goto_list_store

static

Definition at line 60 of file gotodlg.c.

Referenced by create_goto_dialog(), refresh_airlift_column(), and update_goto_dialog().

## ◆ gotodlg_updating

bool gotodlg_updating = FALSE

static

Definition at line 63 of file gotodlg.c.

Referenced by goto_selection_callback(), and update_goto_dialog().

## ◆ original_tile

struct tile* original_tile

Definition at line 62 of file gotodlg.c.

Referenced by create_goto_dialog(), and goto_cmd_callback().

## ◆ source

GtkWidget* source

static

Definition at line 58 of file gotodlg.c.

Referenced by action_found(), adjust_improvement_wants_by_effects(), adv_data_city_impr_calc(), building_has_effect(), change_build_target(), city_tile_found(), create_goto_dialog(), crop_sprite(), dai_gov_value(), dai_tech_effect_values(), diplrel_found(), drag_begin(), drag_prepare(), extra_type_found(), get_net_input(), get_potential_improvement_bonus(), global_worklists_build(), government_found(), helptext_advance(), helptext_building(), helptext_extra(), helptext_government(), helptext_nation(), helptext_terrain(), improvement_found(), improvement_has_effects(), is_building_replaced(), is_claimable_ocean(), nation_found(), output_type_found(), overview_canvas_draw(), overview_canvas_draw(), qtg_crop_sprite(), terrain_type_found(), tile_border_strength(), unit_activity_found(), unit_class_found(), unit_type_found(), universal_by_number(), universal_by_rule_name(), universal_extraction(), universal_fulfills_requirement(), universal_fulfills_requirements(), universal_is_relevant_to_requirement(), universal_never_there(), universal_number(), universal_value_from_str(), unpack_tech_req(), update_source_label(), and ustate_found().

## ◆ view

GtkWidget* view

static

Definition at line 57 of file gotodlg.c.