67#define SPECLIST_TAG dialog
68#define SPECLIST_TYPE struct spaceship_dialog
71#define dialog_list_iterate(dialoglist, pdialog) \
72 TYPED_LIST_ITERATE(struct spaceship_dialog, dialoglist, pdialog)
73#define dialog_list_iterate_end LIST_ITERATE_END
106 if (pdialog->pplayer ==
pplayer) {
133 GTK_RESPONSE_ACCEPT,
TRUE);
136 GTK_RESPONSE_ACCEPT,
FALSE);
205 case GTK_RESPONSE_ACCEPT:
221 GtkWidget *hbox, *frame;
233 GTK_RESPONSE_ACCEPT);
235 g_signal_connect(pdialog->
shell->
vbox,
"destroy",
239 hbox = gtk_grid_new();
240 gtk_grid_set_column_spacing(GTK_GRID(hbox), 5);
241 gtk_container_add(GTK_CONTAINER(pdialog->
shell->
vbox), hbox);
243 frame = gtk_frame_new(NULL);
244 gtk_container_add(GTK_CONTAINER(hbox), frame);
249 gtk_widget_set_size_request(pdialog->
image_canvas, w, h);
251 gtk_widget_set_events(pdialog->
image_canvas, GDK_EXPOSURE_MASK);
252 gtk_container_add(GTK_CONTAINER(frame), pdialog->
image_canvas);
260 gtk_label_set_justify(GTK_LABEL(pdialog->
info_label), GTK_JUSTIFY_LEFT);
261 gtk_widget_set_halign(pdialog->
info_label, GTK_ALIGN_START);
262 gtk_widget_set_valign(pdialog->
info_label, GTK_ALIGN_START);
264 gtk_container_add(GTK_CONTAINER(hbox), pdialog->
info_label);
265 gtk_widget_set_name(pdialog->
info_label,
"spaceship_label");
283 gtk_label_set_text(GTK_LABEL(pdialog->
info_label),
#define FC_STATIC_CANVAS_INIT
void gui_dialog_destroy(struct gui_dialog *dlg)
void gui_dialog_raise(struct gui_dialog *dlg)
void gui_dialog_new(struct gui_dialog **pdlg, GtkNotebook *notebook, gpointer user_data, bool check_top)
void gui_dialog_response_set_callback(struct gui_dialog *dlg, GUI_DIALOG_RESPONSE_FUN fun)
GtkWidget * gui_dialog_add_button(struct gui_dialog *dlg, const char *text, int response)
void gui_dialog_show_all(struct gui_dialog *dlg)
void gui_dialog_set_title(struct gui_dialog *dlg, const char *title)
void gui_dialog_set_response_sensitive(struct gui_dialog *dlg, int response, bool setting)
static void spaceship_dialog_update_info(struct spaceship_dialog *pdialog)
static gboolean spaceship_image_canvas_expose(GtkWidget *widget, cairo_t *cr, gpointer data)
static struct spaceship_dialog * get_spaceship_dialog(struct player *pplayer)
void popdown_spaceship_dialog(struct player *pplayer)
static void spaceship_destroy_callback(GtkWidget *w, gpointer data)
#define dialog_list_iterate_end
void spaceship_dialog_init(void)
#define dialog_list_iterate(dialoglist, pdialog)
static struct dialog_list * dialog_list
static void spaceship_dialog_update_image(struct spaceship_dialog *pdialog)
void spaceship_dialog_done(void)
void popup_spaceship_dialog(struct player *pplayer)
void refresh_spaceship_dialog(struct player *pplayer)
static struct spaceship_dialog * create_spaceship_dialog(struct player *pplayer)
static void spaceship_response(struct gui_dialog *dlg, int response, gpointer data)
void get_spaceship_dimensions(int *width, int *height)
void put_spaceship(struct canvas *pcanvas, int canvas_x, int canvas_y, const struct player *pplayer)
int send_packet_spaceship_launch(struct connection *pc)
const char * player_name(const struct player *pplayer)
enum spaceship_state state
struct player_spaceship spaceship
struct gui_dialog * shell
const char * get_spaceship_descr(struct player_spaceship *pship)
bool victory_enabled(enum victory_condition_type victory)