rem: GTK_SIGNAL_FUNC (worm_relative_movement_cb), (gpointer) i);  gtk_widget_show (button); gtk_table_attach (GTK_TABLE (table), button, 2, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0);  gtk_notebook_append_page (GTK_NOTEBOOK(notebook), table, label);
add: GTK_SIGNAL_FUNC (worm_relative_movement_cb), (gpointer) i);
context: void gnibbles_preferences_cb (GtkWidget *widget, gpointer data){	GtkWidget *notebook;	GtkWidget *label;	GtkWidget *hbox;	GtkWidget *frame;	GtkWidget *button;	GtkWidget *levelspinner;	GtkWidget *vbox;	GtkObject *adjustment;	GtkWidget *hbox2;	GtkWidget *label2;	GtkWidget *table;	GtkWidget *entry;	GtkWidget *omenu;	GtkWidget *menuitem;	GtkWidget *menu;	gchar buffer[256];	gint i, j;	GList *list;	gint running = 0;		if (pref_dialog)	{		gtk_window_present (GTK_WINDOW(pref_dialog));		return;	}	if (!paused) {		unpause = 1;		pause_game_cb (NULL, 0);	}	if (game_running ())		running = 1;	t_properties = gnibbles_properties_copy (properties);	pref_dialog = gtk_dialog_new_with_buttons (_("Gnibbles Preferences"),			GTK_WINDOW(window),			0,			GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,			GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL);	notebook = gtk_notebook_new();	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (pref_dialog)->vbox),			notebook);	gtk_widget_show (notebook);	label = gtk_label_new (_("Game"));	gtk_widget_show (label);	hbox = gtk_hbox_new (FALSE, GNOME_PAD);	gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);	gtk_widget_show (hbox);	frame = gtk_frame_new (_("Speed"));	gtk_container_set_border_width (GTK_CONTAINER (frame), 0);	if (running)		gtk_widget_set_sensitive (frame, FALSE);	gtk_widget_show (frame);	vbox = gtk_vbox_new (TRUE, 0);	gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);	gtk_widget_show (vbox);	button = gtk_radio_button_new_with_label (NULL, _("Nibbles newbie"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->gamespeed == 4)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(game_speed_cb), (gpointer) 4);	button = gtk_radio_button_new_with_label (gtk_radio_button_get_group			(GTK_RADIO_BUTTON (button)), _("My second day"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->gamespeed == 3)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(game_speed_cb), (gpointer) 3);	button = gtk_radio_button_new_with_label (gtk_radio_button_get_group			(GTK_RADIO_BUTTON (button)), _("Not too shabby"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->gamespeed == 2)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(game_speed_cb), (gpointer) 2);	button = gtk_radio_button_new_with_label (gtk_radio_button_get_group			(GTK_RADIO_BUTTON (button)),			_("Finger-twitching good"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->gamespeed == 1)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(game_speed_cb), (gpointer) 1);	gtk_container_add (GTK_CONTAINER (frame), vbox);	gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);	table = gtk_table_new (5, 2, FALSE);	gtk_widget_show (table);	gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD);	label2 = gtk_label_new (_("Starting level: "));	gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);	gtk_widget_show (label2);	if (properties->random)		gtk_widget_set_sensitive (GTK_WIDGET (label2), FALSE);	if (running)		gtk_widget_set_sensitive (GTK_WIDGET (label2), FALSE);	gtk_table_attach (GTK_TABLE (table), label2, 0, 1, 3, 4, GTK_EXPAND |			GTK_FILL, 0, 0, 0);	adjustment = gtk_adjustment_new ((gfloat) properties->startlevel, 1.0,			MAXLEVEL, 1.0, 5.0, 0.0);	levelspinner = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 0, 0);	gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (levelspinner), FALSE);	gtk_widget_show (levelspinner);	if (properties->random)		gtk_widget_set_sensitive (GTK_WIDGET (levelspinner), FALSE);	if (running)		gtk_widget_set_sensitive (GTK_WIDGET (levelspinner), FALSE);	gtk_table_attach (GTK_TABLE (table), levelspinner, 1, 2, 3, 4,			GTK_EXPAND | GTK_FILL, 0, 0, 0);	g_signal_connect (GTK_OBJECT (adjustment), "value_changed",			GTK_SIGNAL_FUNC (start_level_cb), levelspinner);	button = gtk_check_button_new_with_label (_("Levels in random order"));	gtk_widget_show (button);	gtk_table_attach (GTK_TABLE (table), button, 0, 2, 0, 1,			GTK_EXPAND | GTK_FILL, 0, 0, 0);	if (running)		gtk_widget_set_sensitive (button, FALSE);	if (properties->random)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(random_order_cb), NULL);	button = gtk_check_button_new_with_label (_("Fake bonuses"));	gtk_widget_show (button);	gtk_table_attach (GTK_TABLE (table), button, 0, 2, 1, 2,			GTK_EXPAND | GTK_FILL, 0, 0, 0);	if (running)		gtk_widget_set_sensitive (button, FALSE);	if (properties->fakes)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(fake_bonus_cb), NULL);	button = gtk_check_button_new_with_label (_("Sounds"));	if (properties->sound)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	gtk_widget_show (button);	gtk_table_attach (GTK_TABLE (table), button, 0, 2, 2, 3,			GTK_EXPAND | GTK_FILL, 0, 0, 0);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(sound_cb), NULL);	label2 = gtk_label_new (_("Number of players: "));	gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);	gtk_widget_show (label2);	gtk_table_attach (GTK_TABLE (table), label2, 0, 1, 4, 5, GTK_EXPAND |			GTK_FILL, 0, 0, 0);	if (running)		gtk_widget_set_sensitive (label2, FALSE);	adjustment = gtk_adjustment_new ((gfloat) properties->numworms, 1.0,			NUMWORMS, 1.0, 1.0, 0.0);	button = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 0, 0);	gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (button), FALSE);	gtk_widget_show (button);	gtk_table_attach (GTK_TABLE (table), button, 1, 2, 4, 5, GTK_EXPAND |			GTK_FILL, 0, 0, 0);	if (running)		gtk_widget_set_sensitive (button, FALSE);	g_signal_connect (GTK_OBJECT (adjustment), "value_changed",			GTK_SIGNAL_FUNC (num_worms_cb), button);	gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE, 0);	gtk_notebook_append_page (GTK_NOTEBOOK (notebook),			hbox, label);  label = gtk_label_new (_("Graphics"));  gtk_widget_show (label);	hbox = gtk_hbox_new (FALSE, GNOME_PAD);	gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);	gtk_widget_show (hbox);	frame = gtk_frame_new (_("Board size"));	gtk_container_set_border_width (GTK_CONTAINER (frame), 0);	gtk_widget_show (frame);	vbox = gtk_vbox_new (TRUE, 0);	gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);	gtk_widget_show (vbox);	button = gtk_radio_button_new_with_label (NULL, _("Tiny (184x132)"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->tilesize == 2)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(tile_size_cb), (gpointer) 2);	button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON(button)),                                            _("Small (368x264)"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->tilesize == 4)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(tile_size_cb), (gpointer) 4);	button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON(button)),                                            _("Medium (460x330)"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->tilesize == 5)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(tile_size_cb), (gpointer) 5);	button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON(button)),                                            _("Large (736x528)"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->tilesize == 8)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(tile_size_cb), (gpointer) 8);	button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON(button)),                                            _("Extra large (920x660)"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->tilesize == 10)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(tile_size_cb), (gpointer) 10);	button = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON(button)),                                            _("Huge (1840x1320)"));	gtk_widget_show (button);	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);	if (properties->tilesize == 20)		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),				TRUE);	g_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC			(tile_size_cb), (gpointer) 20);	gtk_container_add (GTK_CONTAINER (frame), vbox);	gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);	gtk_notebook_append_page (GTK_NOTEBOOK (notebook),			hbox, label);	for (i = 0; i < NUMWORMS; i++) {		sprintf (buffer, _("Worm %d"), i + 1);		label = gtk_label_new (buffer);		gtk_widget_show (label);		table = gtk_table_new (3, 4, FALSE);		gtk_container_set_border_width (GTK_CONTAINER (table),				GNOME_PAD);		gtk_table_set_col_spacings (GTK_TABLE (table),				GNOME_PAD);		gtk_table_set_row_spacings (GTK_TABLE (table),				GNOME_PAD);		gtk_widget_show (table);		label2 = gtk_label_new (_("Up:"));		gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);		gtk_widget_show (label2);		gtk_table_attach (GTK_TABLE (table), label2, 0, 1, 0, 1,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		entry = gtk_entry_new ();		gtk_entry_set_text (GTK_ENTRY (entry), keyboard_string				(properties->wormprops[i]->up));		gtk_entry_set_editable (GTK_ENTRY (entry), FALSE);		gtk_widget_show (entry);		gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 0, 1,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		g_signal_connect (GTK_OBJECT (entry), "key_press_event",				GTK_SIGNAL_FUNC (worm_up_cb), (gpointer) i);		label2 = gtk_label_new (_("Down:"));		gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);		gtk_widget_show (label2);		gtk_table_attach (GTK_TABLE (table), label2, 2, 3, 0, 1,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		entry = gtk_entry_new ();		gtk_entry_set_text (GTK_ENTRY (entry), keyboard_string				(properties->wormprops[i]->down));		gtk_entry_set_editable (GTK_ENTRY (entry), FALSE);		gtk_widget_show (entry);		gtk_table_attach (GTK_TABLE (table), entry, 3, 4, 0, 1,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		g_signal_connect (GTK_OBJECT (entry), "key_press_event",				GTK_SIGNAL_FUNC (worm_down_cb), (gpointer) i);		label2 = gtk_label_new (_("Left:"));		gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);		gtk_widget_show (label2);		gtk_table_attach (GTK_TABLE (table), label2, 0, 1, 1, 2,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		entry = gtk_entry_new ();		gtk_entry_set_text (GTK_ENTRY (entry), keyboard_string				(properties->wormprops[i]->left));		gtk_entry_set_editable (GTK_ENTRY (entry), FALSE);		gtk_widget_show (entry);		gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		g_signal_connect (GTK_OBJECT (entry), "key_press_event",				GTK_SIGNAL_FUNC (worm_left_cb), (gpointer) i);		label2 = gtk_label_new (_("Right:"));		gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);		gtk_widget_show (label2);		gtk_table_attach (GTK_TABLE (table), label2, 2, 3, 1, 2,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		entry = gtk_entry_new ();		gtk_entry_set_text (GTK_ENTRY (entry), keyboard_string				(properties->wormprops[i]->right));		gtk_entry_set_editable (GTK_ENTRY (entry), FALSE);		gtk_widget_show (entry);		gtk_table_attach (GTK_TABLE (table), entry, 3, 4, 1, 2,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		g_signal_connect (GTK_OBJECT (entry), "key_press_event",				GTK_SIGNAL_FUNC (worm_right_cb), (gpointer) i);		label2 = gtk_label_new (_("Color:"));		gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);		gtk_widget_show (label2);		gtk_table_attach (GTK_TABLE (table), label2, 0, 1, 2, 3,				GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,				0, 0);		omenu = gtk_option_menu_new ();		menu = gtk_menu_new ();		menuitem = gtk_menu_item_new_with_label (_("Red"));		gtk_widget_show (menuitem);		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);		g_signal_connect (GTK_OBJECT (menuitem), "activate",				GTK_SIGNAL_FUNC (set_worm_color_cb),				(gpointer) (WORMRED << 2 | i));		menuitem = gtk_menu_item_new_with_label (_("Green"));		gtk_widget_show (menuitem);		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);		g_signal_connect (GTK_OBJECT (menuitem), "activate",				GTK_SIGNAL_FUNC (set_worm_color_cb),				(gpointer) (WORMGREEN << 2 | i));		menuitem = gtk_menu_item_new_with_label (_("Blue"));		gtk_widget_show (menuitem);		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);		g_signal_connect (GTK_OBJECT (menuitem), "activate",				GTK_SIGNAL_FUNC (set_worm_color_cb),				(gpointer) (WORMBLUE << 2 | i));		menuitem = gtk_menu_item_new_with_label (_("Yellow"));		gtk_widget_show (menuitem);		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);		g_signal_connect (GTK_OBJECT (menuitem), "activate",				GTK_SIGNAL_FUNC (set_worm_color_cb),				(gpointer) (WORMYELLOW << 2 | i));		menuitem = gtk_menu_item_new_with_label (_("Cyan"));		gtk_widget_show (menuitem);		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);		g_signal_connect (GTK_OBJECT (menuitem), "activate",				GTK_SIGNAL_FUNC (set_worm_color_cb),				(gpointer) (WORMCYAN << 2 | i));		menuitem = gtk_menu_item_new_with_label (_("Purple"));		gtk_widget_show (menuitem);		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);		g_signal_connect (GTK_OBJECT (menuitem), "activate",				GTK_SIGNAL_FUNC (set_worm_color_cb),				(gpointer) (WORMPURPLE << 2 | i));		menuitem = gtk_menu_item_new_with_label (_("Gray"));		gtk_widget_show (menuitem);		gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);		g_signal_connect (GTK_OBJECT (menuitem), "activate",				GTK_SIGNAL_FUNC (set_worm_color_cb),				(gpointer) (WORMGRAY << 2 | i));		gtk_menu_set_active (GTK_MENU (menu),				properties->wormprops[i]->color - WORMRED);				gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);				gtk_widget_show(omenu);		gtk_table_attach (GTK_TABLE (table), omenu, 1, 2, 2, 3,				GTK_EXPAND | GTK_FILL, 0, 0, 0);		button = gtk_check_button_new_with_label			(_("Relative movement"));		if (properties->wormprops[i]->relmove) {			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON					(button), TRUE);			list = gtk_container_get_children (GTK_CONTAINER (table));			list = g_list_reverse (list);			for (j = 0; j < 4; j++) {				gtk_widget_set_sensitive (GTK_WIDGET						(list->data), FALSE);				list = list->next;			}			g_list_free (list);		}		g_signal_connect (GTK_OBJECT (button), "toggled",				GTK_SIGNAL_FUNC (worm_relative_movement_cb),				(gpointer) i);		gtk_widget_show (button);		gtk_table_attach (GTK_TABLE (table), button, 2, 4, 2, 3,				GTK_EXPAND | GTK_FILL, 0, 0, 0);		gtk_notebook_append_page (GTK_NOTEBOOK(notebook), table, label);	}	g_signal_connect (GTK_OBJECT (pref_dialog), "response", GTK_SIGNAL_FUNC			(apply_cb), NULL);	g_signal_connect (GTK_OBJECT (pref_dialog), "destroy", GTK_SIGNAL_FUNC			(destroy_cb), NULL);	g_signal_connect (GTK_OBJECT (pref_dialog), "close", GTK_SIGNAL_FUNC			(destroy_cb), NULL);		gtk_widget_show (pref_dialog);}