137 GtkWidget *sw, *label, *frame, *vbox;
138 GtkCellRenderer *rend;
139 GtkTreeViewColumn *col;
141 dshell = gtk_dialog_new_with_buttons(
_(
"Goto/Airlift Unit"),
152 gtk_window_set_position(GTK_WINDOW(
dshell), GTK_WIN_POS_MOUSE);
154 g_signal_connect(
dshell,
"destroy",
155 G_CALLBACK(gtk_widget_destroyed), &
dshell);
156 g_signal_connect(
dshell,
"response",
159 source = gtk_label_new(
"" );
160 gtk_label_set_line_wrap(GTK_LABEL(
source),
TRUE);
161 gtk_label_set_justify(GTK_LABEL(
source), GTK_JUSTIFY_CENTER);
162 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(
dshell))),
165 label = g_object_new(GTK_TYPE_LABEL,
166 "use-underline",
TRUE,
167 "label",
_(
"Select destination ci_ty"),
171 frame = gtk_frame_new(
"");
172 gtk_frame_set_label_widget(GTK_FRAME(frame), label);
173 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(
dshell))),
176 vbox = gtk_grid_new();
177 gtk_orientable_set_orientation(GTK_ORIENTABLE(vbox),
178 GTK_ORIENTATION_VERTICAL);
179 gtk_grid_set_row_spacing(GTK_GRID(vbox), 6);
180 gtk_container_add(GTK_CONTAINER(frame), vbox);
183 GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
184 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(
goto_list_store),
192 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
view),
TRUE);
194 gtk_tree_view_set_enable_search(GTK_TREE_VIEW(
view),
TRUE);
197 gtk_label_set_mnemonic_widget(GTK_LABEL(label),
view);
200 rend = gtk_cell_renderer_text_new();
201 col = gtk_tree_view_column_new_with_attributes(
_(
"Id"), rend,
203 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
207 rend = gtk_cell_renderer_text_new();
208 col = gtk_tree_view_column_new_with_attributes(
_(
"City"), rend,
210 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
213 rend = gtk_cell_renderer_pixbuf_new();
214 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
216 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
218 rend = gtk_cell_renderer_text_new();
219 col = gtk_tree_view_column_new_with_attributes(
_(
"Nation"), rend,
221 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
224 rend = gtk_cell_renderer_text_new();
225 col = gtk_tree_view_column_new_with_attributes(
_(
"Airlift"), rend,
227 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
230 sw = gtk_scrolled_window_new(NULL, NULL);
231 gtk_container_add(GTK_CONTAINER(sw),
view);
232 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
233 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
234 gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(sw), 200);
236 gtk_container_add(GTK_CONTAINER(vbox), sw);
238 all_toggle = gtk_check_button_new_with_mnemonic(
_(
"Show _All Cities"));
239 gtk_container_add(GTK_CONTAINER(vbox),
all_toggle);
246 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)