[Freeciv-Dev] (PR#10937) minor startup screen bug
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10937 >
> [bagpipe@xxxxxxxxx - Mon Nov 08 00:27:13 2004]:
>
> If you change the "Number of Players (including AI)" field and then
> press <Enter>, then that option will get updated. If you change that
> field and then press <Tab> or click on the <Start> button, then that
> option will not get updated.
Here is a patch. To be commited ASAP.
Index: client/gui-gtk-2.0/pages.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/pages.c,v
retrieving revision 1.10
diff -u -r1.10 pages.c
--- client/gui-gtk-2.0/pages.c 1 Nov 2004 22:02:22 -0000 1.10
+++ client/gui-gtk-2.0/pages.c 14 Nov 2004 00:51:03 -0000
@@ -897,7 +897,6 @@
GtkWidget *label, *menu, *item;
GtkCellRenderer *rend;
- GtkAdjustment *adj;
int i;
box = gtk_vbox_new(FALSE, 8);
@@ -919,13 +918,13 @@
gtk_table_set_col_spacings(GTK_TABLE(table), 12);
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
- adj = GTK_ADJUSTMENT(gtk_adjustment_new(1, 1, MAX_NUM_PLAYERS, 1, 1, 1));
- spin = gtk_spin_button_new(adj, 1, 0);
+ spin = gtk_spin_button_new_with_range(1, MAX_NUM_PLAYERS, 1);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin), 0);
/* Default to aifill 5. */
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), 5);
gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin),
GTK_UPDATE_IF_VALID);
- g_signal_connect_after(spin, "activate",
+ g_signal_connect_after(spin, "value_changed",
G_CALLBACK(ai_fill_callback), NULL);
gtk_table_attach_defaults(GTK_TABLE(table), spin, 1, 2, 0, 1);
|
|