Freeciv-3.1
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "astring.h"
#include "fcintl.h"
#include "support.h"
#include "diptreaty.h"
#include "packets.h"
#include "nation.h"
#include "player.h"
#include "client_main.h"
#include "climisc.h"
#include "connectdlg_common.h"
#include "tilespec.h"
#include "colors.h"
#include "graphics.h"
#include "options.h"
#include "text.h"
#include "chatline.h"
#include "dialogs.h"
#include "gui_main.h"
#include "gui_stuff.h"
#include "inteldlg.h"
#include "spaceshipdlg.h"
#include "plrdlg.h"
Go to the source code of this file.
Macros | |
#define | PLR_DLG_COL_STYLE (0 + num_player_dlg_columns) |
#define | PLR_DLG_COL_WEIGHT (1 + num_player_dlg_columns) |
#define | PLR_DLG_COL_ID (2 + num_player_dlg_columns) |
#define | PLR_DLG_COL_TOOLTIP (3 + num_player_dlg_columns) |
#define | PLR_DLG_COL_TOTAL (PLR_DLG_COL_TOOLTIP + 1) |
#define | MIN_DIMENSION 5 |
Functions | |
static void | create_players_dialog (void) |
static void | players_meet_callback (GtkMenuItem *item, gpointer data) |
static void | players_war_callback (GtkMenuItem *item, gpointer data) |
static void | players_vision_callback (GtkMenuItem *item, gpointer data) |
static void | players_intel_callback (GtkMenuItem *item, gpointer data) |
static void | players_intel_wonder_callback (GtkMenuItem *item, gpointer data) |
static void | players_sship_callback (GtkMenuItem *item, gpointer data) |
static void | players_ai_toggle_callback (GtkMenuItem *item, gpointer data) |
static void | players_ai_skill_callback (GtkMenuItem *item, gpointer data) |
static void | update_views (void) |
void | popup_players_dialog (bool raise) |
void | popdown_players_dialog (void) |
GdkPixbuf * | create_player_icon (const struct player *plr) |
static void | update_players_menu (void) |
static void | selection_callback (GtkTreeSelection *selection, gpointer data) |
static gboolean | button_press_callback (GtkTreeView *view, GdkEventButton *ev) |
static gint | plrdlg_sort_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data) |
static GtkListStore * | players_dialog_store_new (void) |
static void | toggle_view (GtkCheckMenuItem *item, gpointer data) |
static void | toggle_dead_players (GtkCheckMenuItem *item, gpointer data) |
static GtkWidget * | create_diplomacy_menu (void) |
static GtkWidget * | create_intelligence_menu (void) |
static GtkWidget * | create_show_menu (void) |
GdkPixbuf * | get_flag (const struct nation_type *nation) |
static void | fill_row (GtkListStore *store, GtkTreeIter *it, const struct player *pplayer) |
static bool | player_should_be_shown (const struct player *pplayer) |
void | real_players_dialog_update (void *unused) |
static void | confirm_cancel_pact (enum clause_type clause, int plrno, char *title, char *question) |
Variables | |
struct gui_dialog * | players_dialog_shell |
static GtkWidget * | players_list |
static GtkTreeSelection * | players_selection |
static GtkWidget * | players_int_command |
static GtkWidget * | players_meet_command |
static GtkWidget * | players_war_command |
static GtkWidget * | players_vision_command |
static GtkWidget * | players_sship_command |
static GtkListStore * | players_dialog_store |
#define PLR_DLG_COL_ID (2 + num_player_dlg_columns) |
#define PLR_DLG_COL_STYLE (0 + num_player_dlg_columns) |
#define PLR_DLG_COL_TOOLTIP (3 + num_player_dlg_columns) |
#define PLR_DLG_COL_TOTAL (PLR_DLG_COL_TOOLTIP + 1) |
#define PLR_DLG_COL_WEIGHT (1 + num_player_dlg_columns) |
|
static |
Button pressed on player list
Definition at line 211 of file plrdlg.c.
Referenced by create_players_dialog().
|
static |
Confirm pact/treaty cancellation. Frees strings passed in.
Definition at line 787 of file plrdlg.c.
Referenced by players_vision_callback(), players_vision_callback(), players_war_callback(), and players_war_callback().
|
static |
Create and return the "diplomacy" menu for the player report. This menu contains diplomacy actions the current player can use on other nations.
Definition at line 337 of file plrdlg.c.
Referenced by create_players_dialog().
|
static |
Create and return the "intelligence" menu. The items in this menu are used by the player to see more detailed information about other nations.
Definition at line 368 of file plrdlg.c.
Referenced by create_players_dialog().
GdkPixbuf * create_player_icon | ( | const struct player * | plr | ) |
Create a small colored square representing the player color, for use in player lists. May return NULL if the player has no color yet.
Definition at line 117 of file plrdlg.c.
Referenced by fill_row(), and real_conn_list_dialog_update().
|
static |
Create all of player dialog
Definition at line 429 of file plrdlg.c.
Referenced by popup_players_dialog().
|
static |
Create 'show' menu for player dialog
Definition at line 397 of file plrdlg.c.
Referenced by create_players_dialog().
|
static |
Fills the player list with the information for 'pplayer' at the row given by 'it'.
Definition at line 650 of file plrdlg.c.
Referenced by real_players_dialog_update().
GdkPixbuf * get_flag | ( | const struct nation_type * | nation | ) |
Builds the flag pixmap. May return NULL if there is not enough memory. You must call g_object_unref on the returned pixbuf when it is no longer needed.
Definition at line 609 of file plrdlg.c.
Referenced by citizens_dialog_row(), create_list_of_nations_in_group(), endgame_report_dialog_player(), extviewer_refresh_widgets(), extviewer_view_cell_toggled(), fill_row(), list_store_append_player_cities(), property_page_set_store_value(), real_conn_list_dialog_update(), refresh_player_pov_indicator(), and refresh_tool_applied_player_combo().
Return TRUE if the player should be shown in the player list.
Definition at line 722 of file plrdlg.c.
Referenced by real_players_dialog_update().
|
static |
AI skill level setting callback.
Definition at line 947 of file plrdlg.c.
Referenced by create_ai_menu(), and create_players_dialog().
|
static |
AI toggle callback.
Definition at line 930 of file plrdlg.c.
Referenced by create_ai_menu(), and create_players_dialog().
|
static |
Create a player dialog store.
Definition at line 268 of file plrdlg.c.
Referenced by create_players_dialog().
|
static |
Intelligence report query
Definition at line 878 of file plrdlg.c.
Referenced by create_intelligence_menu(), and create_intelligence_menu().
|
static |
Wonders list report query
Definition at line 897 of file plrdlg.c.
Referenced by create_intelligence_menu(), and create_intelligence_menu().
|
static |
Callback for diplomatic meetings button. This button is enabled iff we can meet with the other player.
Definition at line 769 of file plrdlg.c.
Referenced by create_diplomacy_menu(), and create_diplomacy_menu().
|
static |
Spaceship query callback
Definition at line 914 of file plrdlg.c.
Referenced by create_intelligence_menu(), and create_intelligence_menu().
|
static |
Withdrawing shared vision
Definition at line 851 of file plrdlg.c.
Referenced by create_diplomacy_menu(), and create_diplomacy_menu().
|
static |
Pact cancellation requested
Definition at line 810 of file plrdlg.c.
Referenced by create_diplomacy_menu(), and create_diplomacy_menu().
|
static |
Sorting function for plr dlg.
Definition at line 244 of file plrdlg.c.
Referenced by players_dialog_store_new().
void popdown_players_dialog | ( | void | ) |
Closes the players dialog.
Definition at line 105 of file plrdlg.c.
Referenced by exit_players_dlg_callback(), player_nation_callback(), and popdown_all_game_dialogs().
void popup_players_dialog | ( | bool | raise | ) |
Popup the dialog 10% inside the main-window, and optionally raise it.
Definition at line 91 of file plrdlg.c.
Referenced by fc_client::create_game_page(), players_action_callback(), report_nations_callback(), report_nations_callback(), and mr_menu::slot_show_nations().
void real_players_dialog_update | ( | void * | unused | ) |
Clear and refill the entire player list.
Definition at line 732 of file plrdlg.c.
Referenced by create_players_dialog(), players_dialog_update(), toggle_dead_players(), and toggle_dead_players().
|
static |
Something selected from player menu
Definition at line 203 of file plrdlg.c.
Referenced by create_players_dialog().
|
static |
Called whenever player toggles the 'Show/Dead Players' menu item
Definition at line 326 of file plrdlg.c.
Referenced by create_show_menu(), and create_show_menu().
|
static |
Toggled column visibility
Definition at line 315 of file plrdlg.c.
Referenced by create_show_menu(), and create_show_menu().
|
static |
|
static |
Refresh players dialog views.
Definition at line 966 of file plrdlg.c.
Referenced by real_players_dialog_update(), toggle_view(), and toggle_view().
struct gui_dialog* players_dialog_shell |
Definition at line 58 of file plrdlg.c.
Referenced by create_players_dialog(), popdown_players_dialog(), popup_diplomacy_dialog(), popup_players_dialog(), and real_players_dialog_update().
|
static |
Definition at line 67 of file plrdlg.c.
Referenced by create_players_dialog(), and real_players_dialog_update().
|
static |
Definition at line 61 of file plrdlg.c.
Referenced by create_intelligence_menu(), create_intelligence_menu(), and update_players_menu().
|
static |
Definition at line 59 of file plrdlg.c.
Referenced by create_players_dialog(), and update_views().
|
static |
Definition at line 62 of file plrdlg.c.
Referenced by create_diplomacy_menu(), create_diplomacy_menu(), and update_players_menu().
|
static |
Definition at line 60 of file plrdlg.c.
Referenced by create_players_dialog(), players_ai_skill_callback(), players_ai_skill_callback(), players_ai_toggle_callback(), players_ai_toggle_callback(), players_intel_callback(), players_intel_callback(), players_intel_wonder_callback(), players_intel_wonder_callback(), players_meet_callback(), players_meet_callback(), players_sship_callback(), players_sship_callback(), players_vision_callback(), players_vision_callback(), players_war_callback(), players_war_callback(), real_players_dialog_update(), and update_players_menu().
|
static |
Definition at line 65 of file plrdlg.c.
Referenced by create_intelligence_menu(), create_intelligence_menu(), and update_players_menu().
|
static |
Definition at line 64 of file plrdlg.c.
Referenced by create_diplomacy_menu(), create_diplomacy_menu(), and update_players_menu().
|
static |
Definition at line 63 of file plrdlg.c.
Referenced by create_diplomacy_menu(), create_diplomacy_menu(), and update_players_menu().