Freeciv-3.1
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "citizens.h"
#include "city.h"
#include "player.h"
#include "gui_stuff.h"
#include "plrdlg.h"
#include "citizensinfo.h"
#include "speclist.h"
Go to the source code of this file.
Data Structures | |
struct | citizens_column |
struct | citizens_dialog |
Macros | |
#define | CITIZENS_DLG_COL_STYLE (0 + num_citizens_cols) |
#define | CITIZENS_DLG_COL_WEIGHT (1 + num_citizens_cols) |
#define | CITIZENS_DLG_COL_ID (2 + num_citizens_cols) |
#define | SPECLIST_TAG dialog |
#define | SPECLIST_TYPE struct citizens_dialog |
#define | dialog_list_iterate(dialoglist, pdialog) TYPED_LIST_ITERATE(struct citizens_dialog, dialoglist, pdialog) |
#define | dialog_list_iterate_end LIST_ITERATE_END |
Functions | |
static struct citizens_dialog * | citizens_dialog_get (const struct city *pcity) |
static struct citizens_dialog * | citizens_dialog_create (const struct city *pcity) |
static GtkTreeStore * | citizens_dialog_store_new (void) |
static int | citizens_dialog_default_sort_column (void) |
static void | citizens_dialog_row (GtkTreeStore *store, GtkTreeIter *it, const struct city *pcity, const struct player_slot *pslot) |
static const char * | col_nation (const struct city *pcity, const struct player_slot *pslot) |
static const char * | col_citizens (const struct city *pcity, const struct player_slot *pslot) |
void | citizens_dialog_init (void) |
void | citizens_dialog_done (void) |
void | citizens_dialog_refresh (const struct city *pcity) |
void | citizens_dialog_close (const struct city *pcity) |
GtkWidget * | citizens_dialog_display (const struct city *pcity) |
Variables | |
static struct citizens_column | citizens_cols [] |
static const int | num_citizens_cols = ARRAY_SIZE(citizens_cols) |
static struct dialog_list * | dialog_list |
#define CITIZENS_DLG_COL_ID (2 + num_citizens_cols) |
Definition at line 70 of file citizensinfo.c.
#define CITIZENS_DLG_COL_STYLE (0 + num_citizens_cols) |
Definition at line 68 of file citizensinfo.c.
#define CITIZENS_DLG_COL_WEIGHT (1 + num_citizens_cols) |
Definition at line 69 of file citizensinfo.c.
#define dialog_list_iterate | ( | dialoglist, | |
pdialog | |||
) | TYPED_LIST_ITERATE(struct citizens_dialog, dialoglist, pdialog) |
Definition at line 87 of file citizensinfo.c.
#define dialog_list_iterate_end LIST_ITERATE_END |
Definition at line 89 of file citizensinfo.c.
#define SPECLIST_TAG dialog |
Definition at line 83 of file citizensinfo.c.
#define SPECLIST_TYPE struct citizens_dialog |
Definition at line 84 of file citizensinfo.c.
void citizens_dialog_close | ( | const struct city * | pcity | ) |
Close citizens dialog of one city
Definition at line 363 of file citizensinfo.c.
Referenced by city_destroy_callback(), and switch_city_callback().
|
static |
Create citizens dialog
Definition at line 170 of file citizensinfo.c.
Referenced by citizens_dialog_display().
|
static |
Returns column to sort by by default
Definition at line 162 of file citizensinfo.c.
Referenced by citizens_dialog_create().
GtkWidget * citizens_dialog_display | ( | const struct city * | pcity | ) |
Make citizen dialog of the city visible.
Definition at line 381 of file citizensinfo.c.
Referenced by create_and_append_happiness_page(), and switch_city_callback().
void citizens_dialog_done | ( | void | ) |
Free resources allocated for citizens dialog
Definition at line 275 of file citizensinfo.c.
Referenced by ui_main().
|
static |
Get citizen dialog of the given city
Definition at line 283 of file citizensinfo.c.
Referenced by citizens_dialog_close(), citizens_dialog_display(), and citizens_dialog_refresh().
void citizens_dialog_init | ( | void | ) |
Initialize citizens dialog
Definition at line 267 of file citizensinfo.c.
Referenced by activate_gui(), and ui_main().
void citizens_dialog_refresh | ( | const struct city * | pcity | ) |
Refresh citizen dialog of the given city
Definition at line 297 of file citizensinfo.c.
Referenced by citizens_dialog_create(), citizens_dialog_display(), and real_city_dialog_refresh().
|
static |
Fills the citizens list with the data for 'pslot' at the row given by 'it'.
Definition at line 317 of file citizensinfo.c.
Referenced by citizens_dialog_refresh().
|
static |
Create a citizens dialog store.
FIXME: copy of players_dialog_store_new();
Definition at line 126 of file citizensinfo.c.
Referenced by citizens_dialog_create().
|
static |
The number of citizens for the player in the city.
Definition at line 105 of file citizensinfo.c.
|
static |
The name of the player's nation for the plrdlg.
Definition at line 96 of file citizensinfo.c.
|
static |
Referenced by citizens_dialog_create(), citizens_dialog_row(), and citizens_dialog_store_new().
|
static |
Definition at line 91 of file citizensinfo.c.
Referenced by option_dialog::apply_option(), citizens_dialog_close(), citizens_dialog_create(), citizens_dialog_done(), citizens_dialog_get(), citizens_dialog_init(), and option_dialog::~option_dialog().
|
static |
Definition at line 67 of file citizensinfo.c.
Referenced by citizens_dialog_create(), citizens_dialog_row(), and citizens_dialog_store_new().