62#define USDLG_COLUMNS_DEFAULT 3
64#define USDLG_COL_UTID USDLG_COLUMNS_DEFAULT + 0
65#define USDLG_COL_UID USDLG_COLUMNS_DEFAULT + 1
66#define USDLG_COL_LOCATION USDLG_COLUMNS_DEFAULT + 2
67#define USDLG_COL_ACTIVITY USDLG_COLUMNS_DEFAULT + 3
68#define USDLG_COL_ROW_TYPE USDLG_COLUMNS_DEFAULT + 4
69#define USDLG_COLUMNS_DEBUG USDLG_COLUMNS_DEFAULT + 5
71#define USDLG_COL_STYLE USDLG_COLUMNS_DEBUG + 0
72#define USDLG_COL_WEIGHT USDLG_COLUMNS_DEBUG + 1
73#define USDLG_COLUMNS_ALL USDLG_COLUMNS_DEBUG + 2
76 #define USDLG_COLUMNS_SHOW USDLG_COLUMNS_DEBUG
78 #define USDLG_COLUMNS_SHOW USDLG_COLUMNS_DEFAULT
248 pdialog =
fc_calloc(1,
sizeof(*pdialog));
799 static char buf[248] =
"";
1037 log_debug(
"Unit vanished (Unit ID %d)!", uid);
1206 if (pdialog ==
NULL) {
const char * city_name_get(const struct city *pcity)
bool can_client_control(void)
bool client_is_global_observer(void)
bool can_client_change_view(void)
bool unit_is_in_focus(const struct unit *punit)
void unit_focus_add(struct unit *punit)
void unit_focus_set(struct unit *punit)
void unit_focus_remove(struct unit *punit)
struct unit * head_of_units_in_focus(void)
int get_num_units_in_focus(void)
void unit_focus_update(void)
void request_new_unit_activity(struct unit *punit, enum unit_activity act)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
#define FC_STATIC_CANVAS_INIT
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
void intl_slist(int n, const char **s, bool *done)
GdkPixbuf * surface_get_pixbuf(cairo_surface_t *surf, int width, int height)
#define USDLG_COL_LOCATION
static void usdlg_cmd_ready(GObject *object, gpointer data)
static void usdlg_cmd_deselect(GObject *object, gpointer data)
static void usdlg_cmd_center(GObject *object, gpointer data)
#define USDLG_COL_ROW_TYPE
static void usdlg_cmd_cursor_changed(GtkTreeView *view, gpointer data)
GdkPixbuf * usdlg_get_unit_image(const struct unit *punit)
const char * usdlg_get_unit_descr(const struct unit *punit)
static void usdlg_tab_append_units(struct unit_select_dialog *pdialog, enum unit_select_location_mode loc, enum unit_activity act, const struct unit *punit, bool transported, GtkTreeIter *it, GtkTreeIter *parent)
static void usdlg_tile(struct unit_select_dialog *pdialog, struct tile *ptile)
static void usdlg_cmd_sentry(GObject *object, gpointer data)
static struct unit_select_dialog * usdlg_get(bool create)
static void usdlg_cmd_exec_unit(struct unit *punit, enum usdlg_cmd cmd)
static void usdlg_tab_append_activity(GtkTreeStore *store, enum unit_select_location_mode loc, const struct unit_type *putype, enum unit_activity act, int count, GtkTreeIter *it, GtkTreeIter *parent)
static struct unit_select_dialog * usdlg_create(void)
static void usdlg_cmd_focus(GObject *object, gpointer data)
#define USDLG_COL_ACTIVITY
static void usdlg_cmd_exec(GObject *object, gpointer mode_data, enum usdlg_cmd cmd)
#define USDLG_COLUMNS_ALL
static void usdlg_destroy_callback(GObject *object, gpointer data)
static void usdlg_cmd_select(GObject *object, gpointer data)
static const char * usdlg_col_titles[USDLG_COLUMNS_ALL]
static void usdlg_cmd_focus_real(GtkTreeView *view)
#define USDLG_COLUMNS_SHOW
static struct unit_select_dialog * unit_select_dlg
enum usdlg_column_types usdlg_col_types[USDLG_COLUMNS_ALL]
void unit_select_dialog_popup_main(struct tile *ptile, bool create)
static void usdlg_cmd_row_activated(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data)
void unit_select_dialog_popdown(void)
static void usdlg_tab_append_utype(GtkTreeStore *store, enum unit_select_location_mode loc, const struct unit_type *putype, GtkTreeIter *it)
static void usdlg_tab_select(struct unit_select_dialog *pdialog, const char *title, enum unit_select_location_mode loc)
static bool usdlg_tab_update(struct unit_select_dialog *pdialog, struct usdata_hash *ushash, enum unit_select_location_mode loc)
static void usdlg_refresh(struct unit_select_dialog *pdialog)
static void usdlg_destroy(void)
static GtkTreeStore * usdlg_tab_store_new(void)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define fc_assert_action(condition, action)
#define log_debug(message,...)
struct tile * get_center_tile_mapcanvas(void)
void put_unit(const struct unit *punit, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
void put_unittype(const struct unit_type *putype, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
void center_tile_mapcanvas(const struct tile *ptile)
#define fc_calloc(n, esz)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
cairo_surface_t * surface
struct unit_select_dialog::@159 units
struct unit_select_dialog::@160 tabs[SELLOC_COUNT]
GtkWidget * cmd[USDLG_CMD_LAST]
enum unit_activity activity
struct unit_list * units[SELLOC_COUNT][ACTIVITY_LAST]
const struct unit_type * utype
int fc_snprintf(char *str, size_t n, const char *format,...)
int cat_snprintf(char *str, size_t n, const char *format,...)
#define sz_strlcpy(dest, src)
int tileset_full_tile_height(const struct tileset *t)
int tileset_full_tile_width(const struct tileset *t)
int get_transporter_occupancy(const struct unit *ptrans)
struct unit * unit_transport_get(const struct unit *pcargo)
const char * get_activity_text(enum unit_activity activity)
struct unit_list * unit_transport_cargo(const struct unit *ptrans)
#define activity_type_iterate(_act_)
#define activity_type_iterate_end
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
struct usdata_hash * usdlg_data_new(const struct tile *ptile)
void usdlg_data_destroy(struct usdata_hash *ushash)
const struct unit_type * unit_type_get(const struct unit *punit)
const char * unit_name_translation(const struct unit *punit)
Unit_type_id utype_index(const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)
#define unit_type_iterate(_p)
#define unit_type_iterate_end