Freeciv-3.1
Loading...
Searching...
No Matches
inteldlg.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include <stdio.h>
19#include <stdlib.h>
20
21#include <gtk/gtk.h>
22
23/* utility */
24#include "fcintl.h"
25#include "log.h"
26#include "shared.h"
27#include "support.h"
28
29/* common */
30#include "government.h"
31#include "packets.h"
32#include "player.h"
33#include "research.h"
34
35/* client */
36#include "client_main.h"
37#include "options.h"
38
39/* client/gui-gtk-3.0 */
40#include "gui_main.h"
41#include "gui_stuff.h"
42#include "mapview.h"
43
44#include "inteldlg.h"
45
46/******************************************************************/
47static const char *table_text[] = {
48 N_("Ruler:"),
49 N_("Government:"),
50 N_("Capital:"),
51 N_("Gold:"),
52 NULL,
53 N_("Tax:"),
54 N_("Science:"),
55 N_("Luxury:"),
56 NULL,
57 N_("Researching:"),
58 N_("Culture:")
59};
60
75
76/******************************************************************/
78 struct player *pplayer;
79 GtkWidget *shell;
80
81 GtkTreeStore *diplstates;
82 GtkListStore *techs;
84};
85
86#define SPECLIST_TAG dialog
87#define SPECLIST_TYPE struct intel_dialog
88#include "speclist.h"
89
90#define dialog_list_iterate(dialoglist, pdialog) \
91 TYPED_LIST_ITERATE(struct intel_dialog, dialoglist, pdialog)
92#define dialog_list_iterate_end LIST_ITERATE_END
93
95 struct player *pplayer;
96 GtkWidget *shell;
97
98 GtkListStore *wonders;
99 GtkWidget *rule;
100};
101
102#define SPECLIST_TAG wonder_dialog
103#define SPECLIST_TYPE struct intel_wonder_dialog
104#include "speclist.h"
105
106#define wonder_dialog_list_iterate(dialoglist, pdialog) \
107 TYPED_LIST_ITERATE(struct intel_wonder_dialog, dialoglist, pdialog)
108#define wonder_dialog_list_iterate_end LIST_ITERATE_END
109
111static struct intel_dialog *create_intel_dialog(struct player *p);
112static struct wonder_dialog_list *wonder_dialogs;
114
115/**********************************************************************/
119{
120 dialog_list = dialog_list_new();
121 wonder_dialogs = wonder_dialog_list_new();
122}
123
124/**********************************************************************/
128{
129 dialog_list_destroy(dialog_list);
130 wonder_dialog_list_destroy(wonder_dialogs);
131}
132
133/**********************************************************************/
138{
140 if (pdialog->pplayer == pplayer) {
141 return pdialog;
142 }
144
145 return NULL;
146}
147
148/**********************************************************************/
153{
155 if (pdialog->pplayer == pplayer) {
156 return pdialog;
157 }
159
160 return NULL;
161}
162
163/**********************************************************************/
167{
168 struct intel_dialog *pdialog;
169
170 if (!(pdialog = get_intel_dialog(p))) {
172 }
173
175
176 gtk_window_present(GTK_WINDOW(pdialog->shell));
177}
178
179/**********************************************************************/
183{
184 struct intel_wonder_dialog *pdialog;
185
186 if (!(pdialog = get_intel_wonder_dialog(p))) {
187 pdialog = create_intel_wonder_dialog(p);
188 }
189
191
192 gtk_window_present(GTK_WINDOW(pdialog->shell));
193}
194
195/**********************************************************************/
198static void intel_destroy_callback(GtkWidget *w, gpointer data)
199{
200 struct intel_dialog *pdialog = (struct intel_dialog *)data;
201
202 dialog_list_remove(dialog_list, pdialog);
203
204 free(pdialog);
205}
206
207/**********************************************************************/
210static void intel_wonder_destroy_callback(GtkWidget *w, gpointer data)
211{
212 struct intel_wonder_dialog *pdialog = (struct intel_wonder_dialog *)data;
213
214 wonder_dialog_list_remove(wonder_dialogs, pdialog);
215
216 free(pdialog);
217}
218
219/**********************************************************************/
223{
226}
227
228/**********************************************************************/
232{
233 struct intel_wonder_dialog *pdialog = get_intel_wonder_dialog(p);
234
235 intel_wonder_destroy_callback(NULL, pdialog);
236}
237
238/**********************************************************************/
242static struct intel_dialog *create_intel_dialog(struct player *p)
243{
244 struct intel_dialog *pdialog;
245
246 GtkWidget *shell, *notebook, *label, *sw, *view, *table;
247 GtkCellRenderer *rend;
248 GtkTreeViewColumn *col;
249
250 int i;
251
252 pdialog = fc_malloc(sizeof(*pdialog));
253 pdialog->pplayer = p;
254
255 shell = gtk_dialog_new_with_buttons(NULL,
256 NULL,
257 0,
258 GTK_STOCK_CLOSE,
259 GTK_RESPONSE_CLOSE,
260 NULL);
261 pdialog->shell = shell;
262 gtk_window_set_default_size(GTK_WINDOW(shell), 350, 350);
264 gtk_dialog_set_default_response(GTK_DIALOG(shell), GTK_RESPONSE_CLOSE);
265
266 g_signal_connect(shell, "destroy",
267 G_CALLBACK(intel_destroy_callback), pdialog);
268 g_signal_connect(shell, "response",
269 G_CALLBACK(gtk_widget_destroy), NULL);
270
271 notebook = gtk_notebook_new();
272 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_BOTTOM);
273 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(shell))), notebook);
274
275 /* overview tab. */
276 table = gtk_grid_new();
277 g_object_set(table, "margin", 6, NULL);
278
279 gtk_grid_set_row_spacing(GTK_GRID(table), 2);
280 gtk_grid_set_column_spacing(GTK_GRID(table), 12);
281
282 /* TRANS: Overview tab of foreign intelligence report dialog */
283 label = gtk_label_new_with_mnemonic(_("_Overview"));
284 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table, label);
285
286 for (i = 0; i < ARRAY_SIZE(table_text); i++) {
287 if (table_text[i]) {
288 label = gtk_label_new(_(table_text[i]));
289 gtk_widget_set_halign(label, GTK_ALIGN_START);
290 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
291 gtk_grid_attach(GTK_GRID(table), label, 0, i, 1, 1);
292
293 label = gtk_label_new(NULL);
294 pdialog->table_labels[i] = label;
295 gtk_widget_set_halign(label, GTK_ALIGN_START);
296 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
297 gtk_grid_attach(GTK_GRID(table), label, 1, i, 1, 1);
298 } else {
299 pdialog->table_labels[i] = NULL;
300 }
301 }
302
303 /* diplomacy tab. */
304 pdialog->diplstates = gtk_tree_store_new(1, G_TYPE_STRING);
305
306 view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(pdialog->diplstates));
307 g_object_set(view, "margin", 6, NULL);
308 gtk_widget_set_hexpand(view, TRUE);
309 gtk_widget_set_vexpand(view, TRUE);
310 g_object_unref(pdialog->diplstates);
311 gtk_container_set_border_width(GTK_CONTAINER(view), 6);
312 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE);
313
314 rend = gtk_cell_renderer_text_new();
315 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
316 "text", 0, NULL);
317 gtk_tree_view_append_column(GTK_TREE_VIEW(view), col);
318
319 gtk_tree_view_expand_all(GTK_TREE_VIEW(view));
320
321 sw = gtk_scrolled_window_new(NULL,NULL);
322 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
323 GTK_SHADOW_ETCHED_IN);
324 gtk_container_add(GTK_CONTAINER(sw), view);
325
326 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
327 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
328
329 label = gtk_label_new_with_mnemonic(_("_Diplomacy"));
330 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sw, label);
331
332 /* techs tab. */
333 pdialog->techs = gtk_list_store_new(2, G_TYPE_BOOLEAN, G_TYPE_STRING);
334 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(pdialog->techs),
335 1, GTK_SORT_ASCENDING);
336
337 view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(pdialog->techs));
338 g_object_set(view, "margin", 6, NULL);
339 gtk_widget_set_hexpand(view, TRUE);
340 gtk_widget_set_vexpand(view, TRUE);
341 g_object_unref(pdialog->techs);
342 gtk_container_set_border_width(GTK_CONTAINER(view), 6);
343 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE);
344
345 rend = gtk_cell_renderer_toggle_new();
346 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
347 "active", 0, NULL);
348 gtk_tree_view_append_column(GTK_TREE_VIEW(view), col);
349
350 rend = gtk_cell_renderer_text_new();
351 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
352 "text", 1, NULL);
353 gtk_tree_view_append_column(GTK_TREE_VIEW(view), col);
354
355 sw = gtk_scrolled_window_new(NULL,NULL);
356 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
357 GTK_SHADOW_ETCHED_IN);
358 gtk_container_add(GTK_CONTAINER(sw), view);
359
360 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
361 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
362
363 label = gtk_label_new_with_mnemonic(_("_Techs"));
364 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sw, label);
365
366 gtk_widget_show_all(gtk_dialog_get_content_area(GTK_DIALOG(shell)));
367
368 dialog_list_prepend(dialog_list, pdialog);
369
370 return pdialog;
371}
372
373/**********************************************************************/
378{
379 struct intel_wonder_dialog *pdialog;
380 GtkWidget *shell, *sw, *view;
381 GtkCellRenderer *rend;
382 GtkWidget *box;
383
384 pdialog = fc_malloc(sizeof(*pdialog));
385 pdialog->pplayer = p;
386
387 shell = gtk_dialog_new_with_buttons(NULL,
388 NULL,
389 0,
390 _("_Close"),
391 GTK_RESPONSE_CLOSE,
392 NULL);
393 pdialog->shell = shell;
394 gtk_window_set_default_size(GTK_WINDOW(shell), 350, 350);
396 gtk_dialog_set_default_response(GTK_DIALOG(shell), GTK_RESPONSE_CLOSE);
397
398 g_signal_connect(shell, "destroy",
399 G_CALLBACK(intel_wonder_destroy_callback), pdialog);
400 g_signal_connect(shell, "response",
401 G_CALLBACK(gtk_widget_destroy), NULL);
402
403 pdialog->rule = gtk_label_new("-");
404
405 /* columns: 0 - wonder name, 1 - location (city/unknown/lost),
406 * 2 - strikethrough (for lost or obsolete),
407 * 3 - font weight (great wonders in bold) */
408 pdialog->wonders = gtk_list_store_new(4, G_TYPE_STRING,
409 G_TYPE_STRING,
410 G_TYPE_BOOLEAN,
411 G_TYPE_INT);
412 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(pdialog->wonders),
413 3, GTK_SORT_DESCENDING);
414 view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(pdialog->wonders));
415 g_object_set(view, "margin", 6, NULL);
416 gtk_widget_set_hexpand(view, TRUE);
417 gtk_widget_set_vexpand(view, TRUE);
418 g_object_unref(pdialog->wonders);
419 gtk_container_set_border_width(GTK_CONTAINER(view), 6);
420 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE);
421
422 rend = gtk_cell_renderer_text_new();
423 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), -1, NULL,
424 rend, "text", 0,
425 "strikethrough", 2,
426 "weight", 3,
427 NULL);
428
429 rend = gtk_cell_renderer_text_new();
430 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), -1, NULL,
431 rend, "text", 1,
432 NULL);
433
434 sw = gtk_scrolled_window_new(NULL, NULL);
435 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
436 GTK_SHADOW_ETCHED_IN);
437 box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
438 gtk_container_add(GTK_CONTAINER(box), pdialog->rule);
439 gtk_container_add(GTK_CONTAINER(box), view);
440 gtk_container_add(GTK_CONTAINER(sw), box);
441
442 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
443 GTK_POLICY_AUTOMATIC,
444 GTK_POLICY_AUTOMATIC);
445
446 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(shell))),
447 sw);
448
449 gtk_widget_show_all(gtk_dialog_get_content_area(GTK_DIALOG(shell)));
450
451 wonder_dialog_list_prepend(wonder_dialogs, pdialog);
452
453 return pdialog;
454}
455
456/**********************************************************************/
461{
463
464 if (pdialog) {
465 const struct research *mresearch, *presearch;
466 GtkTreeIter diplstates[DS_LAST];
467 int i;
468 bool global_observer = client_is_global_observer();
469 struct player *me = client_player();
470 bool embassy_knowledge = global_observer || team_has_embassy(me->team, p);
471 bool trade_knowledge = global_observer || p == me || could_intel_with_player(me, p);
472
473 /* window title. */
474 gchar *title = g_strdup_printf(_("Foreign Intelligence: %s Empire"),
476 gtk_window_set_title(GTK_WINDOW(pdialog->shell), title);
477 g_free(title);
478
479 /* diplomacy tab. */
480 gtk_tree_store_clear(pdialog->diplstates);
481
482 for (i = 0; i < ARRAY_SIZE(diplstates); i++) {
483 GtkTreeIter it;
484 GValue v = { 0, };
485
486 gtk_tree_store_append(pdialog->diplstates, &it, NULL);
487 g_value_init(&v, G_TYPE_STRING);
488 g_value_set_static_string(&v, diplstate_type_translated_name(i));
489 gtk_tree_store_set_value(pdialog->diplstates, &it, 0, &v);
490 g_value_unset(&v);
491 diplstates[i] = it;
492 }
493
494 players_iterate(other) {
495 const struct player_diplstate *state;
496 GtkTreeIter it;
497 GValue v = { 0, };
498
499 if (other == p || !other->is_alive) {
500 continue;
501 }
502 state = player_diplstate_get(p, other);
503 gtk_tree_store_append(pdialog->diplstates, &it,
504 &diplstates[state->type]);
505 g_value_init(&v, G_TYPE_STRING);
506 g_value_set_static_string(&v, player_name(other));
507 gtk_tree_store_set_value(pdialog->diplstates, &it, 0, &v);
508 g_value_unset(&v);
510
511 /* techs tab. */
512 gtk_list_store_clear(pdialog->techs);
513
514 mresearch = research_get(client_player());
515 presearch = research_get(p);
517 if (research_invention_state(presearch, advi) == TECH_KNOWN) {
518 GtkTreeIter it;
519
520 gtk_list_store_append(pdialog->techs, &it);
521
522 gtk_list_store_set(pdialog->techs, &it,
523 0, research_invention_state(mresearch, advi)
524 != TECH_KNOWN,
526 advi),
527 -1);
528 }
530
531 /* table labels. */
532 for (i = 0; i < ARRAY_SIZE(pdialog->table_labels); i++) {
533 if (pdialog->table_labels[i]) {
534 struct city *pcity;
535 gchar *buf = NULL;
536 char tbuf[256];
537
538 switch (i) {
539 case LABEL_RULER:
540 ruler_title_for_player(p, tbuf, sizeof(tbuf));
541 buf = g_strdup(tbuf);
542 break;
543 case LABEL_GOVERNMENT:
544 if (trade_knowledge) {
545 buf = g_strdup(government_name_for_player(p));
546 } else {
547 buf = g_strdup(_("(Unknown)"));
548 }
549 break;
550 case LABEL_CAPITAL:
551 pcity = player_primary_capital(p);
552 /* TRANS: "unknown" location */
553 buf = g_strdup((!pcity) ? _("(Unknown)") : city_name_get(pcity));
554 break;
555 case LABEL_GOLD:
556 if (trade_knowledge) {
557 buf = g_strdup_printf("%d", p->economic.gold);
558 } else {
559 buf = g_strdup(_("(Unknown)"));
560 }
561 break;
562 case LABEL_TAX:
563 if (embassy_knowledge) {
564 buf = g_strdup_printf("%d%%", p->economic.tax);
565 } else {
566 buf = g_strdup(_("(Unknown)"));
567 }
568 break;
569 case LABEL_SCIENCE:
570 if (embassy_knowledge) {
571 buf = g_strdup_printf("%d%%", p->economic.science);
572 } else {
573 buf = g_strdup(_("(Unknown)"));
574 }
575 break;
576 case LABEL_LUXURY:
577 if (embassy_knowledge) {
578 buf = g_strdup_printf("%d%%", p->economic.luxury);
579 } else {
580 buf = g_strdup(_("(Unknown)"));
581 }
582 break;
584 {
585 struct research *research = research_get(p);
586
587 switch (research->researching) {
588 case A_UNKNOWN:
589 /* TRANS: "Unknown" advance/technology */
590 buf = g_strdup(_("(Unknown)"));
591 break;
592 case A_UNSET:
593 if (embassy_knowledge) {
594 /* TRANS: missing value */
595 buf = g_strdup(_("(none)"));
596 } else {
597 buf = g_strdup(_("(Unknown)"));
598 }
599 break;
600 default:
601 buf = g_strdup_printf("%s(%d/%d)",
606 break;
607 }
608 break;
609 }
610 case LABEL_CULTURE:
611 if (embassy_knowledge) {
612 buf = g_strdup_printf("%d", p->client.culture);
613 } else {
614 buf = g_strdup(_("(Unknown)"));
615 }
616 break;
617 }
618
619 if (buf) {
620 gtk_label_set_text(GTK_LABEL(pdialog->table_labels[i]), buf);
621 g_free(buf);
622 }
623 }
624 }
625 }
626
627 /* Update also wonders list dialog */
629}
630
631/**********************************************************************/
635{
636 struct intel_wonder_dialog *pdialog = get_intel_wonder_dialog(p);
637
638 if (pdialog != NULL) {
639 gchar *title = g_strdup_printf(_("Wonders of %s Empire"),
641 const char *rule = NULL;
642
643 gtk_window_set_title(GTK_WINDOW(pdialog->shell), title);
644 g_free(title);
645
647 case WV_ALWAYS:
648 rule = _("All Wonders are known");
649 break;
650 case WV_NEVER:
651 rule = _("Small Wonders not known");
652 break;
653 }
654
655 gtk_label_set_text(GTK_LABEL(pdialog->rule), rule);
656
657 gtk_list_store_clear(pdialog->wonders);
658
659 improvement_iterate(impr) {
660 if (is_wonder(impr)) {
661 GtkTreeIter it;
662 const char *cityname;
663 bool is_lost = FALSE;
664
665 if (wonder_is_built(p, impr)) {
666 struct city *pcity = city_from_wonder(p, impr);
667
668 if (pcity) {
669 cityname = city_name_get(pcity);
670 } else {
671 cityname = _("(unknown city)");
672 }
673 if (improvement_obsolete(p, impr, NULL)) {
674 is_lost = TRUE;
675 }
676 } else if (wonder_is_lost(p, impr)) {
677 cityname = _("(lost)");
678 is_lost = TRUE;
679 } else {
680 continue;
681 }
682
683 gtk_list_store_append(pdialog->wonders, &it);
684 gtk_list_store_set(pdialog->wonders, &it,
686 1, cityname,
687 2, is_lost,
688 /* font weight: great wonders in bold */
689 3, is_great_wonder(impr) ? 700 : 400,
690 -1);
691 }
693 }
694}
const char * city_name_get(const struct city *pcity)
Definition city.c:1115
bool client_is_global_observer(void)
#define client_player()
bool could_intel_with_player(const struct player *pplayer, const struct player *aplayer)
Definition diptreaty.c:81
#define _(String)
Definition fcintl.h:67
#define N_(String)
Definition fcintl.h:69
struct civ_game game
Definition game.c:57
const char * ruler_title_for_player(const struct player *pplayer, char *buf, size_t buf_len)
Definition government.c:390
const char * government_name_for_player(const struct player *pplayer)
Definition government.c:153
GtkWidget * toplevel
Definition gui_main.c:124
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
Definition gui_stuff.c:281
void popup_intel_dialog(struct player *p)
Definition inteldlg.c:166
static struct intel_dialog * get_intel_dialog(struct player *pplayer)
Definition inteldlg.c:137
static void intel_wonder_destroy_callback(GtkWidget *w, gpointer data)
Definition inteldlg.c:210
void close_intel_wonder_dialog(struct player *p)
Definition inteldlg.c:231
static struct intel_wonder_dialog * get_intel_wonder_dialog(struct player *pplayer)
Definition inteldlg.c:152
void close_intel_dialog(struct player *p)
Definition inteldlg.c:222
#define wonder_dialog_list_iterate_end
Definition inteldlg.c:108
static const char * table_text[]
Definition inteldlg.c:47
void update_intel_wonder_dialog(struct player *p)
Definition inteldlg.c:634
static void intel_destroy_callback(GtkWidget *w, gpointer data)
Definition inteldlg.c:198
#define wonder_dialog_list_iterate(dialoglist, pdialog)
Definition inteldlg.c:106
#define dialog_list_iterate_end
Definition inteldlg.c:92
void popup_intel_wonder_dialog(struct player *p)
Definition inteldlg.c:182
#define dialog_list_iterate(dialoglist, pdialog)
Definition inteldlg.c:90
void intel_dialog_done(void)
Definition inteldlg.c:127
static struct dialog_list * dialog_list
Definition inteldlg.c:110
static struct wonder_dialog_list * wonder_dialogs
Definition inteldlg.c:112
table_label
Definition inteldlg.c:61
@ LABEL_GOLD
Definition inteldlg.c:65
@ LABEL_GOVERNMENT
Definition inteldlg.c:63
@ LABEL_SEP2
Definition inteldlg.c:70
@ LABEL_LUXURY
Definition inteldlg.c:69
@ LABEL_SCIENCE
Definition inteldlg.c:68
@ LABEL_RULER
Definition inteldlg.c:62
@ LABEL_CULTURE
Definition inteldlg.c:72
@ LABEL_CAPITAL
Definition inteldlg.c:64
@ LABEL_RESEARCHING
Definition inteldlg.c:71
@ LABEL_TAX
Definition inteldlg.c:67
@ LABEL_SEP1
Definition inteldlg.c:66
@ LABEL_LAST
Definition inteldlg.c:73
static struct intel_wonder_dialog * create_intel_wonder_dialog(struct player *p)
Definition inteldlg.c:377
void intel_dialog_init(void)
Definition inteldlg.c:118
static struct intel_dialog * create_intel_dialog(struct player *p)
Definition inteldlg.c:242
void update_intel_dialog(struct player *p)
Definition inteldlg.c:460
static struct gui_dialog * shell
Definition messagedlg.c:39
const char * title
Definition repodlgs.c:1313
bool wonder_is_lost(const struct player *pplayer, const struct impr_type *pimprove)
bool wonder_is_built(const struct player *pplayer, const struct impr_type *pimprove)
struct city * city_from_wonder(const struct player *pplayer, const struct impr_type *pimprove)
bool is_wonder(const struct impr_type *pimprove)
bool is_great_wonder(const struct impr_type *pimprove)
bool improvement_obsolete(const struct player *pplayer, const struct impr_type *pimprove, const struct city *pcity)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_malloc(sz)
Definition mem.h:34
const char * nation_adjective_for_player(const struct player *pplayer)
Definition nation.c:168
const char * player_name(const struct player *pplayer)
Definition player.c:886
bool team_has_embassy(const struct team *pteam, const struct player *tgt_player)
Definition player.c:214
struct city * player_primary_capital(const struct player *pplayer)
Definition player.c:1313
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
Definition player.c:317
#define players_iterate_end
Definition player.h:535
#define players_iterate(_pplayer)
Definition player.h:530
const char * research_advance_name_translation(const struct research *presearch, Tech_type_id tech)
Definition research.c:271
struct research * research_get(const struct player *pplayer)
Definition research.c:126
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
Definition research.c:616
#define ARRAY_SIZE(x)
Definition shared.h:85
Definition city.h:309
struct packet_game_info info
Definition game.h:89
GtkWidget * shell
Definition inteldlg.c:79
GtkTreeStore * diplstates
Definition inteldlg.c:81
GtkListStore * techs
Definition inteldlg.c:82
struct advanced_dialog * pdialog
Definition inteldlg.c:51
struct player * pplayer
Definition inteldlg.c:78
GtkWidget * table_labels[LABEL_LAST]
Definition inteldlg.c:83
struct player * pplayer
Definition inteldlg.c:95
GtkWidget * rule
Definition inteldlg.c:99
GtkListStore * wonders
Definition inteldlg.c:98
GtkWidget * shell
Definition inteldlg.c:96
enum wonder_visib_type small_wonder_visibility
enum diplstate_type type
Definition player.h:201
const struct player_diplstate ** diplstates
Definition player.h:278
struct player::@69::@72 client
struct team * team
Definition player.h:261
bool is_alive
Definition player.h:268
struct player_economic economic
Definition player.h:284
int culture
Definition player.h:367
Tech_type_id researching
Definition research.h:52
struct research::@75::@77 client
int researching_cost
Definition research.h:98
int bulbs_researched
Definition research.h:53
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47
#define advance_index_iterate_end
Definition tech.h:248
#define A_FIRST
Definition tech.h:44
#define A_UNSET
Definition tech.h:48
#define A_UNKNOWN
Definition tech.h:49
#define advance_index_iterate(_start, _index)
Definition tech.h:244