136 GtkWidget *sw, *label, *frame, *vbox;
137 GtkCellRenderer *rend;
138 GtkTreeViewColumn *col;
140 dshell = gtk_dialog_new_with_buttons(
_(
"Goto/Airlift Unit"),
151 gtk_window_set_position(GTK_WINDOW(
dshell), GTK_WIN_POS_MOUSE);
153 g_signal_connect(
dshell,
"destroy",
154 G_CALLBACK(gtk_widget_destroyed), &
dshell);
155 g_signal_connect(
dshell,
"response",
158 source = gtk_label_new(
"" );
159 gtk_label_set_line_wrap(GTK_LABEL(
source),
TRUE);
160 gtk_label_set_justify(GTK_LABEL(
source), GTK_JUSTIFY_CENTER);
161 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(
dshell))),
164 label = g_object_new(GTK_TYPE_LABEL,
165 "use-underline",
TRUE,
166 "label",
_(
"Select destination ci_ty"),
170 frame = gtk_frame_new(
"");
171 gtk_frame_set_label_widget(GTK_FRAME(frame), label);
172 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(
dshell))),
175 vbox = gtk_grid_new();
176 gtk_orientable_set_orientation(GTK_ORIENTABLE(vbox),
177 GTK_ORIENTATION_VERTICAL);
178 gtk_grid_set_row_spacing(GTK_GRID(vbox), 6);
179 gtk_container_add(GTK_CONTAINER(frame), vbox);
182 GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
183 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(
goto_list_store),
191 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
view),
TRUE);
193 gtk_tree_view_set_enable_search(GTK_TREE_VIEW(
view),
TRUE);
196 gtk_label_set_mnemonic_widget(GTK_LABEL(label),
view);
199 rend = gtk_cell_renderer_text_new();
200 col = gtk_tree_view_column_new_with_attributes(
_(
"Id"), rend,
202 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
206 rend = gtk_cell_renderer_text_new();
207 col = gtk_tree_view_column_new_with_attributes(
_(
"City"), rend,
209 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
212 rend = gtk_cell_renderer_pixbuf_new();
213 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
215 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
217 rend = gtk_cell_renderer_text_new();
218 col = gtk_tree_view_column_new_with_attributes(
_(
"Nation"), rend,
220 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
223 rend = gtk_cell_renderer_text_new();
224 col = gtk_tree_view_column_new_with_attributes(
_(
"Airlift"), rend,
226 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
229 sw = gtk_scrolled_window_new(NULL, NULL);
230 gtk_container_add(GTK_CONTAINER(sw),
view);
231 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
232 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
233 gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(sw), 200);
235 gtk_container_add(GTK_CONTAINER(vbox), sw);
237 all_toggle = gtk_check_button_new_with_mnemonic(
_(
"Show _All Cities"));
238 gtk_container_add(GTK_CONTAINER(vbox),
all_toggle);
245 gtk_widget_show_all(
dshell);
bool can_client_issue_orders(void)
bool client_has_player(void)
const char * get_airlift_text(const struct unit_list *punits, const struct city *pdest)