Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
cityrep.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "fcintl.h"
#include "log.h"
#include "shared.h"
#include "support.h"
#include "city.h"
#include "game.h"
#include "packets.h"
#include "unit.h"
#include "cma_fec.h"
#include "citydlg_common.h"
#include "cityrepdata.h"
#include "client_main.h"
#include "climisc.h"
#include "global_worklist.h"
#include "mapctrl_common.h"
#include "mapview_common.h"
#include "options.h"
#include "chatline.h"
#include "citydlg.h"
#include "gui_main.h"
#include "gui_stuff.h"
#include "mapview.h"
#include "optiondlg.h"
#include "repodlgs.h"
#include "cityrep.h"

Go to the source code of this file.

Data Structures

struct  sell_data
 
struct  _FcCityRow
 
struct  _FcCityClass
 
struct  scbs_data
 

Macros

#define NEG_VAL(x)   ((x)<0 ? (x) : (-x))
 
#define CMA_NONE   (10000)
 
#define CMA_CUSTOM   (10001)
 
#define CRD_COL_CITY_ID   (0 + NUM_CREPORT_COLS)
 
#define FC_TYPE_CITY_ROW   (fc_city_row_get_type())
 

Enumerations

enum  city_operation_type {
  CO_CHANGE , CO_LAST , CO_NEXT , CO_FIRST ,
  CO_NEXT_TO_LAST , CO_SELL , CO_NONE
}
 
enum  { CITY_CENTER = 1 , CITY_POPUP , CITY_BUY }
 

Functions

static void create_city_report_dialog (bool make_modal)
 
static void city_activated_callback (GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data)
 
static void city_command_callback (struct gui_dialog *dlg, int response, gpointer data)
 
static void city_selection_changed_callback (GtkTreeSelection *selection)
 
static void city_clear_worklist_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void update_total_buy_cost (void)
 
static GMenucreate_production_menu (GActionGroup *group)
 
static GMenucreate_select_menu (GActionGroup *group)
 
static GMenucreate_change_menu (GActionGroup *group, const char *mname, const char *human_mname, enum city_operation_type oper)
 
static void recreate_production_menu (GActionGroup *group)
 
static void recreate_select_menu (GActionGroup *group)
 
static void recreate_sell_menu (GActionGroup *group)
 
static void fc_city_row_finalize (GObject *gobject)
 
static void fc_city_row_class_init (FcCityRowClass *klass)
 
static void fc_city_row_init (FcCityRow *self)
 
static FcCityRowfc_city_row_new (void)
 
static void get_city_table_header (char **text, int n)
 
static void city_factory_bind (GtkSignalListItemFactory *self, GtkListItem *list_item, gpointer user_data)
 
static void city_factory_setup (GtkSignalListItemFactory *self, GtkListItem *list_item, gpointer user_data)
 
static GtkListStorecity_report_dialog_store_new_depr (void)
 
static void city_model_set_depr (GtkListStore *store, GtkTreeIter *iter, struct city *pcity)
 
static void city_store_set (FcCityRow *row, struct city *pcity)
 
static struct citycity_model_get (GtkTreeModel *model, GtkTreeIter *iter)
 
static gboolean city_model_find (GtkTreeModel *model, GtkTreeIter *iter, const struct city *pcity)
 
static void city_model_fill_depr (GtkListStore *store, GtkTreeSelection *selection, GHashTable *select)
 
static void city_store_fill (GListStore *store, GtkMultiSelection *selection, GHashTable *select)
 
void city_report_dialog_popup (bool raise)
 
void city_report_dialog_popdown (void)
 
static void append_impr_or_unit_to_menu (GMenu *menu, GActionGroup *act_group, const char *act_pfx, const char *act_pfx2, bool append_units, bool append_wonders, enum city_operation_type city_operation, TestCityFunc test_func, GCallback callback, int size)
 
static void impr_or_unit_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void worklist_last_impr_or_unit_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void worklist_first_impr_or_unit_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void worklist_next_impr_or_unit_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void worklist_next_to_last_impr_or_unit_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void sell_impr_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void sell_callback_response (GObject *dialog, GAsyncResult *result, gpointer data)
 
static void select_impr_or_unit_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void governors_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void select_governor_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static GMenucreate_governor_menu (GActionGroup *group, bool change_governor)
 
static void update_governor_menu (void)
 
static void append_worklist_foreach (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void append_worklist_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void set_worklist_foreach (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void set_worklist_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static GMenucreate_wl_menu (GActionGroup *group, const char *act_pfx, GCallback cb)
 
static void city_report_update_views (void)
 
static GMenuItemcreate_display_menu_item (int pos)
 
static void toggle_view (GSimpleAction *act, GVariant *value, gpointer data)
 
static GMenucreate_display_menu (GActionGroup *group)
 
static GtkWidgetcreate_city_report_menu (void)
 
static gint cityrep_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data)
 
static void city_select_all_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void city_unselect_all_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void city_invert_selection_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void city_select_coastal_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void same_island_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void city_select_island_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void city_select_building_callback (GSimpleAction *action, GVariant *parameter, gpointer data)
 
static void buy_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void center_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
static void popup_iterate (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
void real_city_report_dialog_update (void *unused)
 
void real_city_report_update_city (struct city *pcity)
 
static bool city_building_impr_or_unit (const struct city *pcity, const struct universal *target)
 
static void clear_worklist_foreach_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 
void hilite_cities_from_canvas (void)
 
void toggle_city_hilite (struct city *pcity, bool on_off)
 

Variables

static struct gui_dialogcity_dialog_shell = NULL
 
static GtkWidgetcity_view_depr
 
static GtkTreeSelectioncity_selection_depr
 
static GtkListStorecity_model_depr
 
static GtkWidgetcity_view
 
static GtkMultiSelectioncity_selection
 
static GListStorecity_store
 
static GtkWidgetcity_center_command
 
static GtkWidgetcity_popup_command
 
static GtkWidgetcity_buy_command
 
static GtkWidgetcity_total_buy_cost_label
 
static GMenuprod_menu = NULL
 
static GMenuchange_menu
 
static GMenuadd_first_menu
 
static GMenuadd_last_menu
 
static GMenuadd_next_menu
 
static GMenuadd_2ndlast_menu
 
static GMenuwl_set_menu
 
static GMenuwl_append_menu
 
static GMenuselect_menu
 
static GMenuunit_b_select_menu = NULL
 
static GMenuimpr_b_select_menu
 
static GMenuwndr_b_select_menu
 
static GMenuunit_s_select_menu
 
static GMenuunit_p_select_menu
 
static GMenuimpr_p_select_menu
 
static GMenuwndr_p_select_menu
 
static GMenuunit_a_select_menu
 
static GMenuimpr_a_select_menu
 
static GMenuwndr_a_select_menu
 
static GMenugovernor_select_menu
 
static int city_dialog_shell_is_modal
 
static GMenucityrep_menu
 
static GActionGroupcityrep_group
 
static GMenudisplay_menu
 

Macro Definition Documentation

◆ CMA_CUSTOM

#define CMA_CUSTOM   (10001)

Definition at line 65 of file cityrep.c.

◆ CMA_NONE

#define CMA_NONE   (10000)

Definition at line 64 of file cityrep.c.

◆ CRD_COL_CITY_ID

#define CRD_COL_CITY_ID   (0 + NUM_CREPORT_COLS)

Definition at line 110 of file cityrep.c.

◆ FC_TYPE_CITY_ROW

#define FC_TYPE_CITY_ROW   (fc_city_row_get_type())

Definition at line 156 of file cityrep.c.

◆ NEG_VAL

#define NEG_VAL (   x)    ((x)<0 ? (x) : (-x))

Definition at line 61 of file cityrep.c.

Enumeration Type Documentation

◆ anonymous enum

Enumerator
CITY_CENTER 
CITY_POPUP 
CITY_BUY 

Definition at line 100 of file cityrep.c.

◆ city_operation_type

Enumerator
CO_CHANGE 
CO_LAST 
CO_NEXT 
CO_FIRST 
CO_NEXT_TO_LAST 
CO_SELL 
CO_NONE 

Definition at line 73 of file cityrep.c.

Function Documentation

◆ append_impr_or_unit_to_menu()

static void append_impr_or_unit_to_menu ( GMenu menu,
GActionGroup act_group,
const char act_pfx,
const char act_pfx2,
bool  append_units,
bool  append_wonders,
enum city_operation_type  city_operation,
TestCityFunc  test_func,
GCallback  callback,
int  size 
)
static

Make submenu listing possible build targets

Definition at line 456 of file cityrep.c.

◆ append_worklist_callback()

static void append_worklist_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

Menu item callback to append the global worklist associated with this item to the worklists of all selected cities. The worklist pointer is passed in 'data'.

Definition at line 1091 of file cityrep.c.

◆ append_worklist_foreach()

static void append_worklist_foreach ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Helper function to append a worklist to the current work list of one city in the city report. This function is called over all selected rows in the list view.

Definition at line 1073 of file cityrep.c.

◆ buy_iterate()

static void buy_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Buy the production in one single city.

Definition at line 1592 of file cityrep.c.

◆ center_iterate()

static void center_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Center to one single city.

Definition at line 1605 of file cityrep.c.

◆ city_activated_callback()

static void city_activated_callback ( GtkTreeView view,
GtkTreePath path,
GtkTreeViewColumn col,
gpointer  data 
)
static

User has selected city row from city report.

Definition at line 1660 of file cityrep.c.

◆ city_building_impr_or_unit()

static bool city_building_impr_or_unit ( const struct city pcity,
const struct universal target 
)
static

Returns whether city is building given target

Definition at line 1895 of file cityrep.c.

◆ city_clear_worklist_callback()

static void city_clear_worklist_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

Called when the "clear worklist" menu item is activated.

Definition at line 2186 of file cityrep.c.

◆ city_command_callback()

static void city_command_callback ( struct gui_dialog dlg,
int  response,
gpointer  data 
)
static

gui_dialog response callback.

Definition at line 1634 of file cityrep.c.

◆ city_factory_bind()

static void city_factory_bind ( GtkSignalListItemFactory self,
GtkListItem list_item,
gpointer  user_data 
)
static

City table cell bind function

Definition at line 242 of file cityrep.c.

Referenced by create_city_report_dialog().

◆ city_factory_setup()

static void city_factory_setup ( GtkSignalListItemFactory self,
GtkListItem list_item,
gpointer  user_data 
)
static

City table cell setup function

Definition at line 257 of file cityrep.c.

Referenced by create_city_report_dialog().

◆ city_invert_selection_callback()

static void city_invert_selection_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

User has chosen to invert selection

Definition at line 1487 of file cityrep.c.

◆ city_model_fill_depr()

static void city_model_fill_depr ( GtkListStore store,
GtkTreeSelection selection,
GHashTable select 
)
static

Fill the model with the current configuration.

Definition at line 360 of file cityrep.c.

Referenced by create_city_report_dialog(), and real_city_report_dialog_update().

◆ city_model_find()

static gboolean city_model_find ( GtkTreeModel model,
GtkTreeIter iter,
const struct city pcity 
)
static

Return TRUE if 'iter' has been set to the city row.

Definition at line 340 of file cityrep.c.

◆ city_model_get()

static struct city * city_model_get ( GtkTreeModel model,
GtkTreeIter iter 
)
static

Set the values of the iterator.

Definition at line 324 of file cityrep.c.

◆ city_model_set_depr()

static void city_model_set_depr ( GtkListStore store,
GtkTreeIter iter,
struct city pcity 
)
static

Set the values of the iterator.

Definition at line 286 of file cityrep.c.

Referenced by city_model_fill_depr(), and real_city_report_update_city().

◆ city_report_dialog_popdown()

void city_report_dialog_popdown ( void  )

Closes the city report dialog.

Definition at line 446 of file cityrep.c.

◆ city_report_dialog_popup()

void city_report_dialog_popup ( bool  raise)

Popup the city report dialog, and optionally raise it.

Definition at line 428 of file cityrep.c.

◆ city_report_dialog_store_new_depr()

static GtkListStore * city_report_dialog_store_new_depr ( void  )
static

Returns a new tree model for the city report.

Definition at line 267 of file cityrep.c.

Referenced by create_city_report_dialog().

◆ city_report_update_views()

static void city_report_update_views ( void  )
static

Update city report views

Definition at line 1197 of file cityrep.c.

◆ city_select_all_callback()

static void city_select_all_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

User has chosen to select all cities

Definition at line 1467 of file cityrep.c.

◆ city_select_building_callback()

static void city_select_building_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

User has chosen to select cities with certain target in production

Definition at line 1563 of file cityrep.c.

◆ city_select_coastal_callback()

static void city_select_coastal_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

User has chosen to select coastal cities

Definition at line 1506 of file cityrep.c.

◆ city_select_island_callback()

static void city_select_island_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

User has chosen to select all cities on same island

Definition at line 1552 of file cityrep.c.

◆ city_selection_changed_callback()

static void city_selection_changed_callback ( GtkTreeSelection selection)
static

Update city report button sensitivity and total buy cost label when the user makes a change in the selection of cities.

Definition at line 2133 of file cityrep.c.

◆ city_store_fill()

static void city_store_fill ( GListStore store,
GtkMultiSelection selection,
GHashTable select 
)
static

Fill the model with the current configuration.

Definition at line 390 of file cityrep.c.

Referenced by create_city_report_dialog(), and real_city_report_dialog_update().

◆ city_store_set()

static void city_store_set ( FcCityRow row,
struct city pcity 
)
static

Set the values of the city.

Definition at line 305 of file cityrep.c.

Referenced by city_store_fill().

◆ city_unselect_all_callback()

static void city_unselect_all_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

User has chosen to unselect all cities

Definition at line 1477 of file cityrep.c.

◆ cityrep_sort_func()

static gint cityrep_sort_func ( GtkTreeModel model,
GtkTreeIter a,
GtkTreeIter b,
gpointer  data 
)
static

Sort callback.

Definition at line 1321 of file cityrep.c.

◆ clear_worklist_foreach_func()

static void clear_worklist_foreach_func ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Clear the worklist in one selected city in the city report.

Definition at line 2168 of file cityrep.c.

◆ create_change_menu()

static GMenu * create_change_menu ( GActionGroup group,
const char mname,
const char human_mname,
enum city_operation_type  oper 
)
static

Create submenu for changing production target.

Parameters
groupGroup to add actions to
mnameMenu name part of the action identifier
human_mnameFormat of the human visible menu name
operOperation to do when user selects an entry
Returns
Created menu

Definition at line 1750 of file cityrep.c.

◆ create_city_report_dialog()

static void create_city_report_dialog ( bool  make_modal)
static

Create city report dialog.

Definition at line 1340 of file cityrep.c.

◆ create_city_report_menu()

static GtkWidget * create_city_report_menu ( void  )
static

Create menu for city report

Definition at line 1282 of file cityrep.c.

◆ create_display_menu()

static GMenu * create_display_menu ( GActionGroup group)
static

Create columns selection menu for the city report.

Definition at line 1254 of file cityrep.c.

◆ create_display_menu_item()

static GMenuItem * create_display_menu_item ( int  pos)
static

Create up-to-date menu item for the display menu. Caller need to g_object_unref() returned item.

Definition at line 1222 of file cityrep.c.

◆ create_governor_menu()

static GMenu * create_governor_menu ( GActionGroup group,
bool  change_governor 
)
static

Create the governor entries in the change menu and the select menu. The indices CMA_NONE and CMA_CUSTOM are special. CMA_NONE signifies a preset of "none" and CMA_CUSTOM a "custom" preset.

Definition at line 929 of file cityrep.c.

◆ create_production_menu()

static GMenu * create_production_menu ( GActionGroup group)
static

Creates production menu

Definition at line 1811 of file cityrep.c.

◆ create_select_menu()

static GMenu * create_select_menu ( GActionGroup group)
static

Creates select menu

Definition at line 1904 of file cityrep.c.

◆ create_wl_menu()

static GMenu * create_wl_menu ( GActionGroup group,
const char act_pfx,
GCallback  cb 
)
static

Create submenu based on global worklist.

Definition at line 1155 of file cityrep.c.

◆ fc_city_row_class_init()

static void fc_city_row_class_init ( FcCityRowClass klass)
static

Initialization method for FcCityRow class

Definition at line 192 of file cityrep.c.

◆ fc_city_row_finalize()

static void fc_city_row_finalize ( GObject gobject)
static

Finalizing method for FcCityRow class

Definition at line 178 of file cityrep.c.

Referenced by fc_city_row_class_init().

◆ fc_city_row_init()

static void fc_city_row_init ( FcCityRow self)
static

Initialization method for FcCityRow

Definition at line 203 of file cityrep.c.

◆ fc_city_row_new()

static FcCityRow * fc_city_row_new ( void  )
static

FcCityRow creation method

Definition at line 211 of file cityrep.c.

Referenced by city_store_fill().

◆ get_city_table_header()

static void get_city_table_header ( char **  text,
int  n 
)
static

Return text line for the column headers for the city report

Definition at line 223 of file cityrep.c.

◆ governors_iterate()

static void governors_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Governors iterating callback.

Definition at line 850 of file cityrep.c.

◆ hilite_cities_from_canvas()

void hilite_cities_from_canvas ( void  )

After a selection rectangle is defined, make the cities that are hilited on the canvas exclusively hilited in the City List window.

Definition at line 2204 of file cityrep.c.

◆ impr_or_unit_iterate()

static void impr_or_unit_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Change the production of one single selected city.

Definition at line 610 of file cityrep.c.

◆ popup_iterate()

static void popup_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Popup the dialog of a single city.

Definition at line 1618 of file cityrep.c.

◆ real_city_report_dialog_update()

void real_city_report_dialog_update ( void unused)

Update the city report dialog

Definition at line 1691 of file cityrep.c.

◆ real_city_report_update_city()

void real_city_report_update_city ( struct city pcity)

Update the text for a single city in the city report.

Definition at line 1725 of file cityrep.c.

◆ recreate_production_menu()

static void recreate_production_menu ( GActionGroup group)
static

Recreates production menu

Definition at line 1875 of file cityrep.c.

◆ recreate_select_menu()

static void recreate_select_menu ( GActionGroup group)
static

Recreates production menu

Definition at line 2062 of file cityrep.c.

◆ recreate_sell_menu()

static void recreate_sell_menu ( GActionGroup group)
static

Update the sell menu.

Definition at line 1791 of file cityrep.c.

◆ same_island_iterate()

static void same_island_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Select all cities on the same continent.

Definition at line 1528 of file cityrep.c.

◆ select_governor_callback()

static void select_governor_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

Called when one clicks on an governor item to make a selection or to change a selection's preset.

Definition at line 870 of file cityrep.c.

◆ select_impr_or_unit_callback()

static void select_impr_or_unit_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

Some build target, either improvement or unit, has been selected from some menu.

Definition at line 767 of file cityrep.c.

◆ sell_callback_response()

static void sell_callback_response ( GObject dialog,
GAsyncResult result,
gpointer  data 
)
static

Callback for sell dialog response.

Definition at line 725 of file cityrep.c.

Referenced by select_impr_or_unit_callback().

◆ sell_impr_iterate()

static void sell_impr_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Iterate the cities going to sell.

Definition at line 702 of file cityrep.c.

◆ set_worklist_callback()

static void set_worklist_callback ( GSimpleAction action,
GVariant parameter,
gpointer  data 
)
static

Menu item callback to set a city's worklist to the global worklist associated with this menu item. The worklist pointer is passed in 'data'.

Definition at line 1131 of file cityrep.c.

◆ set_worklist_foreach()

static void set_worklist_foreach ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Helper function to set a worklist for one city in the city report. This function is called over all selected rows in the list view.

Definition at line 1114 of file cityrep.c.

◆ toggle_city_hilite()

void toggle_city_hilite ( struct city pcity,
bool  on_off 
)

Toggle a city's hilited status.

Definition at line 2229 of file cityrep.c.

◆ toggle_view()

static void toggle_view ( GSimpleAction act,
GVariant value,
gpointer  data 
)
static

User has toggled some column viewing option

Definition at line 1239 of file cityrep.c.

◆ update_governor_menu()

static void update_governor_menu ( void  )
static

Recreate governor menu

Definition at line 1061 of file cityrep.c.

◆ update_total_buy_cost()

static void update_total_buy_cost ( void  )
static

Update the value displayed by the "total buy cost" label in the city report, or make it blank if nothing can be bought.

Definition at line 2087 of file cityrep.c.

◆ worklist_first_impr_or_unit_iterate()

static void worklist_first_impr_or_unit_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Called by select_impr_or_unit_callback() for each city that is selected in the city list dialog to have a object inserted first to the worklist. Sends a packet adding the current production to the first place after the current production of the worklist. Then changes the production to the requested item.

Definition at line 647 of file cityrep.c.

◆ worklist_last_impr_or_unit_iterate()

static void worklist_last_impr_or_unit_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Called by select_impr_or_unit_callback() for each city that is selected in the city list dialog to have a object appended to the worklist. Sends a packet adding the item to the end of the worklist.

Definition at line 626 of file cityrep.c.

◆ worklist_next_impr_or_unit_iterate()

static void worklist_next_impr_or_unit_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Called by select_impr_or_unit_callback() for each city that is selected in the city list dialog to have a object added next to the worklist. Sends a packet adding the item to the first place after the current production of the worklist.

Definition at line 667 of file cityrep.c.

◆ worklist_next_to_last_impr_or_unit_iterate()

static void worklist_next_to_last_impr_or_unit_iterate ( GtkTreeModel model,
GtkTreePath path,
GtkTreeIter iter,
gpointer  data 
)
static

Called by select_impr_or_unit_callback() for each city that is selected in the city list dialog to have an object added before the last position in the worklist.

Definition at line 686 of file cityrep.c.

Variable Documentation

◆ add_2ndlast_menu

GMenu* add_2ndlast_menu
static

Definition at line 133 of file cityrep.c.

◆ add_first_menu

GMenu* add_first_menu
static

Definition at line 130 of file cityrep.c.

◆ add_last_menu

GMenu* add_last_menu
static

Definition at line 131 of file cityrep.c.

◆ add_next_menu

GMenu* add_next_menu
static

Definition at line 132 of file cityrep.c.

◆ change_menu

GMenu* change_menu
static

Definition at line 129 of file cityrep.c.

◆ city_buy_command

GtkWidget* city_buy_command
static

Definition at line 122 of file cityrep.c.

◆ city_center_command

GtkWidget* city_center_command
static

Definition at line 120 of file cityrep.c.

◆ city_dialog_shell

struct gui_dialog* city_dialog_shell = NULL
static

Definition at line 98 of file cityrep.c.

◆ city_dialog_shell_is_modal

int city_dialog_shell_is_modal
static

Definition at line 150 of file cityrep.c.

◆ city_model_depr

GtkListStore* city_model_depr
static

◆ city_popup_command

GtkWidget* city_popup_command
static

Definition at line 121 of file cityrep.c.

◆ city_selection

GtkMultiSelection* city_selection
static

Definition at line 108 of file cityrep.c.

◆ city_selection_depr

GtkTreeSelection* city_selection_depr
static

◆ city_store

GListStore* city_store
static

Definition at line 109 of file cityrep.c.

Referenced by create_city_report_dialog(), and real_city_report_dialog_update().

◆ city_total_buy_cost_label

GtkWidget* city_total_buy_cost_label
static

Definition at line 126 of file cityrep.c.

◆ city_view

GtkWidget* city_view
static

Definition at line 107 of file cityrep.c.

◆ city_view_depr

GtkWidget* city_view_depr
static

◆ cityrep_group

GActionGroup* cityrep_group
static

Definition at line 153 of file cityrep.c.

◆ cityrep_menu

GMenu* cityrep_menu
static

Definition at line 152 of file cityrep.c.

◆ display_menu

GMenu* display_menu
static

Definition at line 154 of file cityrep.c.

◆ governor_select_menu

GMenu* governor_select_menu
static

Definition at line 148 of file cityrep.c.

◆ impr_a_select_menu

GMenu* impr_a_select_menu
static

Definition at line 146 of file cityrep.c.

◆ impr_b_select_menu

GMenu* impr_b_select_menu
static

Definition at line 139 of file cityrep.c.

◆ impr_p_select_menu

GMenu* impr_p_select_menu
static

Definition at line 143 of file cityrep.c.

◆ prod_menu

GMenu* prod_menu = NULL
static

Definition at line 128 of file cityrep.c.

◆ select_menu

GMenu* select_menu
static

Definition at line 137 of file cityrep.c.

◆ unit_a_select_menu

GMenu* unit_a_select_menu
static

Definition at line 145 of file cityrep.c.

◆ unit_b_select_menu

GMenu* unit_b_select_menu = NULL
static

Definition at line 138 of file cityrep.c.

◆ unit_p_select_menu

GMenu* unit_p_select_menu
static

Definition at line 142 of file cityrep.c.

◆ unit_s_select_menu

GMenu* unit_s_select_menu
static

Definition at line 141 of file cityrep.c.

◆ wl_append_menu

GMenu* wl_append_menu
static

Definition at line 135 of file cityrep.c.

◆ wl_set_menu

GMenu* wl_set_menu
static

Definition at line 134 of file cityrep.c.

◆ wndr_a_select_menu

GMenu* wndr_a_select_menu
static

Definition at line 147 of file cityrep.c.

◆ wndr_b_select_menu

GMenu* wndr_b_select_menu
static

Definition at line 140 of file cityrep.c.

◆ wndr_p_select_menu

GMenu* wndr_p_select_menu
static

Definition at line 144 of file cityrep.c.