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.22 */
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/******************************************************************/
77struct intel_dialog {
78 struct player *pplayer;
79 GtkWidget *shell;
80
81 GtkTreeStore *diplstates;
82 GtkListStore *techs;
83 GtkWidget *table_labels[LABEL_LAST];
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{
225
227}
228
229/**********************************************************************/
233{
234 struct intel_wonder_dialog *pdialog = get_intel_wonder_dialog(p);
235
236 intel_wonder_destroy_callback(NULL, pdialog);
237}
238
239/**********************************************************************/
243static struct intel_dialog *create_intel_dialog(struct player *p)
244{
245 struct intel_dialog *pdialog;
246
247 GtkWidget *shell, *notebook, *label, *sw, *view, *table;
248 GtkCellRenderer *rend;
249 GtkTreeViewColumn *col;
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 _("_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
404 pdialog->rule = gtk_label_new("-");
405
406 /* columns: 0 - wonder name, 1 - location (city/unknown/lost),
407 * 2 - strikethrough (for lost or obsolete),
408 * 3 - font weight (great wonders in bold) */
409 pdialog->wonders = gtk_list_store_new(4, G_TYPE_STRING,
410 G_TYPE_STRING,
411 G_TYPE_BOOLEAN,
412 G_TYPE_INT);
413 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(pdialog->wonders),
414 3, GTK_SORT_DESCENDING);
415 view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(pdialog->wonders));
416 g_object_set(view, "margin", 6, NULL);
417 gtk_widget_set_hexpand(view, TRUE);
418 gtk_widget_set_vexpand(view, TRUE);
419 g_object_unref(pdialog->wonders);
420 gtk_container_set_border_width(GTK_CONTAINER(view), 6);
421 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), FALSE);
422
423 rend = gtk_cell_renderer_text_new();
424 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), -1, NULL,
425 rend, "text", 0,
426 "strikethrough", 2,
427 "weight", 3,
428 NULL);
429
430 rend = gtk_cell_renderer_text_new();
431 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), -1, NULL,
432 rend, "text", 1,
433 NULL);
434
435 sw = gtk_scrolled_window_new(NULL, NULL);
436 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
437 GTK_SHADOW_ETCHED_IN);
438 box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
439 gtk_container_add(GTK_CONTAINER(box), pdialog->rule);
440 gtk_container_add(GTK_CONTAINER(box), view);
441 gtk_container_add(GTK_CONTAINER(sw), box);
442
443 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
444 GTK_POLICY_AUTOMATIC,
445 GTK_POLICY_AUTOMATIC);
446
447 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(shell))),
448 sw);
449
450 gtk_widget_show_all(gtk_dialog_get_content_area(GTK_DIALOG(shell)));
451
452 wonder_dialog_list_prepend(wonder_dialogs, pdialog);
453
454 return pdialog;
455}
456
457/**********************************************************************/
462{
464
465 if (pdialog) {
466 const struct research *mresearch, *presearch;
467 GtkTreeIter diplstates[DS_LAST];
468 int i;
469 bool global_observer = client_is_global_observer();
470 struct player *me = client_player();
471 bool embassy_knowledge = global_observer || team_has_embassy(me->team, p);
472 bool trade_knowledge = global_observer || p == me || could_intel_with_player(me, p);
473
474 /* window title. */
475 gchar *title = g_strdup_printf(_("Foreign Intelligence: %s Empire"),
477 gtk_window_set_title(GTK_WINDOW(pdialog->shell), title);
478 g_free(title);
479
480 /* diplomacy tab. */
481 gtk_tree_store_clear(pdialog->diplstates);
482
483 for (i = 0; i < ARRAY_SIZE(diplstates); i++) {
484 GtkTreeIter it;
485 GValue v = { 0, };
486
487 gtk_tree_store_append(pdialog->diplstates, &it, NULL);
488 g_value_init(&v, G_TYPE_STRING);
489 g_value_set_static_string(&v, diplstate_type_translated_name(i));
490 gtk_tree_store_set_value(pdialog->diplstates, &it, 0, &v);
491 g_value_unset(&v);
492 diplstates[i] = it;
493 }
494
495 players_iterate(other) {
496 const struct player_diplstate *state;
497 GtkTreeIter it;
498 GValue v = { 0, };
499
500 if (other == p || !other->is_alive) {
501 continue;
502 }
503 state = player_diplstate_get(p, other);
504 gtk_tree_store_append(pdialog->diplstates, &it,
505 &diplstates[state->type]);
506 g_value_init(&v, G_TYPE_STRING);
507 g_value_set_static_string(&v, player_name(other));
508 gtk_tree_store_set_value(pdialog->diplstates, &it, 0, &v);
509 g_value_unset(&v);
511
512 /* techs tab. */
513 gtk_list_store_clear(pdialog->techs);
514
515 mresearch = research_get(client_player());
516 presearch = research_get(p);
518 if (research_invention_state(presearch, advi) == TECH_KNOWN) {
519 GtkTreeIter it;
520
521 gtk_list_store_append(pdialog->techs, &it);
522
523 gtk_list_store_set(pdialog->techs, &it,
524 0, research_invention_state(mresearch, advi)
525 != TECH_KNOWN,
527 advi),
528 -1);
529 }
531
532 /* table labels. */
533 for (i = 0; i < ARRAY_SIZE(pdialog->table_labels); i++) {
534 if (pdialog->table_labels[i]) {
535 struct city *pcity;
536 gchar *buf = NULL;
537 char tbuf[256];
538
539 switch (i) {
540 case LABEL_RULER:
541 ruler_title_for_player(p, tbuf, sizeof(tbuf));
542 buf = g_strdup(tbuf);
543 break;
544 case LABEL_GOVERNMENT:
545 if (trade_knowledge) {
546 buf = g_strdup(government_name_for_player(p));
547 } else {
548 buf = g_strdup(_("(Unknown)"));
549 }
550 break;
551 case LABEL_CAPITAL:
552 pcity = player_primary_capital(p);
553 /* TRANS: "unknown" location */
554 buf = g_strdup((!pcity) ? _("(Unknown)") : city_name_get(pcity));
555 break;
556 case LABEL_GOLD:
557 if (trade_knowledge) {
558 buf = g_strdup_printf("%d", p->economic.gold);
559 } else {
560 buf = g_strdup(_("(Unknown)"));
561 }
562 break;
563 case LABEL_TAX:
564 if (embassy_knowledge) {
565 buf = g_strdup_printf("%d%%", p->economic.tax);
566 } else {
567 buf = g_strdup(_("(Unknown)"));
568 }
569 break;
570 case LABEL_SCIENCE:
571 if (embassy_knowledge) {
572 buf = g_strdup_printf("%d%%", p->economic.science);
573 } else {
574 buf = g_strdup(_("(Unknown)"));
575 }
576 break;
577 case LABEL_LUXURY:
578 if (embassy_knowledge) {
579 buf = g_strdup_printf("%d%%", p->economic.luxury);
580 } else {
581 buf = g_strdup(_("(Unknown)"));
582 }
583 break;
585 {
586 struct research *research = research_get(p);
587
588 switch (research->researching) {
589 case A_UNKNOWN:
590 /* TRANS: "Unknown" advance/technology */
591 buf = g_strdup(_("(Unknown)"));
592 break;
593 case A_UNSET:
594 if (embassy_knowledge) {
595 /* TRANS: missing value */
596 buf = g_strdup(_("(none)"));
597 } else {
598 buf = g_strdup(_("(Unknown)"));
599 }
600 break;
601 default:
602 buf = g_strdup_printf("%s(%d/%d)",
607 break;
608 }
609 break;
610 }
611 case LABEL_CULTURE:
612 if (embassy_knowledge) {
613 buf = g_strdup_printf("%d", p->client.culture);
614 } else {
615 buf = g_strdup(_("(Unknown)"));
616 }
617 break;
618 }
619
620 if (buf) {
621 gtk_label_set_text(GTK_LABEL(pdialog->table_labels[i]), buf);
622 g_free(buf);
623 }
624 }
625 }
626 }
627
628 /* Update also wonders list dialog */
630}
631
632/**********************************************************************/
636{
637 struct intel_wonder_dialog *pdialog = get_intel_wonder_dialog(p);
638
639 if (pdialog != NULL) {
640 gchar *title = g_strdup_printf(_("Wonders of %s Empire"),
642 const char *rule = NULL;
643
644 gtk_window_set_title(GTK_WINDOW(pdialog->shell), title);
645 g_free(title);
646
648 case WV_ALWAYS:
649 rule = _("All Wonders are known");
650 break;
651 case WV_NEVER:
652 rule = _("Small Wonders not known");
653 break;
654 }
655
656 gtk_label_set_text(GTK_LABEL(pdialog->rule), rule);
657
658 gtk_list_store_clear(pdialog->wonders);
659
660 improvement_iterate(impr) {
661 if (is_wonder(impr)) {
662 GtkTreeIter it;
663 const char *cityname;
664 bool is_lost = FALSE;
665
666 if (wonder_is_built(p, impr)) {
667 struct city *pcity = city_from_wonder(p, impr);
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