136 GtkWidget *sw, *label, *frame, *vgrid;
137 GtkCellRenderer *rend;
138 GtkTreeViewColumn *col;
141 dshell = gtk_dialog_new_with_buttons(
_(
"Goto/Airlift Unit"),
153 g_signal_connect(
dshell,
"destroy",
155 g_signal_connect(
dshell,
"response",
158 source = gtk_label_new(
"" );
160 gtk_label_set_justify(GTK_LABEL(
source), GTK_JUSTIFY_CENTER);
161 gtk_box_insert_child_after(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_insert_child_after(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(
dshell))),
175 vgrid = gtk_grid_new();
176 gtk_orientable_set_orientation(GTK_ORIENTABLE(vgrid),
177 GTK_ORIENTATION_VERTICAL);
178 gtk_grid_set_row_spacing(GTK_GRID(vgrid), 6);
179 gtk_frame_set_child(GTK_FRAME(frame), vgrid);
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();
230 gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(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_grid_attach(GTK_GRID(vgrid), sw, 0, grid_row++, 1, 1);
237 all_toggle = gtk_check_button_new_with_mnemonic(
_(
"Show _All Cities"));
238 gtk_grid_attach(GTK_GRID(vgrid),
all_toggle, 0, grid_row++, 1, 1);
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)