#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "astring.h"
#include "bitvector.h"
#include "fcintl.h"
#include "log.h"
#include "mem.h"
#include "rand.h"
#include "support.h"
#include "game.h"
#include "government.h"
#include "map.h"
#include "packets.h"
#include "player.h"
#include "sex.h"
#include "client_main.h"
#include "climisc.h"
#include "connectdlg_common.h"
#include "control.h"
#include "helpdata.h"
#include "goto.h"
#include "options.h"
#include "packhand.h"
#include "text.h"
#include "tilespec.h"
#include "chatline.h"
#include "choice_dialog.h"
#include "citydlg.h"
#include "editprop.h"
#include "graphics.h"
#include "gui_main.h"
#include "gui_stuff.h"
#include "mapview.h"
#include "plrdlg.h"
#include "wldlg.h"
#include "unitselect.h"
#include "unitselextradlg.h"
#include "dialogs.h"
Go to the source code of this file.
|
static void | create_races_dialog (struct player *pplayer) |
|
static void | races_response (GtkWidget *w, gint response, gpointer data) |
|
static void | races_nation_callback (GtkTreeSelection *select, gpointer data) |
|
static void | races_leader_callback (void) |
|
static void | races_sex_callback (GtkWidget *w, gpointer data) |
|
static void | races_style_callback (GtkTreeSelection *select, gpointer data) |
|
static gboolean | races_selection_func (GtkTreeSelection *select, GtkTreeModel *model, GtkTreePath *path, gboolean selected, gpointer data) |
|
void | popup_notify_dialog (const char *caption, const char *headline, const char *lines) |
|
static void | notify_goto_response (GtkWidget *w, gint response) |
|
static void | notify_connect_msg_response (GtkWidget *w, gint response) |
|
void | popup_notify_goto_dialog (const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile) |
|
void | popup_connect_msg (const char *headline, const char *message) |
|
static void | revolution_response (GtkWidget *w, gint response, gpointer data) |
|
void | popup_revolution_dialog (struct government *government) |
|
static void | pillage_callback (GtkWidget *dlg, gint arg) |
|
void | popup_pillage_dialog (struct unit *punit, bv_extras extras) |
|
void | unit_select_dialog_popup (struct tile *ptile) |
|
void | unit_select_dialog_update_real (void *unused) |
|
static GtkTreePath * | path_to_nation_on_list (Nation_type_id nation, GtkTreeView *list) |
|
static void | select_nation_on_tab (GtkWidget *tab_list, int nation) |
|
static void | sync_tabs_to_nation (int nation) |
|
static void | populate_leader_list (void) |
|
static void | select_nation (int nation, const char *leadername, bool is_male, int style_id) |
|
static GtkWidget * | create_list_of_nations_in_group (struct nation_group *group, int index) |
|
static void | create_nation_selection_lists (void) |
|
void | races_update_pickable (bool nationset_change) |
|
void | nationset_sync_to_server (const char *nationset) |
|
static void | nationset_callback (GtkComboBox *b, gpointer data) |
|
void | popup_races_dialog (struct player *pplayer) |
|
void | popdown_races_dialog (void) |
|
void | races_toggles_set_sensitive (void) |
|
gboolean | taxrates_callback (GtkGestureClick *gesture, int n_press, double x, double y) |
|
gboolean | reverse_taxrates_callback (GtkGestureClick *gesture, int n_press, double x, double y) |
|
void | popup_upgrade_dialog (struct unit_list *punits) |
|
void | popup_disband_dialog (struct unit_list *punits) |
|
void | popdown_all_game_dialogs (void) |
|
void | show_tech_gained_dialog (Tech_type_id tech) |
|
void | show_tileset_error (bool fatal, const char *tset_name, const char *msg) |
|
bool | handmade_scenario_warning (void) |
|
void | popup_combat_info (int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran) |
|
static void | act_conf_response (GtkWidget *dialog, gint response, gpointer data) |
|
void | request_action_confirmation (const char *expl, struct act_confirmation_data *data) |
|
◆ act_conf_response()
This is the response callback for the action confirmation dialog.
Definition at line 1631 of file dialogs.c.
◆ create_list_of_nations_in_group()
Creates a list of currently-pickable nations in the given group Inserts appropriate gtk_tree_view into races_nation_list[index] (or NULL if the group has no nations) If group == NULL, create a list of all nations
Definition at line 612 of file dialogs.c.
◆ create_nation_selection_lists()
Creates lists of nations for left side of nation selection dialog
Definition at line 698 of file dialogs.c.
◆ create_races_dialog()
Create nations dialog
Definition at line 844 of file dialogs.c.
◆ handmade_scenario_warning()
Give a warning when user is about to edit scenario with manually set properties.
Definition at line 1612 of file dialogs.c.
◆ nationset_callback()
Called when the nationset control's value has changed.
Definition at line 818 of file dialogs.c.
◆ nationset_sync_to_server()
Sync nationset control with the current state of the server.
Definition at line 805 of file dialogs.c.
◆ notify_connect_msg_response()
User clicked close for connect message dialog
Definition at line 186 of file dialogs.c.
◆ notify_goto_response()
User has responded to notify dialog with possibility to center (goto) on event location.
Definition at line 158 of file dialogs.c.
◆ path_to_nation_on_list()
Return the GtkTreePath for a given nation on the specified list, or NULL if it's not there at all. Caller must free with gtk_tree_path_free().
Definition at line 399 of file dialogs.c.
◆ pillage_callback()
Callback for pillage dialog.
Definition at line 313 of file dialogs.c.
◆ popdown_all_game_dialogs()
This function is called when the client disconnects or the game is over. It should close all dialog windows for that game.
Definition at line 1553 of file dialogs.c.
◆ popdown_races_dialog()
◆ populate_leader_list()
Populates leader list. If no nation selected, blanks it.
Definition at line 490 of file dialogs.c.
◆ popup_combat_info()
void popup_combat_info |
( |
int |
attacker_unit_id, |
|
|
int |
defender_unit_id, |
|
|
int |
attacker_hp, |
|
|
int |
defender_hp, |
|
|
bool |
make_att_veteran, |
|
|
bool |
make_def_veteran |
|
) |
| |
Popup detailed information about battle or save information for some kind of statistics
Definition at line 1622 of file dialogs.c.
◆ popup_connect_msg()
Popup a dialog to display connection message from server.
Definition at line 239 of file dialogs.c.
◆ popup_disband_dialog()
void popup_disband_dialog |
( |
struct unit_list * |
punits | ) |
|
◆ popup_notify_dialog()
Popup a generic dialog to display some generic information.
Definition at line 103 of file dialogs.c.
◆ popup_notify_goto_dialog()
Popup a dialog to display information about an event that has a specific location. The user should be given the option to goto that location.
Definition at line 196 of file dialogs.c.
◆ popup_pillage_dialog()
Opens pillage dialog listing possible pillage targets.
Definition at line 338 of file dialogs.c.
◆ popup_races_dialog()
Popup the dialog 10% inside the main-window
Definition at line 1233 of file dialogs.c.
◆ popup_revolution_dialog()
Popup revolution dialog for user
Definition at line 284 of file dialogs.c.
◆ popup_upgrade_dialog()
void popup_upgrade_dialog |
( |
struct unit_list * |
punits | ) |
|
Pops up a dialog to confirm upgrading of the unit.
Definition at line 1472 of file dialogs.c.
◆ races_leader_callback()
Leader name has been chosen
Definition at line 1340 of file dialogs.c.
◆ races_nation_callback()
Called whenever a user selects a nation in nation list
Definition at line 1311 of file dialogs.c.
◆ races_response()
User has selected some of the responses for whole nations dialog
Definition at line 1398 of file dialogs.c.
◆ races_selection_func()
Determines which nations can be selected in the UI
Definition at line 1368 of file dialogs.c.
◆ races_sex_callback()
Leader sex has been chosen
Definition at line 1360 of file dialogs.c.
◆ races_style_callback()
City style has been chosen
Definition at line 1383 of file dialogs.c.
◆ races_toggles_set_sensitive()
void races_toggles_set_sensitive |
( |
void |
| ) |
|
Update which nations are allowed to be selected (due to e.g. another player choosing a nation).
Definition at line 1263 of file dialogs.c.
◆ races_update_pickable()
void races_update_pickable |
( |
bool |
nationset_change | ) |
|
The server has changed the set of selectable nations. Update any current nations dialog accordingly.
Definition at line 733 of file dialogs.c.
◆ request_action_confirmation()
Common code wants confirmation for an action.
Definition at line 1646 of file dialogs.c.
◆ reverse_taxrates_callback()
◆ revolution_response()
User has responded to revolution dialog
Definition at line 265 of file dialogs.c.
◆ select_nation()
Update dialog state by selecting a nation and choosing values for its parameters, and update the right-hand side of the dialog accordingly. If 'leadername' is NULL, pick a random leader name and sex from the nation's list (ignoring the 'is_male' parameter).
Definition at line 516 of file dialogs.c.
◆ select_nation_on_tab()
Make sure the given nation is selected in the list on a given groups notebook tab, if it's present on that tab. Intended for synchronising the tabs to the current selection, so does not disturb the controls on the right-hand side.
Definition at line 429 of file dialogs.c.
◆ show_tech_gained_dialog()
Player has gained a new tech.
Definition at line 1563 of file dialogs.c.
◆ show_tileset_error()
Show tileset error dialog. It's blocking as client will shutdown as soon as this function returns.
Definition at line 1579 of file dialogs.c.
◆ sync_tabs_to_nation()
Select the given nation in the nation lists in the left-hand-side notebook.
Definition at line 474 of file dialogs.c.
◆ taxrates_callback()
Adjust tax rates from main window
Definition at line 1444 of file dialogs.c.
◆ unit_select_dialog_popup()
◆ unit_select_dialog_update_real()
void unit_select_dialog_update_real |
( |
void * |
unused | ) |
|
◆ is_showing_pillage_dialog
◆ nationsets_chooser
◆ races_leader
◆ races_nation_list
◆ races_notebook
◆ races_player
◆ races_properties
◆ races_sex
◆ races_shell
◆ races_style_list
◆ races_text
◆ selected_nation
◆ selected_sex
◆ selected_style