Changeset 219
- Timestamp:
- 03/16/08 14:10:26 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/branches/ZeroRadiant/plugins/surface_ufoai/surfaceflagsdialog_ufoai.cpp
r213 r219 213 213 void on_surface_button_toggled (GtkToggleButton *togglebutton, gpointer user_data) 214 214 { 215 int flag = *(int*)user_data;215 int flag = GPOINTER_TO_INT(user_data); 216 216 change_surfaceflag(GTK_WIDGET (togglebutton), flag, (GTK_TOGGLE_BUTTON (togglebutton)->active)); 217 217 } … … 220 220 void on_content_button_toggled (GtkToggleButton *togglebutton, gpointer user_data) 221 221 { 222 int flag = *(int*)user_data;222 int flag = GPOINTER_TO_INT(user_data); 223 223 change_contentflag(GTK_WIDGET (togglebutton), flag, (GTK_TOGGLE_BUTTON (togglebutton)->active)); 224 224 } … … 339 339 "stepon", 340 340 "" 341 };342 343 static const int flagBitMasks[] = {344 1<<0,345 1<<1,346 1<<2,347 1<<3,348 1<<4,349 1<<5,350 1<<6,351 1<<7,352 1<<8,353 1<<9,354 1<<10,355 1<<11,356 1<<12,357 1<<13,358 1<<14,359 1<<15,360 1<<16,361 1<<17,362 1<<18,363 1<<19,364 1<<20,365 1<<21,366 1<<22,367 1<<23,368 1<<24,369 1<<25,370 1<<26,371 1<<27,372 1<<28,373 1<<29,374 1<<30,375 1<<31,376 341 }; 377 342 … … 423 388 x = i % 4; 424 389 surface_buttons[i] = gtk_toggle_button_new_with_label (surfaceFlags[i]); 425 gtk_signal_connect(GTK_OBJECT (surface_buttons[i]), "toggled", GTK_SIGNAL_FUNC(on_surface_button_toggled), &flagBitMasks[i]);390 gtk_signal_connect(GTK_OBJECT (surface_buttons[i]), "toggled", GTK_SIGNAL_FUNC(on_surface_button_toggled), GINT_TO_POINTER(1 << i)); 426 391 gtk_widget_show(surface_buttons[i]); 427 392 gtk_table_attach(GTK_TABLE (table4), surface_buttons[i], 0 + x, 1 + x, (0 + y), (1 + y), … … 481 446 x = i % 4; 482 447 content_buttons[i] = gtk_toggle_button_new_with_label(contentFlags[i]); 483 gtk_signal_connect(GTK_OBJECT (content_buttons[i]), "toggled", GTK_SIGNAL_FUNC (on_content_button_toggled), &flagBitMasks[i]);448 gtk_signal_connect(GTK_OBJECT (content_buttons[i]), "toggled", GTK_SIGNAL_FUNC (on_content_button_toggled), GINT_TO_POINTER(1 << i)); 484 449 gtk_widget_show(content_buttons[i]); 485 450 gtk_table_attach(GTK_TABLE (table3), content_buttons[i], 0 + x, 1 + x, (0 + y), (1 + y),
