18#include <gdk/gdkkeysyms.h>
50#define SPECLIST_TAG dialog
51#define SPECLIST_TYPE struct cma_dialog
54#define dialog_list_iterate(dialoglist, pdialog) \
55 TYPED_LIST_ITERATE(struct cma_dialog, dialoglist, pdialog)
56#define dialog_list_iterate_end LIST_ITERATE_END
109 if (pdialog ==
NULL) {
135 if (pdialog->pcity ==
pcity) {
237 pdialog->
pcity = pcity;
262 pdialog->
store = store;
279 _(
"For information on\n"
280 "the citizen governor and governor presets,\n"
281 "including sample presets,\n"
282 "see README.governor."));
292 "use-underline",
TRUE,
293 "mnemonic-widget",
view,
294 "label",
_(
"Prese_ts:"),
295 "xalign", 0.0,
"yalign", 0.5,
NULL);
339 gtk_label_new(
"food\n prod\n trade\n\n people\n grow\n prod\n name");
523 _(
"Governor Enabl_ed"));
526 _(
"Governor Disabl_ed"));
599 _(
"Name new preset"),
600 _(
"What should we name the preset?"),
685 _(
"Remove this preset?"));
const char * get_output_name(Output_type_id output)
#define output_type_iterate(output)
#define output_type_iterate_end
void refresh_city_dialog(struct city *pcity)
void city_report_dialog_update(void)
bool can_client_issue_orders(void)
struct cm_result * cm_result_new(struct city *pcity)
void cm_result_from_main_map(struct cm_result *result, const struct city *pcity)
void cm_result_destroy(struct cm_result *result)
bool cma_is_city_under_agent(const struct city *pcity, struct cm_parameter *parameter)
void cma_put_city_under_agent(struct city *pcity, const struct cm_parameter *const parameter)
void cma_release_city(struct city *pcity)
const char * cmafec_get_short_descr(const struct cm_parameter *const parameter)
void cmafec_set_fe_parameter(struct city *pcity, const struct cm_parameter *const parameter)
char * cmafec_preset_get_descr(int idx)
const char * cmafec_get_result_descr(struct city *pcity, const struct cm_result *result, const struct cm_parameter *const parameter)
const struct cm_parameter * cmafec_preset_get_parameter(int idx)
void cmafec_preset_add(const char *descr_name, struct cm_parameter *pparam)
int cmafec_preset_get_index_of_parameter(const struct cm_parameter *const parameter)
void cmafec_preset_remove(int idx)
int cmafec_preset_num(void)
void cmafec_get_fe_parameter(struct city *pcity, struct cm_parameter *dest)
static PangoLayout * layout
static gboolean button_press_callback(GtkTreeView *view, GdkEventButton *ev, gpointer data)
static void cma_preset_remove(struct cma_dialog *pdialog, int preset_index)
void close_cma_dialog(struct city *pcity)
struct cma_dialog * create_cma_dialog(struct city *pcity, bool tiny)
void refresh_cma_dialog(struct city *pcity, enum cma_refresh refresh)
static void cma_del_preset_callback(GtkWidget *w, gpointer data)
static void cma_dialog_destroy_callback(GtkWidget *w, gpointer data)
static void cma_add_preset_callback(GtkWidget *w, gpointer data)
static void help_callback(GtkWidget *w, gpointer data)
static void update_cma_preset_list(struct cma_dialog *pdialog)
#define dialog_list_iterate_end
static void hscale_changed(GtkWidget *get, gpointer data)
static void cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *it, gpointer data)
static void cma_preset_add_popup_callback(gpointer data, gint response, const char *input)
static struct cma_dialog * get_cma_dialog(struct city *pcity)
#define dialog_list_iterate(dialoglist, pdialog)
static struct dialog_list * dialog_list
static void cma_preset_remove_response(GtkWidget *w, gint response, gpointer data)
static void cma_activate_preset_callback(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data)
static void cma_active_callback(GtkWidget *w, gpointer data)
static void set_hscales(const struct cm_parameter *const parameter, struct cma_dialog *pdialog)
static int allow_refreshes
#define GUI_GTK_OPTION(optname)
void gtk_tree_view_focus(GtkTreeView *view)
gint gtk_tree_selection_get_row(GtkTreeSelection *selection)
GtkWidget * icon_label_button_new(const gchar *icon_name, const gchar *label_text)
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
void popup_help_dialog_string(const char *item)
static gboolean cma_preset_key_pressed(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer data)
int minimal_surplus[O_LAST]
GtkWidget * active_command
GtkWidget * factor[O_LAST+1]
GtkWidget * del_preset_command
GtkWidget * growth_button
GtkWidget * add_preset_command
GtkWidget * minimal_surplus[O_LAST]
GtkWidget * preset_remove_shell
GtkTreeSelection * selection
size_t fc_strlcpy(char *dest, const char *src, size_t n)