diff --git a/contrib/bkgrnd2d/dialog.cpp b/contrib/bkgrnd2d/dialog.cpp index a8a3d79f..42f0e4c9 100644 --- a/contrib/bkgrnd2d/dialog.cpp +++ b/contrib/bkgrnd2d/dialog.cpp @@ -325,11 +325,11 @@ void InitBackgroundDialog(){ // GTK_STOCK_CLOSE, // GTK_RESPONSE_CLOSE, NULL ); - gtk_signal_connect( GTK_OBJECT( pDialogWnd ), "delete-event", - GTK_SIGNAL_FUNC( close_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( pDialogWnd ), "response", - GTK_SIGNAL_FUNC( response_callback ), NULL ); -// gtk_signal_connect( GTK_OBJECT (pDialogWnd), "expose-event", GTK_SIGNAL_FUNC( ci_expose ), NULL ); + g_signal_connect( G_OBJECT( pDialogWnd ), "delete-event", + G_CALLBACK( close_callback ), NULL ); + g_signal_connect( G_OBJECT( pDialogWnd ), "response", + G_CALLBACK( response_callback ), NULL ); +// g_signal_connect( G_OBJECT (pDialogWnd), "expose-event", G_CALLBACK( ci_expose ), NULL ); pTooltips = gtk_tooltips_new(); diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index 426bbb8b..68123daa 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -54,23 +54,23 @@ void Update_TextureReseter(){ gboolean check; check = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbTexChange ) ); - gtk_entry_set_editable( GTK_ENTRY( dlgTexReset.editTexNew ), check ); - gtk_entry_set_editable( GTK_ENTRY( dlgTexReset.editTexOld ), check ); + gtk_editable_set_editable( GTK_EDITABLE( dlgTexReset.editTexNew ), check ); + gtk_editable_set_editable( GTK_EDITABLE( dlgTexReset.editTexOld ), check ); check = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbScaleHor ) ); - gtk_entry_set_editable( GTK_ENTRY( dlgTexReset.editScaleHor ), check ); + gtk_editable_set_editable( GTK_EDITABLE( dlgTexReset.editScaleHor ), check ); check = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbScaleVert ) ); - gtk_entry_set_editable( GTK_ENTRY( dlgTexReset.editScaleVert ), check ); + gtk_editable_set_editable( GTK_EDITABLE( dlgTexReset.editScaleVert ), check ); check = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbShiftHor ) ); - gtk_entry_set_editable( GTK_ENTRY( dlgTexReset.editShiftHor ), check ); + gtk_editable_set_editable( GTK_EDITABLE( dlgTexReset.editShiftHor ), check ); check = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbShiftVert ) ); - gtk_entry_set_editable( GTK_ENTRY( dlgTexReset.editShiftVert ), check ); + gtk_editable_set_editable( GTK_EDITABLE( dlgTexReset.editShiftVert ), check ); check = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbRotation ) ); - gtk_entry_set_editable( GTK_ENTRY( dlgTexReset.editRotation ), check ); + gtk_editable_set_editable( GTK_EDITABLE( dlgTexReset.editRotation ), check ); } static void dialog_button_callback( GtkWidget *widget, gpointer data ){ @@ -207,12 +207,12 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ int mode = ( uType & MB_TYPEMASK ), ret, loop = 1; window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), lpCaption ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); gtk_widget_realize( window ); @@ -237,9 +237,9 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ if ( mode == MB_OK ) { w = gtk_button_new_with_label( "Ok" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); ret = IDOK; @@ -247,38 +247,38 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ else if ( mode == MB_OKCANCEL ) { w = gtk_button_new_with_label( "Ok" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; } else if ( mode == MB_YESNOCANCEL ) { w = gtk_button_new_with_label( "Yes" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "No" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; } @@ -286,16 +286,16 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ { w = gtk_button_new_with_label( "Yes" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "No" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); ret = IDNO; } @@ -321,11 +321,11 @@ int DoIntersectBox( IntersectRS* rs ){ window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), "Intersect" ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); @@ -344,7 +344,7 @@ int DoIntersectBox( IntersectRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), radio1, FALSE, FALSE, 2 ); gtk_widget_show( radio1 ); - radio2 = gtk_radio_button_new_with_label( ( (GtkRadioButton*)radio1 )->group, "Use Selected Brushes" ); + radio2 = gtk_radio_button_new_with_label( gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio1 ) ), "Use Selected Brushes" ); gtk_box_pack_start( GTK_BOX( vbox ), radio2, FALSE, FALSE, 2 ); gtk_widget_show( radio2 ); @@ -368,15 +368,15 @@ int DoIntersectBox( IntersectRS* rs ){ w = gtk_button_new_with_label( "Ok" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -417,11 +417,11 @@ int DoPolygonBox( PolygonRS* rs ){ window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), "Polygon Builder" ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); @@ -455,8 +455,10 @@ int DoPolygonBox( PolygonRS* rs ){ // ---- hbox2 ---- - text1 = gtk_entry_new_with_max_length( 256 ); - gtk_entry_set_text( (GtkEntry*)text1, "3" ); + text1 = gtk_entry_new(); + g_object_set( text1, "xalign", 1.0, NULL ); + gtk_entry_set_max_length( GTK_ENTRY( text1 ), 256 ); + gtk_entry_set_text( GTK_ENTRY( text1 ), "3" ); gtk_box_pack_start( GTK_BOX( hbox2 ), text1, FALSE, FALSE, 2 ); gtk_widget_show( text1 ); @@ -473,8 +475,10 @@ int DoPolygonBox( PolygonRS* rs ){ // ---- hbox2 ---- - text2 = gtk_entry_new_with_max_length( 256 ); - gtk_entry_set_text( (GtkEntry*)text2, "8" ); + text2 = gtk_entry_new(); + g_object_set( text2, "xalign", 1.0, NULL ); + gtk_entry_set_max_length( GTK_ENTRY( text2 ), 256 ); + gtk_entry_set_text( GTK_ENTRY( text2 ), "8" ); gtk_box_pack_start( GTK_BOX( hbox2 ), text2, FALSE, FALSE, 2 ); gtk_widget_show( text2 ); @@ -521,15 +525,15 @@ int DoPolygonBox( PolygonRS* rs ){ w = gtk_button_new_with_label( "Ok" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -555,12 +559,12 @@ int DoPolygonBox( PolygonRS* rs ){ rs->bInverse = gtk_toggle_button_get_active( (GtkToggleButton*)check2 ) ? true : false; rs->bAlignTop = gtk_toggle_button_get_active( (GtkToggleButton*)check3 ) ? true : false; - if ( !ValidateTextIntRange( gtk_entry_get_text( (GtkEntry*)text1 ), 3, 32, "Number Of Sides", &rs->nSides ) ) { + if ( !ValidateTextIntRange( gtk_entry_get_text( GTK_ENTRY( text1 ) ), 3, 32, "Number Of Sides", &rs->nSides ) ) { dialogError = TRUE; } if ( rs->bUseBorder ) { - if ( !ValidateTextIntRange( gtk_entry_get_text( (GtkEntry*)text2 ), 8, 256, "Border Width", &rs->nBorderWidth ) ) { + if ( !ValidateTextIntRange( gtk_entry_get_text( GTK_ENTRY( text2 ) ), 8, 256, "Border Width", &rs->nBorderWidth ) ) { dialogError = TRUE; } } @@ -592,12 +596,12 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), "Stair Builder" ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); @@ -629,7 +633,8 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textStairHeight = gtk_entry_new_with_max_length( 256 ); + textStairHeight = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( textStairHeight ), 256 ); gtk_box_pack_start( GTK_BOX( hbox ), textStairHeight, FALSE, FALSE, 1 ); gtk_widget_show( textStairHeight ); @@ -663,19 +668,19 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), radioNorth, FALSE, FALSE, 3 ); gtk_widget_show( radioNorth ); - radioDirection = gtk_radio_button_group( GTK_RADIO_BUTTON( radioNorth ) ); + radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioNorth ) ); radioSouth = gtk_radio_button_new_with_label( radioDirection, "South" ); gtk_box_pack_start( GTK_BOX( hbox ), radioSouth, FALSE, FALSE, 2 ); gtk_widget_show( radioSouth ); - radioDirection = gtk_radio_button_group( GTK_RADIO_BUTTON( radioSouth ) ); + radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioSouth ) ); radioEast = gtk_radio_button_new_with_label( radioDirection, "East" ); gtk_box_pack_start( GTK_BOX( hbox ), radioEast, FALSE, FALSE, 1 ); gtk_widget_show( radioEast ); - radioDirection = gtk_radio_button_group( GTK_RADIO_BUTTON( radioEast ) ); + radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioEast ) ); radioWest = gtk_radio_button_new_with_label( radioDirection, "West" ); gtk_box_pack_start( GTK_BOX( hbox ), radioWest, FALSE, FALSE, 0 ); @@ -701,13 +706,13 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), radioOldStyle, FALSE, FALSE, 0 ); gtk_widget_show( radioOldStyle ); - radioStyle = gtk_radio_button_group( GTK_RADIO_BUTTON( radioOldStyle ) ); + radioStyle = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioOldStyle ) ); radioBobStyle = gtk_radio_button_new_with_label( radioStyle, "Bob's Style" ); gtk_box_pack_start( GTK_BOX( hbox ), radioBobStyle, FALSE, FALSE, 0 ); gtk_widget_show( radioBobStyle ); - radioStyle = gtk_radio_button_group( GTK_RADIO_BUTTON( radioBobStyle ) ); + radioStyle = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioBobStyle ) ); radioCornerStyle = gtk_radio_button_new_with_label( radioStyle, "Corner Style" ); gtk_box_pack_start( GTK_BOX( hbox ), radioCornerStyle, FALSE, FALSE, 0 ); @@ -730,7 +735,8 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textMainTex = gtk_entry_new_with_max_length( 512 ); + textMainTex = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( textMainTex ), 512 ); gtk_entry_set_text( GTK_ENTRY( textMainTex ), rs->mainTexture ); gtk_box_pack_start( GTK_BOX( hbox ), textMainTex, FALSE, FALSE, 0 ); gtk_widget_show( textMainTex ); @@ -745,7 +751,8 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textRiserTex = gtk_entry_new_with_max_length( 512 ); + textRiserTex = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( textRiserTex ), 512 ); gtk_box_pack_start( GTK_BOX( hbox ), textRiserTex, FALSE, FALSE, 0 ); gtk_widget_show( textRiserTex ); @@ -764,14 +771,14 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ w = gtk_button_new_with_label( "OK" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -793,8 +800,8 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ if ( ret == IDOK ) { rs->bUseDetail = gtk_toggle_button_get_active( (GtkToggleButton*)checkUseDetail ) ? true : false; - strcpy( rs->riserTexture, gtk_entry_get_text( (GtkEntry*)textRiserTex ) ); - strcpy( rs->mainTexture, gtk_entry_get_text( (GtkEntry*)textMainTex ) ); + strcpy( rs->riserTexture, gtk_entry_get_text( GTK_ENTRY( textRiserTex ) ) ); + strcpy( rs->mainTexture, gtk_entry_get_text( GTK_ENTRY( textMainTex ) ) ); if ( gtk_toggle_button_get_active( (GtkToggleButton*)radioNorth ) ) { rs->direction = MOVE_NORTH; @@ -809,7 +816,7 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ rs->direction = MOVE_WEST; } - if ( !ValidateTextInt( gtk_entry_get_text( (GtkEntry*)textStairHeight ), "Stair Height", &rs->stairHeight ) ) { + if ( !ValidateTextInt( gtk_entry_get_text( GTK_ENTRY( textStairHeight ) ), "Stair Height", &rs->stairHeight ) ) { dialogError = TRUE; } @@ -849,12 +856,12 @@ int DoDoorsBox( DoorRS* rs ){ window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), "Door Builder" ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); @@ -877,7 +884,8 @@ int DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textFrontBackTex = gtk_entry_new_with_max_length( 512 ); + textFrontBackTex = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( textFrontBackTex ), 512 ); gtk_entry_set_text( GTK_ENTRY( textFrontBackTex ), rs->mainTexture ); gtk_box_pack_start( GTK_BOX( hbox ), textFrontBackTex, FALSE, FALSE, 0 ); gtk_widget_show( textFrontBackTex ); @@ -892,7 +900,8 @@ int DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textTrimTex = gtk_entry_new_with_max_length( 512 ); + textTrimTex = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( textTrimTex ), 512 ); gtk_box_pack_start( GTK_BOX( hbox ), textTrimTex, FALSE, FALSE, 0 ); gtk_widget_show( textTrimTex ); @@ -951,7 +960,7 @@ int DoDoorsBox( DoorRS* rs ){ tw1.two = comboMain; buttonSetMain = gtk_button_new_with_label( "Set As Main Texture" ); - gtk_signal_connect( GTK_OBJECT( buttonSetMain ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback_settex ), &tw1 ); + g_signal_connect( G_OBJECT( buttonSetMain ), "clicked", G_CALLBACK( dialog_button_callback_settex ), &tw1 ); gtk_box_pack_start( GTK_BOX( hbox ), buttonSetMain, FALSE, FALSE, 0 ); gtk_widget_show( buttonSetMain ); @@ -971,7 +980,7 @@ int DoDoorsBox( DoorRS* rs ){ tw2.two = comboTrim; buttonSetTrim = gtk_button_new_with_label( "Set As Trim Texture" ); - gtk_signal_connect( GTK_OBJECT( buttonSetTrim ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback_settex ), &tw2 ); + g_signal_connect( G_OBJECT( buttonSetTrim ), "clicked", G_CALLBACK( dialog_button_callback_settex ), &tw2 ); gtk_box_pack_start( GTK_BOX( hbox ), buttonSetTrim, FALSE, FALSE, 0 ); gtk_widget_show( buttonSetTrim ); @@ -990,7 +999,7 @@ int DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), radioNS, FALSE, FALSE, 0 ); gtk_widget_show( radioNS ); - radioOrientation = gtk_radio_button_group( GTK_RADIO_BUTTON( radioNS ) ); + radioOrientation = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioNS ) ); radioEW = gtk_radio_button_new_with_label( radioOrientation, "East - West" ); gtk_box_pack_start( GTK_BOX( hbox ), radioEW, FALSE, FALSE, 0 ); @@ -1010,14 +1019,14 @@ int DoDoorsBox( DoorRS* rs ){ w = gtk_button_new_with_label( "OK" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -1063,11 +1072,11 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), "Texture Reset" ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); @@ -1088,8 +1097,9 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ // ---- hbox ---- - text1 = gtk_entry_new_with_max_length( 256 ); - gtk_entry_set_text( (GtkEntry*)text1, "25" ); + text1 = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( text1 ), 256 ); + gtk_entry_set_text( GTK_ENTRY( text1 ), "25" ); gtk_box_pack_start( GTK_BOX( hbox ), text1, FALSE, FALSE, 2 ); gtk_widget_show( text1 ); @@ -1106,8 +1116,9 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ // ---- hbox ---- - text2 = gtk_entry_new_with_max_length( 256 ); - gtk_entry_set_text( (GtkEntry*)text2, "3" ); + text2 = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( text2 ), 256 ); + gtk_entry_set_text( GTK_ENTRY( text2 ), "3" ); gtk_box_pack_start( GTK_BOX( hbox ), text2, FALSE, FALSE, 2 ); gtk_widget_show( text2 ); @@ -1129,8 +1140,9 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ // ---- hbox ---- - text3 = gtk_entry_new_with_max_length( 256 ); - gtk_entry_set_text( (GtkEntry*)text3, "-800" ); + text3 = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( text3 ), 256 ); + gtk_entry_set_text( GTK_ENTRY( text3 ), "-800" ); gtk_box_pack_start( GTK_BOX( hbox ), text3, FALSE, FALSE, 2 ); gtk_widget_show( text3 ); @@ -1170,20 +1182,20 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ w = gtk_button_new_with_label( "Enable" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); gtk_widget_show( w ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); w = gtk_button_new_with_label( "Disable" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -1233,11 +1245,11 @@ int DoCTFColourChangeBox(){ window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), "CTF Colour Changer" ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); @@ -1260,20 +1272,20 @@ int DoCTFColourChangeBox(){ w = gtk_button_new_with_label( "Red->Blue" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Blue->Red" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -1303,11 +1315,11 @@ int DoResetTextureBox( ResetTextureRS* rs ){ window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), "Texture Reset" ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); @@ -1352,7 +1364,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- frame ---- dlgTexReset.cbTexChange = gtk_check_button_new_with_label( "Enabled" ); - gtk_signal_connect( GTK_OBJECT( dlgTexReset.cbTexChange ), "toggled", GTK_SIGNAL_FUNC( dialog_button_callback_texreset_update ), NULL ); + g_signal_connect( G_OBJECT( dlgTexReset.cbTexChange ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbTexChange ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbTexChange, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1364,7 +1376,8 @@ int DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editTexOld = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editTexOld = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( dlgTexReset.editTexOld ), 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editTexOld ), rs->textureName ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editTexOld, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1377,7 +1390,8 @@ int DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editTexNew = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editTexNew = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( dlgTexReset.editTexNew ), 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editTexNew ), rs->textureName ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editTexNew, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1400,7 +1414,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- frame ---- dlgTexReset.cbScaleHor = gtk_check_button_new_with_label( "Enabled" ); - gtk_signal_connect( GTK_OBJECT( dlgTexReset.cbScaleHor ), "toggled", GTK_SIGNAL_FUNC( dialog_button_callback_texreset_update ), NULL ); + g_signal_connect( G_OBJECT( dlgTexReset.cbScaleHor ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbScaleHor ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbScaleHor, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1412,7 +1426,8 @@ int DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editScaleHor = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editScaleHor = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( dlgTexReset.editScaleHor ), 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editScaleHor ), "0.5" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editScaleHor, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1421,7 +1436,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ dlgTexReset.cbScaleVert = gtk_check_button_new_with_label( "Enabled" ); - gtk_signal_connect( GTK_OBJECT( dlgTexReset.cbScaleVert ), "toggled", GTK_SIGNAL_FUNC( dialog_button_callback_texreset_update ), NULL ); + g_signal_connect( G_OBJECT( dlgTexReset.cbScaleVert ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbScaleVert ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbScaleVert, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1433,7 +1448,8 @@ int DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editScaleVert = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editScaleVert = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( dlgTexReset.editScaleVert ), 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editScaleVert ), "0.5" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editScaleVert, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1456,7 +1472,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- frame ---- dlgTexReset.cbShiftHor = gtk_check_button_new_with_label( "Enabled" ); - gtk_signal_connect( GTK_OBJECT( dlgTexReset.cbShiftHor ), "toggled", GTK_SIGNAL_FUNC( dialog_button_callback_texreset_update ), NULL ); + g_signal_connect( G_OBJECT( dlgTexReset.cbShiftHor ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbShiftHor ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbShiftHor, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1468,7 +1484,8 @@ int DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editShiftHor = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editShiftHor = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( dlgTexReset.editShiftHor ), 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editShiftHor ), "0" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editShiftHor, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1477,7 +1494,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ dlgTexReset.cbShiftVert = gtk_check_button_new_with_label( "Enabled" ); - gtk_signal_connect( GTK_OBJECT( dlgTexReset.cbShiftVert ), "toggled", GTK_SIGNAL_FUNC( dialog_button_callback_texreset_update ), NULL ); + g_signal_connect( G_OBJECT( dlgTexReset.cbShiftVert ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbShiftVert ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbShiftVert, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1489,7 +1506,8 @@ int DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editShiftVert = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editShiftVert = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( dlgTexReset.editShiftVert ), 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editShiftVert ), "0" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editShiftVert, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1523,7 +1541,8 @@ int DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editRotation = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editRotation = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( dlgTexReset.editRotation ), 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editRotation ), "0" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editRotation, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1540,20 +1559,20 @@ int DoResetTextureBox( ResetTextureRS* rs ){ w = gtk_button_new_with_label( "Use Selected Brushes" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Use All Brushes" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -1577,42 +1596,42 @@ int DoResetTextureBox( ResetTextureRS* rs ){ dialogError = FALSE; if ( ret != IDCANCEL ) { - rs->bResetRotation = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbRotation ) ); + rs->bResetRotation = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbRotation ) ); if ( rs->bResetRotation ) { if ( !ValidateTextInt( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editRotation ) ), "Rotation", &rs->rotation ) ) { dialogError = TRUE; } } - rs->bResetScale[0] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbScaleHor ) ); + rs->bResetScale[0] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbScaleHor ) ); if ( rs->bResetScale[0] ) { if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editScaleHor ) ), "Horizontal Scale", &rs->fScale[0] ) ) { dialogError = TRUE; } } - rs->bResetScale[1] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbScaleVert ) ); + rs->bResetScale[1] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbScaleVert ) ); if ( rs->bResetScale[1] ) { if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editScaleVert ) ), "Vertical Scale", &rs->fScale[1] ) ) { dialogError = TRUE; } } - rs->bResetShift[0] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbShiftHor ) ); + rs->bResetShift[0] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbShiftHor ) ); if ( rs->bResetShift[0] ) { if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editShiftHor ) ), "Horizontal Shift", &rs->fShift[0] ) ) { dialogError = TRUE; } } - rs->bResetShift[1] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbShiftVert ) ); + rs->bResetShift[1] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbShiftVert ) ); if ( rs->bResetShift[1] ) { if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editShiftVert ) ), "Vertical Shift", &rs->fShift[1] ) ) { dialogError = TRUE; } } - rs->bResetTextureName = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbTexChange ) ); + rs->bResetTextureName = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbTexChange ) ); if ( rs->bResetTextureName ) { strcpy( rs->textureName, gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editTexOld ) ) ); strcpy( rs->newTextureName, gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editTexNew ) ) ); @@ -1640,14 +1659,14 @@ int DoTrainThingBox( TrainThingRS* rs ){ window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), "Train Thing" ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); - gtk_object_set_data( GTK_OBJECT( window ), "loop", &loop ); - gtk_object_set_data( GTK_OBJECT( window ), "ret", &ret ); + g_object_set_data( G_OBJECT( window ), "loop", &loop ); + g_object_set_data( G_OBJECT( window ), "ret", &ret ); gtk_widget_realize( window ); @@ -1682,7 +1701,8 @@ int DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - radiusX = gtk_entry_new_with_max_length( 256 ); + radiusX = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( radiusX ), 256 ); gtk_entry_set_text( GTK_ENTRY( radiusX ), "100" ); gtk_table_attach( GTK_TABLE( table ), radiusX, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1697,7 +1717,8 @@ int DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - radiusY = gtk_entry_new_with_max_length( 256 ); + radiusY = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( radiusY ), 256 ); gtk_entry_set_text( GTK_ENTRY( radiusY ), "100" ); gtk_table_attach( GTK_TABLE( table ), radiusY, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1725,7 +1746,8 @@ int DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - angleStart = gtk_entry_new_with_max_length( 256 ); + angleStart = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( angleStart ), 256 ); gtk_entry_set_text( GTK_ENTRY( angleStart ), "0" ); gtk_table_attach( GTK_TABLE( table ), angleStart, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1740,7 +1762,8 @@ int DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - angleEnd = gtk_entry_new_with_max_length( 256 ); + angleEnd = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( angleEnd ), 256 ); gtk_entry_set_text( GTK_ENTRY( angleEnd ), "90" ); gtk_table_attach( GTK_TABLE( table ), angleEnd, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1767,7 +1790,8 @@ int DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - heightStart = gtk_entry_new_with_max_length( 256 ); + heightStart = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( heightStart ), 256 ); gtk_entry_set_text( GTK_ENTRY( heightStart ), "0" ); gtk_table_attach( GTK_TABLE( table ), heightStart, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1782,7 +1806,8 @@ int DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - heightEnd = gtk_entry_new_with_max_length( 256 ); + heightEnd = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( heightEnd ), 256 ); gtk_entry_set_text( GTK_ENTRY( heightEnd ), "0" ); gtk_table_attach( GTK_TABLE( table ), heightEnd, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1810,7 +1835,8 @@ int DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - numPoints = gtk_entry_new_with_max_length( 256 ); + numPoints = gtk_entry_new(); + gtk_entry_set_max_length( GTK_ENTRY( numPoints ), 256 ); gtk_entry_set_text( GTK_ENTRY( numPoints ), "0" ); gtk_table_attach( GTK_TABLE( table ), numPoints, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1826,15 +1852,15 @@ int DoTrainThingBox( TrainThingRS* rs ){ w = gtk_button_new_with_label( "Ok" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; diff --git a/contrib/camera/dialogs.cpp b/contrib/camera/dialogs.cpp index c21ff155..8f42a303 100644 --- a/contrib/camera/dialogs.cpp +++ b/contrib/camera/dialogs.cpp @@ -73,8 +73,8 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( window ), "New Camera" ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -133,15 +133,15 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_show( w ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -316,7 +316,7 @@ static gint ci_pathlist_changed( GtkWidget *widget, gpointer data ){ } // start edit mode - if ( g_pCameraInspectorWnd && GTK_WIDGET_VISIBLE( g_pCameraInspectorWnd ) ) { + if ( g_pCameraInspectorWnd && gtk_widget_get_visible( g_pCameraInspectorWnd ) ) { DoStartEdit( GetCurrentCam() ); } @@ -365,8 +365,8 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){ // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( window ), "Rename Path" ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -414,15 +414,15 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){ w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_show( w ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -483,8 +483,8 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( window ), "Add Target" ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -560,15 +560,15 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_show( w ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -756,7 +756,7 @@ static gint ci_camlist_changed( GtkWidget *widget, gpointer data ){ // start edit mode g_iActiveTarget = -1; - if ( g_pCameraInspectorWnd && GTK_WIDGET_VISIBLE( g_pCameraInspectorWnd ) ) { + if ( g_pCameraInspectorWnd && gtk_widget_get_visible( g_pCameraInspectorWnd ) ) { DoStartEdit( GetCurrentCam() ); } @@ -830,8 +830,8 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( window ), _( "Add Event" ) ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -899,15 +899,15 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_show( w ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; @@ -996,9 +996,9 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( window ), _( "Camera Inspector" ) ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", GTK_SIGNAL_FUNC( ci_close ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "expose-event", GTK_SIGNAL_FUNC( ci_expose ), NULL ); - // gtk_signal_connect( GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( ci_close ), NULL ); + g_signal_connect( G_OBJECT( window ), "expose-event", G_CALLBACK( ci_expose ), NULL ); + // g_signal_connect( G_OBJECT (window), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pRadiantWnd ) ); // don't use show, as you don't want to have it displayed on startup ;-) @@ -1065,7 +1065,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ RefreshCamListCombo(); gtk_entry_set_editable( GTK_ENTRY( GTK_COMBO( g_pCamListCombo )->entry ), FALSE ); - gtk_signal_connect( GTK_OBJECT( GTK_COMBO( g_pCamListCombo )->entry ), "changed", GTK_SIGNAL_FUNC( ci_camlist_changed ), NULL ); + g_signal_connect( G_OBJECT( GTK_COMBO( g_pCamListCombo )->entry ), "changed", G_CALLBACK( ci_camlist_changed ), NULL ); // -------------------------- // @@ -1097,7 +1097,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ RefreshPathListCombo(); gtk_entry_set_editable( GTK_ENTRY( GTK_COMBO( g_pPathListCombo )->entry ), FALSE ); - gtk_signal_connect( GTK_OBJECT( GTK_COMBO( g_pPathListCombo )->entry ), "changed", GTK_SIGNAL_FUNC( ci_pathlist_changed ), NULL ); + g_signal_connect( G_OBJECT( GTK_COMBO( g_pPathListCombo )->entry ), "changed", G_CALLBACK( ci_pathlist_changed ), NULL ); // -------------------------- // @@ -1110,14 +1110,14 @@ GtkWidget *CreateCameraInspectorDialog( void ){ gtk_widget_show( g_pEditModeEditRadioButton ); g_pEditTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( g_pEditModeEditRadioButton ) ); - gtk_signal_connect( GTK_OBJECT( g_pEditModeEditRadioButton ), "clicked", GTK_SIGNAL_FUNC( ci_editmode_edit ), NULL ); + g_signal_connect( G_OBJECT( g_pEditModeEditRadioButton ), "clicked", G_CALLBACK( ci_editmode_edit ), NULL ); g_pEditModeAddRadioButton = gtk_radio_button_new_with_label( g_pEditTypeRadio, _( "Add Points" ) ); gtk_box_pack_start( GTK_BOX( hbox ), g_pEditModeAddRadioButton, FALSE, FALSE, 3 ); gtk_widget_show( g_pEditModeAddRadioButton ); g_pEditTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( g_pEditModeAddRadioButton ) ); - gtk_signal_connect( GTK_OBJECT( g_pEditModeAddRadioButton ), "clicked", GTK_SIGNAL_FUNC( ci_editmode_add ), NULL ); + g_signal_connect( G_OBJECT( g_pEditModeAddRadioButton ), "clicked", G_CALLBACK( ci_editmode_add ), NULL ); // see if we should use a different default if ( g_iEditMode == 1 ) { @@ -1142,23 +1142,23 @@ GtkWidget *CreateCameraInspectorDialog( void ){ w = gtk_button_new_with_label( _( "Rename..." ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_rename ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_rename ), NULL ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Add Target..." ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_add_target ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_add_target ), NULL ); gtk_widget_show( w ); // not available in splines library /*w = gtk_button_new_with_label( "Delete Selected" ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_delete_selected ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_delete_selected ), NULL ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Select All" ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_select_all ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_select_all ), NULL ); gtk_widget_show( w );*/ // -------------------------- // @@ -1220,7 +1220,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ gtk_widget_show( hbox ); g_pTimeLine = GTK_ADJUSTMENT( gtk_adjustment_new( 0, 0, 30000, 100, 250, 0 ) ); - gtk_signal_connect( GTK_OBJECT( g_pTimeLine ), "value-changed", GTK_SIGNAL_FUNC( ci_timeline_changed ), NULL ); + g_signal_connect( G_OBJECT( g_pTimeLine ), "value-changed", G_CALLBACK( ci_timeline_changed ), NULL ); w = gtk_hscale_new( g_pTimeLine ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); gtk_widget_show( w ); @@ -1260,7 +1260,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ g_pEventsList = gtk_clist_new( 3 ); gtk_container_add( GTK_CONTAINER( w ), g_pEventsList ); - //gtk_signal_connect( GTK_OBJECT(g_pEventsList), "select_row", GTK_SIGNAL_FUNC (proplist_select_row), NULL); + //g_signal_connect( G_OBJECT(g_pEventsList), "select_row", G_CALLBACK (proplist_select_row), NULL); gtk_clist_set_selection_mode( GTK_CLIST( g_pEventsList ), GTK_SELECTION_BROWSE ); gtk_clist_column_titles_hide( GTK_CLIST( g_pEventsList ) ); gtk_clist_set_column_auto_resize( GTK_CLIST( g_pEventsList ), 0, TRUE ); @@ -1274,12 +1274,12 @@ GtkWidget *CreateCameraInspectorDialog( void ){ w = gtk_button_new_with_label( _( "Add..." ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_add ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_add ), NULL ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Del" ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_del ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_del ), NULL ); gtk_widget_show( w ); // -------------------------- // @@ -1294,12 +1294,12 @@ GtkWidget *CreateCameraInspectorDialog( void ){ w = gtk_button_new_with_label( _( "New..." ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_new ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_new ), NULL ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Load..." ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_load ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_load ), NULL ); gtk_widget_show( w ); // -------------------------- // @@ -1312,12 +1312,12 @@ GtkWidget *CreateCameraInspectorDialog( void ){ w = gtk_button_new_with_label( _( "Save..." ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_save ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_save ), NULL ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Unload" ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_unload ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_unload ), NULL ); gtk_widget_show( w ); hbox = gtk_hbox_new( FALSE, 5 ); @@ -1326,12 +1326,12 @@ GtkWidget *CreateCameraInspectorDialog( void ){ w = gtk_button_new_with_label( _( "Apply" ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_apply ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_apply ), NULL ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Preview" ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_preview ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_preview ), NULL ); gtk_widget_show( w ); // -------------------------- // @@ -1348,8 +1348,8 @@ GtkWidget *CreateCameraInspectorDialog( void ){ w = gtk_button_new_with_label( _( "Close" ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_close ), NULL ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_close ), NULL ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index 526516cc..6d747998 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -1404,7 +1404,7 @@ GtkWidget* create_main_dialog(){ radio = gtk_radio_button_new_with_label( group, games[i] ); gtk_widget_show( radio ); gtk_box_pack_start( GTK_BOX( vbox ), radio, TRUE, TRUE, 0 ); - group = gtk_radio_button_group( GTK_RADIO_BUTTON( radio ) ); + group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) ); game_radios[i] = radio; g_signal_connect( G_OBJECT( radio ), "toggled", G_CALLBACK( general_game ), GINT_TO_POINTER( i ) ); } @@ -1425,7 +1425,7 @@ GtkWidget* create_main_dialog(){ radio = gtk_radio_button_new_with_label( group, waveforms[i] ); gtk_widget_show( radio ); gtk_box_pack_start( GTK_BOX( vbox ), radio, TRUE, TRUE, 0 ); - group = gtk_radio_button_group( GTK_RADIO_BUTTON( radio ) ); + group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) ); wave_radios[i] = radio; g_signal_connect( G_OBJECT( radio ), "toggled", G_CALLBACK( general_wave ), GINT_TO_POINTER( i ) ); } @@ -1446,7 +1446,7 @@ GtkWidget* create_main_dialog(){ radio = gtk_radio_button_new_with_label( group, orientations[i] ); gtk_widget_show( radio ); gtk_box_pack_start( GTK_BOX( vbox ), radio, TRUE, TRUE, 0 ); - group = gtk_radio_button_group( GTK_RADIO_BUTTON( radio ) ); + group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio ) ); plane_radios[i] = radio; g_signal_connect( G_OBJECT( radio ), "toggled", G_CALLBACK( general_plane ), GINT_TO_POINTER( i ) ); } @@ -1682,7 +1682,7 @@ GtkWidget* create_main_dialog(){ label = gtk_label_new( _( "Snap to grid:" ) ); gtk_widget_show( label ); gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 ); - gtk_object_set_data( GTK_OBJECT( dlg ), "snap_text", label ); + g_object_set_data( G_OBJECT( dlg ), "snap_text", label ); adj = gtk_adjustment_new( 8, 0, 256, 1, 10, 0 ); g_signal_connect( G_OBJECT( adj ), "value-changed", G_CALLBACK( extents_snaptogrid_spin ), &SP ); diff --git a/contrib/gtkgensurf/gensurf.cpp b/contrib/gtkgensurf/gensurf.cpp index 17160aa9..edd632e5 100644 --- a/contrib/gtkgensurf/gensurf.cpp +++ b/contrib/gtkgensurf/gensurf.cpp @@ -409,7 +409,7 @@ void WriteIniFile( const char *file ){ } void UpdatePreview( bool DataChange ){ - if ( g_pWndPreview && GTK_WIDGET_VISIBLE( g_pWndPreview ) ) { + if ( g_pWndPreview && gtk_widget_get_visible( g_pWndPreview ) ) { if ( DataChange ) { GenerateXYZ(); } diff --git a/contrib/gtkgensurf/view.cpp b/contrib/gtkgensurf/view.cpp index 30682948..f237e0c5 100644 --- a/contrib/gtkgensurf/view.cpp +++ b/contrib/gtkgensurf/view.cpp @@ -308,7 +308,7 @@ static void motion( GtkWidget *widget, GdkEventMotion *event, gpointer data ){ if ( PtInRect( &rcGrid,pt ) ) { GdkCursor *cursor = gdk_cursor_new( GDK_CROSS ); - gdk_window_set_cursor( g_pWndPreview->window, cursor ); + gdk_window_set_cursor( gtk_widget_get_window( g_pWndPreview ), cursor ); gdk_cursor_unref( cursor ); char Text[32]; @@ -334,7 +334,7 @@ static void motion( GtkWidget *widget, GdkEventMotion *event, gpointer data ){ } else { - gdk_window_set_cursor( g_pWndPreview->window, NULL ); + gdk_window_set_cursor( gtk_widget_get_window( g_pWndPreview ), NULL ); } g_UIGtkTable.m_pfn_glwidget_swap_buffers( g_pPreviewWidget ); @@ -358,7 +358,7 @@ static gint doublevariable_spinfocusout( GtkWidget* widget, GdkEventFocus* event } static void preview_spin( GtkAdjustment *adj, double *data ){ - *data = DegreesToRadians( adj->value ); + *data = DegreesToRadians( gtk_adjustment_get_value( adj ) ); UpdatePreview( false ); } @@ -373,8 +373,8 @@ void CreateViewWindow(){ g_pWndPreview = dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), "GtkGenSurf Preview" ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", GTK_SIGNAL_FUNC( preview_close ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( preview_close ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pWnd ) ); gtk_window_set_default_size( GTK_WINDOW( dlg ), 300, 400 ); @@ -394,14 +394,14 @@ void CreateViewWindow(){ gtk_box_pack_start( GTK_BOX( hbox ), label, FALSE, TRUE, 0 ); adj = gtk_adjustment_new( 30, -90, 90, 1, 10, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( preview_spin ), &elevation ); + g_signal_connect( adj, "value-changed", G_CALLBACK( preview_spin ), &elevation ); spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 ); gtk_widget_show( spin ); gtk_box_pack_start( GTK_BOX( hbox ), spin, FALSE, TRUE, 0 ); g_signal_connect( G_OBJECT( spin ), "focus-out-event", G_CALLBACK( doublevariable_spinfocusout ), &elevation ); adj = gtk_adjustment_new( 30, 0, 359, 1, 10, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( preview_spin ), &azimuth ); + g_signal_connect( adj, "value-changed", G_CALLBACK( preview_spin ), &azimuth ); spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 ); gtk_widget_show( spin ); gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( spin ), TRUE ); @@ -422,10 +422,10 @@ void CreateViewWindow(){ g_pPreviewWidget = g_UIGtkTable.m_pfn_glwidget_new( FALSE, NULL ); gtk_widget_set_events( g_pPreviewWidget, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK ); - gtk_signal_connect( GTK_OBJECT( g_pPreviewWidget ), "expose-event", GTK_SIGNAL_FUNC( expose ), NULL ); - gtk_signal_connect( GTK_OBJECT( g_pPreviewWidget ), "motion-notify-event", GTK_SIGNAL_FUNC( motion ), NULL ); - gtk_signal_connect( GTK_OBJECT( g_pPreviewWidget ), "button-press-event", - GTK_SIGNAL_FUNC( button_press ), NULL ); + g_signal_connect( G_OBJECT( g_pPreviewWidget ), "expose-event", G_CALLBACK( expose ), NULL ); + g_signal_connect( G_OBJECT( g_pPreviewWidget ), "motion-notify-event", G_CALLBACK( motion ), NULL ); + g_signal_connect( G_OBJECT( g_pPreviewWidget ), "button-press-event", + G_CALLBACK( button_press ), NULL ); gtk_widget_show( g_pPreviewWidget ); gtk_container_add( GTK_CONTAINER( frame ), g_pPreviewWidget ); diff --git a/contrib/prtview/AboutDialog.cpp b/contrib/prtview/AboutDialog.cpp index 0fa05a67..d9fbeeb6 100644 --- a/contrib/prtview/AboutDialog.cpp +++ b/contrib/prtview/AboutDialog.cpp @@ -59,10 +59,10 @@ void DoAboutDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), "About Portal Viewer" ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -88,8 +88,8 @@ void DoAboutDlg(){ button = gtk_button_new_with_label( "OK" ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); diff --git a/contrib/prtview/ConfigDialog.cpp b/contrib/prtview/ConfigDialog.cpp index 43f20261..da64f465 100644 --- a/contrib/prtview/ConfigDialog.cpp +++ b/contrib/prtview/ConfigDialog.cpp @@ -69,14 +69,14 @@ static int DoColor( COLORREF *c ){ dlg = gtk_color_selection_dialog_new( "Choose Color" ); gtk_color_selection_set_color( GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG( dlg )->colorsel ), clr ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); - gtk_signal_connect( GTK_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->ok_button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - gtk_signal_connect( GTK_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->cancel_button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->ok_button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->cancel_button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -131,7 +131,7 @@ static void SetClipText( GtkWidget* label ){ } static void OnScroll2d( GtkAdjustment *adj, gpointer data ){ - portals.width_2d = adj->value; + portals.width_2d = gtk_adjustment_get_value( adj ); Set2DText( GTK_WIDGET( data ) ); if ( interfaces_started ) { @@ -140,7 +140,7 @@ static void OnScroll2d( GtkAdjustment *adj, gpointer data ){ } static void OnScroll3d( GtkAdjustment *adj, gpointer data ){ - portals.width_3d = adj->value; + portals.width_3d = gtk_adjustment_get_value( adj ); Set3DText( GTK_WIDGET( data ) ); if ( interfaces_started ) { @@ -149,7 +149,7 @@ static void OnScroll3d( GtkAdjustment *adj, gpointer data ){ } static void OnScrollTrans( GtkAdjustment *adj, gpointer data ){ - portals.trans_3d = adj->value; + portals.trans_3d = gtk_adjustment_get_value( adj ); Set3DTransText( GTK_WIDGET( data ) ); if ( interfaces_started ) { @@ -158,7 +158,7 @@ static void OnScrollTrans( GtkAdjustment *adj, gpointer data ){ } static void OnScrollClip( GtkAdjustment *adj, gpointer data ){ - portals.clip_range = adj->value; + portals.clip_range = gtk_adjustment_get_value( adj ); SetClipText( GTK_WIDGET( data ) ); if ( interfaces_started ) { @@ -280,10 +280,10 @@ void DoConfigDialog(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Portal Viewer Configuration" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -314,7 +314,7 @@ void DoConfigDialog(){ lw3label = gtk_label_new( "" ); gtk_widget_show( lw3label ); gtk_box_pack_start( GTK_BOX( hbox ), lw3label, FALSE, TRUE, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScroll3d ), lw3label ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnScroll3d ), lw3label ); table = gtk_table_new( 2, 4, FALSE ); gtk_widget_show( table ); @@ -327,42 +327,42 @@ void DoConfigDialog(){ gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnColor3d ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnColor3d ), NULL ); button = gtk_button_new_with_label( _( "Depth Color" ) ); gtk_widget_show( button ); gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnColorFog ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnColorFog ), NULL ); aa3check = gtk_check_button_new_with_label( "Anti-Alias (May not work on some video cards)" ); gtk_widget_show( aa3check ); gtk_table_attach( GTK_TABLE( table ), aa3check, 1, 4, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( aa3check ), "toggled", GTK_SIGNAL_FUNC( OnAntiAlias3d ), NULL ); + g_signal_connect( G_OBJECT( aa3check ), "toggled", G_CALLBACK( OnAntiAlias3d ), NULL ); depthcheck = gtk_check_button_new_with_label( _( "Depth Cue" ) ); gtk_widget_show( depthcheck ); gtk_table_attach( GTK_TABLE( table ), depthcheck, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( depthcheck ), "toggled", GTK_SIGNAL_FUNC( OnFog ), NULL ); + g_signal_connect( G_OBJECT( depthcheck ), "toggled", G_CALLBACK( OnFog ), NULL ); linescheck = gtk_check_button_new_with_label( _( "Lines" ) ); gtk_widget_show( linescheck ); gtk_table_attach( GTK_TABLE( table ), linescheck, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( linescheck ), "toggled", GTK_SIGNAL_FUNC( OnLines ), NULL ); + g_signal_connect( G_OBJECT( linescheck ), "toggled", G_CALLBACK( OnLines ), NULL ); polyscheck = gtk_check_button_new_with_label( _( "Polygons" ) ); gtk_widget_show( polyscheck ); gtk_table_attach( GTK_TABLE( table ), polyscheck, 3, 4, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( polyscheck ), "toggled", GTK_SIGNAL_FUNC( OnPoly ), NULL ); + g_signal_connect( G_OBJECT( polyscheck ), "toggled", G_CALLBACK( OnPoly ), NULL ); zlist = gtk_option_menu_new(); gtk_widget_show( zlist ); @@ -374,20 +374,20 @@ void DoConfigDialog(){ item = gtk_menu_item_new_with_label( _( "Z-Buffer Test and Write (recommended for solid or no polygons)" ) ); gtk_widget_show( item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( OnSelchangeZbuffer ), GINT_TO_POINTER( 0 ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( OnSelchangeZbuffer ), GINT_TO_POINTER( 0 ) ); gtk_menu_append( GTK_MENU( menu ), item ); item = gtk_menu_item_new_with_label( _( "Z-Buffer Test Only (recommended for transparent polygons)" ) ); gtk_widget_show( item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( OnSelchangeZbuffer ), GINT_TO_POINTER( 1 ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( OnSelchangeZbuffer ), GINT_TO_POINTER( 1 ) ); gtk_menu_append( GTK_MENU( menu ), item ); item = gtk_menu_item_new_with_label( _( "Z-Buffer Off" ) ); gtk_widget_show( item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( OnSelchangeZbuffer ), GINT_TO_POINTER( 2 ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( OnSelchangeZbuffer ), GINT_TO_POINTER( 2 ) ); gtk_menu_append( GTK_MENU( menu ), item ); table = gtk_table_new( 2, 2, FALSE ); @@ -410,7 +410,7 @@ void DoConfigDialog(){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( translabel ), 0.0, 0.0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScrollTrans ), translabel ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnScrollTrans ), translabel ); adj = gtk_adjustment_new( portals.clip_range, 1, 128, 1, 1, 1 ); clipslider = gtk_hscale_new( GTK_ADJUSTMENT( adj ) ); @@ -426,7 +426,7 @@ void DoConfigDialog(){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( cliplabel ), 0.0, 0.0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScrollClip ), cliplabel ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnScrollClip ), cliplabel ); hbox = gtk_hbox_new( TRUE, 5 ); gtk_widget_show( hbox ); @@ -435,12 +435,12 @@ void DoConfigDialog(){ show3check = gtk_check_button_new_with_label( _( "Show" ) ); gtk_widget_show( show3check ); gtk_box_pack_start( GTK_BOX( hbox ), show3check, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( show3check ), "toggled", GTK_SIGNAL_FUNC( OnConfig3d ), NULL ); + g_signal_connect( G_OBJECT( show3check ), "toggled", G_CALLBACK( OnConfig3d ), NULL ); portalcheck = gtk_check_button_new_with_label( _( "Portal cubic clipper" ) ); gtk_widget_show( portalcheck ); gtk_box_pack_start( GTK_BOX( hbox ), portalcheck, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( portalcheck ), "toggled", GTK_SIGNAL_FUNC( OnClip ), NULL ); + g_signal_connect( G_OBJECT( portalcheck ), "toggled", G_CALLBACK( OnClip ), NULL ); frame = gtk_frame_new( _( "2D View" ) ); gtk_widget_show( frame ); @@ -464,7 +464,7 @@ void DoConfigDialog(){ lw2label = gtk_label_new( "" ); gtk_widget_show( lw2label ); gtk_box_pack_start( GTK_BOX( hbox ), lw2label, FALSE, TRUE, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScroll2d ), lw2label ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnScroll2d ), lw2label ); hbox = gtk_hbox_new( FALSE, 5 ); gtk_widget_show( hbox ); @@ -473,13 +473,13 @@ void DoConfigDialog(){ button = gtk_button_new_with_label( _( "Color" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnColor2d ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnColor2d ), NULL ); gtk_widget_set_usize( button, 60, -2 ); aa2check = gtk_check_button_new_with_label( _( "Anti-Alias (May not work on some video cards)" ) ); gtk_widget_show( aa2check ); gtk_box_pack_start( GTK_BOX( hbox ), aa2check, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( aa2check ), "toggled", GTK_SIGNAL_FUNC( OnAntiAlias2d ), NULL ); + g_signal_connect( G_OBJECT( aa2check ), "toggled", G_CALLBACK( OnAntiAlias2d ), NULL ); hbox = gtk_hbox_new( FALSE, 5 ); gtk_widget_show( hbox ); @@ -488,7 +488,7 @@ void DoConfigDialog(){ show2check = gtk_check_button_new_with_label( _( "Show" ) ); gtk_widget_show( show2check ); gtk_box_pack_start( GTK_BOX( hbox ), show2check, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( show2check ), "toggled", GTK_SIGNAL_FUNC( OnConfig2d ), NULL ); + g_signal_connect( G_OBJECT( show2check ), "toggled", G_CALLBACK( OnConfig2d ), NULL ); hbox = gtk_hbox_new( FALSE, 5 ); gtk_widget_show( hbox ); @@ -497,8 +497,8 @@ void DoConfigDialog(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); // initialize dialog diff --git a/contrib/prtview/LoadPortalFileDialog.cpp b/contrib/prtview/LoadPortalFileDialog.cpp index 9586a247..6db28874 100644 --- a/contrib/prtview/LoadPortalFileDialog.cpp +++ b/contrib/prtview/LoadPortalFileDialog.cpp @@ -71,12 +71,12 @@ static void change_clicked( GtkWidget *widget, gpointer data ){ int loop = 1; file_sel = gtk_file_selection_new( "Locate portal (.prt) file" ); - gtk_signal_connect( GTK_OBJECT( GTK_FILE_SELECTION( file_sel )->ok_button ), "clicked", - GTK_SIGNAL_FUNC( file_sel_callback ), GINT_TO_POINTER( IDOK ) ); - gtk_signal_connect( GTK_OBJECT( GTK_FILE_SELECTION( file_sel )->cancel_button ), "clicked", - GTK_SIGNAL_FUNC( file_sel_callback ), GINT_TO_POINTER( IDCANCEL ) ); - gtk_signal_connect( GTK_OBJECT( file_sel ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( GTK_FILE_SELECTION( file_sel )->ok_button ), "clicked", + G_CALLBACK( file_sel_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( GTK_FILE_SELECTION( file_sel )->cancel_button ), "clicked", + G_CALLBACK( file_sel_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( file_sel ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); gtk_file_selection_hide_fileop_buttons( GTK_FILE_SELECTION( file_sel ) ); g_object_set_data( G_OBJECT( file_sel ), "loop", &loop ); @@ -105,10 +105,10 @@ int DoLoadPortalFileDialog(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), "Load .prt" ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -137,7 +137,7 @@ int DoLoadPortalFileDialog(){ button = gtk_button_new_with_label( "Change" ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( change_clicked ), entry ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( change_clicked ), entry ); gtk_widget_set_usize( button, 60, -2 ); hbox = gtk_hbox_new( FALSE, 5 ); @@ -147,15 +147,15 @@ int DoLoadPortalFileDialog(){ button = gtk_button_new_with_label( "Cancel" ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( "OK" ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); char *fn = g_FuncTable.m_pfnGetMapName(); diff --git a/contrib/prtview/gtkdlgs.cpp b/contrib/prtview/gtkdlgs.cpp index 21c6f450..4dbebe53 100644 --- a/contrib/prtview/gtkdlgs.cpp +++ b/contrib/prtview/gtkdlgs.cpp @@ -70,12 +70,12 @@ static void change_clicked( GtkWidget *widget, gpointer data ){ int loop = 1; file_sel = gtk_file_selection_new( "Locate portal (.prt) file" ); - gtk_signal_connect( GTK_OBJECT( GTK_FILE_SELECTION( file_sel )->ok_button ), "clicked", - GTK_SIGNAL_FUNC( file_sel_callback ), GINT_TO_POINTER( IDOK ) ); - gtk_signal_connect( GTK_OBJECT( GTK_FILE_SELECTION( file_sel )->cancel_button ), "clicked", - GTK_SIGNAL_FUNC( file_sel_callback ), GINT_TO_POINTER( IDCANCEL ) ); - gtk_signal_connect( GTK_OBJECT( file_sel ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( GTK_FILE_SELECTION( file_sel )->ok_button ), "clicked", + G_CALLBACK( file_sel_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( GTK_FILE_SELECTION( file_sel )->cancel_button ), "clicked", + G_CALLBACK( file_sel_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( file_sel ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); gtk_file_selection_hide_fileop_buttons( GTK_FILE_SELECTION( file_sel ) ); g_object_set_data( G_OBJECT( file_sel ), "loop", &loop ); @@ -107,10 +107,10 @@ int DoLoadPortalFileDialog(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), "Load .prt" ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -139,7 +139,7 @@ int DoLoadPortalFileDialog(){ button = gtk_button_new_with_label( "Change" ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( change_clicked ), entry ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( change_clicked ), entry ); gtk_widget_set_usize( button, 60, -2 ); hbox = gtk_hbox_new( FALSE, 5 ); @@ -149,15 +149,15 @@ int DoLoadPortalFileDialog(){ button = gtk_button_new_with_label( "Cancel" ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( "OK" ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); char *fn = g_IBSPTable.m_pfnGetMapName(); @@ -200,10 +200,10 @@ void DoAboutDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), "About Portal Viewer" ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -226,8 +226,8 @@ void DoAboutDlg(){ button = gtk_button_new_with_label( "OK" ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); @@ -254,14 +254,14 @@ static int DoColor( COLORREF *c ){ dlg = gtk_color_selection_dialog_new( "Choose Color" ); gtk_color_selection_set_color( GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG( dlg )->colorsel ), clr ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); - gtk_signal_connect( GTK_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->ok_button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - gtk_signal_connect( GTK_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->cancel_button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->ok_button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->cancel_button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -465,10 +465,10 @@ void DoConfigDialog(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Portal Viewer Configuration" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -499,7 +499,7 @@ void DoConfigDialog(){ lw3label = gtk_label_new( "" ); gtk_widget_show( lw3label ); gtk_box_pack_start( GTK_BOX( hbox ), lw3label, FALSE, TRUE, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScroll3d ), lw3label ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnScroll3d ), lw3label ); table = gtk_table_new( 2, 4, FALSE ); gtk_widget_show( table ); @@ -512,42 +512,42 @@ void DoConfigDialog(){ gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnColor3d ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnColor3d ), NULL ); button = gtk_button_new_with_label( _( "Depth Color" ) ); gtk_widget_show( button ); gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnColorFog ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnColorFog ), NULL ); aa3check = gtk_check_button_new_with_label( _( "Anti-Alias (May not work on some video cards)" ) ); gtk_widget_show( aa3check ); gtk_table_attach( GTK_TABLE( table ), aa3check, 1, 4, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( aa3check ), "toggled", GTK_SIGNAL_FUNC( OnAntiAlias3d ), NULL ); + g_signal_connect( G_OBJECT( aa3check ), "toggled", G_CALLBACK( OnAntiAlias3d ), NULL ); depthcheck = gtk_check_button_new_with_label( _( "Depth Cue" ) ); gtk_widget_show( depthcheck ); gtk_table_attach( GTK_TABLE( table ), depthcheck, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( depthcheck ), "toggled", GTK_SIGNAL_FUNC( OnFog ), NULL ); + g_signal_connect( G_OBJECT( depthcheck ), "toggled", G_CALLBACK( OnFog ), NULL ); linescheck = gtk_check_button_new_with_label( _( "Lines" ) ); gtk_widget_show( linescheck ); gtk_table_attach( GTK_TABLE( table ), linescheck, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( linescheck ), "toggled", GTK_SIGNAL_FUNC( OnLines ), NULL ); + g_signal_connect( G_OBJECT( linescheck ), "toggled", G_CALLBACK( OnLines ), NULL ); polyscheck = gtk_check_button_new_with_label( _( "Polygons" ) ); gtk_widget_show( polyscheck ); gtk_table_attach( GTK_TABLE( table ), polyscheck, 3, 4, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( polyscheck ), "toggled", GTK_SIGNAL_FUNC( OnPoly ), NULL ); + g_signal_connect( G_OBJECT( polyscheck ), "toggled", G_CALLBACK( OnPoly ), NULL ); zlist = gtk_option_menu_new(); gtk_widget_show( zlist ); @@ -559,20 +559,20 @@ void DoConfigDialog(){ item = gtk_menu_item_new_with_label( _( "Z-Buffer Test and Write (recommended for solid or no polygons)" ) ); gtk_widget_show( item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( OnSelchangeZbuffer ), GINT_TO_POINTER( 0 ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( OnSelchangeZbuffer ), GINT_TO_POINTER( 0 ) ); gtk_menu_append( GTK_MENU( menu ), item ); item = gtk_menu_item_new_with_label( _( "Z-Buffer Test Only (recommended for transparent polygons)" ) ); gtk_widget_show( item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( OnSelchangeZbuffer ), GINT_TO_POINTER( 1 ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( OnSelchangeZbuffer ), GINT_TO_POINTER( 1 ) ); gtk_menu_append( GTK_MENU( menu ), item ); item = gtk_menu_item_new_with_label( _( "Z-Buffer Off" ) ); gtk_widget_show( item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( OnSelchangeZbuffer ), GINT_TO_POINTER( 2 ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( OnSelchangeZbuffer ), GINT_TO_POINTER( 2 ) ); gtk_menu_append( GTK_MENU( menu ), item ); table = gtk_table_new( 2, 2, FALSE ); @@ -595,7 +595,7 @@ void DoConfigDialog(){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( translabel ), 0.0, 0.0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScrollTrans ), translabel ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnScrollTrans ), translabel ); adj = gtk_adjustment_new( portals.clip_range, 1, 128, 1, 1, 1 ); clipslider = gtk_hscale_new( GTK_ADJUSTMENT( adj ) ); @@ -611,7 +611,7 @@ void DoConfigDialog(){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( cliplabel ), 0.0, 0.0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScrollClip ), cliplabel ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnScrollClip ), cliplabel ); hbox = gtk_hbox_new( TRUE, 5 ); gtk_widget_show( hbox ); @@ -620,12 +620,12 @@ void DoConfigDialog(){ show3check = gtk_check_button_new_with_label( _( "Show" ) ); gtk_widget_show( show3check ); gtk_box_pack_start( GTK_BOX( hbox ), show3check, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( show3check ), "toggled", GTK_SIGNAL_FUNC( OnConfig3d ), NULL ); + g_signal_connect( G_OBJECT( show3check ), "toggled", G_CALLBACK( OnConfig3d ), NULL ); portalcheck = gtk_check_button_new_with_label( _( "Portal cubic clipper" ) ); gtk_widget_show( portalcheck ); gtk_box_pack_start( GTK_BOX( hbox ), portalcheck, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( portalcheck ), "toggled", GTK_SIGNAL_FUNC( OnClip ), NULL ); + g_signal_connect( G_OBJECT( portalcheck ), "toggled", G_CALLBACK( OnClip ), NULL ); frame = gtk_frame_new( _( "2D View" ) ); gtk_widget_show( frame ); @@ -649,7 +649,7 @@ void DoConfigDialog(){ lw2label = gtk_label_new( "" ); gtk_widget_show( lw2label ); gtk_box_pack_start( GTK_BOX( hbox ), lw2label, FALSE, TRUE, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScroll2d ), lw2label ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnScroll2d ), lw2label ); hbox = gtk_hbox_new( FALSE, 5 ); gtk_widget_show( hbox ); @@ -658,13 +658,13 @@ void DoConfigDialog(){ button = gtk_button_new_with_label( "Color" ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnColor2d ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnColor2d ), NULL ); gtk_widget_set_usize( button, 60, -2 ); aa2check = gtk_check_button_new_with_label( "Anti-Alias (May not work on some video cards)" ); gtk_widget_show( aa2check ); gtk_box_pack_start( GTK_BOX( hbox ), aa2check, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( aa2check ), "toggled", GTK_SIGNAL_FUNC( OnAntiAlias2d ), NULL ); + g_signal_connect( G_OBJECT( aa2check ), "toggled", G_CALLBACK( OnAntiAlias2d ), NULL ); hbox = gtk_hbox_new( FALSE, 5 ); gtk_widget_show( hbox ); @@ -673,7 +673,7 @@ void DoConfigDialog(){ show2check = gtk_check_button_new_with_label( "Show" ); gtk_widget_show( show2check ); gtk_box_pack_start( GTK_BOX( hbox ), show2check, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( show2check ), "toggled", GTK_SIGNAL_FUNC( OnConfig2d ), NULL ); + g_signal_connect( G_OBJECT( show2check ), "toggled", G_CALLBACK( OnConfig2d ), NULL ); hbox = gtk_hbox_new( FALSE, 5 ); gtk_widget_show( hbox ); @@ -682,8 +682,8 @@ void DoConfigDialog(){ button = gtk_button_new_with_label( "OK" ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); // initialize dialog diff --git a/plugins/surface_idtech2/surfaceflags.cpp b/plugins/surface_idtech2/surfaceflags.cpp index 3ce5acd3..db9d997c 100644 --- a/plugins/surface_idtech2/surfaceflags.cpp +++ b/plugins/surface_idtech2/surfaceflags.cpp @@ -243,7 +243,7 @@ void on_content_button_toggled( GtkToggleButton *togglebutton, gpointer user_dat // Value Entry Callback void on_value_entry_changed( GtkEditable *editable, gpointer user_data ){ if ( ( !setup_buttons ) ) { // If we're setting up the buttons, don't change value - working_value = atoi( gtk_entry_get_text( (GtkEntry*)editable ) ); + working_value = atoi( gtk_entry_get_text( GTK_ENTRY( editable ) ) ); GetTexMods( false ); } } @@ -264,15 +264,15 @@ void on_value_entry_insert_text( GtkEditable *editable, gchar *new_text, gint ne } if ( count > 0 ) { - gtk_signal_handler_block_by_func( GTK_OBJECT( editable ), - GTK_SIGNAL_FUNC( on_value_entry_insert_text ), + g_signal_handlers_block_by_func( G_OBJECT( editable ), + (gpointer)G_CALLBACK( on_value_entry_insert_text ), user_data ); gtk_editable_insert_text( editable, result, count, position ); - gtk_signal_handler_unblock_by_func( GTK_OBJECT( editable ), - GTK_SIGNAL_FUNC( on_value_entry_insert_text ), + g_signal_handlers_unblock_by_func( G_OBJECT( editable ), + (gpointer)G_CALLBACK( on_value_entry_insert_text ), user_data ); } - gtk_signal_emit_stop_by_name( GTK_OBJECT( editable ), "insert-text" ); + g_signal_stop_emission_by_name( G_OBJECT( editable ), "insert-text" ); g_free( result ); } @@ -338,7 +338,7 @@ GtkWidget* create_SurfaceFlagsFrame( GtkWidget* surfacedialog_widget ){ buttonLabel = g_FuncTable.m_pfnReadProjectKey( buffer ); //Sys_Printf( "%s: %s\n", buffer, buttonLabel ); surface_buttons[i] = gtk_toggle_button_new_with_label( buttonLabel ); - gtk_signal_connect( GTK_OBJECT( surface_buttons[i] ), "toggled", GTK_SIGNAL_FUNC( on_surface_button_toggled ), GINT_TO_POINTER( 1 << i ) ); + g_signal_connect( G_OBJECT( surface_buttons[i] ), "toggled", G_CALLBACK( on_surface_button_toggled ), GINT_TO_POINTER( 1 << i ) ); gtk_widget_show( surface_buttons[i] ); gtk_table_attach( GTK_TABLE( table4 ), surface_buttons[i], 0 + x, 1 + x, ( 0 + y ), ( 1 + y ), (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -362,11 +362,11 @@ GtkWidget* create_SurfaceFlagsFrame( GtkWidget* surfacedialog_widget ){ gtk_box_pack_start( GTK_BOX( hbox3 ), value_label, FALSE, FALSE, 0 ); value_entry = gtk_entry_new(); - gtk_signal_connect( GTK_OBJECT( value_entry ), "changed", - GTK_SIGNAL_FUNC( on_value_entry_changed ), + g_signal_connect( G_OBJECT( value_entry ), "changed", + G_CALLBACK( on_value_entry_changed ), NULL ); - gtk_signal_connect( GTK_OBJECT( value_entry ), "insert-text", - GTK_SIGNAL_FUNC( on_value_entry_insert_text ), + g_signal_connect( G_OBJECT( value_entry ), "insert-text", + G_CALLBACK( on_value_entry_insert_text ), NULL ); gtk_entry_set_max_length( (GtkEntry *)value_entry, 11 ); gtk_widget_show( value_entry ); @@ -395,7 +395,7 @@ GtkWidget* create_SurfaceFlagsFrame( GtkWidget* surfacedialog_widget ){ snprintf( buffer, sizeof( buffer ) - 1, "cont%i", i + 1 ); buttonLabel = g_FuncTable.m_pfnReadProjectKey( buffer ); content_buttons[i] = gtk_toggle_button_new_with_label( buttonLabel ); - gtk_signal_connect( GTK_OBJECT( content_buttons[i] ), "toggled", GTK_SIGNAL_FUNC( on_content_button_toggled ), GINT_TO_POINTER( 1 << i ) ); + g_signal_connect( G_OBJECT( content_buttons[i] ), "toggled", G_CALLBACK( on_content_button_toggled ), GINT_TO_POINTER( 1 << i ) ); gtk_widget_show( content_buttons[i] ); gtk_table_attach( GTK_TABLE( table3 ), content_buttons[i], 0 + x, 1 + x, ( 0 + y ), ( 1 + y ), (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), diff --git a/plugins/textool/2DView.cpp b/plugins/textool/2DView.cpp index b2a63227..abcf5444 100644 --- a/plugins/textool/2DView.cpp +++ b/plugins/textool/2DView.cpp @@ -117,22 +117,22 @@ bool C2DView::OnRButtonUp( int x, int y ){ menu = gtk_menu_new(); item = gtk_menu_item_new_with_label( "Validate (RETURN)" ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( Textool_Validate ), NULL ); + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( Textool_Validate ), NULL ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); item = gtk_menu_item_new_with_label( "Zoom in (INSERT)" ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( view_ZoomIn ), this ); + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( view_ZoomIn ), this ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); item = gtk_menu_item_new_with_label( "Zoom out (DELETE)" ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( view_ZoomOut ), this ); + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( view_ZoomOut ), this ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); item = gtk_menu_item_new_with_label( "Cancel (ESC)" ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( Textool_Cancel ), NULL ); + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( Textool_Cancel ), NULL ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); diff --git a/plugins/textool/TexTool.cpp b/plugins/textool/TexTool.cpp index fa1edc5f..4ad641f5 100644 --- a/plugins/textool/TexTool.cpp +++ b/plugins/textool/TexTool.cpp @@ -55,12 +55,12 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ int mode = ( uType & MB_TYPEMASK ), ret, loop = 1; window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), lpCaption ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); gtk_widget_realize( window ); @@ -85,9 +85,9 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ if ( mode == MB_OK ) { w = gtk_button_new_with_label( "Ok" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); ret = IDOK; @@ -95,38 +95,38 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ else if ( mode == MB_OKCANCEL ) { w = gtk_button_new_with_label( "Ok" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; } else if ( mode == MB_YESNOCANCEL ) { w = gtk_button_new_with_label( "Yes" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "No" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); w = gtk_button_new_with_label( "Cancel" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; } @@ -134,16 +134,16 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ { w = gtk_button_new_with_label( "Yes" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( "No" ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); ret = IDNO; } @@ -607,7 +607,7 @@ static gint expose( GtkWidget *widget, GdkEventExpose *event, gpointer data ){ static gint keypress( GtkWidget* widget, GdkEventKey* event, gpointer data ){ unsigned int code = gdk_keyval_to_upper( event->keyval ); - if ( code == GDK_Escape ) { + if ( code == GDK_KEY_Escape ) { gtk_widget_destroy( g_pToolWnd ); g_pToolWnd = NULL; return TRUE; @@ -618,7 +618,7 @@ static gint keypress( GtkWidget* widget, GdkEventKey* event, gpointer data ){ return FALSE; } - if ( code == GDK_Return ) { + if ( code == GDK_KEY_Return ) { Textool_Validate(); return FALSE; } @@ -641,17 +641,17 @@ static GtkWidget* CreateOpenGLWidget(){ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK ); // Connect signal handlers - gtk_signal_connect( GTK_OBJECT( g_pToolWidget ), "expose-event", GTK_SIGNAL_FUNC( expose ), NULL ); - gtk_signal_connect( GTK_OBJECT( g_pToolWidget ), "motion-notify-event", - GTK_SIGNAL_FUNC( motion ), NULL ); - gtk_signal_connect( GTK_OBJECT( g_pToolWidget ), "button-press-event", - GTK_SIGNAL_FUNC( button_press ), NULL ); - gtk_signal_connect( GTK_OBJECT( g_pToolWidget ), "button-release-event", - GTK_SIGNAL_FUNC( button_release ), NULL ); + g_signal_connect( G_OBJECT( g_pToolWidget ), "expose-event", G_CALLBACK( expose ), NULL ); + g_signal_connect( G_OBJECT( g_pToolWidget ), "motion-notify-event", + G_CALLBACK( motion ), NULL ); + g_signal_connect( G_OBJECT( g_pToolWidget ), "button-press-event", + G_CALLBACK( button_press ), NULL ); + g_signal_connect( G_OBJECT( g_pToolWidget ), "button-release-event", + G_CALLBACK( button_release ), NULL ); - gtk_signal_connect( GTK_OBJECT( g_pToolWnd ), "delete-event", GTK_SIGNAL_FUNC( close ), NULL ); - gtk_signal_connect( GTK_OBJECT( g_pToolWnd ), "key-press-event", - GTK_SIGNAL_FUNC( keypress ), NULL ); + g_signal_connect( G_OBJECT( g_pToolWnd ), "delete-event", G_CALLBACK( close ), NULL ); + g_signal_connect( G_OBJECT( g_pToolWnd ), "key-press-event", + G_CALLBACK( keypress ), NULL ); return g_pToolWidget; } diff --git a/radiant/bp_dlg.cpp b/radiant/bp_dlg.cpp index e7300802..ff71f8fd 100644 --- a/radiant/bp_dlg.cpp +++ b/radiant/bp_dlg.cpp @@ -59,14 +59,14 @@ int BP_MessageBox( int status ){ int ret, loop = 1; window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", - GTK_SIGNAL_FUNC( BP_dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", + G_CALLBACK( BP_dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), _( "Current map format is incompatible" ) ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); gtk_widget_realize( window ); @@ -109,22 +109,22 @@ int BP_MessageBox( int status ){ w = gtk_button_new_with_label( _( "Convert" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( BP_dialog_button_callback ), GINT_TO_POINTER( 1 ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( BP_dialog_button_callback ), GINT_TO_POINTER( 1 ) ); GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Change default" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( BP_dialog_button_callback ), GINT_TO_POINTER( 2 ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( BP_dialog_button_callback ), GINT_TO_POINTER( 2 ) ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Abort load" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( BP_dialog_button_callback ), GINT_TO_POINTER( 0 ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( BP_dialog_button_callback ), GINT_TO_POINTER( 0 ) ); gtk_widget_show( w ); ret = 0; // abort diff --git a/radiant/camwindow.cpp b/radiant/camwindow.cpp index 7bca4f0f..4655d1a3 100644 --- a/radiant/camwindow.cpp +++ b/radiant/camwindow.cpp @@ -339,7 +339,7 @@ void CamWnd::Cam_MouseControl( float dtime ){ dx = m_ptLastCamCursorX - m_ptCursorX; dy = m_ptLastCamCursorY - m_ptCursorY; - gdk_window_get_origin( m_pWidget->window, &x, &y ); + gdk_window_get_origin( gtk_widget_get_window( m_pWidget ), &x, &y ); m_ptLastCamCursorX = x + ( m_Camera.width / 2 ); m_ptLastCamCursorY = y + ( m_Camera.height / 2 ); @@ -481,12 +481,12 @@ void CamWnd::ToggleFreeMove(){ if ( g_pParentWnd->CurrentStyle() == MainFrame::eFloating ) { widget = g_pParentWnd->GetCamWnd()->m_pParent; - window = widget->window; + window = gtk_widget_get_window( widget ); } else { widget = g_pParentWnd->m_pWidget; - window = widget->window; + window = gtk_widget_get_window( widget ); } if ( m_bFreeMove ) { @@ -514,8 +514,8 @@ void CamWnd::ToggleFreeMove(){ // RR2DO2: FIXME why does this only work the 2nd and // further times the event is called? (floating windows // mode seems to work fine though...) - m_FocusOutHandler_id = gtk_signal_connect( GTK_OBJECT( widget ), "focus-out-event", - GTK_SIGNAL_FUNC( camwindow_focusout ), g_pParentWnd ); + m_FocusOutHandler_id = g_signal_connect( G_OBJECT( widget ), "focus-out-event", + G_CALLBACK( camwindow_focusout ), g_pParentWnd ); { GdkEventMask mask = (GdkEventMask)( GDK_POINTER_MOTION_MASK @@ -527,14 +527,14 @@ void CamWnd::ToggleFreeMove(){ | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK ); - gdk_pointer_grab( widget->window, TRUE, mask, widget->window, NULL, GDK_CURRENT_TIME ); + gdk_pointer_grab( gtk_widget_get_window( widget ), TRUE, mask, gtk_widget_get_window( widget ), NULL, GDK_CURRENT_TIME ); } } else { gdk_pointer_ungrab( GDK_CURRENT_TIME ); - gtk_signal_disconnect( GTK_OBJECT( widget ), m_FocusOutHandler_id ); + g_signal_handler_disconnect( G_OBJECT( widget ), m_FocusOutHandler_id ); GdkCursor *cursor = gdk_cursor_new( GDK_LEFT_PTR ); gdk_window_set_cursor( window, cursor ); diff --git a/radiant/dialog.cpp b/radiant/dialog.cpp index 98ba454a..05fbe19b 100644 --- a/radiant/dialog.cpp +++ b/radiant/dialog.cpp @@ -81,10 +81,10 @@ static gint delete_event_callback( GtkWidget *widget, GdkEvent* event, gpointer void Dialog::Create(){ if ( m_bNeedBuild ) { m_pWidget = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "delete-event", - GTK_SIGNAL_FUNC( delete_event_callback ), this ); - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( m_pWidget ), "delete-event", + G_CALLBACK( delete_event_callback ), this ); + g_signal_connect( G_OBJECT( m_pWidget ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( m_pWidget ), "loop", &m_nLoop ); g_object_set_data( G_OBJECT( m_pWidget ), "ret", &m_nReturn ); @@ -112,8 +112,8 @@ void Dialog::AddDialogData( GtkObject *object, void *buf, DLG_DATA_TYPE type ){ } void Dialog::AddModalButton( GtkWidget *widget, int ret ) { - gtk_signal_connect( GTK_OBJECT( widget ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( ret ) ); + g_signal_connect( G_OBJECT( widget ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( ret ) ); } void Dialog::UpdateData( bool retrieve ){ diff --git a/radiant/dialoginfo.cpp b/radiant/dialoginfo.cpp index c0933dfd..5ce5c9b1 100644 --- a/radiant/dialoginfo.cpp +++ b/radiant/dialoginfo.cpp @@ -42,10 +42,10 @@ void ShowInfoDialog( const char* pText ){ g_dlgInfo = dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Information" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( gtk_widget_hide ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( gtk_widget_hide ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_default_size( GTK_WINDOW( dlg ), 300, 150 ); scr = gtk_scrolled_window_new( NULL, NULL ); diff --git a/radiant/findtexturedialog.cpp b/radiant/findtexturedialog.cpp index a2fea609..5e6b6f02 100644 --- a/radiant/findtexturedialog.cpp +++ b/radiant/findtexturedialog.cpp @@ -72,7 +72,7 @@ static void find_clicked( GtkWidget *widget, gpointer data ){ IShader *pShader = QERApp_ActiveShader_ForIndex( i ); item = gtk_menu_item_new_with_label( pShader->getName() ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( popup_selected ), data ); + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( popup_selected ), data ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); } @@ -146,8 +146,8 @@ void FindTextureDialog::BuildDialog(){ gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( entry ), "focus-in-event", - GTK_SIGNAL_FUNC( find_focus_in ), NULL ); + g_signal_connect( G_OBJECT( entry ), "focus-in-event", + G_CALLBACK( find_focus_in ), NULL ); AddDialogData( entry, &m_strFind, DLG_ENTRY_TEXT ); button = gtk_button_new(); @@ -155,8 +155,8 @@ void FindTextureDialog::BuildDialog(){ gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( find_clicked ), entry ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( find_clicked ), entry ); arrow = gtk_arrow_new( GTK_ARROW_DOWN, GTK_SHADOW_OUT ); gtk_widget_show( arrow ); @@ -167,8 +167,8 @@ void FindTextureDialog::BuildDialog(){ gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( entry ), "focus-in-event", - GTK_SIGNAL_FUNC( replace_focus_in ), NULL ); + g_signal_connect( G_OBJECT( entry ), "focus-in-event", + G_CALLBACK( replace_focus_in ), NULL ); AddDialogData( entry, &m_strReplace, DLG_ENTRY_TEXT ); button = gtk_button_new(); @@ -176,8 +176,8 @@ void FindTextureDialog::BuildDialog(){ gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( find_clicked ), entry ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( find_clicked ), entry ); arrow = gtk_arrow_new( GTK_ARROW_DOWN, GTK_SHADOW_OUT ); gtk_widget_show( arrow ); @@ -205,29 +205,29 @@ void FindTextureDialog::BuildDialog(){ button = gtk_button_new_with_label( _( "Find" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnFind ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnFind ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnOK ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnOK ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Apply" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnApply ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnApply ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Close" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnClose ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnClose ), NULL ); gtk_widget_set_usize( button, 60, -2 ); gtk_widget_show( dlg ); @@ -246,7 +246,7 @@ void FindTextureDialog::updateTextures( const char *p ){ } bool FindTextureDialog::isOpen(){ - return ( g_dlgFind.m_pWidget == NULL || GTK_WIDGET_VISIBLE( g_dlgFind.m_pWidget ) == FALSE ) ? false : true; + return ( g_dlgFind.m_pWidget == NULL || gtk_widget_get_visible( g_dlgFind.m_pWidget ) == FALSE ) ? false : true; } void FindTextureDialog::setFindStr( const char * p ){ diff --git a/radiant/glwidget.cpp b/radiant/glwidget.cpp index a7e354e9..bd9ba7fc 100644 --- a/radiant/glwidget.cpp +++ b/radiant/glwidget.cpp @@ -177,9 +177,12 @@ GtkWidget* WINAPI gtk_glwidget_new( gboolean zbuffer, GtkWidget* share ){ GtkWidget* drawing_area = gtk_drawing_area_new(); GdkGLConfig* glconfig = ( zbuffer ) ? glconfig_new_with_depth() : glconfig_new(); GdkGLContext* shared_context = ( share ) ? gtk_widget_get_gl_context( share ) : NULL; + gboolean result; - gtk_widget_set_gl_capability( drawing_area, glconfig, shared_context, TRUE, GDK_GL_RGBA_TYPE ); - + result = gtk_widget_set_gl_capability( drawing_area, glconfig, shared_context, TRUE, GDK_GL_RGBA_TYPE ); + if( !result ){ + Sys_Printf( "gtk_widget_set_gl_capability failed.\n" ); + } return drawing_area; } diff --git a/radiant/glwindow.cpp b/radiant/glwindow.cpp index 41989d1a..0c10245d 100644 --- a/radiant/glwindow.cpp +++ b/radiant/glwindow.cpp @@ -67,7 +67,7 @@ static void button_press( GtkWidget *widget, GdkEventButton *event, gpointer dat GLWindow *wnd = (GLWindow*)data; guint32 flags = 0; - gdk_pointer_grab( widget->window, FALSE, + gdk_pointer_grab( gtk_widget_get_window( widget ), FALSE, (GdkEventMask)( GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK ), NULL, NULL, GDK_CURRENT_TIME ); @@ -214,14 +214,14 @@ GLWindow::GLWindow( bool zbuffer ) { #endif // Connect signal handlers - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "realize", GTK_SIGNAL_FUNC( realize ), this ); - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "expose-event", GTK_SIGNAL_FUNC( expose ), this ); - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "motion-notify-event", GTK_SIGNAL_FUNC( motion ), this ); - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "button-press-event", GTK_SIGNAL_FUNC( button_press ), this ); - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "button-release-event",GTK_SIGNAL_FUNC( button_release ), this ); - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "size-allocate", GTK_SIGNAL_FUNC( resize ), this ); + g_signal_connect( G_OBJECT( m_pWidget ), "realize", G_CALLBACK( realize ), this ); + g_signal_connect( G_OBJECT( m_pWidget ), "expose-event", G_CALLBACK( expose ), this ); + g_signal_connect( G_OBJECT( m_pWidget ), "motion-notify-event", G_CALLBACK( motion ), this ); + g_signal_connect( G_OBJECT( m_pWidget ), "button-press-event", G_CALLBACK( button_press ), this ); + g_signal_connect( G_OBJECT( m_pWidget ), "button-release-event",G_CALLBACK( button_release ), this ); + g_signal_connect( G_OBJECT( m_pWidget ), "size-allocate", G_CALLBACK( resize ), this ); #if GTK_CHECK_VERSION( 1,3,0 ) - gtk_signal_connect( GTK_OBJECT( m_pWidget ), "scroll-event", GTK_SIGNAL_FUNC( scroll_event ), this ); + g_signal_connect( G_OBJECT( m_pWidget ), "scroll-event", G_CALLBACK( scroll_event ), this ); #endif } @@ -244,11 +244,11 @@ void GLWindow::CreateContext(){ } void GLWindow::SetTimer( guint millisec ){ - m_nTimer = gtk_timeout_add( millisec, timer, this ); + m_nTimer = g_timeout_add( millisec, timer, this ); } void GLWindow::KillTimer(){ - gtk_timeout_remove( m_nTimer ); + g_source_remove( m_nTimer ); m_nTimer = 0; } diff --git a/radiant/groupdialog.cpp b/radiant/groupdialog.cpp index 8d15c99a..5c85fc24 100644 --- a/radiant/groupdialog.cpp +++ b/radiant/groupdialog.cpp @@ -541,10 +541,10 @@ void ResetEntity(){ // refresh the dialog SetKeyValuePairs(); for ( i = EntCheck1; i <= EntCheck16; i++ ) - gtk_signal_handler_block_by_func( GTK_OBJECT( EntWidgets[i] ), GTK_SIGNAL_FUNC( entity_check ), NULL ); + g_signal_handlers_block_by_func( G_OBJECT( EntWidgets[i] ), (gpointer)G_CALLBACK( entity_check ), NULL ); SetSpawnFlags(); for ( i = EntCheck1; i <= EntCheck16; i++ ) - gtk_signal_handler_unblock_by_func( GTK_OBJECT( EntWidgets[i] ), GTK_SIGNAL_FUNC( entity_check ), NULL ); + g_signal_handlers_unblock_by_func( G_OBJECT( EntWidgets[i] ), (gpointer)G_CALLBACK( entity_check ), NULL ); } bool GetSelectAllCriteria( CString &strKey, CString &strVal ){ @@ -552,7 +552,7 @@ bool GetSelectAllCriteria( CString &strKey, CString &strVal ){ GtkTreeIter iter; if ( gtk_tree_selection_get_selected( gtk_tree_view_get_selection( GTK_TREE_VIEW( EntWidgets[EntProps] ) ), &model, &iter ) && ( inspector_mode == W_ENTITY ) - && GTK_WIDGET_VISIBLE( g_pGroupDlg->m_pWidget ) ) { + && gtk_widget_get_visible( g_pGroupDlg->m_pWidget ) ) { strKey = gtk_entry_get_text( GTK_ENTRY( EntWidgets[EntKeyField] ) ); strVal = gtk_entry_get_text( GTK_ENTRY( EntWidgets[EntValueField] ) ); return TRUE; @@ -1017,7 +1017,7 @@ static gint eclasslist_button_press( GtkWidget *widget, GdkEventButton *event, g static gint eclasslist_keypress( GtkWidget* widget, GdkEventKey* event, gpointer data ){ unsigned int code = gdk_keyval_to_upper( event->keyval ); - if ( event->keyval == GDK_Return ) { + if ( event->keyval == GDK_KEY_Return ) { CreateEntity(); return TRUE; } @@ -1089,7 +1089,7 @@ static void entitylist_angle( GtkWidget *widget, gpointer data ){ } static gint entityentry_keypress( GtkWidget* widget, GdkEventKey* event, gpointer data ){ - if ( event->keyval == GDK_Tab ) { + if ( event->keyval == GDK_KEY_Tab ) { if ( widget == EntWidgets[EntKeyField] ) { //gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), ""); gtk_window_set_focus( GTK_WINDOW( g_pGroupDlg->m_pWidget ), EntWidgets[EntValueField] ); @@ -1100,7 +1100,7 @@ static gint entityentry_keypress( GtkWidget* widget, GdkEventKey* event, gpointe return TRUE; } - else if ( event->keyval == GDK_Return ) { + else if ( event->keyval == GDK_KEY_Return ) { if ( widget == EntWidgets[EntKeyField] ) { gtk_entry_set_text( GTK_ENTRY( EntWidgets[EntValueField] ), "" ); gtk_window_set_focus( GTK_WINDOW( g_pGroupDlg->m_pWidget ), EntWidgets[EntValueField] ); @@ -1115,7 +1115,7 @@ static gint entityentry_keypress( GtkWidget* widget, GdkEventKey* event, gpointe return FALSE; } -static void switch_page( GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer data ){ +static void switch_page( GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer data ){ const gchar *text; text = gtk_label_get_text( GTK_LABEL( gtk_notebook_get_tab_label( notebook, gtk_notebook_get_nth_page( notebook, page_num ) ) ) ); gtk_window_set_title( GTK_WINDOW( data ), text ); @@ -1191,7 +1191,7 @@ static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ) } } #endif - if ( g_pParentWnd->CurrentStyle() != MainFrame::eFloating && ( hide || event->keyval == GDK_Escape ) ) { + if ( g_pParentWnd->CurrentStyle() != MainFrame::eFloating && ( hide || event->keyval == GDK_KEY_Escape ) ) { // toggle off the group view (whatever part of it is currently displayed) // this used to be done with a g_pParentWnd->OnViewEntity(); but it had bad consequences gtk_widget_hide( widget ); @@ -1228,9 +1228,9 @@ void GroupDlg::Create(){ load_window_pos( dlg, g_PrefsDlg.mWindowInfo.posEntityWnd ); gtk_window_set_title( GTK_WINDOW( dlg ), "Entities" ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", GTK_SIGNAL_FUNC( OnDeleteHide ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( OnDeleteHide ), NULL ); // catch 'Esc' - gtk_signal_connect( GTK_OBJECT( dlg ), "key-press-event", GTK_SIGNAL_FUNC( OnDialogKey ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "key-press-event", G_CALLBACK( OnDialogKey ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pParentWnd->m_pWidget ) ); g_qeglobals_gui.d_entity = dlg; @@ -1335,7 +1335,7 @@ void GroupDlg::Create(){ { GtkWidget* check = gtk_check_button_new_with_label( "" ); gtk_widget_ref( check ); - gtk_signal_connect( GTK_OBJECT( check ), "toggled", GTK_SIGNAL_FUNC( entity_check ), NULL ); + g_signal_connect( G_OBJECT( check ), "toggled", G_CALLBACK( entity_check ), NULL ); EntWidgets[EntCheck1 + i] = check; } @@ -1411,8 +1411,8 @@ void GroupDlg::Create(){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_set_events( entry, GDK_KEY_PRESS_MASK ); - gtk_signal_connect( GTK_OBJECT( entry ), "key-press-event", - GTK_SIGNAL_FUNC( entityentry_keypress ), this ); + g_signal_connect( G_OBJECT( entry ), "key-press-event", + G_CALLBACK( entityentry_keypress ), this ); EntWidgets[EntKeyField] = entry; } @@ -1423,8 +1423,8 @@ void GroupDlg::Create(){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_set_events( entry, GDK_KEY_PRESS_MASK ); - gtk_signal_connect( GTK_OBJECT( entry ), "key-press-event", - GTK_SIGNAL_FUNC( entityentry_keypress ), this ); + g_signal_connect( G_OBJECT( entry ), "key-press-event", + G_CALLBACK( entityentry_keypress ), this ); EntWidgets[EntValueField] = entry; } @@ -1460,7 +1460,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "360" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"360" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"360" ); gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); @@ -1469,7 +1469,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "45" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"45" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"45" ); gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); @@ -1478,7 +1478,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "90" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"90" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"90" ); gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); @@ -1488,7 +1488,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "135" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"135" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"135" ); gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); @@ -1497,7 +1497,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "180" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"180" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"180" ); gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); @@ -1506,7 +1506,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "225" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"225" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"225" ); gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 2, 3, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); @@ -1515,7 +1515,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "270" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"270" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"270" ); gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 2, 3, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); @@ -1524,7 +1524,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "315" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"315" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"315" ); gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 2, 3, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); @@ -1539,21 +1539,21 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "Reset" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( ResetEntity ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( ResetEntity ), NULL ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); } { GtkWidget* button = gtk_button_new_with_label( _( "Up" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"-1" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"-1" ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); } { GtkWidget* button = gtk_button_new_with_label( _( "Dn" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( entitylist_angle ), (void *)"-2" ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( entitylist_angle ), (void *)"-2" ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); } } @@ -1566,21 +1566,21 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "Del Key/Pair" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( DelProp ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( DelProp ), NULL ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); } { GtkWidget* button = gtk_button_new_with_label( _( "Sound..." ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( AssignSound ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( AssignSound ), NULL ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); } { GtkWidget* button = gtk_button_new_with_label( _( "Model..." ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( AssignModel ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( AssignModel ), NULL ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); } } @@ -1593,7 +1593,7 @@ void GroupDlg::Create(){ { GtkWidget* button = gtk_button_new_with_label( _( "Cam to angles" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( cam2angles ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( cam2angles ), NULL ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); } } diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index 8d084856..6d0f3347 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -120,10 +120,10 @@ static void DoProjectAddEdit( bool edit, GtkWidget *parent ){ else{ gtk_window_set_title( GTK_WINDOW( dlg ), _( "Add Command" ) ); } - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -175,15 +175,15 @@ static void DoProjectAddEdit( bool edit, GtkWidget *parent ){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); if ( edit ) { @@ -474,10 +474,10 @@ void DoProjectSettings(){ project = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( project ), _( "Project Settings" ) ); - gtk_signal_connect( GTK_OBJECT( project ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( project ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( project ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( project ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( project ), "loop", &loop ); g_object_set_data( G_OBJECT( project ), "ret", &ret ); gtk_window_set_default_size( GTK_WINDOW( project ), 550, 400 ); @@ -498,15 +498,15 @@ void DoProjectSettings(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); vbox = gtk_vbox_new( FALSE, 5 ); @@ -518,22 +518,22 @@ void DoProjectSettings(){ button = gtk_button_new_with_label( _( "Add..." ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( project_add ), project ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( project_add ), project ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Change..." ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( project_change ), project ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( project_change ), project ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Remove" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( project_remove ), project ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( project_remove ), project ); gtk_widget_set_usize( button, 60, -2 ); frame = gtk_frame_new( _( "Misc settings" ) ); @@ -614,8 +614,8 @@ void DoProjectSettings(){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( GTK_COMBO( game_select )->entry ), "changed", - GTK_SIGNAL_FUNC( OnSelchangeComboWhatgame ), project ); + g_signal_connect( G_OBJECT( GTK_COMBO( game_select )->entry ), "changed", + G_CALLBACK( OnSelchangeComboWhatgame ), project ); g_object_set_data( G_OBJECT( project ), "game_select", game_select ); gtk_entry_set_editable( GTK_ENTRY( GTK_COMBO( game_select )->entry ), FALSE ); @@ -899,10 +899,10 @@ void DoMapInfo(){ load_window_pos( dlg, g_PrefsDlg.mWindowInfo.posMapInfoWnd ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Map Info" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -970,8 +970,8 @@ void DoMapInfo(){ button = gtk_button_new_with_label( _( "Close" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); label = gtk_label_new( _( "Entity breakdown" ) ); @@ -1161,10 +1161,10 @@ void DoEntityList(){ load_window_pos( dlg, g_PrefsDlg.mWindowInfo.posEntityInfoWnd ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Entities" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -1300,15 +1300,15 @@ void DoEntityList(){ button = gtk_button_new_with_label( _( "Select" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( entitylist_select ), dlg ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( entitylist_select ), dlg ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Close" ) );; gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); @@ -1333,21 +1333,21 @@ static void rotatedlg_apply( GtkWidget *widget, gpointer data ){ float f; spin = GTK_SPIN_BUTTON( g_object_get_data( G_OBJECT( data ), "x" ) ); - f = gtk_spin_button_get_value_as_float( spin ); + f = gtk_spin_button_get_value( spin ); if ( f != 0.0 ) { Select_RotateAxis( 0,f ); } gtk_spin_button_set_value( GTK_SPIN_BUTTON( spin ), 0.0f ); // reset to 0 on Apply spin = GTK_SPIN_BUTTON( g_object_get_data( G_OBJECT( data ), "y" ) ); - f = gtk_spin_button_get_value_as_float( spin ); + f = gtk_spin_button_get_value( spin ); if ( f != 0.0 ) { Select_RotateAxis( 1,f ); } gtk_spin_button_set_value( GTK_SPIN_BUTTON( spin ), 0.0f ); spin = GTK_SPIN_BUTTON( g_object_get_data( G_OBJECT( data ), "z" ) ); - f = gtk_spin_button_get_value_as_float( spin ); + f = gtk_spin_button_get_value( spin ); if ( f != 0.0 ) { Select_RotateAxis( 2,f ); } @@ -1367,10 +1367,10 @@ void DoRotateDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Arbitrary rotation" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -1385,19 +1385,19 @@ void DoRotateDlg(){ gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); gtk_table_set_col_spacings( GTK_TABLE( table ), 5 ); - label = gtk_label_new( _( " X " ) ); + label = gtk_label_new( _( "X" ) ); gtk_widget_show( label ); gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1, (GtkAttachOptions) ( 0 ), (GtkAttachOptions) ( 0 ), 0, 0 ); - label = gtk_label_new( _( " Y " ) ); + label = gtk_label_new( _( "Y" ) ); gtk_widget_show( label ); gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2, (GtkAttachOptions) ( 0 ), (GtkAttachOptions) ( 0 ), 0, 0 ); - label = gtk_label_new( _( " Z " ) ); + label = gtk_label_new( _( "Z" ) ); gtk_widget_show( label ); gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3, @@ -1448,21 +1448,21 @@ void DoRotateDlg(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); button = gtk_button_new_with_label( _( "Apply" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( rotatedlg_apply ), dlg ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( rotatedlg_apply ), dlg ); gtk_grab_add( dlg ); gtk_widget_show( dlg ); @@ -1487,10 +1487,10 @@ void DoGamma(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Gamma" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -1522,15 +1522,15 @@ void DoGamma(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); // Initialize dialog char buf[16]; @@ -1698,10 +1698,10 @@ void DoFind(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Find Brush" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -1747,15 +1747,15 @@ void DoFind(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); // Initialize dialog char buf[16]; @@ -1792,10 +1792,10 @@ void DoSides( bool bCone, bool bSphere, bool bTorus ){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Arbitrary sides" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -1819,15 +1819,15 @@ void DoSides( bool bCone, bool bSphere, bool bTorus ){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_grab_add( dlg ); gtk_widget_show( dlg ); @@ -1864,10 +1864,10 @@ void DoNewPatchDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Patch density" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -1927,15 +1927,15 @@ void DoNewPatchDlg(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); // Initialize dialog g_list_free( combo_list ); @@ -1973,9 +1973,9 @@ static void scaledlg_apply( GtkWidget *widget, gpointer data ){ y = GTK_WIDGET( g_object_get_data( G_OBJECT( data ), "y" ) ); z = GTK_WIDGET( g_object_get_data( G_OBJECT( data ), "z" ) ); - sx = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( x ) ); - sy = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( y ) ); - sz = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( z ) ); + sx = gtk_spin_button_get_value( GTK_SPIN_BUTTON( x ) ); + sy = gtk_spin_button_get_value( GTK_SPIN_BUTTON( y ) ); + sz = gtk_spin_button_get_value( GTK_SPIN_BUTTON( z ) ); gtk_spin_button_set_value( GTK_SPIN_BUTTON( x ), 1.0f ); gtk_spin_button_set_value( GTK_SPIN_BUTTON( y ), 1.0f ); @@ -1986,7 +1986,7 @@ static void scaledlg_apply( GtkWidget *widget, gpointer data ){ Sys_UpdateWindows( W_ALL ); } else{ - Sys_Printf( _( "Warning.. Tried to scale by a zero value.\n" ) ); + Sys_FPrintf( SYS_WRN, _( "Warning.. Tried to scale by a zero value." ) ); } } @@ -2003,10 +2003,10 @@ void DoScaleDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Scale" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -2085,21 +2085,21 @@ void DoScaleDlg(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); button = gtk_button_new_with_label( _( "Apply" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( scaledlg_apply ), dlg ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( scaledlg_apply ), dlg ); gtk_grab_add( dlg ); gtk_widget_show( dlg ); @@ -2126,10 +2126,10 @@ void DoThickenDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Thicken Patch" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -2155,15 +2155,15 @@ void DoThickenDlg(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); hbox = gtk_hbox_new( FALSE, 5 ); gtk_widget_show( hbox ); @@ -2244,10 +2244,10 @@ void DoAbout(){ gtk_window_set_position( GTK_WINDOW( dlg ), GTK_WIN_POS_CENTER_ON_PARENT ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "About GtkRadiant" ) ); gtk_window_set_resizable( GTK_WINDOW( dlg ), FALSE ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -2373,21 +2373,21 @@ void DoAbout(){ GtkWidget *ok_button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( ok_button ); gtk_box_pack_end( GTK_BOX( button_hbox ), ok_button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( ok_button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( ok_button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); /* button = gtk_button_new_with_label( _( "Credits" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( button_hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( about_button_credits ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( about_button_credits ), NULL ); button = gtk_button_new_with_label( _( "Changelog" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( button_hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( about_button_changelog ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( about_button_changelog ), NULL ); */ // show it @@ -2412,10 +2412,10 @@ void DoCommandListDlg(){ gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pParentWnd->m_pWidget ) ); gtk_window_set_position( GTK_WINDOW( dlg ), GTK_WIN_POS_CENTER_ON_PARENT ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Shortcut List" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); gtk_window_set_default_size( GTK_WINDOW( dlg ), 400, 400 ); @@ -2528,8 +2528,8 @@ void DoCommandListDlg(){ button = gtk_button_new_with_label( _( "Close" ) );; gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); @@ -2551,10 +2551,10 @@ void DoTextureListDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Textures" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); gtk_window_set_default_size( GTK_WINDOW( dlg ), 400, 400 ); @@ -2615,15 +2615,15 @@ void DoTextureListDlg(){ button = gtk_button_new_with_label( _( "Load" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Close" ) );; gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); @@ -2661,10 +2661,10 @@ int DoCapDlg( int *type, bool *b_GroupResult ){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Cap" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -2713,28 +2713,28 @@ int DoCapDlg( int *type, bool *b_GroupResult ){ gtk_table_attach( GTK_TABLE( table ), bevel, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ), (GtkAttachOptions) ( 0 ), 0, 0 ); - group = gtk_radio_button_group( GTK_RADIO_BUTTON( bevel ) ); + group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( bevel ) ); endcap = gtk_radio_button_new_with_label( group, _( "Endcap" ) ); gtk_widget_show( endcap ); gtk_table_attach( GTK_TABLE( table ), endcap, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ), (GtkAttachOptions) ( 0 ), 0, 0 ); - group = gtk_radio_button_group( GTK_RADIO_BUTTON( endcap ) ); + group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( endcap ) ); ibevel = gtk_radio_button_new_with_label( group, _( "Inverted Bevel" ) ); gtk_widget_show( ibevel ); gtk_table_attach( GTK_TABLE( table ), ibevel, 1, 2, 2, 3, (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ), (GtkAttachOptions) ( 0 ), 0, 0 ); - group = gtk_radio_button_group( GTK_RADIO_BUTTON( ibevel ) ); + group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( ibevel ) ); iendcap = gtk_radio_button_new_with_label( group, _( "Inverted Endcap" ) ); gtk_widget_show( iendcap ); gtk_table_attach( GTK_TABLE( table ), iendcap, 1, 2, 3, 4, (GtkAttachOptions) ( GTK_FILL | GTK_EXPAND ), (GtkAttachOptions) ( 0 ), 0, 0 ); - group = gtk_radio_button_group( GTK_RADIO_BUTTON( iendcap ) ); + group = gtk_radio_button_get_group( GTK_RADIO_BUTTON( iendcap ) ); // Gef: added radio toggle for func_grouping capped patches group_toggle = gtk_check_button_new_with_label( _( "Result to func_group" ) ); @@ -2748,15 +2748,15 @@ int DoCapDlg( int *type, bool *b_GroupResult ){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); // Gef: Set the state of the func_group toggle @@ -2804,10 +2804,10 @@ void DoScriptsDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Available Scripts - Not Implemented Yet" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -2895,8 +2895,8 @@ void DoScriptsDlg(){ button = gtk_button_new_with_label( _( "Run" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "New..." ) ); @@ -2914,8 +2914,8 @@ void DoScriptsDlg(){ button = gtk_button_new_with_label( _( "Close" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( vbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); @@ -2951,10 +2951,10 @@ int DoBSInputDlg( const char *fields[5], float values[5] ){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "BrushScript Input" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -2996,15 +2996,15 @@ int DoBSInputDlg( const char *fields[5], float values[5] ){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); @@ -3038,10 +3038,10 @@ int DoTextureLayout( float *fx, float *fy ){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Patch texture layout" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -3101,15 +3101,15 @@ int DoTextureLayout( float *fx, float *fy ){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); // Initialize @@ -3143,10 +3143,10 @@ char* DoNameDlg( const char* title ){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), title ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -3170,15 +3170,15 @@ char* DoNameDlg( const char* title ){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); @@ -3221,10 +3221,10 @@ char* DoNewProjectDlg(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "New Project" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -3265,15 +3265,15 @@ char* DoNewProjectDlg(){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); gtk_grab_add( dlg ); @@ -3405,8 +3405,8 @@ static void CreateGtkTextEditor(){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( editor_delete ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( editor_delete ), NULL ); gtk_window_set_default_size( GTK_WINDOW( dlg ), 600, 300 ); vbox = gtk_vbox_new( FALSE, 5 ); @@ -3433,15 +3433,15 @@ static void CreateGtkTextEditor(){ button = gtk_button_new_with_label( _( "Close" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( editor_close ), dlg ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( editor_close ), dlg ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Save" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( editor_save ), dlg ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( editor_save ), dlg ); gtk_widget_set_usize( button, 60, -2 ); text_editor = dlg; @@ -3515,7 +3515,7 @@ void DoTextEditor( const char* filename, int cursorpos ){ if ( g_PrefsDlg.m_bUseWin32Editor ) { HINSTANCE result; Sys_Printf( "Opening file '%s'.\n", filename ); - result = ShellExecute( (HWND)GDK_WINDOW_HWND( g_pParentWnd->m_pWidget->window ), "open", filename, NULL, NULL, SW_SHOW ); + result = ShellExecute( (HWND)GDK_WINDOW_HWND( gtk_widget_get_window( g_pParentWnd->m_pWidget ) ), "open", filename, NULL, NULL, SW_SHOW ); if( (int)result <= 32 ) { const char *errstr; switch( (int)result ) { @@ -3619,10 +3619,10 @@ int DoLightIntensityDlg( int *intensity ){ dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Light intensity" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -3653,8 +3653,8 @@ int DoLightIntensityDlg( int *intensity ){ button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_add_accelerator( button, "clicked", accel_group, GDK_Return, (GdkModifierType)0, GTK_ACCEL_VISIBLE ); gtk_widget_set_usize( button, 60, -2 ); @@ -3662,8 +3662,8 @@ int DoLightIntensityDlg( int *intensity ){ button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_add_accelerator( button, "clicked", accel_group, GDK_Escape, (GdkModifierType)0, GTK_ACCEL_VISIBLE ); gtk_widget_set_usize( button, 60, -2 ); diff --git a/radiant/gtkmisc.cpp b/radiant/gtkmisc.cpp index c8c7d5b4..d2d37499 100644 --- a/radiant/gtkmisc.cpp +++ b/radiant/gtkmisc.cpp @@ -64,7 +64,7 @@ // it's also very poorly done, the save calls are a bit randomly disctributed in the OnDestroy void save_window_pos( GtkWidget *wnd, window_position_t& pos ){ - if ( ( wnd == NULL ) || ( wnd->window == NULL ) ) { + if ( ( wnd == NULL ) || ( gtk_widget_get_window( wnd ) == NULL ) ) { return; } @@ -83,7 +83,7 @@ void win32_get_window_pos( GtkWidget *widget, gint *x, gint *y ){ if ( g_PrefsDlg.m_bStartOnPrimMon ) { RECT rc; POINT point; - HWND xwnd = (HWND)GDK_WINDOW_HWND( widget->window ); + HWND xwnd = (HWND)GDK_WINDOW_HWND( gtk_widget_get_window( widget ) ); const GdkRectangle primaryMonitorRect = g_pParentWnd->GetPrimaryMonitorRect(); GetClientRect( xwnd,&rc ); @@ -101,7 +101,7 @@ void win32_get_window_pos( GtkWidget *widget, gint *x, gint *y ){ } else { // this is the same as the unix version of get_window_pos - gdk_window_get_root_origin( widget->window, x, y ); + gdk_window_get_root_origin( gtk_widget_get_window( widget ), x, y ); } #ifdef DBG_WINDOWPOS Sys_Printf( "win32_get_window_pos %p %d,%d\n",widget,*x,*y ); @@ -744,13 +744,13 @@ GtkWidget* create_menu_item_with_mnemonic( GtkWidget *menu, const gchar *mnemoni gtk_widget_show( item ); gtk_container_add( GTK_CONTAINER( menu ), item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( func ), GINT_TO_POINTER( id ) ); + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( func ), GINT_TO_POINTER( id ) ); AddMenuItem( item, id ); return item; } -GtkWidget* create_check_menu_item_with_mnemonic( GtkWidget *menu, const gchar *mnemonic, GtkSignalFunc func, int id, gboolean active ){ +GtkWidget* create_check_menu_item_with_mnemonic( GtkWidget *menu, const gchar *mnemonic, GCallback func, int id, gboolean active ){ GtkWidget *item; item = gtk_check_menu_item_new_with_mnemonic( mnemonic ); @@ -758,13 +758,13 @@ GtkWidget* create_check_menu_item_with_mnemonic( GtkWidget *menu, const gchar *m gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( item ), active ); gtk_widget_show( item ); gtk_container_add( GTK_CONTAINER( menu ), item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( func ), GINT_TO_POINTER( id ) ); + g_signal_connect( G_OBJECT( item ), "activate", func, GINT_TO_POINTER( id ) ); AddMenuItem( item, id ); return item; } -GtkWidget* create_radio_menu_item_with_mnemonic( GtkWidget *menu, GtkWidget *last, const gchar *mnemonic, GtkSignalFunc func, int id, gboolean state ){ +GtkWidget* create_radio_menu_item_with_mnemonic( GtkWidget *menu, GtkWidget *last, const gchar *mnemonic, GCallback func, int id, gboolean state ){ GtkWidget *item; GSList *group = (GSList*)NULL; @@ -776,7 +776,7 @@ GtkWidget* create_radio_menu_item_with_mnemonic( GtkWidget *menu, GtkWidget *las gtk_widget_show( item ); gtk_container_add( GTK_CONTAINER( menu ), item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( func ), GINT_TO_POINTER( id ) ); + g_signal_connect( G_OBJECT( item ), "activate", func, GINT_TO_POINTER( id ) ); AddMenuItem( item, id ); return item; @@ -831,8 +831,8 @@ static GtkWidget * gtk_AddDlgButton( GtkWidget *container, const char *label, const int clickSignal, qboolean setGrabDefault ) { GtkWidget *btn = gtk_button_new_with_label( _( label ) ); gtk_box_pack_start( GTK_BOX( container ), btn, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( btn ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( clickSignal ) ); + g_signal_connect( G_OBJECT( btn ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( clickSignal ) ); gtk_widget_set_can_default( btn, TRUE ); if( setGrabDefault ) @@ -857,13 +857,13 @@ int WINAPI gtk_MessageBoxNew( void *parent, const char *message, // create dialog window GtkWidget *dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( dlg ), caption ); gtk_window_set_policy( GTK_WINDOW( dlg ), FALSE, FALSE, TRUE ); - gtk_container_border_width( GTK_CONTAINER( dlg ), MSGBOX_PAD_MAJOR ); + gtk_container_set_border_width( GTK_CONTAINER( dlg ), MSGBOX_PAD_MAJOR ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); gtk_widget_realize( dlg ); @@ -937,17 +937,17 @@ int WINAPI gtk_MessageBoxNew( void *parent, const char *message, switch( flags & MB_TYPEMASK ) { case MB_OK: default: { - GtkWidget *btn_ok = gtk_AddDlgButton( buttons_hbox, "Ok", IDOK, TRUE ); - gtk_widget_add_accelerator( btn_ok, "clicked", accel, GDK_Escape, (GdkModifierType)0, (GtkAccelFlags)0 ); - gtk_widget_add_accelerator( btn_ok, "clicked", accel, GDK_Return, (GdkModifierType)0, (GtkAccelFlags)0 ); + GtkWidget *btn_ok = gtk_AddDlgButton( buttons_hbox, _( "Ok" ), IDOK, TRUE ); + gtk_widget_add_accelerator( btn_ok, "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 ); + gtk_widget_add_accelerator( btn_ok, "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 ); ret = IDOK; break; } case MB_OKCANCEL: { - GtkWidget *btn_ok = gtk_AddDlgButton( buttons_hbox, "Ok", IDOK, TRUE ); - gtk_widget_add_accelerator( btn_ok, "clicked", accel, GDK_Return, (GdkModifierType)0, (GtkAccelFlags)0 ); - GtkWidget *btn_cancel = gtk_AddDlgButton( buttons_hbox, "Cancel", IDCANCEL, FALSE ); - gtk_widget_add_accelerator( btn_cancel, "clicked", accel, GDK_Escape, (GdkModifierType)0, (GtkAccelFlags)0 ); + GtkWidget *btn_ok = gtk_AddDlgButton( buttons_hbox, _( "Ok" ), IDOK, TRUE ); + gtk_widget_add_accelerator( btn_ok, "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 ); + GtkWidget *btn_cancel = gtk_AddDlgButton( buttons_hbox, _( "Cancel" ), IDCANCEL, FALSE ); + gtk_widget_add_accelerator( btn_cancel, "clicked", accel, GDK_KEY_Escape, (GdkModifierType)0, (GtkAccelFlags)0 ); ret = IDCANCEL; break; } @@ -957,16 +957,16 @@ int WINAPI gtk_MessageBoxNew( void *parent, const char *message, } case MB_YESNOCANCEL: { //! @todo accelerators? - gtk_AddDlgButton( buttons_hbox, "Yes", IDYES, TRUE ); - gtk_AddDlgButton( buttons_hbox, "No", IDNO, FALSE ); - gtk_AddDlgButton( buttons_hbox, "Cancel", IDCANCEL, FALSE ); + gtk_AddDlgButton( buttons_hbox, _( "Yes" ), IDYES, TRUE ); + gtk_AddDlgButton( buttons_hbox, _( "No" ), IDNO, FALSE ); + gtk_AddDlgButton( buttons_hbox, _( "Cancel" ), IDCANCEL, FALSE ); ret = IDCANCEL; break; } case MB_YESNO: { //! @todo accelerators? - gtk_AddDlgButton( buttons_hbox, "Yes", IDYES, TRUE ); - gtk_AddDlgButton( buttons_hbox, "No", IDNO, FALSE ); + gtk_AddDlgButton( buttons_hbox, _( "Yes" ), IDYES, TRUE ); + gtk_AddDlgButton( buttons_hbox, _( "No" ), IDNO, FALSE ); ret = IDNO; break; } @@ -986,10 +986,10 @@ int WINAPI gtk_MessageBoxNew( void *parent, const char *message, if( URL ) { GtkWidget *btn_url = gtk_button_new_with_label( _( "Go to URL" ) ); gtk_box_pack_start( GTK_BOX( buttons_hbox ), btn_url, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( btn_url ), "clicked", - GTK_SIGNAL_FUNC( dialog_url_callback ), NULL ); + g_signal_connect( G_OBJECT( btn_url ), "clicked", + G_CALLBACK( dialog_url_callback ), NULL ); g_object_set_data( G_OBJECT( btn_url ), "URL", (void *)URL ); - GTK_WIDGET_SET_FLAGS( btn_url, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( btn_url, TRUE ); gtk_widget_grab_default( btn_url ); gtk_widget_show( btn_url ); } @@ -1014,12 +1014,12 @@ int WINAPI gtk_MessageBox( void *parent, const char* lpText, const char* lpCapti int mode = ( uType & MB_TYPEMASK ), ret, loop = 1; window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( window ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( window ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_title( GTK_WINDOW( window ), lpCaption ); - gtk_container_border_width( GTK_CONTAINER( window ), 10 ); + gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); g_object_set_data( G_OBJECT( window ), "ret", &ret ); gtk_widget_realize( window ); @@ -1053,11 +1053,11 @@ int WINAPI gtk_MessageBox( void *parent, const char* lpText, const char* lpCapti if ( mode == MB_OK ) { w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_add_accelerator( w, "clicked", accel, GDK_Escape, (GdkModifierType)0, (GtkAccelFlags)0 ); gtk_widget_add_accelerator( w, "clicked", accel, GDK_Return, (GdkModifierType)0, (GtkAccelFlags)0 ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); ret = IDOK; @@ -1065,17 +1065,17 @@ int WINAPI gtk_MessageBox( void *parent, const char* lpText, const char* lpCapti else if ( mode == MB_OKCANCEL ) { w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_add_accelerator( w, "clicked", accel, GDK_Return, (GdkModifierType)0, (GtkAccelFlags)0 ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_add_accelerator( w, "clicked", accel, GDK_Escape, (GdkModifierType)0, (GtkAccelFlags)0 ); gtk_widget_show( w ); ret = IDCANCEL; @@ -1083,22 +1083,22 @@ int WINAPI gtk_MessageBox( void *parent, const char* lpText, const char* lpCapti else if ( mode == MB_YESNOCANCEL ) { w = gtk_button_new_with_label( _( "Yes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "No" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); ret = IDCANCEL; } @@ -1106,16 +1106,16 @@ int WINAPI gtk_MessageBox( void *parent, const char* lpText, const char* lpCapti { w = gtk_button_new_with_label( _( "Yes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); w = gtk_button_new_with_label( _( "No" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); ret = IDNO; } @@ -1123,10 +1123,10 @@ int WINAPI gtk_MessageBox( void *parent, const char* lpText, const char* lpCapti if ( URL ) { w = gtk_button_new_with_label( _( "Go to URL" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); - gtk_signal_connect( GTK_OBJECT( w ), "clicked", - GTK_SIGNAL_FUNC( dialog_url_callback ), NULL ); + g_signal_connect( G_OBJECT( w ), "clicked", + G_CALLBACK( dialog_url_callback ), NULL ); g_object_set_data( G_OBJECT( w ), "URL", (void *)URL ); - GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); + gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); } @@ -1372,7 +1372,7 @@ const char* file_dialog( void *parent, gboolean open, const char* title, const c // See http://msdn.microsoft.com/en-us/library/ms646839%28v=vs.85%29.aspx . memset( &ofn, 0, sizeof( ofn ) ); ofn.lStructSize = sizeof( ofn ); - ofn.hwndOwner = (HWND)GDK_WINDOW_HWND( g_pParentWnd->m_pWidget->window ); + ofn.hwndOwner = (HWND)GDK_WINDOW_HWND( gtk_widget_get_window( g_pParentWnd->m_pWidget ) ); ofn.nFilterIndex = 1; // The index is 1-based, not 0-based. This basically says, // "select the first filter as default". if ( pattern ) { @@ -1636,14 +1636,14 @@ bool WINAPI color_dialog( void *parent, float *color, const char* title ){ dlg = gtk_color_selection_dialog_new( title ); gtk_color_selection_set_color( GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG( dlg )->colorsel ), clr ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", - GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL ); - gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", - GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); - gtk_signal_connect( GTK_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->ok_button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); - gtk_signal_connect( GTK_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->cancel_button ), "clicked", - GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", + G_CALLBACK( dialog_delete_callback ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "destroy", + G_CALLBACK( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->ok_button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); + g_signal_connect( G_OBJECT( GTK_COLOR_SELECTION_DIALOG( dlg )->cancel_button ), "clicked", + G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); g_object_set_data( G_OBJECT( dlg ), "loop", &loop ); g_object_set_data( G_OBJECT( dlg ), "ret", &ret ); @@ -1684,7 +1684,7 @@ void OpenURL( const char *url ){ Sys_Printf( "OpenURL: %s\n", url ); #ifdef _WIN32 - ShellExecute( (HWND)GDK_WINDOW_HWND( g_pParentWnd->m_pWidget->window ), "open", url, NULL, NULL, SW_SHOW ); + ShellExecute( (HWND)GDK_WINDOW_HWND( gtk_widget_get_window( g_pParentWnd->m_pWidget ) ), "open", url, NULL, NULL, SW_SHOW ); #else # ifdef __APPLE__ snprintf(command, sizeof(command), "open '%s' &", url); @@ -1712,7 +1712,7 @@ void CheckMenuSplitting( GtkWidget *&menu ){ // move the last 2 items to a submenu (3 because of win32) for ( int i = 0; i < 3; i++ ) { - item = GTK_WIDGET( g_list_last( gtk_container_children( GTK_CONTAINER( menu ) ) )->data ); + item = GTK_WIDGET( g_list_last( gtk_container_get_children( GTK_CONTAINER( menu ) ) )->data ); gtk_widget_ref( item ); gtk_container_remove( GTK_CONTAINER( menu ), item ); gtk_menu_append( GTK_MENU( menu2 ), item ); diff --git a/radiant/main.cpp b/radiant/main.cpp index 02eadcb6..f2fc149e 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -896,9 +896,9 @@ int mainRadiant( int argc, char* argv[] ) { Texture_ShowStartupShaders(); #ifndef SKIP_SPLASH - gdk_window_raise( splash_screen->window ); + gdk_window_raise( gtk_widget_get_window( splash_screen ) ); gtk_window_set_transient_for( GTK_WINDOW( splash_screen ), GTK_WINDOW( g_pParentWnd->m_pWidget ) ); - gtk_timeout_add( 1000, try_destroy_splash, NULL ); + g_timeout_add( 1000, try_destroy_splash, NULL ); #endif g_pParentWnd->GetSynapseServer().DumpActiveClients(); diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index d0d90fb0..cc90ef5d 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -123,180 +123,180 @@ void Select_Ungroup(); // - if you decide to add a menu item, check if it's not in the "hidden" menu already SCommandInfo g_Commands[] = { - {"CycleOutlineStyle", 'J', 0x00, ID_SELECTION_OUTLINESTYLE, "menu_selection_outlinestyle"}, - {"CSGMerge", 'U', 0x04, ID_SELECTION_CSGMERGE, "menu_selection_csgmerge"}, - {"CSGSubtract", 'U', 0x01, ID_SELECTION_CSGSUBTRACT, "menu_selection_csgsubstract"}, - // {"ViewGroups", 'G', 0x00, ID_VIEW_GROUPS, "menu_view_groups"}, (temporary disabled) - {"SelectFuncGroup", 'G', 0x00, ID_SELECT_FUNC_GROUP, "menu_select_func_group"}, - {"HideSelected", 'H', 0x00, ID_VIEW_HIDESHOW_HIDESELECTED, "menu_view_hideshow_hideselected"}, - {"ShowHidden", 'H', 0x01, ID_VIEW_HIDESHOW_SHOWHIDDEN, "menu_view_hideshow_showhidden"}, - {"BendMode", 'B', 0x00, ID_PATCH_BEND, "menu_patch_bend"}, - {"FitTexture", 'B', 0x01, IDC_BTN_FACEFIT, "menu_idc_btn_facefit"}, - {"ViewTextures", 'T', 0, ID_VIEW_TEXTURE, "menu_view_texture"}, - {"ThickenPatch", 'T', 0x04, ID_CURVE_THICKEN, "menu_curve_thicken"}, - {"MakeOverlayPatch", 'Y', 0, ID_CURVE_OVERLAY_SET, "menu_curve_overlay_set"}, - {"ClearPatchOverlays", 'L', 0x04, ID_CURVE_OVERLAY_CLEAR, "menu_curve_overlay_clear"}, - {"SurfaceInspector", 'S', 0, ID_TEXTURES_INSPECTOR, "menu_textures_inspector"}, - {"PatchInspector", 'S', 0x01, ID_PATCH_INSPECTOR, "menu_patch_inspector"}, - {"RedisperseRows", 'E', 0x04, ID_CURVE_REDISPERSE_ROWS, "menu_curve_redisperse_rows"}, - {"RedisperseIntermediateCols", 'E', 0x05, ID_CURVE_REDISPERSE_INTERMEDIATE_COLS, "menu_curve_redisperse_cols"}, - {"InvertCurveTextureX", 'I', 0x05, ID_CURVE_NEGATIVETEXTUREY, "menu_curve_negativetexturey"}, - {"InvertCurveTextureY", 'I', 0x01, ID_CURVE_NEGATIVETEXTUREX, "menu_curve_negativetexturex"}, - {"InvertCurve", 'I', 0x04, ID_CURVE_NEGATIVE, "menu_curve_negative"}, - {"IncPatchColumn", GDK_KP_Add, 0x05, ID_CURVE_INSERTCOLUMN, "menu_curve_insertcolumn"}, - {"IncPatchRow", GDK_KP_Add, 0x04, ID_CURVE_INSERTROW, "menu_curve_insertrow"}, - {"DecPatchColumn", GDK_KP_Subtract, 0x05, ID_CURVE_DELETECOLUMN, "menu_curve_deletecolumn"}, - {"DecPatchRow", GDK_KP_Subtract, 0x04, ID_CURVE_DELETEROW, "menu_curve_deleterow"}, - {"Patch TAB", GDK_Tab, 0x00, ID_PATCH_TAB, "menu_patch_tab"}, - {"Patch TAB", GDK_Tab, 0x01, ID_PATCH_TAB, "menu_patch_tab"}, - {"SelectNudgeDown", GDK_Down, 0x02, ID_SELECTION_SELECT_NUDGEDOWN, "menu_selection_select_nudgedown"}, - {"EntityColor",'K', 0, ID_MISC_SELECTENTITYCOLOR, "menu_misc_select_entitycolor"}, - {"CameraForward", GDK_Up, 0, ID_CAMERA_FORWARD, "menu_camera_forward"}, - {"CameraBack", GDK_Down, 0, ID_CAMERA_BACK, "menu_camera_back"}, - {"CameraLeft", GDK_Left, 0, ID_CAMERA_LEFT, "menu_camera_left"}, - {"CameraRight", GDK_Right, 0, ID_CAMERA_RIGHT, "menu_camera_right"}, - {"CameraUp", 'D', 0, ID_CAMERA_UP, "menu_camera_up"}, - {"CameraDown", 'C', 0, ID_CAMERA_DOWN, "menu_camera_down"}, - {"CameraAngleUp", 'A', 0, ID_CAMERA_ANGLEUP, "menu_camera_angleup"}, - {"CameraAngleDown", 'Z', 0, ID_CAMERA_ANGLEDOWN, "menu_camera_angledown"}, - {"CameraStrafeRight", GDK_period, 0, ID_CAMERA_STRAFERIGHT, "menu_camera_straferight"}, - {"CameraStrafeLeft", GDK_comma, 0, ID_CAMERA_STRAFELEFT, "menu_camera_strafeleft"}, + {"CycleOutlineStyle", GDK_KEY_J, 0x00, ID_SELECTION_OUTLINESTYLE, "menu_selection_outlinestyle"}, + {"CSGMerge", GDK_KEY_U, 0x04, ID_SELECTION_CSGMERGE, "menu_selection_csgmerge"}, + {"CSGSubtract", GDK_KEY_U, 0x01, ID_SELECTION_CSGSUBTRACT, "menu_selection_csgsubstract"}, + // {"ViewGroups", GDK_KEY_G, 0x00, ID_VIEW_GROUPS, "menu_view_groups"}, (temporary disabled) + {"SelectFuncGroup", GDK_KEY_G, 0x00, ID_SELECT_FUNC_GROUP, "menu_select_func_group"}, + {"HideSelected", GDK_KEY_H, 0x00, ID_VIEW_HIDESHOW_HIDESELECTED, "menu_view_hideshow_hideselected"}, + {"ShowHidden", GDK_KEY_H, 0x01, ID_VIEW_HIDESHOW_SHOWHIDDEN, "menu_view_hideshow_showhidden"}, + {"BendMode", GDK_KEY_B, 0x00, ID_PATCH_BEND, "menu_patch_bend"}, + {"FitTexture", GDK_KEY_B, 0x01, IDC_BTN_FACEFIT, "menu_idc_btn_facefit"}, + {"ViewTextures", GDK_KEY_T, 0, ID_VIEW_TEXTURE, "menu_view_texture"}, + {"ThickenPatch", GDK_KEY_T, 0x04, ID_CURVE_THICKEN, "menu_curve_thicken"}, + {"MakeOverlayPatch", GDK_KEY_Y, 0, ID_CURVE_OVERLAY_SET, "menu_curve_overlay_set"}, + {"ClearPatchOverlays", GDK_KEY_L, 0x04, ID_CURVE_OVERLAY_CLEAR, "menu_curve_overlay_clear"}, + {"SurfaceInspector", GDK_KEY_S, 0, ID_TEXTURES_INSPECTOR, "menu_textures_inspector"}, + {"PatchInspector", GDK_KEY_S, 0x01, ID_PATCH_INSPECTOR, "menu_patch_inspector"}, + {"RedisperseRows", GDK_KEY_E, 0x04, ID_CURVE_REDISPERSE_ROWS, "menu_curve_redisperse_rows"}, + {"RedisperseIntermediateCols", GDK_KEY_E, 0x05, ID_CURVE_REDISPERSE_INTERMEDIATE_COLS, "menu_curve_redisperse_cols"}, + {"InvertCurveTextureX", GDK_KEY_I, 0x05, ID_CURVE_NEGATIVETEXTUREY, "menu_curve_negativetexturey"}, + {"InvertCurveTextureY", GDK_KEY_I, 0x01, ID_CURVE_NEGATIVETEXTUREX, "menu_curve_negativetexturex"}, + {"InvertCurve", GDK_KEY_I, 0x04, ID_CURVE_NEGATIVE, "menu_curve_negative"}, + {"IncPatchColumn", GDK_KEY_KP_Add, 0x05, ID_CURVE_INSERTCOLUMN, "menu_curve_insertcolumn"}, + {"IncPatchRow", GDK_KEY_KP_Add, 0x04, ID_CURVE_INSERTROW, "menu_curve_insertrow"}, + {"DecPatchColumn", GDK_KEY_KP_Subtract, 0x05, ID_CURVE_DELETECOLUMN, "menu_curve_deletecolumn"}, + {"DecPatchRow", GDK_KEY_KP_Subtract, 0x04, ID_CURVE_DELETEROW, "menu_curve_deleterow"}, + {"Patch TAB", GDK_KEY_Tab, 0x00, ID_PATCH_TAB, "menu_patch_tab"}, + {"Patch TAB", GDK_KEY_Tab, 0x01, ID_PATCH_TAB, "menu_patch_tab"}, + {"SelectNudgeDown", GDK_KEY_Down, 0x02, ID_SELECTION_SELECT_NUDGEDOWN, "menu_selection_select_nudgedown"}, + {"EntityColor",GDK_KEY_K, 0, ID_MISC_SELECTENTITYCOLOR, "menu_misc_select_entitycolor"}, + {"CameraForward", GDK_KEY_Up, 0, ID_CAMERA_FORWARD, "menu_camera_forward"}, + {"CameraBack", GDK_KEY_Down, 0, ID_CAMERA_BACK, "menu_camera_back"}, + {"CameraLeft", GDK_KEY_Left, 0, ID_CAMERA_LEFT, "menu_camera_left"}, + {"CameraRight", GDK_KEY_Right, 0, ID_CAMERA_RIGHT, "menu_camera_right"}, + {"CameraUp", GDK_KEY_D, 0, ID_CAMERA_UP, "menu_camera_up"}, + {"CameraDown", GDK_KEY_C, 0, ID_CAMERA_DOWN, "menu_camera_down"}, + {"CameraAngleUp", GDK_KEY_A, 0, ID_CAMERA_ANGLEUP, "menu_camera_angleup"}, + {"CameraAngleDown", GDK_KEY_Z, 0, ID_CAMERA_ANGLEDOWN, "menu_camera_angledown"}, + {"CameraStrafeRight", GDK_KEY_period, 0, ID_CAMERA_STRAFERIGHT, "menu_camera_straferight"}, + {"CameraStrafeLeft", GDK_KEY_comma, 0, ID_CAMERA_STRAFELEFT, "menu_camera_strafeleft"}, {"ToggleGrid", '0', 0, ID_GRID_TOGGLE, "menu_grid_toggle"}, - {"ToggleGrid", GDK_KP_0, 0, ID_GRID_TOGGLE, "menu_grid_toggle"}, + {"ToggleGrid", GDK_KEY_0, 0, ID_GRID_TOGGLE, "menu_grid_toggle"}, {"SetGrid1", '1', 0, ID_GRID_1, "menu_grid_1"}, - {"SetGrid1", GDK_KP_1, 0, ID_GRID_1, "menu_grid_1"}, + {"SetGrid1", GDK_KEY_1, 0, ID_GRID_1, "menu_grid_1"}, {"SetGrid2", '2', 0, ID_GRID_2, "menu_grid_2"}, - {"SetGrid2", GDK_KP_2, 0, ID_GRID_2, "menu_grid_2"}, + {"SetGrid2", GDK_KEY_2, 0, ID_GRID_2, "menu_grid_2"}, {"SetGrid4", '3', 0, ID_GRID_4, "menu_grid_4"}, - {"SetGrid4", GDK_KP_3, 0, ID_GRID_4, "menu_grid_4"}, + {"SetGrid4", GDK_KEY_3, 0, ID_GRID_4, "menu_grid_4"}, {"SetGrid8", '4', 0, ID_GRID_8, "menu_grid_8"}, - {"SetGrid8", GDK_KP_4, 0, ID_GRID_8, "menu_grid_8"}, + {"SetGrid8", GDK_KEY_4, 0, ID_GRID_8, "menu_grid_8"}, {"SetGrid16", '5', 0, ID_GRID_16, "menu_grid_16"}, - {"SetGrid16", GDK_KP_5, 0, ID_GRID_16, "menu_grid_16"}, + {"SetGrid16", GDK_KEY_5, 0, ID_GRID_16, "menu_grid_16"}, {"SetGrid32", '6', 0, ID_GRID_32, "menu_grid_32"}, - {"SetGrid32", GDK_KP_6, 0, ID_GRID_32, "menu_grid_32"}, + {"SetGrid32", GDK_KEY_6, 0, ID_GRID_32, "menu_grid_32"}, {"SetGrid64", '7', 0, ID_GRID_64, "menu_grid_64"}, - {"SetGrid64", GDK_KP_7, 0, ID_GRID_64, "menu_grid_64"}, + {"SetGrid64", GDK_KEY_7, 0, ID_GRID_64, "menu_grid_64"}, {"SetGrid128", '8', 0, ID_GRID_128, "menu_grid_128"}, - {"SetGrid128", GDK_KP_8, 0, ID_GRID_128, "menu_grid_128"}, + {"SetGrid128", GDK_KEY_8, 0, ID_GRID_128, "menu_grid_128"}, {"SetGrid256", '9', 0, ID_GRID_256, "menu_grid_256"}, - {"SetGrid256", GDK_KP_9, 0, ID_GRID_256, "menu_grid_256"}, - {"DragEdges", 'E', 0, ID_SELECTION_DRAGEDGES, "menu_selection_dragedges"}, - {"DragVertices", 'V', 0, ID_SELECTION_DRAGVERTECIES, "menu_selection_dragvertecies"}, - {"ViewEntityInfo", 'N', 0, ID_VIEW_ENTITY, "menu_view_entity"}, + {"SetGrid256", GDK_KEY_9, 0, ID_GRID_256, "menu_grid_256"}, + {"DragEdges", GDK_KEY_E, 0, ID_SELECTION_DRAGEDGES, "menu_selection_dragedges"}, + {"DragVertices", GDK_KEY_V, 0, ID_SELECTION_DRAGVERTECIES, "menu_selection_dragvertecies"}, + {"ViewEntityInfo", GDK_KEY_N, 0, ID_VIEW_ENTITY, "menu_view_entity"}, // {"ViewConsole", 'O', 0, ID_VIEW_CONSOLE, "menu_0,"}, - {"CloneSelection", GDK_space, 0, ID_SELECTION_CLONE, "menu_selection_clone"}, - {"DeleteSelection", GDK_BackSpace, 0, ID_SELECTION_DELETE, "menu_selection_delete"}, - {"UnSelectSelection", GDK_Escape, 0, ID_SELECTION_DESELECT, "menu_selection_deselect"}, - {"CenterView", GDK_End, 0, ID_VIEW_CENTER, "menu_view_center"}, - {"ZoomOut", GDK_Insert, 0, ID_VIEW_ZOOMOUT, "menu_view_zoomout"}, - {"ZoomIn", GDK_Delete, 0, ID_VIEW_ZOOMIN, "menu_view_zoomin"}, - {"UpFloor", GDK_Prior, 0, ID_VIEW_UPFLOOR, "menu_view_upfloor"}, - {"DownFloor", GDK_Next, 0, ID_VIEW_DOWNFLOOR, "menu_view_downfloor"}, - {"ToggleClipper", 'X', 0, ID_VIEW_CLIPPER, "menu_view_clipper"}, - {"ToggleCrosshairs", 'X', 0x01, ID_VIEW_CROSSHAIR, "menu_view_crosshair"}, - {"TogTexLock", 'T', 0x01, ID_TOGGLE_LOCK, "menu_toggle_lock"}, - {"TogTexRotLock", 'R', 0x01, ID_TOGGLE_ROTATELOCK, "menu_toggle_rotatelock"}, - {"ToggleRealtime", 'R', 0x04, ID_VIEW_CAMERAUPDATE, "menu_view_cameraupdate"}, - {"EntityList", 'L', 0, ID_EDIT_ENTITYINFO, "menu_edit_entityinfo"}, - {"Preferences", 'P', 0, ID_PREFS, "menu_prefs"}, - {"ToggleCamera", 'C', 0x05, ID_TOGGLECAMERA, "menu_togglecamera"}, - {"ToggleConsole", 'O', 0, ID_TOGGLECONSOLE, "menu_toggleconsole"}, - {"ToggleView", 'V', 0x05, ID_TOGGLEVIEW, "menu_toggleview"}, - {"ToggleZ", 'Z', 0x05, ID_TOGGLEZ, "menu_togglez"}, - {"ConnectSelection", 'K', 0x04, ID_SELECTION_CONNECT, "menu_selection_connect"}, - {"Brush3Sided", '3', 0x04, ID_BRUSH_3SIDED, "menu_brush_3sided"}, - {"Brush4Sided", '4', 0x04, ID_BRUSH_4SIDED, "menu_brush_4sided"}, - {"Brush5Sided", '5', 0x04, ID_BRUSH_5SIDED, "menu_brush_5sided"}, - {"Brush6Sided", '6', 0x04, ID_BRUSH_6SIDED, "menu_brush_6sided"}, - {"Brush7Sided", '7', 0x04, ID_BRUSH_7SIDED, "menu_brush_7sided"}, - {"Brush8Sided", '8', 0x04, ID_BRUSH_8SIDED, "menu_brush_8sided"}, - {"Brush9Sided", '9', 0x04, ID_BRUSH_9SIDED, "menu_brush_9sided"}, - {"MatrixTranspose", 'M', 0x05, ID_CURVE_MATRIX_TRANSPOSE, "menu_curve_matrix_transpose"}, - {"MakeDetail", 'M', 0x04, ID_SELECTION_MAKE_DETAIL, "menu_selection_make_detail"}, - {"MapInfo", 'M', 0, ID_EDIT_MAPINFO, "menu_edit_mapinfo"}, - {"NextLeakSpot", 'K', 0x05, ID_MISC_NEXTLEAKSPOT, "menu_misc_nextleakspot"}, - {"PrevLeakSpot", 'L', 0x05, ID_MISC_PREVIOUSLEAKSPOT, "menu_misc_previousleakspot"}, - {"FileOpen", 'O', 0x04, ID_FILE_OPEN, "menu_file_open"}, - {"FileSave", 'S', 0x04, ID_FILE_SAVE, "menu_file_save"}, - //% {"Exit", 'X', 0x04, ID_FILE_EXIT, "menu_file_exit"}, // ydnar: Ctrl+X should be cut - {"CenterXYView", GDK_Tab, 0x05, ID_VIEW_CENTERVIEW, "menu_view_centerview"}, - {"NextView", GDK_Tab, 0x04, ID_VIEW_NEXTVIEW, "menu_view_nextview"}, - {"ClipSelected", GDK_Return, 0x00, ID_CLIP_SELECTED, "menu_clip_selected"}, - {"SplitSelected", GDK_Return, 0x01, ID_SPLIT_SELECTED, "menu_split_selected"}, - {"FlipClip", GDK_Return, 0x04, ID_FLIP_CLIP, "menu_flip_clip"}, - {"MouseRotate", 'R', 0x00, ID_SELECT_MOUSEROTATE, "menu_select_mouserotate"}, - {"Copy", 'C', 0x04, ID_EDIT_COPYBRUSH, "menu_edit_copybrush"}, - {"Paste", 'V', 0x04, ID_EDIT_PASTEBRUSH, "menu_edit_pastebrush"}, - {"PasteToCamera", 'V', RAD_ALT, ID_EDIT_PASTEBRUSHTOCAMERA, "menu_edit_pastebrushtocamera"}, - {"Undo", 'Z', 0x04, ID_EDIT_UNDO, "menu_edit_undo"}, - {"Redo", 'Y', 0x04, ID_EDIT_REDO, "menu_edit_redo"}, - {"ZZoomOut", GDK_Insert, 0x04, ID_VIEW_ZZOOMOUT, "menu_view_zzoomout"}, - {"ZZoomIn", GDK_Delete, 0x04, ID_VIEW_ZZOOMIN, "menu_view_zzoomin"}, - {"TexRotateClock", GDK_Next, 0x01, ID_SELECTION_TEXTURE_ROTATECLOCK, "menu_selection_texture_rotateclock"}, - {"TexRotateCounter", GDK_Prior, 0x01, ID_SELECTION_TEXTURE_ROTATECOUNTER, "menu_selection_texture_rotatecounter"}, - {"TexScaleUp", GDK_Up, 0x04, ID_SELECTION_TEXTURE_SCALEUP, "menu_selection_texture_scaleup"}, - {"TexScaleDown", GDK_Down, 0x04, ID_SELECTION_TEXTURE_SCALEDOWN, "menu_selection_texture_scaledown"}, - {"TexShiftLeft", GDK_Left, 0x01, ID_SELECTION_TEXTURE_SHIFTLEFT, "menu_selection_texture_shiftleft"}, - {"TexShiftRight", GDK_Right, 0x01, ID_SELECTION_TEXTURE_SHIFTRIGHT, "menu_selection_texture_shiftright"}, - {"TexShiftUp", GDK_Up, 0x01, ID_SELECTION_TEXTURE_SHIFTUP, "menu_selection_texture_shiftup"}, - {"TexShiftDown", GDK_Down, 0x01, ID_SELECTION_TEXTURE_SHIFTDOWN, "menu_selection_texture_shiftdown"}, - {"GridDown", '[', 0x00, ID_GRID_PREV, "menu_grid_prev"}, - {"GridUp", ']', 0x00, ID_GRID_NEXT, "menu_grid_next"}, - {"TexScaleLeft", GDK_Left, 0x04, ID_SELECTION_TEXTURE_SCALELEFT, "menu_selection_texture_scaleleft"}, - {"TexScaleRight", GDK_Right, 0x04, ID_SELECTION_TEXTURE_SCALERIGHT, "menu_selection_texture_scaleright"}, - {"CubicClipZoomOut", ']', 0x04, ID_VIEW_CUBEOUT, "menu_view_cubeout"}, - {"CubicClipZoomIn", '[', 0x04, ID_VIEW_CUBEIN, "menu_view_cubein"}, - {"ToggleCubicClip", '\\', 0x04, ID_VIEW_CUBICCLIPPING, "menu_view_cubicclipping"}, - {"MoveSelectionDOWN", GDK_KP_Subtract, 0x00, ID_SELECTION_MOVEDOWN, "menu_selection_movedown"}, - {"MoveSelectionUP", GDK_KP_Add, 0x00, ID_SELECTION_MOVEUP, "menu_selection_moveup"}, - {"DumpSelectedBrush", 'D', 0x01, ID_SELECTION_PRINT, "menu_selection_print"}, - {"ToggleSizePaint", 'Q', 0x00, ID_SELECTION_TOGGLESIZEPAINT, "menu_selection_togglesizepaint"}, - {"SelectNudgeLeft", GDK_Left, 0x02, ID_SELECTION_SELECT_NUDGELEFT, "menu_selection_select_nudgeleft"}, - {"SelectNudgeRight", GDK_Right, 0x02, ID_SELECTION_SELECT_NUDGERIGHT, "menu_selection_select_nudgeright"}, - {"SelectNudgeUp", GDK_Up, 0x02, ID_SELECTION_SELECT_NUDGEUP, "menu_selection_select_nudgeup"}, - {"CycleCapTexturePatch", 'N', 0x05, ID_CURVE_CYCLECAP, "menu_curve_cyclecap"}, - {"NaturalizePatch", 'N', 0x04, ID_PATCH_NATURALIZE, "menu_patch_naturalize"}, - {"SnapToGrid", 'G', 0x04, ID_SELECT_SNAPTOGRID, "menu_select_snaptogrid"}, - {"ShowAllTextures", 'A', 0x04, ID_TEXTURES_SHOWALL, "menu_textures_showall"}, - {"SelectAllOfType", 'A', 0x01, ID_SELECT_ALL, "menu_select_all"}, - {"CapCurrentCurve", 'C', 0x01, ID_CURVE_CAP, "menu_curve_cap"}, - {"MakeStructural", 'S', 0x05, ID_SELECTION_MAKE_STRUCTURAL, "menu_selection_make_structural"}, - {"RegionSetSelection", 'R', 0x05, ID_REGION_SETSELECTION, "menu_region_setselection"}, - {"ShowInUse", 'U', 0, ID_TEXTURES_SHOWINUSE, "menu_textures_showinuse"}, - {"InvertSelection", 'I', 0, ID_SELECTION_INVERT, "menu_selection_invert"}, - {"Sleep", 'P', 0x05, ID_FILE_SLEEP, "menu_file_sleep"}, - {"SimplePatchMesh", 'P', 0x01, ID_CURVE_SIMPLEPATCHMESH, "menu_simplepatchmesh"}, + {"CloneSelection", GDK_KEY_space, 0, ID_SELECTION_CLONE, "menu_selection_clone"}, + {"DeleteSelection", GDK_KEY_BackSpace, 0, ID_SELECTION_DELETE, "menu_selection_delete"}, + {"UnSelectSelection", GDK_KEY_Escape, 0, ID_SELECTION_DESELECT, "menu_selection_deselect"}, + {"CenterView", GDK_KEY_End, 0, ID_VIEW_CENTER, "menu_view_center"}, + {"ZoomOut", GDK_KEY_Insert, 0, ID_VIEW_ZOOMOUT, "menu_view_zoomout"}, + {"ZoomIn", GDK_KEY_Delete, 0, ID_VIEW_ZOOMIN, "menu_view_zoomin"}, + {"UpFloor", GDK_KEY_Prior, 0, ID_VIEW_UPFLOOR, "menu_view_upfloor"}, + {"DownFloor", GDK_KEY_Next, 0, ID_VIEW_DOWNFLOOR, "menu_view_downfloor"}, + {"ToggleClipper", GDK_KEY_X, 0, ID_VIEW_CLIPPER, "menu_view_clipper"}, + {"ToggleCrosshairs", GDK_KEY_X, 0x01, ID_VIEW_CROSSHAIR, "menu_view_crosshair"}, + {"TogTexLock", GDK_KEY_T, 0x01, ID_TOGGLE_LOCK, "menu_toggle_lock"}, + {"TogTexRotLock", GDK_KEY_R, 0x01, ID_TOGGLE_ROTATELOCK, "menu_toggle_rotatelock"}, + {"ToggleRealtime", GDK_KEY_R, 0x04, ID_VIEW_CAMERAUPDATE, "menu_view_cameraupdate"}, + {"EntityList", GDK_KEY_L, 0, ID_EDIT_ENTITYINFO, "menu_edit_entityinfo"}, + {"Preferences", GDK_KEY_P, 0, ID_PREFS, "menu_prefs"}, + {"ToggleCamera", GDK_KEY_C, 0x05, ID_TOGGLECAMERA, "menu_togglecamera"}, + {"ToggleConsole", GDK_KEY_O, 0, ID_TOGGLECONSOLE, "menu_toggleconsole"}, + {"ToggleView", GDK_KEY_V, 0x05, ID_TOGGLEVIEW, "menu_toggleview"}, + {"ToggleZ", GDK_KEY_Z, 0x05, ID_TOGGLEZ, "menu_togglez"}, + {"ConnectSelection", GDK_KEY_K, 0x04, ID_SELECTION_CONNECT, "menu_selection_connect"}, + {"Brush3Sided", GDK_KEY_3, 0x04, ID_BRUSH_3SIDED, "menu_brush_3sided"}, + {"Brush4Sided", GDK_KEY_4, 0x04, ID_BRUSH_4SIDED, "menu_brush_4sided"}, + {"Brush5Sided", GDK_KEY_5, 0x04, ID_BRUSH_5SIDED, "menu_brush_5sided"}, + {"Brush6Sided", GDK_KEY_6, 0x04, ID_BRUSH_6SIDED, "menu_brush_6sided"}, + {"Brush7Sided", GDK_KEY_7, 0x04, ID_BRUSH_7SIDED, "menu_brush_7sided"}, + {"Brush8Sided", GDK_KEY_8, 0x04, ID_BRUSH_8SIDED, "menu_brush_8sided"}, + {"Brush9Sided", GDK_KEY_9, 0x04, ID_BRUSH_9SIDED, "menu_brush_9sided"}, + {"MatrixTranspose", GDK_KEY_M, 0x05, ID_CURVE_MATRIX_TRANSPOSE, "menu_curve_matrix_transpose"}, + {"MakeDetail", GDK_KEY_M, 0x04, ID_SELECTION_MAKE_DETAIL, "menu_selection_make_detail"}, + {"MapInfo", GDK_KEY_M, 0, ID_EDIT_MAPINFO, "menu_edit_mapinfo"}, + {"NextLeakSpot", GDK_KEY_K, 0x05, ID_MISC_NEXTLEAKSPOT, "menu_misc_nextleakspot"}, + {"PrevLeakSpot", GDK_KEY_L, 0x05, ID_MISC_PREVIOUSLEAKSPOT, "menu_misc_previousleakspot"}, + {"FileOpen", GDK_KEY_O, 0x04, ID_FILE_OPEN, "menu_file_open"}, + {"FileSave", GDK_KEY_S, 0x04, ID_FILE_SAVE, "menu_file_save"}, + //% {"Exit", GDK_KEY_X, 0x04, ID_FILE_EXIT, "menu_file_exit"}, // ydnar: Ctrl+X should be cut + {"CenterXYView", GDK_KEY_Tab, 0x05, ID_VIEW_CENTERVIEW, "menu_view_centerview"}, + {"NextView", GDK_KEY_Tab, 0x04, ID_VIEW_NEXTVIEW, "menu_view_nextview"}, + {"ClipSelected", GDK_KEY_Return, 0x00, ID_CLIP_SELECTED, "menu_clip_selected"}, + {"SplitSelected", GDK_KEY_Return, 0x01, ID_SPLIT_SELECTED, "menu_split_selected"}, + {"FlipClip", GDK_KEY_Return, 0x04, ID_FLIP_CLIP, "menu_flip_clip"}, + {"MouseRotate", GDK_KEY_R, 0x00, ID_SELECT_MOUSEROTATE, "menu_select_mouserotate"}, + {"Copy", GDK_KEY_C, 0x04, ID_EDIT_COPYBRUSH, "menu_edit_copybrush"}, + {"Paste", GDK_KEY_V, 0x04, ID_EDIT_PASTEBRUSH, "menu_edit_pastebrush"}, + {"PasteToCamera", GDK_KEY_V, RAD_ALT, ID_EDIT_PASTEBRUSHTOCAMERA, "menu_edit_pastebrushtocamera"}, + {"Undo", GDK_KEY_Z, 0x04, ID_EDIT_UNDO, "menu_edit_undo"}, + {"Redo", GDK_KEY_Y, 0x04, ID_EDIT_REDO, "menu_edit_redo"}, + {"ZZoomOut", GDK_KEY_Insert, 0x04, ID_VIEW_ZZOOMOUT, "menu_view_zzoomout"}, + {"ZZoomIn", GDK_KEY_Delete, 0x04, ID_VIEW_ZZOOMIN, "menu_view_zzoomin"}, + {"TexRotateClock", GDK_KEY_Next, 0x01, ID_SELECTION_TEXTURE_ROTATECLOCK, "menu_selection_texture_rotateclock"}, + {"TexRotateCounter", GDK_KEY_Prior, 0x01, ID_SELECTION_TEXTURE_ROTATECOUNTER, "menu_selection_texture_rotatecounter"}, + {"TexScaleUp", GDK_KEY_Up, 0x04, ID_SELECTION_TEXTURE_SCALEUP, "menu_selection_texture_scaleup"}, + {"TexScaleDown", GDK_KEY_Down, 0x04, ID_SELECTION_TEXTURE_SCALEDOWN, "menu_selection_texture_scaledown"}, + {"TexShiftLeft", GDK_KEY_Left, 0x01, ID_SELECTION_TEXTURE_SHIFTLEFT, "menu_selection_texture_shiftleft"}, + {"TexShiftRight", GDK_KEY_Right, 0x01, ID_SELECTION_TEXTURE_SHIFTRIGHT, "menu_selection_texture_shiftright"}, + {"TexShiftUp", GDK_KEY_Up, 0x01, ID_SELECTION_TEXTURE_SHIFTUP, "menu_selection_texture_shiftup"}, + {"TexShiftDown", GDK_KEY_Down, 0x01, ID_SELECTION_TEXTURE_SHIFTDOWN, "menu_selection_texture_shiftdown"}, + {"GridDown", GDK_KEY_bracketleft, 0x00, ID_GRID_PREV, "menu_grid_prev"}, + {"GridUp", GDK_KEY_bracketright, 0x00, ID_GRID_NEXT, "menu_grid_next"}, + {"TexScaleLeft", GDK_KEY_Left, 0x04, ID_SELECTION_TEXTURE_SCALELEFT, "menu_selection_texture_scaleleft"}, + {"TexScaleRight", GDK_KEY_Right, 0x04, ID_SELECTION_TEXTURE_SCALERIGHT, "menu_selection_texture_scaleright"}, + {"CubicClipZoomOut", GDK_KEY_bracketright, 0x04, ID_VIEW_CUBEOUT, "menu_view_cubeout"}, + {"CubicClipZoomIn", GDK_KEY_bracketleft, 0x04, ID_VIEW_CUBEIN, "menu_view_cubein"}, + {"ToggleCubicClip", GDK_KEY_backslash, 0x04, ID_VIEW_CUBICCLIPPING, "menu_view_cubicclipping"}, + {"MoveSelectionDOWN", GDK_KEY_KP_Subtract, 0x00, ID_SELECTION_MOVEDOWN, "menu_selection_movedown"}, + {"MoveSelectionUP", GDK_KEY_KP_Add, 0x00, ID_SELECTION_MOVEUP, "menu_selection_moveup"}, + {"DumpSelectedBrush", GDK_KEY_D, 0x01, ID_SELECTION_PRINT, "menu_selection_print"}, + {"ToggleSizePaint", GDK_KEY_Q, 0x00, ID_SELECTION_TOGGLESIZEPAINT, "menu_selection_togglesizepaint"}, + {"SelectNudgeLeft", GDK_KEY_Left, 0x02, ID_SELECTION_SELECT_NUDGELEFT, "menu_selection_select_nudgeleft"}, + {"SelectNudgeRight", GDK_KEY_Right, 0x02, ID_SELECTION_SELECT_NUDGERIGHT, "menu_selection_select_nudgeright"}, + {"SelectNudgeUp", GDK_KEY_Up, 0x02, ID_SELECTION_SELECT_NUDGEUP, "menu_selection_select_nudgeup"}, + {"CycleCapTexturePatch", GDK_KEY_N, 0x05, ID_CURVE_CYCLECAP, "menu_curve_cyclecap"}, + {"NaturalizePatch", GDK_KEY_N, 0x04, ID_PATCH_NATURALIZE, "menu_patch_naturalize"}, + {"SnapToGrid", GDK_KEY_G, 0x04, ID_SELECT_SNAPTOGRID, "menu_select_snaptogrid"}, + {"ShowAllTextures", GDK_KEY_A, 0x04, ID_TEXTURES_SHOWALL, "menu_textures_showall"}, + {"SelectAllOfType", GDK_KEY_A, 0x01, ID_SELECT_ALL, "menu_select_all"}, + {"CapCurrentCurve", GDK_KEY_C, 0x01, ID_CURVE_CAP, "menu_curve_cap"}, + {"MakeStructural", GDK_KEY_S, 0x05, ID_SELECTION_MAKE_STRUCTURAL, "menu_selection_make_structural"}, + {"RegionSetSelection", GDK_KEY_R, 0x05, ID_REGION_SETSELECTION, "menu_region_setselection"}, + {"ShowInUse", GDK_KEY_U, 0, ID_TEXTURES_SHOWINUSE, "menu_textures_showinuse"}, + {"InvertSelection", GDK_KEY_I, 0, ID_SELECTION_INVERT, "menu_selection_invert"}, + {"Sleep", GDK_KEY_P, 0x05, ID_FILE_SLEEP, "menu_file_sleep"}, + {"SimplePatchMesh", GDK_KEY_P, 0x01, ID_CURVE_SIMPLEPATCHMESH, "menu_simplepatchmesh"}, {"FilterWorldBrushes", '1', RAD_ALT, ID_FILTER_WORLD, "menu_filter_world"}, - {"FilterWorldBrushes", GDK_KP_1, RAD_ALT, ID_FILTER_WORLD, "menu_filter_world"}, + {"FilterWorldBrushes", GDK_KEY_1, RAD_ALT, ID_FILTER_WORLD, "menu_filter_world"}, {"FilterEntities", '2', RAD_ALT, ID_FILTER_ENTITIES, "menu_filter_entities"}, - {"FilterEntities", GDK_KP_2, RAD_ALT, ID_FILTER_ENTITIES, "menu_filter_entities"}, + {"FilterEntities", GDK_KEY_2, RAD_ALT, ID_FILTER_ENTITIES, "menu_filter_entities"}, {"FilterAreaportals", '3', RAD_ALT, ID_FILTER_AREAPORTALS, "menu_filter_areaportals"}, - {"FilterAreaportals", GDK_KP_3, RAD_ALT, ID_FILTER_AREAPORTALS, "menu_filter_areaportals"}, + {"FilterAreaportals", GDK_KEY_3, RAD_ALT, ID_FILTER_AREAPORTALS, "menu_filter_areaportals"}, {"FilterTranslucent", '4', RAD_ALT, ID_FILTER_TRANSLUCENT, "menu_filter_translucent"}, - {"FilterTranslucent", GDK_KP_4, RAD_ALT, ID_FILTER_TRANSLUCENT, "menu_filter_translucent"}, + {"FilterTranslucent", GDK_KEY_4, RAD_ALT, ID_FILTER_TRANSLUCENT, "menu_filter_translucent"}, {"FilterLiquids", '5', RAD_ALT, ID_FILTER_LIQUIDS, "menu_filter_liquids"}, - {"FilterLiquids", GDK_KP_5, RAD_ALT, ID_FILTER_LIQUIDS, "menu_filter_liquids"}, + {"FilterLiquids", GDK_KEY_5, RAD_ALT, ID_FILTER_LIQUIDS, "menu_filter_liquids"}, {"FilterCaulk", '6', RAD_ALT, ID_FILTER_CAULK, "menu_filter_caulk"}, - {"FilterCaulk", GDK_KP_6, RAD_ALT, ID_FILTER_CAULK, "menu_filter_caulk"}, + {"FilterCaulk", GDK_KEY_6, RAD_ALT, ID_FILTER_CAULK, "menu_filter_caulk"}, {"FilterClips", '7', RAD_ALT, ID_FILTER_CLIPS, "menu_filter_clips"}, - {"FilterClips", GDK_KP_7, RAD_ALT, ID_FILTER_CLIPS, "menu_filter_clips"}, - {"FilterBotClips", 'M', RAD_ALT, ID_FILTER_BOTCLIPS, "menu_filter_botclips"}, + {"FilterClips", GDK_KEY_7, RAD_ALT, ID_FILTER_CLIPS, "menu_filter_clips"}, + {"FilterBotClips", GDK_KEY_M, RAD_ALT, ID_FILTER_BOTCLIPS, "menu_filter_botclips"}, {"FilterPaths", '8', RAD_ALT, ID_FILTER_PATHS, "menu_filter_paths"}, - {"FilterPaths", GDK_KP_8, RAD_ALT, ID_FILTER_PATHS, "menu_filter_paths"}, + {"FilterPaths", GDK_KEY_8, RAD_ALT, ID_FILTER_PATHS, "menu_filter_paths"}, {"FilterClusterportals", '9', RAD_ALT, ID_FILTER_CLUSTERPORTALS, "menu_filter_clusterportals"}, - {"FilterClusterportals", GDK_KP_9, RAD_ALT, ID_FILTER_CLUSTERPORTALS, "menu_filter_clusterportals"}, + {"FilterClusterportals", GDK_KEY_9, RAD_ALT, ID_FILTER_CLUSTERPORTALS, "menu_filter_clusterportals"}, {"FilterLights", '0', RAD_ALT, ID_FILTER_LIGHTS, "menu_filter_lights"}, - {"FilterLights", GDK_KP_0, RAD_ALT, ID_FILTER_LIGHTS, "menu_filter_lights"}, - {"FilterPatches", 'P', RAD_CONTROL, ID_FILTER_PATCHES, "menu_filter_patches"}, - {"FilterDetails", 'D', RAD_CONTROL, ID_FILTER_DETAILS, "menu_filter_details"}, - {"FilterStructural", 'D', RAD_CONTROL | RAD_SHIFT, ID_FILTER_STRUCTURAL, "menu_filter_structural"}, - {"FilterHintsSkips", 'H', RAD_CONTROL, ID_FILTER_HINTSSKIPS, "menu_filter_hintsskips"}, - {"FilterModels", 'M', RAD_SHIFT, ID_FILTER_MODELS, "menu_filter_models"}, - {"FilterTriggers", 'T', RAD_CONTROL | RAD_SHIFT, ID_FILTER_TRIGGERS, "menu_filter_triggers"}, - {"LoadPointfile", 'L', RAD_SHIFT, ID_FILE_POINTFILE, "menu_load_pointfile"}, - {"TextureWindowScaledown", GDK_Insert, RAD_ALT, ID_TEXTUREWINDOW_SCALEDOWN, "menu_texturewindow_scaledown"}, - {"TextureWindowScaleup", GDK_Delete, RAD_ALT, ID_TEXTUREWINDOW_SCALEUP, "menu_texturewindow_scaleup"}, + {"FilterLights", GDK_KEY_0, RAD_ALT, ID_FILTER_LIGHTS, "menu_filter_lights"}, + {"FilterPatches", GDK_KEY_P, RAD_CONTROL, ID_FILTER_PATCHES, "menu_filter_patches"}, + {"FilterDetails", GDK_KEY_D, RAD_CONTROL, ID_FILTER_DETAILS, "menu_filter_details"}, + {"FilterStructural", GDK_KEY_D, RAD_CONTROL | RAD_SHIFT, ID_FILTER_STRUCTURAL, "menu_filter_structural"}, + {"FilterHintsSkips", GDK_KEY_H, RAD_CONTROL, ID_FILTER_HINTSSKIPS, "menu_filter_hintsskips"}, + {"FilterModels", GDK_KEY_M, RAD_SHIFT, ID_FILTER_MODELS, "menu_filter_models"}, + {"FilterTriggers", GDK_KEY_T, RAD_CONTROL | RAD_SHIFT, ID_FILTER_TRIGGERS, "menu_filter_triggers"}, + {"LoadPointfile", GDK_KEY_L, RAD_SHIFT, ID_FILE_POINTFILE, "menu_load_pointfile"}, + {"TextureWindowScaledown", GDK_KEY_Insert, RAD_ALT, ID_TEXTUREWINDOW_SCALEDOWN, "menu_texturewindow_scaledown"}, + {"TextureWindowScaleup", GDK_KEY_Delete, RAD_ALT, ID_TEXTUREWINDOW_SCALEUP, "menu_texturewindow_scaleup"}, {"Help", GDK_KEY_F1, 0, ID_HELP, "menu_help"}, }; @@ -304,51 +304,51 @@ int g_nCommandCount = sizeof( g_Commands ) / sizeof( SCommandInfo ); SKeyInfo g_Keys[] = { - {"Space", GDK_space}, - {"Backspace", GDK_BackSpace}, - {"Escape", GDK_Escape}, - {"End", GDK_End}, - {"Insert", GDK_Insert}, - {"Delete", GDK_Delete}, - {"PageUp", GDK_Prior}, - {"PageDown", GDK_Next}, - {"Up", GDK_Up}, - {"Down", GDK_Down}, - {"Left", GDK_Left}, - {"Right", GDK_Right}, - {"F1", GDK_F1}, - {"F2", GDK_F2}, - {"F3", GDK_F3}, - {"F4", GDK_F4}, - {"F5", GDK_F5}, - {"F6", GDK_F6}, - {"F7", GDK_F7}, - {"F8", GDK_F8}, - {"F9", GDK_F9}, - {"F10", GDK_F10}, - {"F11", GDK_F11}, - {"F12", GDK_F12}, - {"Tab", GDK_Tab}, - {"Return", GDK_Return}, - {"Comma", GDK_comma}, - {"Period", GDK_period}, - {"Plus", GDK_KP_Add}, - {"Multiply", GDK_multiply}, - {"Subtract", GDK_KP_Subtract}, - {"NumPad0", GDK_KP_0}, - {"NumPad1", GDK_KP_1}, - {"NumPad2", GDK_KP_2}, - {"NumPad3", GDK_KP_3}, - {"NumPad4", GDK_KP_4}, - {"NumPad5", GDK_KP_5}, - {"NumPad6", GDK_KP_6}, - {"NumPad7", GDK_KP_7}, - {"NumPad8", GDK_KP_8}, - {"NumPad9", GDK_KP_9}, - {"[", 219}, - {"]", 221}, - {"\\", 220}, - {"Home", GDK_Home} + {"Space", GDK_KEY_space}, + {"Backspace", GDK_KEY_BackSpace}, + {"Escape", GDK_KEY_Escape}, + {"End", GDK_KEY_End}, + {"Insert", GDK_KEY_Insert}, + {"Delete", GDK_KEY_Delete}, + {"PageUp", GDK_KEY_Prior}, + {"PageDown", GDK_KEY_Next}, + {"Up", GDK_KEY_Up}, + {"Down", GDK_KEY_Down}, + {"Left", GDK_KEY_Left}, + {"Right", GDK_KEY_Right}, + {"F1", GDK_KEY_F1}, + {"F2", GDK_KEY_F2}, + {"F3", GDK_KEY_F3}, + {"F4", GDK_KEY_F4}, + {"F5", GDK_KEY_F5}, + {"F6", GDK_KEY_F6}, + {"F7", GDK_KEY_F7}, + {"F8", GDK_KEY_F8}, + {"F9", GDK_KEY_F9}, + {"F10", GDK_KEY_F10}, + {"F11", GDK_KEY_F11}, + {"F12", GDK_KEY_F12}, + {"Tab", GDK_KEY_Tab}, + {"Return", GDK_KEY_Return}, + {"Comma", GDK_KEY_comma}, + {"Period", GDK_KEY_period}, + {"Plus", GDK_KEY_KP_Add}, + {"Multiply", GDK_KEY_multiply}, + {"Subtract", GDK_KEY_KP_Subtract}, + {"NumPad0", GDK_KEY_KP_0}, + {"NumPad1", GDK_KEY_KP_1}, + {"NumPad2", GDK_KEY_KP_2}, + {"NumPad3", GDK_KEY_KP_3}, + {"NumPad4", GDK_KEY_KP_4}, + {"NumPad5", GDK_KEY_KP_5}, + {"NumPad6", GDK_KEY_KP_6}, + {"NumPad7", GDK_KEY_KP_7}, + {"NumPad8", GDK_KEY_KP_8}, + {"NumPad9", GDK_KEY_KP_9}, + {"[", GDK_KEY_braceleft}, + {"]", GDK_KEY_braceright}, + {"\\", GDK_KEY_backslash}, + {"Home", GDK_KEY_Home} }; int g_nKeyCount = sizeof( g_Keys ) / sizeof( SKeyInfo ); @@ -408,7 +408,7 @@ gint HandleCommand( GtkWidget *widget, gpointer data ){ g_pParentWnd->OnMru( id ); } else if ( id >= ID_VIEW_NEAREST && id <= ID_TEXTURES_FLATSHADE ) { - if ( GTK_CHECK_MENU_ITEM( widget )->active ) { + if ( gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM( widget ) ) ) { g_pParentWnd->OnViewNearest( id ); } } @@ -773,8 +773,8 @@ static void mainframe_destroy( GtkWidget *widget, gpointer data ){ static gint mainframe_keypress( GtkWidget* widget, GdkEventKey* event, gpointer data ){ unsigned int code = gdk_keyval_to_upper( event->keyval ); - if ( code == GDK_ISO_Left_Tab ) { - code = GDK_Tab; + if ( code == GDK_KEY_ISO_Left_Tab ) { + code = GDK_KEY_Tab; } #ifdef DBG_KBD @@ -808,7 +808,7 @@ static gint mainframe_keypress( GtkWidget* widget, GdkEventKey* event, gpointer } if ( ( g_Commands[i].m_nModifiers & 0x7 ) == nState ) { HandleCommand( NULL, GINT_TO_POINTER( g_Commands[i].m_nCommand ) ); - gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" ); + g_signal_stop_emission_by_name( G_OBJECT( widget ), "key-press-event" ); return FALSE; } } @@ -839,7 +839,7 @@ static gint mainframe_keyrelease( GtkWidget* widget, GdkEventKey* event, gpointe case ID_CAMERA_STRAFERIGHT: { HandleKeyUp( NULL, GINT_TO_POINTER( g_Commands[i].m_nCommand ) ); - gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-release-event" ); + g_signal_stop_emission_by_name( G_OBJECT( widget ), "key-release-event" ); } } @@ -906,7 +906,7 @@ void MainFrame::process_xlink( Str &FileName, const char *menu_name, const char *url += (char *)xmlGetProp( pNode, (xmlChar *)"url" ); } mHelpURLs.push_back( url ); - create_menu_item_with_mnemonic( menu_in_menu, (char *)xmlGetProp( pNode, (xmlChar *)"name" ), GTK_SIGNAL_FUNC( HandleHelpCommand ), mHelpURLs.size() - 1 ); + create_menu_item_with_mnemonic( menu_in_menu, (char *)xmlGetProp( pNode, (xmlChar *)"name" ), G_CALLBACK( HandleHelpCommand ), mHelpURLs.size() - 1 ); } pNode = pNode->next; } @@ -960,68 +960,68 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ } create_menu_item_with_mnemonic( menu, _( "_New Map" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_NEW ); + G_CALLBACK( HandleCommand ), ID_FILE_NEW ); menu_separator( menu ); //++timo temporary experimental stuff for sleep mode.. item = create_menu_item_with_mnemonic( menu, _( "_Sleep" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_SLEEP ); + G_CALLBACK( HandleCommand ), ID_FILE_SLEEP ); g_object_set_data( G_OBJECT( window ), "menu_file_sleep", item ); menu_separator( menu ); // end experimental item = create_menu_item_with_mnemonic( menu, _( "_Open..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_OPEN ); + G_CALLBACK( HandleCommand ), ID_FILE_OPEN ); g_object_set_data( G_OBJECT( window ), "menu_file_open", item ); create_menu_item_with_mnemonic( menu, _( "_Import..." ), // Hydra: give it it's proper name - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_IMPORTMAP ); + G_CALLBACK( HandleCommand ), ID_FILE_IMPORTMAP ); item = create_menu_item_with_mnemonic( menu, _( "_Save" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_SAVE ); + G_CALLBACK( HandleCommand ), ID_FILE_SAVE ); g_object_set_data( G_OBJECT( window ), "menu_file_save", item ); create_menu_item_with_mnemonic( menu, _( "Save _as..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_SAVEAS ); + G_CALLBACK( HandleCommand ), ID_FILE_SAVEAS ); create_menu_item_with_mnemonic( menu, _( "Save s_elected..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_EXPORTMAP ); + G_CALLBACK( HandleCommand ), ID_FILE_EXPORTMAP ); menu_separator( menu ); item = create_menu_item_with_mnemonic( menu, _( "Save re_gion..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_SAVEREGION ); + G_CALLBACK( HandleCommand ), ID_FILE_SAVEREGION ); g_object_set_data( G_OBJECT( window ), "menu_file_saveregion", item ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, _( "New p_roject..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_NEWPROJECT ); + G_CALLBACK( HandleCommand ), ID_FILE_NEWPROJECT ); create_menu_item_with_mnemonic( menu, _( "Load _project..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_LOADPROJECT ); + G_CALLBACK( HandleCommand ), ID_FILE_LOADPROJECT ); create_menu_item_with_mnemonic( menu, _( "Pro_ject settings..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_PROJECTSETTINGS ); + G_CALLBACK( HandleCommand ), ID_FILE_PROJECTSETTINGS ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, _( "_Pointfile..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_POINTFILE ); + G_CALLBACK( HandleCommand ), ID_FILE_POINTFILE ); menu_separator( menu ); item = create_menu_item_with_mnemonic( menu, _( "Recent Files" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_RECENT1 ); + G_CALLBACK( HandleCommand ), ID_FILE_RECENT1 ); g_object_set_data( G_OBJECT( item ), "accel", accel ); gtk_widget_set_sensitive( item, FALSE ); MRU_AddWidget( item, 0 ); item = create_menu_item_with_mnemonic( menu, "2", - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_RECENT2 ); + G_CALLBACK( HandleCommand ), ID_FILE_RECENT2 ); gtk_widget_hide( item ); MRU_AddWidget( item, 1 ); item = create_menu_item_with_mnemonic( menu, "3", - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_RECENT3 ); + G_CALLBACK( HandleCommand ), ID_FILE_RECENT3 ); gtk_widget_hide( item ); MRU_AddWidget( item, 2 ); item = create_menu_item_with_mnemonic( menu, "4", - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_RECENT4 ); + G_CALLBACK( HandleCommand ), ID_FILE_RECENT4 ); gtk_widget_hide( item ); MRU_AddWidget( item, 3 ); menu_separator( menu ); item = create_menu_item_with_mnemonic( menu, _( "Check for GtkRadiant update (web)" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_CHECKUPDATE ); + G_CALLBACK( HandleCommand ), ID_FILE_CHECKUPDATE ); // disable, the functionality is no longer available gtk_widget_set_sensitive( item, FALSE ); create_menu_item_with_mnemonic( menu, _( "E_xit" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FILE_EXIT ); + G_CALLBACK( HandleCommand ), ID_FILE_EXIT ); // Edit menu menu = create_sub_menu_with_mnemonic( menu_bar, _( "_Edit" ) ); @@ -1029,27 +1029,27 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ menu_tearoff( menu ); } item = create_menu_item_with_mnemonic( menu, _( "_Undo" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_UNDO ); + G_CALLBACK( HandleCommand ), ID_EDIT_UNDO ); g_object_set_data( G_OBJECT( window ), "menu_edit_undo", item ); item = create_menu_item_with_mnemonic( menu, _( "_Redo" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_REDO ); + G_CALLBACK( HandleCommand ), ID_EDIT_REDO ); g_object_set_data( G_OBJECT( window ), "menu_edit_redo", item ); menu_separator( menu ); - item = create_menu_item_with_mnemonic( menu, _( "_Copy" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_COPYBRUSH ); - item = create_menu_item_with_mnemonic( menu, _( "_Paste" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_PASTEBRUSH ); - item = create_menu_item_with_mnemonic( menu, _( "P_aste To Camera" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_PASTEBRUSHTOCAMERA ); - item = create_menu_item_with_mnemonic( menu, _( "_Delete" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_DELETE ); + item = create_menu_item_with_mnemonic( menu, _( "_Copy" ), G_CALLBACK( HandleCommand ), ID_EDIT_COPYBRUSH ); + item = create_menu_item_with_mnemonic( menu, _( "_Paste" ), G_CALLBACK( HandleCommand ), ID_EDIT_PASTEBRUSH ); + item = create_menu_item_with_mnemonic( menu, _( "P_aste To Camera" ), G_CALLBACK( HandleCommand ), ID_EDIT_PASTEBRUSHTOCAMERA ); + item = create_menu_item_with_mnemonic( menu, _( "_Delete" ), G_CALLBACK( HandleCommand ), ID_SELECTION_DELETE ); g_object_set_data( G_OBJECT( window ), "menu_selection_delete", item ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, _( "Map Info..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_MAPINFO ); - create_menu_item_with_mnemonic( menu, _( "Entity Info..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_ENTITYINFO ); + create_menu_item_with_mnemonic( menu, _( "Map Info..." ), G_CALLBACK( HandleCommand ), ID_EDIT_MAPINFO ); + create_menu_item_with_mnemonic( menu, _( "Entity Info..." ), G_CALLBACK( HandleCommand ), ID_EDIT_ENTITYINFO ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, _( "Brush Scripts..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_SCRIPTS ); + create_menu_item_with_mnemonic( menu, _( "Brush Scripts..." ), G_CALLBACK( HandleCommand ), ID_BRUSH_SCRIPTS ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, _( "Load Pre_fab..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_LOADPREFAB ); - create_menu_item_with_mnemonic( menu, _( "Save Selection as Prefab..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_EDIT_SAVEPREFAB ); + create_menu_item_with_mnemonic( menu, _( "Load Pre_fab..." ), G_CALLBACK( HandleCommand ), ID_EDIT_LOADPREFAB ); + create_menu_item_with_mnemonic( menu, _( "Save Selection as Prefab..." ), G_CALLBACK( HandleCommand ), ID_EDIT_SAVEPREFAB ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, _( "Preferences..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_PREFS ); + create_menu_item_with_mnemonic( menu, _( "Preferences..." ), G_CALLBACK( HandleCommand ), ID_PREFS ); // View menu menu = create_sub_menu_with_mnemonic( menu_bar, _( "_View" ) ); @@ -1058,114 +1058,114 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ } menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Toggle" ) ); - create_menu_item_with_mnemonic( menu_in_menu, _( "Camera View" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_TOGGLECAMERA ); - create_menu_item_with_mnemonic( menu_in_menu, _( "Console View" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_TOGGLECONSOLE ); - item = create_menu_item_with_mnemonic( menu_in_menu, _( "Entity View" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ENTITY ); + create_menu_item_with_mnemonic( menu_in_menu, _( "Camera View" ), G_CALLBACK( HandleCommand ), ID_TOGGLECAMERA ); + create_menu_item_with_mnemonic( menu_in_menu, _( "Console View" ), G_CALLBACK( HandleCommand ), ID_TOGGLECONSOLE ); + item = create_menu_item_with_mnemonic( menu_in_menu, _( "Entity View" ), G_CALLBACK( HandleCommand ), ID_VIEW_ENTITY ); g_object_set_data( G_OBJECT( window ), "menu_view_entity", item ); - // create_menu_item_with_mnemonic (menu_in_menu, "Groups View", GTK_SIGNAL_FUNC (HandleCommand), ID_VIEW_GROUPS); - create_menu_item_with_mnemonic( menu_in_menu, _( "XY (Top)" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_TOGGLEVIEW ); - create_menu_item_with_mnemonic( menu_in_menu, _( "YZ (Side)" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_TOGGLEVIEW_YZ ); - create_menu_item_with_mnemonic( menu_in_menu, _( "XZ (Front)" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_TOGGLEVIEW_XZ ); - create_menu_item_with_mnemonic( menu_in_menu, _( "Z View" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_TOGGLEZ ); + // create_menu_item_with_mnemonic (menu_in_menu, "Groups View", G_CALLBACK (HandleCommand), ID_VIEW_GROUPS); + create_menu_item_with_mnemonic( menu_in_menu, _( "XY (Top)" ), G_CALLBACK( HandleCommand ), ID_TOGGLEVIEW ); + create_menu_item_with_mnemonic( menu_in_menu, _( "YZ (Side)" ), G_CALLBACK( HandleCommand ), ID_TOGGLEVIEW_YZ ); + create_menu_item_with_mnemonic( menu_in_menu, _( "XZ (Front)" ), G_CALLBACK( HandleCommand ), ID_TOGGLEVIEW_XZ ); + create_menu_item_with_mnemonic( menu_in_menu, _( "Z View" ), G_CALLBACK( HandleCommand ), ID_TOGGLEZ ); menu_separator( menu ); - item = create_menu_item_with_mnemonic( menu, _( "_Center" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_CENTER ); - item = create_menu_item_with_mnemonic( menu, _( "_Center 2d" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_CENTERVIEW ); - item = create_menu_item_with_mnemonic( menu, _( "_Up Floor" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_UPFLOOR ); - item = create_menu_item_with_mnemonic( menu, _( "_Down Floor" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_DOWNFLOOR ); + item = create_menu_item_with_mnemonic( menu, _( "_Center" ), G_CALLBACK( HandleCommand ), ID_VIEW_CENTER ); + item = create_menu_item_with_mnemonic( menu, _( "_Center 2d" ), G_CALLBACK( HandleCommand ), ID_VIEW_CENTERVIEW ); + item = create_menu_item_with_mnemonic( menu, _( "_Up Floor" ), G_CALLBACK( HandleCommand ), ID_VIEW_UPFLOOR ); + item = create_menu_item_with_mnemonic( menu, _( "_Down Floor" ), G_CALLBACK( HandleCommand ), ID_VIEW_DOWNFLOOR ); menu_separator( menu ); - item = create_menu_item_with_mnemonic( menu, _( "_Next (XY, YZ, XY)" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_NEXTVIEW ); + item = create_menu_item_with_mnemonic( menu, _( "_Next (XY, YZ, XY)" ), G_CALLBACK( HandleCommand ), ID_VIEW_NEXTVIEW ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Layout" ) ); - create_menu_item_with_mnemonic( menu_in_menu, _( "XY (Top)" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_XY ); - create_menu_item_with_mnemonic( menu_in_menu, _( "YZ" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_SIDE ); - create_menu_item_with_mnemonic( menu_in_menu, _( "XZ" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_FRONT ); + create_menu_item_with_mnemonic( menu_in_menu, _( "XY (Top)" ), G_CALLBACK( HandleCommand ), ID_VIEW_XY ); + create_menu_item_with_mnemonic( menu_in_menu, _( "YZ" ), G_CALLBACK( HandleCommand ), ID_VIEW_SIDE ); + create_menu_item_with_mnemonic( menu_in_menu, _( "XZ" ), G_CALLBACK( HandleCommand ), ID_VIEW_FRONT ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Zoom" ) ); - create_menu_item_with_mnemonic( menu_in_menu, _( "_XY 100%" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_100 ); - item = create_menu_item_with_mnemonic( menu_in_menu, _( "XY Zoom _In" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ZOOMIN ); - item = create_menu_item_with_mnemonic( menu_in_menu, _( "XY Zoom _Out" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ZOOMOUT ); + create_menu_item_with_mnemonic( menu_in_menu, _( "_XY 100%" ), G_CALLBACK( HandleCommand ), ID_VIEW_100 ); + item = create_menu_item_with_mnemonic( menu_in_menu, _( "XY Zoom _In" ), G_CALLBACK( HandleCommand ), ID_VIEW_ZOOMIN ); + item = create_menu_item_with_mnemonic( menu_in_menu, _( "XY Zoom _Out" ), G_CALLBACK( HandleCommand ), ID_VIEW_ZOOMOUT ); menu_separator( menu_in_menu ); - create_menu_item_with_mnemonic( menu_in_menu, _( "_Z 100%" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_Z100 ); - item = create_menu_item_with_mnemonic( menu_in_menu, _( "Z Zoo_m In" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ZZOOMIN ); + create_menu_item_with_mnemonic( menu_in_menu, _( "_Z 100%" ), G_CALLBACK( HandleCommand ), ID_VIEW_Z100 ); + item = create_menu_item_with_mnemonic( menu_in_menu, _( "Z Zoo_m In" ), G_CALLBACK( HandleCommand ), ID_VIEW_ZZOOMIN ); g_object_set_data( G_OBJECT( window ), "menu_view_zzoomin", item ); - item = create_menu_item_with_mnemonic( menu_in_menu, _( "Z Zoom O_ut" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ZZOOMOUT ); + item = create_menu_item_with_mnemonic( menu_in_menu, _( "Z Zoom O_ut" ), G_CALLBACK( HandleCommand ), ID_VIEW_ZZOOMOUT ); g_object_set_data( G_OBJECT( window ), "menu_view_zzoomout", item ); menu_separator( menu_in_menu ); - item = create_menu_item_with_mnemonic( menu_in_menu, _( "Cubic Clip Zoom In" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_CUBEIN ); - item = create_menu_item_with_mnemonic( menu_in_menu, _( "Cubic Clip Zoom Out" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_CUBEOUT ); + item = create_menu_item_with_mnemonic( menu_in_menu, _( "Cubic Clip Zoom In" ), G_CALLBACK( HandleCommand ), ID_VIEW_CUBEIN ); + item = create_menu_item_with_mnemonic( menu_in_menu, _( "Cubic Clip Zoom Out" ), G_CALLBACK( HandleCommand ), ID_VIEW_CUBEOUT ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Show" ) ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show _Angles" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_SHOWANGLES, FALSE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show _Angles" ), G_CALLBACK( HandleCommand ), ID_VIEW_SHOWANGLES, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_showangles", item ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show _Names" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_SHOWNAMES, TRUE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show _Names" ), G_CALLBACK( HandleCommand ), ID_VIEW_SHOWNAMES, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_view_shownames", item ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show Blocks" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_SHOWBLOCKS, FALSE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show Blocks" ), G_CALLBACK( HandleCommand ), ID_VIEW_SHOWBLOCKS, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_showblocks", item ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show C_oordinates" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_SHOWCOORDINATES, TRUE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show C_oordinates" ), G_CALLBACK( HandleCommand ), ID_VIEW_SHOWCOORDINATES, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_view_showcoordinates", item ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show Window Outline" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_SHOWOUTLINE, TRUE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show Window Outline" ), G_CALLBACK( HandleCommand ), ID_VIEW_SHOWOUTLINE, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_view_showoutline", item ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show ZBuffered Outline" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_NOOUTLINE, TRUE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show ZBuffered Outline" ), G_CALLBACK( HandleCommand ), ID_SELECTION_NOOUTLINE, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_selection_nooutline", item ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show Axes" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_SHOWAXES, TRUE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show Axes" ), G_CALLBACK( HandleCommand ), ID_VIEW_SHOWAXES, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_view_showaxes", item ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show Workzone" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_SHOWWORKZONE, FALSE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Show Workzone" ), G_CALLBACK( HandleCommand ), ID_VIEW_SHOWWORKZONE, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_showworkzone", item ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Filter" ) ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "World" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_WORLD, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Entities" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_ENTITIES, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Areaportals" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_AREAPORTALS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Translucent" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_TRANSLUCENT, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Liquids" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_LIQUIDS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Caulk" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_CAULK, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Clips" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_CLIPS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Paths" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_PATHS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Clusterportals" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_CLUSTERPORTALS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Lights" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_LIGHTS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Structural" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_STRUCTURAL, FALSE ); - item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Lightgrid" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_LIGHTGRID, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "World" ), G_CALLBACK( HandleCommand ), ID_FILTER_WORLD, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Entities" ), G_CALLBACK( HandleCommand ), ID_FILTER_ENTITIES, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Areaportals" ), G_CALLBACK( HandleCommand ), ID_FILTER_AREAPORTALS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Translucent" ), G_CALLBACK( HandleCommand ), ID_FILTER_TRANSLUCENT, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Liquids" ), G_CALLBACK( HandleCommand ), ID_FILTER_LIQUIDS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Caulk" ), G_CALLBACK( HandleCommand ), ID_FILTER_CAULK, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Clips" ), G_CALLBACK( HandleCommand ), ID_FILTER_CLIPS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Paths" ), G_CALLBACK( HandleCommand ), ID_FILTER_PATHS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Clusterportals" ), G_CALLBACK( HandleCommand ), ID_FILTER_CLUSTERPORTALS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Lights" ), G_CALLBACK( HandleCommand ), ID_FILTER_LIGHTS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Structural" ), G_CALLBACK( HandleCommand ), ID_FILTER_STRUCTURAL, FALSE ); + item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Lightgrid" ), G_CALLBACK( HandleCommand ), ID_FILTER_LIGHTGRID, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_filter_lightgrid", item ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Patches" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_PATCHES, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Details" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_DETAILS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Hints" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_HINTSSKIPS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Models" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_MODELS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Triggers" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_TRIGGERS, FALSE ); - create_check_menu_item_with_mnemonic( menu_in_menu, _( "Botclips" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_FILTER_BOTCLIPS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Patches" ), G_CALLBACK( HandleCommand ), ID_FILTER_PATCHES, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Details" ), G_CALLBACK( HandleCommand ), ID_FILTER_DETAILS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Hints" ), G_CALLBACK( HandleCommand ), ID_FILTER_HINTSSKIPS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Models" ), G_CALLBACK( HandleCommand ), ID_FILTER_MODELS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Triggers" ), G_CALLBACK( HandleCommand ), ID_FILTER_TRIGGERS, FALSE ); + create_check_menu_item_with_mnemonic( menu_in_menu, _( "Botclips" ), G_CALLBACK( HandleCommand ), ID_FILTER_BOTCLIPS, FALSE ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Hide/Show" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Hide Selected" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_HIDESHOW_HIDESELECTED ); + G_CALLBACK( HandleCommand ), ID_VIEW_HIDESHOW_HIDESELECTED ); create_menu_item_with_mnemonic( menu_in_menu, _( "Show Hidden" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_HIDESHOW_SHOWHIDDEN ); + G_CALLBACK( HandleCommand ), ID_VIEW_HIDESHOW_SHOWHIDDEN ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Entities as" ) ); g_object_set_data( G_OBJECT( window ), "view_entitiesas_menu", menu_in_menu ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, NULL, _( "Bounding box" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ENTITIESAS_BOUNDINGBOX,FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_ENTITIESAS_BOUNDINGBOX,FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_entitiesas_boundingbox", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "Wireframe" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ENTITIESAS_WIREFRAME,FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_ENTITIESAS_WIREFRAME,FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_entitiesas_wireframe", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "Selected Wireframe" ), - GTK_SIGNAL_FUNC( HandleCommand ),ID_VIEW_ENTITIESAS_SELECTEDWIREFRAME,FALSE ); + G_CALLBACK( HandleCommand ),ID_VIEW_ENTITIESAS_SELECTEDWIREFRAME,FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_entitiesas_selectedwireframe", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "Selected Skinned" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ENTITIESAS_SELECTEDSKINNED,FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_ENTITIESAS_SELECTEDSKINNED,FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_entitiesas_selectedskinned", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "Skinned" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ENTITIESAS_SKINNED,FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_ENTITIESAS_SKINNED,FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_entitiesas_skinned", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "Skinned and Boxed" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_ENTITIESAS_SKINNEDANDBOXED,FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_ENTITIESAS_SKINNEDANDBOXED,FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_entitiesas_skinnedandboxed", item ); menu_separator( menu ); item = create_check_menu_item_with_mnemonic( menu, _( "Cubic Clipping" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_CUBICCLIPPING, TRUE ); + G_CALLBACK( HandleCommand ), ID_VIEW_CUBICCLIPPING, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_view_cubicclipping", item ); menu_separator( menu ); item = create_check_menu_item_with_mnemonic( menu, _( "OpenGL Lighting" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_OPENGLLIGHTING, FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_OPENGLLIGHTING, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_opengllighting", item ); // Selection menu @@ -1176,90 +1176,90 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Drag" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Drag _Edges" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_DRAGEDGES ); + G_CALLBACK( HandleCommand ), ID_SELECTION_DRAGEDGES ); create_menu_item_with_mnemonic( menu_in_menu, _( "Drag _Vertices" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_DRAGVERTECIES ); + G_CALLBACK( HandleCommand ), ID_SELECTION_DRAGVERTECIES ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, _( "_Clone" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_CLONE ); + G_CALLBACK( HandleCommand ), ID_SELECTION_CLONE ); item = create_menu_item_with_mnemonic( menu, _( "Deselect" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_DESELECT ); + G_CALLBACK( HandleCommand ), ID_SELECTION_DESELECT ); item = create_menu_item_with_mnemonic( menu, _( "Invert" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_INVERT ); + G_CALLBACK( HandleCommand ), ID_SELECTION_INVERT ); #ifndef QUAKE3 create_menu_item_with_mnemonic( menu, _( "_Delete" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_DELETE ); + G_CALLBACK( HandleCommand ), ID_SELECTION_DELETE ); #endif menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Flip" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Flip _X" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_FLIPX ); + G_CALLBACK( HandleCommand ), ID_BRUSH_FLIPX ); create_menu_item_with_mnemonic( menu_in_menu, _( "Flip _Y" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_FLIPY ); + G_CALLBACK( HandleCommand ), ID_BRUSH_FLIPY ); create_menu_item_with_mnemonic( menu_in_menu, _( "Flip _Z" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_FLIPZ ); + G_CALLBACK( HandleCommand ), ID_BRUSH_FLIPZ ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Rotate" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Rotate X" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_ROTATEX ); + G_CALLBACK( HandleCommand ), ID_BRUSH_ROTATEX ); create_menu_item_with_mnemonic( menu_in_menu, _( "Rotate Y" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_ROTATEY ); + G_CALLBACK( HandleCommand ), ID_BRUSH_ROTATEY ); create_menu_item_with_mnemonic( menu_in_menu, _( "Rotate Z" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_ROTATEZ ); + G_CALLBACK( HandleCommand ), ID_BRUSH_ROTATEZ ); create_menu_item_with_mnemonic( menu_in_menu, _( "Arbitrary rotation..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_ARBITRARYROTATION ); + G_CALLBACK( HandleCommand ), ID_SELECTION_ARBITRARYROTATION ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, _( "Scale..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECT_SCALE ); + create_menu_item_with_mnemonic( menu, _( "Scale..." ), G_CALLBACK( HandleCommand ), ID_SELECT_SCALE ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "CSG" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Make _Hollow Overlap" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_MAKEHOLLOW ); + G_CALLBACK( HandleCommand ), ID_SELECTION_MAKEHOLLOW ); create_menu_item_with_mnemonic( menu_in_menu, _( "Make _Hollow Touch" ), G_CALLBACK( HandleCommand ), ID_SELECTION_MAKEHOLLOW_TOUCH ); create_menu_item_with_mnemonic( menu_in_menu, _( "CSG _Subtract" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_CSGSUBTRACT ); + G_CALLBACK( HandleCommand ), ID_SELECTION_CSGSUBTRACT ); create_menu_item_with_mnemonic( menu_in_menu, _( "CSG _Merge" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_CSGMERGE ); + G_CALLBACK( HandleCommand ), ID_SELECTION_CSGMERGE ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Select" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Select Complete _Tall" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECTCOMPLETETALL ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECTCOMPLETETALL ); create_menu_item_with_mnemonic( menu_in_menu, _( "Select T_ouching" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECTTOUCHING ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECTTOUCHING ); create_menu_item_with_mnemonic( menu_in_menu, _( "Select _Partial Tall" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECTPARTIALTALL ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECTPARTIALTALL ); create_menu_item_with_mnemonic( menu_in_menu, _( "Select _Inside" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECTINSIDE ); - create_menu_item_with_mnemonic( menu_in_menu, "Select Func _Group", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECT_FUNC_GROUP ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECTINSIDE ); + create_menu_item_with_mnemonic( menu_in_menu, "Select Func _Group", G_CALLBACK( HandleCommand ), ID_SELECT_FUNC_GROUP ); #ifndef QUAKE3 create_menu_item_with_mnemonic( menu_in_menu, _( "Nudge Left" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECT_NUDGELEFT ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECT_NUDGELEFT ); create_menu_item_with_mnemonic( menu_in_menu, _( "Nudge Right" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECT_NUDGERIGHT ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECT_NUDGERIGHT ); create_menu_item_with_mnemonic( menu_in_menu, _( "Nudge Up" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECT_NUDGEUP ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECT_NUDGEUP ); create_menu_item_with_mnemonic( menu_in_menu, _( "Nudge Down" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECT_NUDGEDOWN ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECT_NUDGEDOWN ); #endif menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Clipper" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Toggle Clipper" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_CLIPPER ); + G_CALLBACK( HandleCommand ), ID_VIEW_CLIPPER ); menu_separator( menu_in_menu ); create_menu_item_with_mnemonic( menu_in_menu, _( "Clip selection" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CLIP_SELECTED ); + G_CALLBACK( HandleCommand ), ID_CLIP_SELECTED ); create_menu_item_with_mnemonic( menu_in_menu, _( "Split selection" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SPLIT_SELECTED ); + G_CALLBACK( HandleCommand ), ID_SPLIT_SELECTED ); create_menu_item_with_mnemonic( menu_in_menu, _( "Flip Clip orientation" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_FLIP_CLIP ); + G_CALLBACK( HandleCommand ), ID_FLIP_CLIP ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, _( "Connect entities" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_CONNECT ); + G_CALLBACK( HandleCommand ), ID_SELECTION_CONNECT ); create_menu_item_with_mnemonic( menu, _( "Ungroup entity" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_UNGROUPENTITY ); + G_CALLBACK( HandleCommand ), ID_SELECTION_UNGROUPENTITY ); create_menu_item_with_mnemonic( menu, _( "Make detail" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_MAKE_DETAIL ); + G_CALLBACK( HandleCommand ), ID_SELECTION_MAKE_DETAIL ); create_menu_item_with_mnemonic( menu, _( "Make structural" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_MAKE_STRUCTURAL ); + G_CALLBACK( HandleCommand ), ID_SELECTION_MAKE_STRUCTURAL ); // BSP menu menu = create_sub_menu_with_mnemonic( menu_bar, _( "_Bsp" ) ); @@ -1274,41 +1274,41 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ } item = create_radio_menu_item_with_mnemonic( menu, NULL, _( "Grid0.25" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_025, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_025, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_025", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid0.5" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_05, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_05, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_05", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid1" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_1, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_1, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_1", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid2" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_2, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_2, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_2", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid4" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_4, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_4, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_4", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid8" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_8, TRUE ); + G_CALLBACK( HandleCommand ), ID_GRID_8, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_grid_8", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid16" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_16, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_16, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_16", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid32" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_32, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_32, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_32", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid64" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_64, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_64, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_64", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid128" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_128, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_128, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_128", item ); item = create_radio_menu_item_with_mnemonic( menu, item, _( "Grid256" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_256, FALSE ); + G_CALLBACK( HandleCommand ), ID_GRID_256, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_grid_256", item ); menu_separator( menu ); item = create_check_menu_item_with_mnemonic( menu, _( "Snap to grid" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_SNAPTOGRID, TRUE ); + G_CALLBACK( HandleCommand ), ID_SNAPTOGRID, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_snaptogrid", item ); // Textures menu @@ -1318,83 +1318,83 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ } item = create_check_menu_item_with_mnemonic( menu, _( "Show In _Use" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_SHOWINUSE, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_SHOWINUSE, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_showinuse", item ); item = create_check_menu_item_with_mnemonic( menu, _( "Show _All" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_SHOWALL, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_SHOWALL, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_showall", item ); menu_separator( menu ); item = create_check_menu_item_with_mnemonic( menu, _( "Show shaders" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_SHADERS_SHOW, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_SHADERS_SHOW, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_shaders_show", item ); item = create_menu_item_with_mnemonic( menu, _( "Flush & Reload Shaders" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_RELOADSHADERS ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_RELOADSHADERS ); g_object_set_data( G_OBJECT( window ), "menu_textures_reloadshaders", item ); item = create_menu_item_with_mnemonic( menu, _( "Load directory..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_LOAD ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_LOAD ); g_object_set_data( G_OBJECT( window ), "menu_textures_load", item ); item = create_menu_item_with_mnemonic( menu, _( "Directory list..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_LOADLIST ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_LOADLIST ); menu_separator( menu ); item = create_menu_item_with_mnemonic( menu, _( "_Surface Inspector" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_INSPECTOR ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_INSPECTOR ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Render Quality" ) ); g_object_set_data( G_OBJECT( window ), "render_quality_menu", menu_in_menu ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, NULL, _( "_Wireframe" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_WIREFRAME, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_WIREFRAME, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_wireframe", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "_Flat shade" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_FLATSHADE, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_FLATSHADE, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_flatshade", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "_Nearest" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_NEAREST, FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_NEAREST, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_nearest", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "Nearest _Mipmap" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_NEARESTMIPMAP, FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_NEARESTMIPMAP, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_nearestmipmap", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "_Linear" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_LINEAR, FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_LINEAR, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_linear", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "_Bilinear" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_BILINEAR, FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_BILINEAR, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_bilinear", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "B_ilinear Mipmap" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_BILINEARMIPMAP, FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_BILINEARMIPMAP, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_bilinearmipmap", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "T_rilinear" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_TRILINEAR, FALSE ); + G_CALLBACK( HandleCommand ), ID_VIEW_TRILINEAR, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_view_trilinear", item ); create_menu_item_with_mnemonic( menu, _( "Find / Replace..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURE_REPLACEALL ); + G_CALLBACK( HandleCommand ), ID_TEXTURE_REPLACEALL ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Texture Lock" ) ); item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Moves" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TOGGLE_LOCK, TRUE ); + G_CALLBACK( HandleCommand ), ID_TOGGLE_LOCK, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_toggle_lock", item ); item = create_check_menu_item_with_mnemonic( menu_in_menu, _( "Rotations" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TOGGLE_ROTATELOCK, TRUE ); + G_CALLBACK( HandleCommand ), ID_TOGGLE_ROTATELOCK, TRUE ); g_object_set_data( G_OBJECT( window ), "menu_toggle_rotatelock", item ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Texture Window Scale" ) ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, NULL, _( "200%" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_200, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_200, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_texturewindowscale_200", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "100%" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_100, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_100, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_texturewindowscale_100", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "50%" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_50, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_50, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_texturewindowscale_50", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "25%" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_25, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_25, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_texturewindowscale_25", item ); item = create_radio_menu_item_with_mnemonic( menu_in_menu, item, _( "10%" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_10, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_TEXTUREWINDOWSCALE_10, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_texturewindowscale_10", item ); item = menu_separator( menu ); item = create_check_menu_item_with_mnemonic( menu, _( "shaderlist.txt only" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTURES_SHADERLISTONLY, FALSE ); + G_CALLBACK( HandleCommand ), ID_TEXTURES_SHADERLISTONLY, FALSE ); g_object_set_data( G_OBJECT( window ), "menu_textures_shaderlistonly", item ); item = menu_separator( menu ); g_object_set_data( G_OBJECT( window ), "menu_textures_separator", item ); @@ -1406,57 +1406,57 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ menu_tearoff( menu ); } - create_menu_item_with_mnemonic( menu, _( "_Benchmark" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_BENCHMARK ); + create_menu_item_with_mnemonic( menu, _( "_Benchmark" ), G_CALLBACK( HandleCommand ), ID_MISC_BENCHMARK ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Colors" ) ); menu_3 = create_menu_in_menu_with_mnemonic( menu_in_menu, _( "Themes" ) ); - create_menu_item_with_mnemonic( menu_3, _( "QE4 Original" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_COLOR_SETORIGINAL ); - create_menu_item_with_mnemonic( menu_3, _( "Q3Radiant Original" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_COLOR_SETQER ); - create_menu_item_with_mnemonic( menu_3, _( "Black and Green" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_COLOR_SETBLACK ); - create_menu_item_with_mnemonic( menu_3, _( "Maya/Max/Lightwave Emulation" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_COLOR_SETYDNAR ); + create_menu_item_with_mnemonic( menu_3, _( "QE4 Original" ), G_CALLBACK( HandleCommand ), ID_COLOR_SETORIGINAL ); + create_menu_item_with_mnemonic( menu_3, _( "Q3Radiant Original" ), G_CALLBACK( HandleCommand ), ID_COLOR_SETQER ); + create_menu_item_with_mnemonic( menu_3, _( "Black and Green" ), G_CALLBACK( HandleCommand ), ID_COLOR_SETBLACK ); + create_menu_item_with_mnemonic( menu_3, _( "Maya/Max/Lightwave Emulation" ), G_CALLBACK( HandleCommand ), ID_COLOR_SETYDNAR ); menu_separator( menu_in_menu ); create_menu_item_with_mnemonic( menu_in_menu, _( "_Texture Background..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTUREBK ); + G_CALLBACK( HandleCommand ), ID_TEXTUREBK ); create_menu_item_with_mnemonic( menu_in_menu, _( "Grid Background..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_XYBK ); + G_CALLBACK( HandleCommand ), ID_COLORS_XYBK ); create_menu_item_with_mnemonic( menu_in_menu, _( "Grid Major..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_MAJOR ); + G_CALLBACK( HandleCommand ), ID_COLORS_MAJOR ); create_menu_item_with_mnemonic( menu_in_menu, _( "Grid Minor..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_MINOR ); + G_CALLBACK( HandleCommand ), ID_COLORS_MINOR ); create_menu_item_with_mnemonic( menu_in_menu, _( "Grid Major Small..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_MAJOR_ALT ); + G_CALLBACK( HandleCommand ), ID_COLORS_MAJOR_ALT ); create_menu_item_with_mnemonic( menu_in_menu, _( "Grid Minor Small..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_MINOR_ALT ); + G_CALLBACK( HandleCommand ), ID_COLORS_MINOR_ALT ); create_menu_item_with_mnemonic( menu_in_menu, _( "Grid Text..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_GRIDTEXT ); + G_CALLBACK( HandleCommand ), ID_COLORS_GRIDTEXT ); create_menu_item_with_mnemonic( menu_in_menu, _( "Grid Block..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_GRIDBLOCK ); + G_CALLBACK( HandleCommand ), ID_COLORS_GRIDBLOCK ); create_menu_item_with_mnemonic( menu_in_menu, _( "Default Brush..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_BRUSH ); + G_CALLBACK( HandleCommand ), ID_COLORS_BRUSH ); create_menu_item_with_mnemonic( menu_in_menu, _( "Camera Background..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_CAMERABACK ); + G_CALLBACK( HandleCommand ), ID_COLORS_CAMERABACK ); create_menu_item_with_mnemonic( menu_in_menu, _( "Selected Brush..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_SELECTEDBRUSH ); + G_CALLBACK( HandleCommand ), ID_COLORS_SELECTEDBRUSH ); create_menu_item_with_mnemonic( menu_in_menu, _( "Selected Brush (Camera)..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_SELECTEDBRUSH3D ); + G_CALLBACK( HandleCommand ), ID_COLORS_SELECTEDBRUSH3D ); create_menu_item_with_mnemonic( menu_in_menu, _( "Clipper..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_CLIPPER ); + G_CALLBACK( HandleCommand ), ID_COLORS_CLIPPER ); create_menu_item_with_mnemonic( menu_in_menu, _( "Active View name..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_VIEWNAME ); + G_CALLBACK( HandleCommand ), ID_COLORS_VIEWNAME ); create_menu_item_with_mnemonic( menu_in_menu, _( "Detail Brush..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_DETAIL ); + G_CALLBACK( HandleCommand ), ID_COLORS_DETAIL ); create_menu_item_with_mnemonic( menu, _( "_Gamma..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_GAMMA ); + G_CALLBACK( HandleCommand ), ID_MISC_GAMMA ); create_menu_item_with_mnemonic( menu, _( "Find brush..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_FINDBRUSH ); + G_CALLBACK( HandleCommand ), ID_MISC_FINDBRUSH ); item = create_menu_item_with_mnemonic( menu, _( "Next leak spot" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_NEXTLEAKSPOT ); + G_CALLBACK( HandleCommand ), ID_MISC_NEXTLEAKSPOT ); item = create_menu_item_with_mnemonic( menu, _( "Previous leak spot" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_PREVIOUSLEAKSPOT ); - create_menu_item_with_mnemonic( menu, _( "_Print XY View" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_PRINTXY ); + G_CALLBACK( HandleCommand ), ID_MISC_PREVIOUSLEAKSPOT ); + create_menu_item_with_mnemonic( menu, _( "_Print XY View" ), G_CALLBACK( HandleCommand ), ID_MISC_PRINTXY ); item = create_menu_item_with_mnemonic( menu, _( "_Select Entity Color..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_SELECTENTITYCOLOR ); + G_CALLBACK( HandleCommand ), ID_MISC_SELECTENTITYCOLOR ); g_object_set_data( G_OBJECT( window ), "menu_misc_selectentitycolor", item ); // Region menu @@ -1466,15 +1466,15 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ } create_menu_item_with_mnemonic( menu, _( "_Off" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_REGION_OFF ); + G_CALLBACK( HandleCommand ), ID_REGION_OFF ); create_menu_item_with_mnemonic( menu, _( "_Set XY" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_REGION_SETXY ); + G_CALLBACK( HandleCommand ), ID_REGION_SETXY ); create_menu_item_with_mnemonic( menu, _( "Set _Tall Brush" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_REGION_SETTALLBRUSH ); + G_CALLBACK( HandleCommand ), ID_REGION_SETTALLBRUSH ); create_menu_item_with_mnemonic( menu, _( "Set _Brush" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_REGION_SETBRUSH ); + G_CALLBACK( HandleCommand ), ID_REGION_SETBRUSH ); create_menu_item_with_mnemonic( menu, _( "Set Se_lected Brushes" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_REGION_SETSELECTION ); + G_CALLBACK( HandleCommand ), ID_REGION_SETSELECTION ); // Brush menu menu = create_sub_menu_with_mnemonic( menu_bar, _( "_Brush" ) ); @@ -1482,22 +1482,22 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ menu_tearoff( menu ); } - item = create_menu_item_with_mnemonic( menu, _( "3 sided" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_3SIDED ); - item = create_menu_item_with_mnemonic( menu, _( "4 sided" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_4SIDED ); - item = create_menu_item_with_mnemonic( menu, _( "5 sided" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_5SIDED ); - item = create_menu_item_with_mnemonic( menu, _( "6 sided" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_6SIDED ); - item = create_menu_item_with_mnemonic( menu, _( "7 sided" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_7SIDED ); - item = create_menu_item_with_mnemonic( menu, _( "8 sided" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_8SIDED ); - item = create_menu_item_with_mnemonic( menu, _( "9 sided" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_9SIDED ); + item = create_menu_item_with_mnemonic( menu, _( "3 sided" ), G_CALLBACK( HandleCommand ), ID_BRUSH_3SIDED ); + item = create_menu_item_with_mnemonic( menu, _( "4 sided" ), G_CALLBACK( HandleCommand ), ID_BRUSH_4SIDED ); + item = create_menu_item_with_mnemonic( menu, _( "5 sided" ), G_CALLBACK( HandleCommand ), ID_BRUSH_5SIDED ); + item = create_menu_item_with_mnemonic( menu, _( "6 sided" ), G_CALLBACK( HandleCommand ), ID_BRUSH_6SIDED ); + item = create_menu_item_with_mnemonic( menu, _( "7 sided" ), G_CALLBACK( HandleCommand ), ID_BRUSH_7SIDED ); + item = create_menu_item_with_mnemonic( menu, _( "8 sided" ), G_CALLBACK( HandleCommand ), ID_BRUSH_8SIDED ); + item = create_menu_item_with_mnemonic( menu, _( "9 sided" ), G_CALLBACK( HandleCommand ), ID_BRUSH_9SIDED ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, _( "Arbitrary sided..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_ARBITRARYSIDED ); + G_CALLBACK( HandleCommand ), ID_BRUSH_ARBITRARYSIDED ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Primitives" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Cone..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_MAKECONE ); + G_CALLBACK( HandleCommand ), ID_BRUSH_MAKECONE ); create_menu_item_with_mnemonic( menu_in_menu, _( "Sphere..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_BRUSH_PRIMITIVES_SPHERE ); + G_CALLBACK( HandleCommand ), ID_BRUSH_PRIMITIVES_SPHERE ); // Curve menu if ( !g_pGameDescription->mNoPatch ) { @@ -1506,76 +1506,76 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ menu_tearoff( menu ); } - create_menu_item_with_mnemonic( menu, _( "Cylinder" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_PATCHTUBE ); + create_menu_item_with_mnemonic( menu, _( "Cylinder" ), G_CALLBACK( HandleCommand ), ID_CURVE_PATCHTUBE ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "More Cylinders" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Dense Cylinder" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_PATCHDENSETUBE ); + G_CALLBACK( HandleCommand ), ID_CURVE_PATCHDENSETUBE ); create_menu_item_with_mnemonic( menu_in_menu, _( "Very Dense Cylinder" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_PATCHVERYDENSETUBE ); + G_CALLBACK( HandleCommand ), ID_CURVE_PATCHVERYDENSETUBE ); create_menu_item_with_mnemonic( menu_in_menu, _( "Square Cylinder" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_PATCHSQUARE ); + G_CALLBACK( HandleCommand ), ID_CURVE_PATCHSQUARE ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, _( "End cap" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_PATCHENDCAP ); - create_menu_item_with_mnemonic( menu, _( "Bevel" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_PATCHBEVEL ); + create_menu_item_with_mnemonic( menu, _( "End cap" ), G_CALLBACK( HandleCommand ), ID_CURVE_PATCHENDCAP ); + create_menu_item_with_mnemonic( menu, _( "Bevel" ), G_CALLBACK( HandleCommand ), ID_CURVE_PATCHBEVEL ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "More End caps, Bevels" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Square Endcap" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_MOREENDCAPSBEVELS_SQUAREBEVEL ); + G_CALLBACK( HandleCommand ), ID_CURVE_MOREENDCAPSBEVELS_SQUAREBEVEL ); create_menu_item_with_mnemonic( menu_in_menu, _( "Square Bevel" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_MOREENDCAPSBEVELS_SQUAREENDCAP ); + G_CALLBACK( HandleCommand ), ID_CURVE_MOREENDCAPSBEVELS_SQUAREENDCAP ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, _( "Cone" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_PATCHCONE ); + create_menu_item_with_mnemonic( menu, _( "Cone" ), G_CALLBACK( HandleCommand ), ID_CURVE_PATCHCONE ); item = create_menu_item_with_mnemonic( menu, _( "Sphere" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_PRIMITIVES_SPHERE ); + G_CALLBACK( HandleCommand ), ID_CURVE_PRIMITIVES_SPHERE ); gtk_widget_set_sensitive( item, FALSE ); menu_separator( menu ); item = create_menu_item_with_mnemonic( menu, _( "Simple Patch Mesh..." ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_SIMPLEPATCHMESH ); + G_CALLBACK( HandleCommand ), ID_CURVE_SIMPLEPATCHMESH ); g_object_set_data( G_OBJECT( window ), "menu_simplepatchmesh", item ); - create_menu_item_with_mnemonic( menu, _( "Patch Inspector" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_PATCH_INSPECTOR ); + create_menu_item_with_mnemonic( menu, _( "Patch Inspector" ), G_CALLBACK( HandleCommand ), ID_PATCH_INSPECTOR ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Insert" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Insert (2) Columns" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_INSERT_INSERTCOLUMN ); + G_CALLBACK( HandleCommand ), ID_CURVE_INSERT_INSERTCOLUMN ); create_menu_item_with_mnemonic( menu_in_menu, _( "Add (2) Columns" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_INSERT_ADDCOLUMN ); + G_CALLBACK( HandleCommand ), ID_CURVE_INSERT_ADDCOLUMN ); menu_separator( menu_in_menu ); create_menu_item_with_mnemonic( menu_in_menu, _( "Insert (2) Rows" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_INSERT_INSERTROW ); + G_CALLBACK( HandleCommand ), ID_CURVE_INSERT_INSERTROW ); create_menu_item_with_mnemonic( menu_in_menu, _( "Add (2) Rows" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_INSERT_ADDROW ); + G_CALLBACK( HandleCommand ), ID_CURVE_INSERT_ADDROW ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Delete" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "First (2) Columns" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_DELETE_FIRSTCOLUMN ); + G_CALLBACK( HandleCommand ), ID_CURVE_DELETE_FIRSTCOLUMN ); create_menu_item_with_mnemonic( menu_in_menu, _( "Last (2) Columns" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_DELETE_LASTCOLUMN ); + G_CALLBACK( HandleCommand ), ID_CURVE_DELETE_LASTCOLUMN ); menu_separator( menu_in_menu ); create_menu_item_with_mnemonic( menu_in_menu, _( "First (2) Rows" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_DELETE_FIRSTROW ); + G_CALLBACK( HandleCommand ), ID_CURVE_DELETE_FIRSTROW ); create_menu_item_with_mnemonic( menu_in_menu, _( "Last (2) Rows" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_DELETE_LASTROW ); + G_CALLBACK( HandleCommand ), ID_CURVE_DELETE_LASTROW ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Matrix" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Invert" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_NEGATIVE ); + G_CALLBACK( HandleCommand ), ID_CURVE_NEGATIVE ); menu_3 = create_menu_in_menu_with_mnemonic( menu_in_menu, _( "Re-disperse" ) ); - create_menu_item_with_mnemonic( menu_3, _( "Rows" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_REDISPERSE_ROWS ); - create_menu_item_with_mnemonic( menu_3, _( "Cols (Intermediate)" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_REDISPERSE_INTERMEDIATE_COLS ); - create_menu_item_with_mnemonic( menu_3, _( "Rows (Intermediate)" ), GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_REDISPERSE_INTERMEDIATE_ROWS ); + create_menu_item_with_mnemonic( menu_3, _( "Rows" ), G_CALLBACK( HandleCommand ), ID_CURVE_REDISPERSE_ROWS ); + create_menu_item_with_mnemonic( menu_3, _( "Cols (Intermediate)" ), G_CALLBACK( HandleCommand ), ID_CURVE_REDISPERSE_INTERMEDIATE_COLS ); + create_menu_item_with_mnemonic( menu_3, _( "Rows (Intermediate)" ), G_CALLBACK( HandleCommand ), ID_CURVE_REDISPERSE_INTERMEDIATE_ROWS ); create_menu_item_with_mnemonic( menu_in_menu, _( "Transpose" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_MATRIX_TRANSPOSE ); + G_CALLBACK( HandleCommand ), ID_CURVE_MATRIX_TRANSPOSE ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, _( "Cap Selection" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_CAP ); + G_CALLBACK( HandleCommand ), ID_CURVE_CAP ); create_menu_item_with_mnemonic( menu, _( "Cycle Cap Texture" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_CYCLECAP ); + G_CALLBACK( HandleCommand ), ID_CURVE_CYCLECAP ); menu_separator( menu ); menu_in_menu = create_menu_in_menu_with_mnemonic( menu, _( "Overlay" ) ); create_menu_item_with_mnemonic( menu_in_menu, _( "Set" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_OVERLAY_SET ); + G_CALLBACK( HandleCommand ), ID_CURVE_OVERLAY_SET ); create_menu_item_with_mnemonic( menu_in_menu, _( "Clear" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_OVERLAY_CLEAR ); + G_CALLBACK( HandleCommand ), ID_CURVE_OVERLAY_CLEAR ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, _( "Thicken..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_THICKEN ); + create_menu_item_with_mnemonic( menu, _( "Thicken..." ), G_CALLBACK( HandleCommand ), ID_CURVE_THICKEN ); } // Plugins menu menu = create_sub_menu_with_mnemonic( menu_bar, _( "_Plugins" ) ); @@ -1584,7 +1584,7 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ } /* - create_menu_item_with_mnemonic (menu, "Refresh", GTK_SIGNAL_FUNC (HandleCommand), ID_PLUGINS_REFRESH); + create_menu_item_with_mnemonic (menu, "Refresh", G_CALLBACK (HandleCommand), ID_PLUGINS_REFRESH); */ // NOTE: the seperator is used when doing a refresh of the list, everything past the seperator is removed item = menu_separator( menu ); @@ -1598,7 +1598,7 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ } item = create_menu_item_with_mnemonic( menu, _( "GtkRadiant Manual" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_HELP ); + G_CALLBACK( HandleCommand ), ID_HELP ); // does not work, using g_Commands for the key binding //gtk_widget_add_accelerator( item, "activate", accel, GDK_F1, (GdkModifierType)0, GTK_ACCEL_VISIBLE ); @@ -1608,13 +1608,13 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ // TTimo: this is in global.xlink now //create_menu_item_with_mnemonic (menu, "Links", - // GTK_SIGNAL_FUNC (HandleCommand), ID_HELP_LINKS); + // G_CALLBACK (HandleCommand), ID_HELP_LINKS); create_menu_item_with_mnemonic( menu, _( "Report a Bug" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_HELP_BUGREPORT ); + G_CALLBACK( HandleCommand ), ID_HELP_BUGREPORT ); create_menu_item_with_mnemonic( menu, _( "View Shortcuts" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_HELP_COMMANDLIST ); + G_CALLBACK( HandleCommand ), ID_HELP_COMMANDLIST ); create_menu_item_with_mnemonic( menu, _( "_About GtkRadiant" ), - GTK_SIGNAL_FUNC( HandleCommand ), ID_HELP_ABOUT ); + G_CALLBACK( HandleCommand ), ID_HELP_ABOUT ); // leo: Hidden menu to make the accelerators work, @@ -1628,57 +1628,57 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ gtk_widget_hide( gtk_menu_get_attach_widget( GTK_MENU( menu ) ) ); - create_menu_item_with_mnemonic( menu, "BendMode", GTK_SIGNAL_FUNC( HandleCommand ), ID_PATCH_BEND ); - create_menu_item_with_mnemonic( menu, "FitTexture", GTK_SIGNAL_FUNC( HandleCommand ), IDC_BTN_FACEFIT ); - create_menu_item_with_mnemonic( menu, "ViewTextures", GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_TEXTURE ); - create_menu_item_with_mnemonic( menu, "InvertCurveTextureX", GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_NEGATIVETEXTUREY ); - create_menu_item_with_mnemonic( menu, "InvertCurveTextureY", GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_NEGATIVETEXTUREX ); - create_menu_item_with_mnemonic( menu, "IncPatchColumn", GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_INSERTCOLUMN ); - create_menu_item_with_mnemonic( menu, "IncPatchRow", GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_INSERTROW ); - create_menu_item_with_mnemonic( menu, "DecPatchColumn", GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_DELETECOLUMN ); - create_menu_item_with_mnemonic( menu, "DecPatchRow", GTK_SIGNAL_FUNC( HandleCommand ), ID_CURVE_DELETEROW ); - create_menu_item_with_mnemonic( menu, "Patch TAB", GTK_SIGNAL_FUNC( HandleCommand ), ID_PATCH_TAB ); - create_menu_item_with_mnemonic( menu, "Patch TAB", GTK_SIGNAL_FUNC( HandleCommand ), ID_PATCH_TAB ); - create_menu_item_with_mnemonic( menu, "SelectNudgeDown", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECT_NUDGEDOWN ); - create_menu_item_with_mnemonic( menu, "CameraForward", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_FORWARD ); - create_menu_item_with_mnemonic( menu, "CameraBack", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_BACK ); - create_menu_item_with_mnemonic( menu, "CameraLeft", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_LEFT ); - create_menu_item_with_mnemonic( menu, "CameraRight", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_RIGHT ); - create_menu_item_with_mnemonic( menu, "CameraUp", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_UP ); - create_menu_item_with_mnemonic( menu, "CameraDown", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_DOWN ); - create_menu_item_with_mnemonic( menu, "CameraAngleUp", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_ANGLEUP ); - create_menu_item_with_mnemonic( menu, "CameraAngleDown", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_ANGLEDOWN ); - create_menu_item_with_mnemonic( menu, "CameraStrafeRight", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_STRAFERIGHT ); - create_menu_item_with_mnemonic( menu, "CameraStrafeLeft", GTK_SIGNAL_FUNC( HandleCommand ), ID_CAMERA_STRAFELEFT ); - create_menu_item_with_mnemonic( menu, "ToggleGrid", GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_TOGGLE ); - create_menu_item_with_mnemonic( menu, "ToggleCrosshairs", GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_CROSSHAIR ); - create_menu_item_with_mnemonic( menu, "ToggleRealtime", GTK_SIGNAL_FUNC( HandleCommand ), ID_VIEW_CAMERAUPDATE ); - create_menu_item_with_mnemonic( menu, "MouseRotate", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECT_MOUSEROTATE ); - create_menu_item_with_mnemonic( menu, "TexRotateClock", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_ROTATECLOCK ); - create_menu_item_with_mnemonic( menu, "TexRotateCounter", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_ROTATECOUNTER ); - create_menu_item_with_mnemonic( menu, "TexScaleUp", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_SCALEUP ); - create_menu_item_with_mnemonic( menu, "TexScaleDown", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_SCALEDOWN ); - create_menu_item_with_mnemonic( menu, "TexShiftLeft", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_SHIFTLEFT ); - create_menu_item_with_mnemonic( menu, "TexShiftRight", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_SHIFTRIGHT ); - create_menu_item_with_mnemonic( menu, "TexShiftUp", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_SHIFTUP ); - create_menu_item_with_mnemonic( menu, "TexShiftDown", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_SHIFTDOWN ); - create_menu_item_with_mnemonic( menu, "GridDown", GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_PREV ); - create_menu_item_with_mnemonic( menu, "GridUp", GTK_SIGNAL_FUNC( HandleCommand ), ID_GRID_NEXT ); - create_menu_item_with_mnemonic( menu, "TexScaleLeft", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_SCALELEFT ); - create_menu_item_with_mnemonic( menu, "TexScaleRight", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TEXTURE_SCALERIGHT ); - create_menu_item_with_mnemonic( menu, "MoveSelectionDOWN", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_MOVEDOWN ); - create_menu_item_with_mnemonic( menu, "MoveSelectionUP", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_MOVEUP ); - create_menu_item_with_mnemonic( menu, "DumpSelectedBrush", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_PRINT ); - create_menu_item_with_mnemonic( menu, "ToggleSizePaint", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_TOGGLESIZEPAINT ); - create_menu_item_with_mnemonic( menu, "SelectNudgeLeft", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECT_NUDGELEFT ); - create_menu_item_with_mnemonic( menu, "SelectNudgeRight", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECT_NUDGERIGHT ); - create_menu_item_with_mnemonic( menu, "SelectNudgeUp", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECT_NUDGEUP ); - create_menu_item_with_mnemonic( menu, "NaturalizePatch", GTK_SIGNAL_FUNC( HandleCommand ), ID_PATCH_NATURALIZE ); - create_menu_item_with_mnemonic( menu, "SnapPatchToGrid", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECT_SNAPTOGRID ); - create_menu_item_with_mnemonic( menu, "SelectAllOfType", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECT_ALL ); - create_menu_item_with_mnemonic( menu, "CycleOutlineStyle", GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_OUTLINESTYLE ); - create_menu_item_with_mnemonic( menu, "TextureWindowScaleup", GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTUREWINDOW_SCALEUP ); - create_menu_item_with_mnemonic( menu, "TextureWindowScaledown", GTK_SIGNAL_FUNC( HandleCommand ), ID_TEXTUREWINDOW_SCALEDOWN ); + create_menu_item_with_mnemonic( menu, "BendMode", G_CALLBACK( HandleCommand ), ID_PATCH_BEND ); + create_menu_item_with_mnemonic( menu, "FitTexture", G_CALLBACK( HandleCommand ), IDC_BTN_FACEFIT ); + create_menu_item_with_mnemonic( menu, "ViewTextures", G_CALLBACK( HandleCommand ), ID_VIEW_TEXTURE ); + create_menu_item_with_mnemonic( menu, "InvertCurveTextureX", G_CALLBACK( HandleCommand ), ID_CURVE_NEGATIVETEXTUREY ); + create_menu_item_with_mnemonic( menu, "InvertCurveTextureY", G_CALLBACK( HandleCommand ), ID_CURVE_NEGATIVETEXTUREX ); + create_menu_item_with_mnemonic( menu, "IncPatchColumn", G_CALLBACK( HandleCommand ), ID_CURVE_INSERTCOLUMN ); + create_menu_item_with_mnemonic( menu, "IncPatchRow", G_CALLBACK( HandleCommand ), ID_CURVE_INSERTROW ); + create_menu_item_with_mnemonic( menu, "DecPatchColumn", G_CALLBACK( HandleCommand ), ID_CURVE_DELETECOLUMN ); + create_menu_item_with_mnemonic( menu, "DecPatchRow", G_CALLBACK( HandleCommand ), ID_CURVE_DELETEROW ); + create_menu_item_with_mnemonic( menu, "Patch TAB", G_CALLBACK( HandleCommand ), ID_PATCH_TAB ); + create_menu_item_with_mnemonic( menu, "Patch TAB", G_CALLBACK( HandleCommand ), ID_PATCH_TAB ); + create_menu_item_with_mnemonic( menu, "SelectNudgeDown", G_CALLBACK( HandleCommand ), ID_SELECTION_SELECT_NUDGEDOWN ); + create_menu_item_with_mnemonic( menu, "CameraForward", G_CALLBACK( HandleCommand ), ID_CAMERA_FORWARD ); + create_menu_item_with_mnemonic( menu, "CameraBack", G_CALLBACK( HandleCommand ), ID_CAMERA_BACK ); + create_menu_item_with_mnemonic( menu, "CameraLeft", G_CALLBACK( HandleCommand ), ID_CAMERA_LEFT ); + create_menu_item_with_mnemonic( menu, "CameraRight", G_CALLBACK( HandleCommand ), ID_CAMERA_RIGHT ); + create_menu_item_with_mnemonic( menu, "CameraUp", G_CALLBACK( HandleCommand ), ID_CAMERA_UP ); + create_menu_item_with_mnemonic( menu, "CameraDown", G_CALLBACK( HandleCommand ), ID_CAMERA_DOWN ); + create_menu_item_with_mnemonic( menu, "CameraAngleUp", G_CALLBACK( HandleCommand ), ID_CAMERA_ANGLEUP ); + create_menu_item_with_mnemonic( menu, "CameraAngleDown", G_CALLBACK( HandleCommand ), ID_CAMERA_ANGLEDOWN ); + create_menu_item_with_mnemonic( menu, "CameraStrafeRight", G_CALLBACK( HandleCommand ), ID_CAMERA_STRAFERIGHT ); + create_menu_item_with_mnemonic( menu, "CameraStrafeLeft", G_CALLBACK( HandleCommand ), ID_CAMERA_STRAFELEFT ); + create_menu_item_with_mnemonic( menu, "ToggleGrid", G_CALLBACK( HandleCommand ), ID_GRID_TOGGLE ); + create_menu_item_with_mnemonic( menu, "ToggleCrosshairs", G_CALLBACK( HandleCommand ), ID_VIEW_CROSSHAIR ); + create_menu_item_with_mnemonic( menu, "ToggleRealtime", G_CALLBACK( HandleCommand ), ID_VIEW_CAMERAUPDATE ); + create_menu_item_with_mnemonic( menu, "MouseRotate", G_CALLBACK( HandleCommand ), ID_SELECT_MOUSEROTATE ); + create_menu_item_with_mnemonic( menu, "TexRotateClock", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_ROTATECLOCK ); + create_menu_item_with_mnemonic( menu, "TexRotateCounter", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_ROTATECOUNTER ); + create_menu_item_with_mnemonic( menu, "TexScaleUp", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_SCALEUP ); + create_menu_item_with_mnemonic( menu, "TexScaleDown", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_SCALEDOWN ); + create_menu_item_with_mnemonic( menu, "TexShiftLeft", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_SHIFTLEFT ); + create_menu_item_with_mnemonic( menu, "TexShiftRight", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_SHIFTRIGHT ); + create_menu_item_with_mnemonic( menu, "TexShiftUp", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_SHIFTUP ); + create_menu_item_with_mnemonic( menu, "TexShiftDown", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_SHIFTDOWN ); + create_menu_item_with_mnemonic( menu, "GridDown", G_CALLBACK( HandleCommand ), ID_GRID_PREV ); + create_menu_item_with_mnemonic( menu, "GridUp", G_CALLBACK( HandleCommand ), ID_GRID_NEXT ); + create_menu_item_with_mnemonic( menu, "TexScaleLeft", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_SCALELEFT ); + create_menu_item_with_mnemonic( menu, "TexScaleRight", G_CALLBACK( HandleCommand ), ID_SELECTION_TEXTURE_SCALERIGHT ); + create_menu_item_with_mnemonic( menu, "MoveSelectionDOWN", G_CALLBACK( HandleCommand ), ID_SELECTION_MOVEDOWN ); + create_menu_item_with_mnemonic( menu, "MoveSelectionUP", G_CALLBACK( HandleCommand ), ID_SELECTION_MOVEUP ); + create_menu_item_with_mnemonic( menu, "DumpSelectedBrush", G_CALLBACK( HandleCommand ), ID_SELECTION_PRINT ); + create_menu_item_with_mnemonic( menu, "ToggleSizePaint", G_CALLBACK( HandleCommand ), ID_SELECTION_TOGGLESIZEPAINT ); + create_menu_item_with_mnemonic( menu, "SelectNudgeLeft", G_CALLBACK( HandleCommand ), ID_SELECTION_SELECT_NUDGELEFT ); + create_menu_item_with_mnemonic( menu, "SelectNudgeRight", G_CALLBACK( HandleCommand ), ID_SELECTION_SELECT_NUDGERIGHT ); + create_menu_item_with_mnemonic( menu, "SelectNudgeUp", G_CALLBACK( HandleCommand ), ID_SELECTION_SELECT_NUDGEUP ); + create_menu_item_with_mnemonic( menu, "NaturalizePatch", G_CALLBACK( HandleCommand ), ID_PATCH_NATURALIZE ); + create_menu_item_with_mnemonic( menu, "SnapPatchToGrid", G_CALLBACK( HandleCommand ), ID_SELECT_SNAPTOGRID ); + create_menu_item_with_mnemonic( menu, "SelectAllOfType", G_CALLBACK( HandleCommand ), ID_SELECT_ALL ); + create_menu_item_with_mnemonic( menu, "CycleOutlineStyle", G_CALLBACK( HandleCommand ), ID_SELECTION_OUTLINESTYLE ); + create_menu_item_with_mnemonic( menu, "TextureWindowScaleup", G_CALLBACK( HandleCommand ), ID_TEXTUREWINDOW_SCALEUP ); + create_menu_item_with_mnemonic( menu, "TextureWindowScaledown", G_CALLBACK( HandleCommand ), ID_TEXTUREWINDOW_SCALEDOWN ); g_bIgnoreCommands--; } @@ -1700,62 +1700,62 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ gtk_widget_show( toolbar ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), _( "Open" ), _( "Open an existing map" ), "", - new_image_icon("file_open.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("file_open.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_FILE_OPEN ) ); g_object_set_data( G_OBJECT( window ), "tb_file_open", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), _( "Save" ), _( "Save the active map" ), "", - new_image_icon("file_save.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("file_save.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_FILE_SAVE ) ); g_object_set_data( G_OBJECT( window ), "tb_file_save", w ); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "x-axis Flip" ), "", - new_image_icon("brush_flipx.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("brush_flipx.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_BRUSH_FLIPX ) ); g_object_set_data( G_OBJECT( window ), "tb_brush_flipx", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "x-axis Rotate" ), "", - new_image_icon("brush_rotatex.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("brush_rotatex.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_BRUSH_ROTATEX ) ); g_object_set_data( G_OBJECT( window ), "tb_brush_rotatex", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "y-axis Flip" ), "", - new_image_icon("brush_flipy.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("brush_flipy.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_BRUSH_FLIPY ) ); g_object_set_data( G_OBJECT( window ), "tb_brush_flipy", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "y-axis Rotate" ), "", - new_image_icon("brush_rotatey.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("brush_rotatey.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_BRUSH_ROTATEY ) ); g_object_set_data( G_OBJECT( window ), "tb_brush_rotatey", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "z-axis Flip" ), "", - new_image_icon("brush_flipz.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("brush_flipz.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_BRUSH_FLIPZ ) ); g_object_set_data( G_OBJECT( window ), "tb_brush_flipz", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "z-axis Rotate" ), "", - new_image_icon("brush_rotatez.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("brush_rotatez.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_BRUSH_ROTATEZ ) ); g_object_set_data( G_OBJECT( window ), "tb_brush_rotatez", w ); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); if ( g_PrefsDlg.m_bWideToolbar ) { w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Complete Tall" ), "", - new_image_icon("selection_selectcompletetall.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("selection_selectcompletetall.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_SELECTCOMPLETETALL ) ); g_object_set_data( G_OBJECT( window ), "tb_selection_selectcompletetall", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Select Touching" ), "", - new_image_icon("selection_selecttouching.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("selection_selecttouching.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_SELECTTOUCHING ) ); g_object_set_data( G_OBJECT( window ), "tb_selection_selecttouching", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Select Partial Tall" ), "", - new_image_icon("selection_selectpartialtall.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("selection_selectpartialtall.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_SELECTPARTIALTALL ) ); g_object_set_data( G_OBJECT( window ), "tb_selection_selectpartialtall", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Select Inside" ), "", - new_image_icon("selection_selectinside.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("selection_selectinside.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_SELECTINSIDE ) ); g_object_set_data( G_OBJECT( window ), "tb_selection_selectinside", w ); } else { w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Selection" ), "", - new_image_icon("popup_selection.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("popup_selection.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_POPUP_SELECTION ) ); g_object_set_data( G_OBJECT( window ), "tb_popup_selection", w ); } @@ -1763,19 +1763,19 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "CSG Subtract" ), "", new_image_icon("selection_csgsubtract.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_CSGSUBTRACT ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_CSGSUBTRACT ) ); g_object_set_data( G_OBJECT( window ), "tb_selection_csgsubtract", w ); if ( g_PrefsDlg.m_bWideToolbar ) { w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "CSG Merge" ), "", new_image_icon("selection_csgmerge.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_CSGMERGE ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_CSGMERGE ) ); g_object_set_data( G_OBJECT( window ), "tb_selection_csgmerge", w ); } w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Hollow Overlap" ), "", new_image_icon("selection_makehollow.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_MAKEHOLLOW ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_MAKEHOLLOW ) ); g_object_set_data( G_OBJECT( window ), "tb_selection_makehollow", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Hollow Touch" ), "", new_image_icon("selection_makehollow.png"), @@ -1785,19 +1785,19 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ if ( g_PrefsDlg.m_bWideToolbar ) { w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Clipper" ), "", new_image_icon("view_clipper.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CLIPPER ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CLIPPER ) ); g_object_set_data( G_OBJECT( window ), "tb_view_clipper", w ); } w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Make Detail Brushes" ), "", new_image_icon("toggle_struct.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_TOGGLE_DETAIL ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_TOGGLE_DETAIL ) ); g_object_set_data( G_OBJECT( window ), "tb_toggle_detail", w ); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Change views" ), "", - new_image_icon("view_change.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("view_change.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CHANGE ) ); g_object_set_data( G_OBJECT( window ), "tb_view_change", w ); @@ -1806,7 +1806,7 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ } w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Texture view mode" ), "", - new_image_icon("textures_popup.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("textures_popup.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_TEXTURES_POPUP ) ); g_object_set_data( G_OBJECT( window ), "tb_textures_popup", w ); @@ -1814,7 +1814,7 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Cubic clip the camera view" ), "", new_image_icon("view_cubicclipping.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CUBICCLIPPING ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CUBICCLIPPING ) ); g_object_set_data( G_OBJECT( window ), "tb_view_cubicclipping", w ); } @@ -1823,57 +1823,57 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ if ( !g_PrefsDlg.m_bWideToolbar ) { w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Camera preview" ), "", new_image_icon("view_cameratoggle.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CAMERATOGGLE ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CAMERATOGGLE ) ); g_object_set_data( G_OBJECT( window ), "tb_view_cameratoggle", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", "Update Camera", "", - new_image_icon("view_cameraupdate.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("view_cameraupdate.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CAMERAUPDATE ) ); g_object_set_data( G_OBJECT( window ), "tb_view_cameraupdate", w ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Cubic clip the camera view" ), "", new_image_icon("view_cubicclipping.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CUBICCLIPPING ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CUBICCLIPPING ) ); g_object_set_data( G_OBJECT( window ), "tb_view_cubicclipping", w ); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Entity inspector" ), "", new_image_icon("view_entity.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_VIEW_ENTITY ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_ENTITY ) ); g_object_set_data( G_OBJECT( window ), "tb_view_entity", w ); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Clipper" ), "", new_image_icon("view_clipper.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CLIPPER ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CLIPPER ) ); g_object_set_data( G_OBJECT( window ), "tb_view_clipper", w ); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); } w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Free Rotation" ), "", new_image_icon("select_mouserotate.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_SELECT_MOUSEROTATE ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECT_MOUSEROTATE ) ); g_object_set_data( G_OBJECT( window ), "tb_select_mouserotate", w ); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Free Scaling" ), "", new_image_icon("select_mousescale.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_SELECT_MOUSESCALE ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECT_MOUSESCALE ) ); g_object_set_data( G_OBJECT( window ), "tb_select_mousescale", w ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Disable Scaling Along X" ), "", new_image_icon("scalelockx.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_SCALELOCKX ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SCALELOCKX ) ); g_object_set_data( G_OBJECT( window ), "tb_scalelockx", w ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Disable Scaling Along Y" ), "", new_image_icon("scalelocky.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_SCALELOCKY ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SCALELOCKY ) ); g_object_set_data( G_OBJECT( window ), "tb_scalelocky", w ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Disable Scaling Along Z" ), "", new_image_icon("scalelockz.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_SCALELOCKZ ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SCALELOCKZ ) ); g_object_set_data( G_OBJECT( window ), "tb_scalelockz", w ); if ( g_PrefsDlg.m_bWideToolbar ) { gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Don't select model brushes" ), "", - new_image_icon("dontselectmodel.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("dontselectmodel.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_DONTSELECTMODEL ) ); gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); g_object_set_data( G_OBJECT( window ), "tb_dontselectmodel", w ); @@ -1881,7 +1881,7 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ if ( !g_pGameDescription->mNoPatch ) { w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Don't select curved brushes" ), "", - new_image_icon("dontselectcurve.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("dontselectcurve.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_DONTSELECTCURVE ) ); g_object_set_data( G_OBJECT( window ), "tb_dontselectcurve", w ); } @@ -1892,30 +1892,30 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Show patch bounding box" ), "", new_image_icon("patch_showboundingbox.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_PATCH_SHOWBOUNDINGBOX ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_PATCH_SHOWBOUNDINGBOX ) ); g_object_set_data( G_OBJECT( window ), "tb_patch_showboundingbox", w ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Show patches as wireframes" ), "", new_image_icon("patch_wireframe.png"), - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( ID_PATCH_WIREFRAME ) ); + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_PATCH_WIREFRAME ) ); g_object_set_data( G_OBJECT( window ), "tb_patch_wireframe", w ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Patch Bend mode" ), "", - new_image_icon("patch_bend.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("patch_bend.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_PATCH_BEND ) ); g_object_set_data( G_OBJECT( window ), "tb_patch_bend", w ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Put caps on the current patch" ), "", - new_image_icon("curve_cap.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("curve_cap.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_CURVE_CAP ) ); g_object_set_data( G_OBJECT( window ), "tb_curve_cap", w ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Welds equal patch points during moves" ), "", - new_image_icon("patch_weld.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("patch_weld.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_PATCH_WELD ) ); g_object_set_data( G_OBJECT( window ), "tb_patch_weld", w ); w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, "", _( "Selects drill down rows and columns" ), "", - new_image_icon("patch_drilldown.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("patch_drilldown.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_PATCH_DRILLDOWN ) ); g_object_set_data( G_OBJECT( window ), "tb_patch_drilldown", w ); } @@ -1923,7 +1923,7 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ if ( g_PrefsDlg.m_bWideToolbar ) { gtk_toolbar_append_space( GTK_TOOLBAR( toolbar ) ); w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Show Entities as" ), "", - new_image_icon("show_entities.png"), GTK_SIGNAL_FUNC( HandleCommand ), + new_image_icon("show_entities.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SHOW_ENTITIES ) ); g_object_set_data( G_OBJECT( window ), "tb_show_entities", w ); } @@ -1973,7 +1973,7 @@ void MainFrame::create_main_statusbar( GtkWidget *window, GtkWidget *vbox ){ hbox = gtk_hbox_new( FALSE, 0 ); gtk_widget_show( hbox ); gtk_widget_set_usize( hbox, -1, 24 ); - gtk_container_border_width( GTK_CONTAINER( hbox ), 1 ); + gtk_container_set_border_width( GTK_CONTAINER( hbox ), 1 ); gtk_box_pack_end( GTK_BOX( vbox ), hbox, FALSE, TRUE, 2 ); frame = gtk_frame_new( (char*)NULL ); @@ -1983,7 +1983,7 @@ void MainFrame::create_main_statusbar( GtkWidget *window, GtkWidget *vbox ){ hbox1 = gtk_hbox_new( FALSE, 0 ); gtk_container_add( GTK_CONTAINER( frame ), hbox1 ); - gtk_container_border_width( GTK_CONTAINER( hbox1 ), 0 ); + gtk_container_set_border_width( GTK_CONTAINER( hbox1 ), 0 ); gtk_widget_show( hbox1 ); label = gtk_label_new( _( " Label " ) ); @@ -2043,7 +2043,7 @@ static void mainframe_map( GtkWidget *widget ){ } inline void CHECK_MINIMIZE( GtkWidget* w ){ - g_object_set_data( G_OBJECT( w ), "was_mapped", (void*)( GTK_WIDGET_VISIBLE( w ) != 0 ) ); + g_object_set_data( G_OBJECT( w ), "was_mapped", (void*)( gtk_widget_get_visible( w ) != 0 ) ); gtk_widget_hide( w ); } @@ -2076,14 +2076,14 @@ static GtkWidget* create_floating( MainFrame* mainframe ){ if (mainframe->CurrentStyle() != MainFrame::eFloating) gtk_window_set_transient_for( GTK_WINDOW( wnd ), GTK_WINDOW( mainframe->m_pWidget ) ); gtk_widget_set_events( wnd, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK ); - gtk_signal_connect( GTK_OBJECT( wnd ), "delete-event", GTK_SIGNAL_FUNC( widget_delete_hide ), NULL ); - gtk_signal_connect( GTK_OBJECT( wnd ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL ); - gtk_signal_connect( GTK_OBJECT( wnd ), "key-press-event", - GTK_SIGNAL_FUNC( mainframe_keypress ), mainframe ); - gtk_signal_connect( GTK_OBJECT( wnd ), "key-release-event", - GTK_SIGNAL_FUNC( mainframe_keyrelease ), mainframe ); - gtk_signal_connect( GTK_OBJECT( wnd ), "map-event", - GTK_SIGNAL_FUNC( mainframe_map ), mainframe ); + g_signal_connect( G_OBJECT( wnd ), "delete-event", G_CALLBACK( widget_delete_hide ), NULL ); + g_signal_connect( G_OBJECT( wnd ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); + g_signal_connect( G_OBJECT( wnd ), "key-press-event", + G_CALLBACK( mainframe_keypress ), mainframe ); + g_signal_connect( G_OBJECT( wnd ), "key-release-event", + G_CALLBACK( mainframe_keyrelease ), mainframe ); + g_signal_connect( G_OBJECT( wnd ), "map-event", + G_CALLBACK( mainframe_map ), mainframe ); gtk_window_set_default_size( GTK_WINDOW( wnd ), 100, 100 ); @@ -2098,7 +2098,7 @@ void console_populate_popup( GtkTextView* textview, GtkMenu* menu, gpointer user menu_separator( GTK_WIDGET( menu ) ); GtkWidget* item = gtk_menu_item_new_with_label( _( "Clear" ) ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( Sys_ClearPrintf ), NULL ); + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( Sys_ClearPrintf ), NULL ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); } @@ -2412,9 +2412,9 @@ static ZWnd *create_floating_zwnd( MainFrame *mainframe ){ gtk_widget_realize( wnd ); // turn OFF minimize and maximize boxes. - // Must be *after* realize, or wnd->window is NULL + // Must be *after* realize, or gtk_widget_get_window( wnd ) is NULL // should do the right thing on *nix, need to verify. - gdk_window_set_decorations( wnd->window, + gdk_window_set_decorations( gtk_widget_get_window( wnd ), GdkWMDecoration( GDK_DECOR_ALL | GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE ) ); //TODO 50 by observation, will vary depending on decoration sizes { @@ -2422,7 +2422,7 @@ static ZWnd *create_floating_zwnd( MainFrame *mainframe ){ geometry.min_width = 50; //we only care about width, but have to set this too, or get nasty bugs geometry.min_height = 10; - gdk_window_set_geometry_hints( wnd->window,&geometry,GDK_HINT_MIN_SIZE ); + gdk_window_set_geometry_hints( gtk_widget_get_window( wnd ), &geometry, GDK_HINT_MIN_SIZE ); } #ifdef _WIN32 @@ -2445,20 +2445,20 @@ void MainFrame::Create(){ GtkWidget* window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); m_pWidget = window; gtk_widget_set_events( window, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK ); - gtk_signal_connect( GTK_OBJECT( window ), "delete-event", - GTK_SIGNAL_FUNC( mainframe_delete ), this ); - gtk_signal_connect( GTK_OBJECT( window ), "destroy", - GTK_SIGNAL_FUNC( mainframe_destroy ), this ); - gtk_signal_connect( GTK_OBJECT( window ), "key-press-event", - GTK_SIGNAL_FUNC( mainframe_keypress ), this ); - gtk_signal_connect( GTK_OBJECT( window ), "key-release-event", - GTK_SIGNAL_FUNC( mainframe_keyrelease ), this ); - gtk_signal_connect( GTK_OBJECT( window ), "map-event", - GTK_SIGNAL_FUNC( mainframe_map ), this ); - gtk_signal_connect( GTK_OBJECT( window ), "unmap-event", - GTK_SIGNAL_FUNC( mainframe_unmap ), this ); - gtk_signal_connect( GTK_OBJECT( window ), "window-state-event", - GTK_SIGNAL_FUNC( mainframe_state ), this ); + g_signal_connect( G_OBJECT( window ), "delete-event", + G_CALLBACK( mainframe_delete ), this ); + g_signal_connect( G_OBJECT( window ), "destroy", + G_CALLBACK( mainframe_destroy ), this ); + g_signal_connect( G_OBJECT( window ), "key-press-event", + G_CALLBACK( mainframe_keypress ), this ); + g_signal_connect( G_OBJECT( window ), "key-release-event", + G_CALLBACK( mainframe_keyrelease ), this ); + g_signal_connect( G_OBJECT( window ), "map-event", + G_CALLBACK( mainframe_map ), this ); + g_signal_connect( G_OBJECT( window ), "unmap-event", + G_CALLBACK( mainframe_unmap ), this ); + g_signal_connect( G_OBJECT( window ), "window-state-event", + G_CALLBACK( mainframe_state ), this ); g_qeglobals_gui.d_main_window = window; @@ -2939,7 +2939,7 @@ void MainFrame::Create(){ SetActiveXY( m_pXYWnd ); - s_idle_id = gtk_timeout_add( 25, mainframe_idle, this ); + s_idle_id = g_timeout_add( 25, mainframe_idle, this ); QGL_InitExtensions(); @@ -2955,7 +2955,7 @@ void MainFrame::Create(){ m_bDoLoop = true; - m_nTimer = gtk_timeout_add( 1000, timer, this ); + m_nTimer = g_timeout_add( 1000, timer, this ); } // ============================================================================= @@ -3034,11 +3034,11 @@ void MainFrame::CreateContexts(){ static void Sys_Iconify( GtkWidget *w ){ // we might not have been realized yet - if ( w->window == NULL ) { + if ( gtk_widget_get_window( w ) == NULL ) { return; } - if ( !GTK_WIDGET_MAPPED( w ) ) { + if ( !gtk_widget_get_mapped( w ) ) { return; } @@ -3047,11 +3047,11 @@ static void Sys_Iconify( GtkWidget *w ){ static void Sys_Restore( GtkWidget *w ){ // we might not have been realized yet - if ( w->window == NULL ) { + if ( gtk_widget_get_window( w ) == NULL ) { return; } - if ( !GTK_WIDGET_VISIBLE( w ) ) { + if ( !gtk_widget_get_visible( w ) ) { return; } @@ -3061,7 +3061,7 @@ static void Sys_Restore( GtkWidget *w ){ XWindowAttributes xattr; GdkWindowPrivate *Private; - Private = (GdkWindowPrivate*)w->window; + Private = (GdkWindowPrivate*)gtk_widget_get_window( w ); xattr.map_state = IsUnmapped; XGetWindowAttributes( Private->xdisplay, Private->xwindow, &xattr ); @@ -3073,7 +3073,7 @@ static void Sys_Restore( GtkWidget *w ){ #endif #ifdef _WIN32 - ShowWindow( (HWND)GDK_WINDOW_HWND( w->window ), SW_RESTORE ); + ShowWindow( (HWND)GDK_WINDOW_HWND( gtk_widget_get_window( w ) ), SW_RESTORE ); #endif } @@ -3278,7 +3278,7 @@ void MainFrame::OnDelete(){ save_window_pos( m_pYZWnd->m_pParent, g_PrefsDlg.mWindowInfo.posYZWnd ); } - g_PrefsDlg.mWindowInfo.nState = gdk_window_get_state( g_pParentWnd->m_pWidget->window ); + g_PrefsDlg.mWindowInfo.nState = gdk_window_get_state( gtk_widget_get_window( g_pParentWnd->m_pWidget ) ); } void MainFrame::OnDestroy(){ @@ -3290,10 +3290,10 @@ void MainFrame::OnDestroy(){ Sys_Printf( "MainFrame::OnDestroy\n" ); #endif if ( s_idle_id ) { - gtk_timeout_remove( s_idle_id ); + g_source_remove( s_idle_id ); } if ( m_nTimer ) { - gtk_timeout_remove( m_nTimer ); + g_source_remove( m_nTimer ); } if ( !g_qeglobals.disable_ini ) { @@ -3332,7 +3332,7 @@ void MainFrame::OnDestroy(){ else { if ( g_PrefsDlg.m_bFloatingZ || CurrentStyle() == eSplit ) { - if ( GTK_WIDGET_VISIBLE( m_pZWnd->m_pParent ) ) { + if ( gtk_widget_get_visible( m_pZWnd->m_pParent ) ) { g_PrefsDlg.m_bZVis = TRUE; } else{ @@ -4025,11 +4025,11 @@ void MainFrame::CleanPlugInMenu(){ sep = GTK_WIDGET( g_object_get_data( G_OBJECT( m_pWidget ), "menu_plugin_separator" ) ); m_nNextPlugInID = ID_PLUGIN_START; - lst = g_list_find( gtk_container_children( GTK_CONTAINER( menu ) ), sep ); + lst = g_list_find( gtk_container_get_children( GTK_CONTAINER( menu ) ), sep ); while ( lst->next ) { gtk_container_remove( GTK_CONTAINER( menu ), GTK_WIDGET( lst->next->data ) ); - lst = g_list_find( gtk_container_children( GTK_CONTAINER( menu ) ), sep ); + lst = g_list_find( gtk_container_get_children( GTK_CONTAINER( menu ) ), sep ); } } @@ -4055,8 +4055,8 @@ void MainFrame::AddPlugInMenuItem( IPlugIn* pPlugIn ){ else { item = gtk_menu_item_new_with_label( menuText ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( m_nNextPlugInID ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( m_nNextPlugInID ) ); } gtk_widget_show( item ); gtk_container_add( GTK_CONTAINER( menu ), item ); @@ -4102,7 +4102,7 @@ void SignalToolbarButton( GtkWidget *widget, gpointer data ){ void MainFrame::AddPlugInToolbarButton( const IToolbarButton* button ){ GtkWidget*const toolbar = GTK_WIDGET( g_object_get_data( G_OBJECT( m_pWidget ), "toolbar_plugin" ) ); - toolbar_insert( toolbar, button->getImage(), button->getText(), button->getTooltip(), button->getType(), GTK_SIGNAL_FUNC( SignalToolbarButton ), reinterpret_cast( const_cast( button ) ) ); + toolbar_insert( toolbar, button->getImage(), button->getText(), button->getTooltip(), button->getType(), G_CALLBACK( SignalToolbarButton ), reinterpret_cast( const_cast( button ) ) ); } void MainFrame::OnSelectionSelectNudgedown(){ @@ -4636,7 +4636,7 @@ void MainFrame::OnPrefs() { void MainFrame::OnTogglecamera(){ if ( CurrentStyle() == eFloating ) { // floating views if ( m_pCamWnd && m_pCamWnd->m_pParent ) { - if ( GTK_WIDGET_VISIBLE( m_pCamWnd->m_pParent ) ) { + if ( gtk_widget_get_visible( m_pCamWnd->m_pParent ) ) { widget_delete_hide( m_pCamWnd->m_pParent ); } else{ @@ -4646,7 +4646,7 @@ void MainFrame::OnTogglecamera(){ } else { - if ( GTK_WIDGET_VISIBLE( m_pCamWnd->GetWidget() ) ) { + if ( gtk_widget_get_visible( m_pCamWnd->GetWidget() ) ) { gtk_widget_hide( m_pCamWnd->GetWidget() ); } else{ @@ -4658,7 +4658,7 @@ void MainFrame::OnTogglecamera(){ void MainFrame::OnToggleconsole(){ if ( FloatingGroupDialog() ) { // QE4 style if ( inspector_mode == W_CONSOLE ) { - if ( GTK_WIDGET_VISIBLE( g_qeglobals_gui.d_entity ) ) { + if ( gtk_widget_get_visible( g_qeglobals_gui.d_entity ) ) { widget_delete_hide( g_qeglobals_gui.d_entity ); } else{ @@ -4676,12 +4676,12 @@ void MainFrame::OnToggleconsole(){ // trigger the entity inspector on/off void MainFrame::OnViewEntity(){ // make sure we're working with the current selection (bugzilla #436) - if ( !GTK_WIDGET_VISIBLE( g_qeglobals_gui.d_entity ) ) { + if ( !gtk_widget_get_visible( g_qeglobals_gui.d_entity ) ) { Select_Reselect(); } if ( !FloatingGroupDialog() ) { - if ( GTK_WIDGET_VISIBLE( g_qeglobals_gui.d_entity ) && inspector_mode == W_ENTITY ) { + if ( gtk_widget_get_visible( g_qeglobals_gui.d_entity ) && inspector_mode == W_ENTITY ) { widget_delete_hide( g_qeglobals_gui.d_entity ); } else @@ -4693,7 +4693,7 @@ void MainFrame::OnViewEntity(){ else { if ( inspector_mode == W_ENTITY ) { - if ( GTK_WIDGET_VISIBLE( g_qeglobals_gui.d_entity ) ) { + if ( gtk_widget_get_visible( g_qeglobals_gui.d_entity ) ) { widget_delete_hide( g_qeglobals_gui.d_entity ); } else{ @@ -4710,7 +4710,7 @@ void MainFrame::OnViewEntity(){ void MainFrame::OnViewGroups(){ if ( !FloatingGroupDialog() ) { - if ( GTK_WIDGET_VISIBLE( g_qeglobals_gui.d_entity ) && inspector_mode == W_GROUP ) { + if ( gtk_widget_get_visible( g_qeglobals_gui.d_entity ) && inspector_mode == W_GROUP ) { widget_delete_hide( g_qeglobals_gui.d_entity ); } else @@ -4722,7 +4722,7 @@ void MainFrame::OnViewGroups(){ else { if ( inspector_mode == W_GROUP && CurrentStyle() != MainFrame::eFloating ) { - if ( GTK_WIDGET_VISIBLE( g_qeglobals_gui.d_entity ) ) { + if ( gtk_widget_get_visible( g_qeglobals_gui.d_entity ) ) { widget_delete_hide( g_qeglobals_gui.d_entity ); } else{ @@ -4740,7 +4740,7 @@ void MainFrame::OnViewGroups(){ void MainFrame::OnToggleview(){ if ( CurrentStyle() == eFloating ) { // QE4 style if ( m_pXYWnd && m_pXYWnd->m_pParent ) { - if ( GTK_WIDGET_VISIBLE( m_pXYWnd->m_pParent ) ) { + if ( gtk_widget_get_visible( m_pXYWnd->m_pParent ) ) { widget_delete_hide( m_pXYWnd->m_pParent ); } else{ @@ -4754,7 +4754,7 @@ void MainFrame::OnToggleviewXz(){ if ( CurrentStyle() == eFloating ) { // QE4 style if ( m_pXZWnd && m_pXZWnd->m_pParent ) { // get windowplacement doesn't actually save this so we will here - g_PrefsDlg.m_bXZVis = GTK_WIDGET_VISIBLE( m_pXZWnd->m_pParent ); + g_PrefsDlg.m_bXZVis = gtk_widget_get_visible( m_pXZWnd->m_pParent ); if ( g_PrefsDlg.m_bXZVis ) { widget_delete_hide( m_pXZWnd->m_pParent ); } @@ -4770,7 +4770,7 @@ void MainFrame::OnToggleviewXz(){ void MainFrame::OnToggleviewYz(){ if ( CurrentStyle() == eFloating ) { // QE4 style if ( m_pYZWnd && m_pYZWnd->m_pParent ) { - g_PrefsDlg.m_bYZVis = GTK_WIDGET_VISIBLE( m_pYZWnd->m_pParent ); + g_PrefsDlg.m_bYZVis = gtk_widget_get_visible( m_pYZWnd->m_pParent ); if ( g_PrefsDlg.m_bYZVis ) { widget_delete_hide( m_pYZWnd->m_pParent ); } @@ -4786,7 +4786,7 @@ void MainFrame::OnToggleviewYz(){ void MainFrame::OnTogglez(){ if ( g_pParentWnd->FloatingGroupDialog() ) { // QE4 style if ( m_pZWnd && m_pZWnd->m_pParent ) { - if ( GTK_WIDGET_VISIBLE( m_pZWnd->m_pParent ) ) { + if ( gtk_widget_get_visible( m_pZWnd->m_pParent ) ) { widget_delete_hide( m_pZWnd->m_pParent ); } else{ @@ -6581,7 +6581,7 @@ void MainFrame::OnPopupSelection(){ for ( int i = 0; i < 4; i++ ) { item = gtk_menu_item_new_with_label( labels[i] ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( HandleCommand ), + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ids[i] ) ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); @@ -6813,7 +6813,7 @@ void MainFrame::OnDontselectmodel(){ void MainFrame::OnViewTexture(){ if ( FloatingGroupDialog() ) { // QE4 style if ( inspector_mode == W_TEXTURE ) { - if ( GTK_WIDGET_VISIBLE( g_qeglobals_gui.d_entity ) ) { + if ( gtk_widget_get_visible( g_qeglobals_gui.d_entity ) ) { widget_delete_hide( g_qeglobals_gui.d_entity ); } else{ @@ -7602,7 +7602,7 @@ void MainFrame::OnFilterWorld(){ void MainFrame::OnViewConsole(){ if ( FloatingGroupDialog() ) { // QE4 style if ( inspector_mode == W_CONSOLE && CurrentStyle() != MainFrame::eFloating ) { // are we in console mode already? - if ( GTK_WIDGET_VISIBLE( g_qeglobals_gui.d_entity ) ) { + if ( gtk_widget_get_visible( g_qeglobals_gui.d_entity ) ) { widget_delete_hide( g_qeglobals_gui.d_entity ); } else{ diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index 044c7484..dd796526 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -117,14 +117,14 @@ static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){ td.flags = 0; td.value = 0; - if ( adj->value == 0 ) { + if ( gtk_adjustment_get_value( adj ) == 0 ) { return; } if ( adj == g_object_get_data( G_OBJECT( g_PatchDialog.GetWidget() ), "hshift_adj" ) ) { l_pPIIncrement->shift[0] = atof( gtk_entry_get_text( GTK_ENTRY( data ) ) ); - if ( adj->value > 0 ) { + if ( gtk_adjustment_get_value( adj ) > 0 ) { td.shift[0] = l_pPIIncrement->shift[0]; } else{ @@ -134,7 +134,7 @@ static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){ else if ( adj == g_object_get_data( G_OBJECT( g_PatchDialog.GetWidget() ), "vshift_adj" ) ) { l_pPIIncrement->shift[1] = atof( gtk_entry_get_text( GTK_ENTRY( data ) ) ); - if ( adj->value > 0 ) { + if ( gtk_adjustment_get_value( adj ) > 0 ) { td.shift[1] = l_pPIIncrement->shift[1]; } else{ @@ -147,7 +147,7 @@ static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){ return; } // make sure scale factor is always >1 for increases and <1 for decreases - if ( adj->value > 0 ) { + if ( gtk_adjustment_get_value( adj ) > 0 ) { if ( l_pPIIncrement->scale[0] < 1 ) { td.scale[0] = l_pPIIncrement->scale[0]; } @@ -171,7 +171,7 @@ static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){ return; } // make sure scale factor is always >1 for increases and <1 for decreases - if ( adj->value > 0 ) { + if ( gtk_adjustment_get_value( adj ) > 0 ) { if ( l_pPIIncrement->scale[1] < 1 ) { td.scale[1] = l_pPIIncrement->scale[1]; } @@ -192,7 +192,7 @@ static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){ else if ( adj == g_object_get_data( G_OBJECT( g_PatchDialog.GetWidget() ), "rotate_adj" ) ) { l_pPIIncrement->rotate = atof( gtk_entry_get_text( GTK_ENTRY( data ) ) ); - if ( adj->value > 0 ) { + if ( gtk_adjustment_get_value( adj ) > 0 ) { td.rotate = l_pPIIncrement->rotate; } else{ @@ -200,7 +200,7 @@ static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){ } } - adj->value = 0; + gtk_adjustment_set_value( adj, 0 ); // will scale shift rotate the patch accordingly Patch_SetTextureInfo( &td ); @@ -210,11 +210,11 @@ static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){ } static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ){ - if ( event->keyval == GDK_Return ) { + if ( event->keyval == GDK_KEY_Return ) { OnApply( NULL, NULL ); return TRUE; } - else if ( event->keyval == GDK_Escape ) { + else if ( event->keyval == GDK_KEY_Escape ) { OnDone( NULL, NULL ); return TRUE; } @@ -298,9 +298,9 @@ void PatchDialog::BuildDialog(){ load_window_pos( dlg, g_PrefsDlg.mWindowInfo.posPatchWnd ); gtk_window_set_title( GTK_WINDOW( dlg ), _( "Patch Properties" ) ); - gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", GTK_SIGNAL_FUNC( OnDone ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( OnDone ), NULL ); // catch 'Esc' and 'Enter' - gtk_signal_connect( GTK_OBJECT( dlg ), "key-press-event", GTK_SIGNAL_FUNC( OnDialogKey ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "key-press-event", G_CALLBACK( OnDialogKey ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pParentWnd->m_pWidget ) ); @@ -347,8 +347,8 @@ void PatchDialog::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_set_usize( combo, 60, -1 ); gtk_entry_set_editable( GTK_ENTRY( GTK_COMBO( combo )->entry ), FALSE ); - gtk_signal_connect( GTK_OBJECT( GTK_COMBO( combo )->entry ), "changed", - GTK_SIGNAL_FUNC( OnSelchangeComboColRow ), this ); + g_signal_connect( G_OBJECT( GTK_COMBO( combo )->entry ), "changed", + G_CALLBACK( OnSelchangeComboColRow ), this ); AddDialogData( combo, &m_nRow, DLG_COMBO_INT ); m_pRowCombo = combo; @@ -359,8 +359,8 @@ void PatchDialog::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_set_usize( combo, 60, -1 ); gtk_entry_set_editable( GTK_ENTRY( GTK_COMBO( combo )->entry ), FALSE ); - gtk_signal_connect( GTK_OBJECT( GTK_COMBO( combo )->entry ), "changed", - GTK_SIGNAL_FUNC( OnSelchangeComboColRow ), this ); + g_signal_connect( G_OBJECT( GTK_COMBO( combo )->entry ), "changed", + G_CALLBACK( OnSelchangeComboColRow ), this ); AddDialogData( combo, &m_nCol, DLG_COMBO_INT ); m_pColCombo = combo; @@ -510,7 +510,7 @@ void PatchDialog::BuildDialog(){ gtk_entry_set_text( GTK_ENTRY( entry ), buf ); adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( m_pWidget ), "hshift_adj", adj ); spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 ); @@ -530,7 +530,7 @@ void PatchDialog::BuildDialog(){ gtk_entry_set_text( GTK_ENTRY( entry ), buf ); adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( m_pWidget ), "vshift_adj", adj ); spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 ); @@ -550,7 +550,7 @@ void PatchDialog::BuildDialog(){ gtk_entry_set_text( GTK_ENTRY( entry ), buf ); adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( m_pWidget ), "hscale_adj", adj ); spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 ); @@ -570,7 +570,7 @@ void PatchDialog::BuildDialog(){ gtk_entry_set_text( GTK_ENTRY( entry ), buf ); adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 ); - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( m_pWidget ), "vscale_adj", adj ); spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 ); @@ -590,7 +590,7 @@ void PatchDialog::BuildDialog(){ gtk_entry_set_text( GTK_ENTRY( entry ), buf ); adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 ); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps - gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry ); + g_signal_connect( adj, "value-changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( m_pWidget ), "rotate_adj", adj ); spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 ); @@ -607,25 +607,25 @@ void PatchDialog::BuildDialog(){ button = gtk_button_new_with_label( _( "CAP" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox2 ), button, TRUE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnPatchdetails ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchdetails ), NULL ); gtk_widget_set_usize( button, 60, -1 ); button = gtk_button_new_with_label( _( "Set..." ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox2 ), button, TRUE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnPatchreset ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchreset ), NULL ); gtk_widget_set_usize( button, 60, -1 ); button = gtk_button_new_with_label( _( "Natural" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox2 ), button, TRUE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnPatchnatural ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchnatural ), NULL ); gtk_widget_set_usize( button, 60, -1 ); button = gtk_button_new_with_label( _( "Fit" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox2 ), button, TRUE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnPatchfit ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchfit ), NULL ); gtk_widget_set_usize( button, 60, -1 ); hbox = gtk_hbox_new( FALSE, 5 ); @@ -635,13 +635,13 @@ void PatchDialog::BuildDialog(){ button = gtk_button_new_with_label( _( "Done" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnDone ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnDone ), NULL ); gtk_widget_set_usize( button, 60, -1 ); button = gtk_button_new_with_label( _( "Apply" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnApply ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnApply ), NULL ); gtk_widget_set_usize( button, 60, -1 ); } diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 287b251a..2007d224 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -1043,7 +1043,7 @@ GtkWidget* CGameDialog::GetGlobalFrame(){ return mFrame; } - mFrame = gtk_frame_new( "Select a game" ); + mFrame = gtk_frame_new( _( "Select a game" ) ); gtk_container_set_border_width( GTK_CONTAINER( mFrame ), 5 ); gtk_widget_show( mFrame ); @@ -1152,8 +1152,8 @@ void CGameDialog::BuildDialog() { setup_button = gtk_button_new_with_label( _( "Configure editor for another game" ) ); gtk_widget_show( setup_button ); gtk_box_pack_start( GTK_BOX( vbox1 ), setup_button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( setup_button ), "clicked", - GTK_SIGNAL_FUNC( SInstallCallback ), this ); + g_signal_connect( G_OBJECT( setup_button ), "clicked", + G_CALLBACK( SInstallCallback ), this ); button = gtk_button_new_with_label( _( "Exit" ) ); gtk_widget_show( button ); @@ -1590,7 +1590,7 @@ void PrefsDlg::BuildDialog(){ button = gtk_button_new_with_label( _( "Clean" ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnButtonClean ), this ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnButtonClean ), this ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); gtk_widget_set_usize( button, 60, -2 ); @@ -2224,7 +2224,7 @@ void PrefsDlg::BuildDialog(){ gtk_widget_show( check ); gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 ); g_object_set_data( G_OBJECT( dialog ), "check_startonprimary", check ); - gtk_signal_connect( GTK_OBJECT( check ), "clicked", GTK_SIGNAL_FUNC( UpdateSensitivity ), this ); + g_signal_connect( G_OBJECT( check ), "clicked", G_CALLBACK( UpdateSensitivity ), this ); AddDialogData( check, &m_bStartOnPrimMon, DLG_CHECK_BOOL ); #endif @@ -2514,7 +2514,7 @@ void PrefsDlg::BuildDialog(){ // browse button button = gtk_button_new_with_label( "..." ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnBrowseprefab ), this ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnBrowseprefab ), this ); gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 0, 1, (GtkAttachOptions) ( 0 ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -2540,7 +2540,7 @@ void PrefsDlg::BuildDialog(){ // user ini browse button button = gtk_button_new_with_label( _( "..." ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnBrowseuserini ), this ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnBrowseuserini ), this ); gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 1, 2, (GtkAttachOptions) ( 0 ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -2653,7 +2653,7 @@ void PrefsDlg::BuildDialog(){ check = gtk_check_button_new_with_label( _( "Use Custom Shader Editor" ) ); gtk_widget_show( check ); gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( check ), "clicked", GTK_SIGNAL_FUNC( UpdateEditorSensitivity ), this ); + g_signal_connect( G_OBJECT( check ), "clicked", G_CALLBACK( UpdateEditorSensitivity ), this ); g_object_set_data( G_OBJECT( dialog ), "check_customeditor", check ); AddDialogData( check, &g_PrefsDlg.m_bUseCustomEditor, DLG_CHECK_BOOL ); @@ -2689,7 +2689,7 @@ void PrefsDlg::BuildDialog(){ // browse button button = gtk_button_new_with_label( _( "..." ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnBrowseEditor ), this ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnBrowseEditor ), this ); gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 0, 1, (GtkAttachOptions) ( 0 ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -2717,7 +2717,7 @@ void PrefsDlg::BuildDialog(){ gtk_widget_show( check ); gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 ); g_object_set_data( G_OBJECT( dialog ), "check_monitorbsp", check ); - gtk_signal_connect( GTK_OBJECT( check ), "clicked", GTK_SIGNAL_FUNC( UpdateSensitivity ), this ); + g_signal_connect( G_OBJECT( check ), "clicked", G_CALLBACK( UpdateSensitivity ), this ); AddDialogData( check, &g_PrefsDlg.m_bWatchBSP, DLG_CHECK_BOOL ); // Stop on leak @@ -2732,7 +2732,7 @@ void PrefsDlg::BuildDialog(){ gtk_widget_show( check ); gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 ); g_object_set_data( G_OBJECT( dialog ), "check_runengine", check ); - gtk_signal_connect( GTK_OBJECT( check ), "clicked", GTK_SIGNAL_FUNC( UpdateSensitivity ), this ); + g_signal_connect( G_OBJECT( check ), "clicked", G_CALLBACK( UpdateSensitivity ), this ); AddDialogData( check, &g_PrefsDlg.m_bRunQuake, DLG_CHECK_BOOL ); // sleep mode when running engine @@ -2756,7 +2756,7 @@ void PrefsDlg::BuildDialog(){ gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 ); g_object_set_data( G_OBJECT( dialog ), "check_x64_q3map2", check ); AddDialogData( check, &g_PrefsDlg.m_bx64q3map2, DLG_CHECK_BOOL ); - g_signal_connect( GTK_OBJECT( check ), "toggled", GTK_SIGNAL_FUNC( OnX64Toggle ), this ); + g_signal_connect( G_OBJECT( check ), "toggled", G_CALLBACK( OnX64Toggle ), this ); #endif // Add the page to the notebook @@ -3443,7 +3443,7 @@ void CGameInstall::BuildDialog() { iGame++; } AddDialogData( game_select_combo, &m_nComboSelect, DLG_COMBO_BOX_INT ); - gtk_signal_connect( GTK_OBJECT( game_select_combo ), "changed", G_CALLBACK( OnGameSelectChanged ), this ); + g_signal_connect( G_OBJECT( game_select_combo ), "changed", G_CALLBACK( OnGameSelectChanged ), this ); text = gtk_label_new( _( "Name:" ) ); gtk_widget_show( text ); @@ -3469,7 +3469,7 @@ void CGameInstall::BuildDialog() { button = gtk_button_new_with_label( _( "..." ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnBrowseEngine ), this ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnBrowseEngine ), this ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); m_executablesVBox = gtk_vbox_new( TRUE, 0 ); @@ -3491,7 +3491,7 @@ void CGameInstall::BuildDialog() { button = gtk_button_new_with_label( _( "..." ) ); gtk_widget_show( button ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnBtnBrowseExecutables ), this ); + g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnBrowseExecutables ), this ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); button = gtk_button_new_with_label( _( "OK" ) ); diff --git a/radiant/qe3.cpp b/radiant/qe3.cpp index 60b7687f..bc524435 100644 --- a/radiant/qe3.cpp +++ b/radiant/qe3.cpp @@ -1281,14 +1281,14 @@ bool g_bWaitCursor = false; void WINAPI Sys_BeginWait( void ){ GdkCursor *cursor = gdk_cursor_new( GDK_WATCH ); - gdk_window_set_cursor( g_pParentWnd->m_pWidget->window, cursor ); + gdk_window_set_cursor( gtk_widget_get_window( g_pParentWnd->m_pWidget ), cursor ); gdk_cursor_unref( cursor ); g_bWaitCursor = true; } void WINAPI Sys_EndWait( void ){ GdkCursor *cursor = gdk_cursor_new( GDK_LEFT_PTR ); - gdk_window_set_cursor( g_pParentWnd->m_pWidget->window, cursor ); + gdk_window_set_cursor( gtk_widget_get_window( g_pParentWnd->m_pWidget ), cursor ); gdk_cursor_unref( cursor ); g_bWaitCursor = false; } @@ -1578,8 +1578,8 @@ void FillBSPMenu(){ item = gtk_menu_item_new_with_label( token ); gtk_widget_show( item ); gtk_container_add( GTK_CONTAINER( menu ), item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( CMD_BSPCOMMAND + i ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( CMD_BSPCOMMAND + i ) ); token = strtok( NULL, ",;" ); i++; } @@ -1594,8 +1594,8 @@ void FillBSPMenu(){ item = gtk_menu_item_new_with_label( ep->key + 4 ); gtk_widget_show( item ); gtk_container_add( GTK_CONTAINER( menu ), item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", - GTK_SIGNAL_FUNC( HandleCommand ), GINT_TO_POINTER( CMD_BSPCOMMAND + i ) ); + g_signal_connect( G_OBJECT( item ), "activate", + G_CALLBACK( HandleCommand ), GINT_TO_POINTER( CMD_BSPCOMMAND + i ) ); i++; } } @@ -1763,7 +1763,7 @@ extern "C" void Sys_FPrintf_VA( int level, const char *text, va_list args ) { gtk_text_view_scroll_mark_onscreen( GTK_TEXT_VIEW( g_qeglobals_gui.d_edit ), end ); // update console widget immediately if we're doing something time-consuming - if ( !g_bScreenUpdates && GTK_WIDGET_REALIZED( g_qeglobals_gui.d_edit ) ) { + if ( !g_bScreenUpdates && gtk_widget_get_realized( g_qeglobals_gui.d_edit ) ) { gtk_grab_add( g_qeglobals_gui.d_edit ); while ( gtk_events_pending() ) diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index 4fe34183..64c49d23 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -255,7 +255,7 @@ static gint OnTextureKey( GtkWidget* widget, GdkEventKey* event, gpointer data ) #ifdef DBG_SI Sys_Printf( "OnTextureKey\n" ); #endif - if ( event->keyval != GDK_Return ) { + if ( event->keyval != GDK_KEY_Return ) { g_dlgSurface.m_bEditingTextureWidget = true; } return FALSE; @@ -278,7 +278,7 @@ static void OnCancel( GtkWidget *widget, gpointer data ){ static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ) { if ( g_surfwin ) { - if ( event->keyval == GDK_Return ) { + if ( event->keyval == GDK_KEY_Return ) { if ( g_dlgSurface.m_bEditingTextureWidget ) { OnApply( NULL, NULL ); g_dlgSurface.m_bEditingTextureWidget = false; @@ -287,7 +287,7 @@ static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ) } return TRUE; } - if ( event->keyval == GDK_Escape ) { + if ( event->keyval == GDK_KEY_Escape ) { OnCancel( NULL, NULL ); return TRUE; } @@ -372,8 +372,8 @@ void DoSnapTToGrid( float hscale, float vscale ){ // increment * scale = gridsize static void OnBtnMatchGrid( GtkWidget *widget, gpointer data ){ float hscale, vscale; - hscale = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "hscale" ) ) ); - vscale = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "vscale" ) ) ); + hscale = gtk_spin_button_get_value( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "hscale" ) ) ); + vscale = gtk_spin_button_get_value( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "vscale" ) ) ); if ( hscale == 0.0f || vscale == 0.0f ) { Sys_FPrintf( SYS_ERR, "ERROR: unexpected scale == 0.0f\n" ); return; @@ -511,7 +511,7 @@ void SurfaceDlg::BuildDialog() { gtk_window_set_title( GTK_WINDOW( dlg ), _( "Surface inspector" ) ); //g_signal_connect (G_OBJECT (dlg), "delete-event", G_CALLBACK (OnCancel), NULL); // we catch 'Enter' and interpret is as OnDone - gtk_signal_connect( GTK_OBJECT( dlg ), "key-press-event", GTK_SIGNAL_FUNC( OnDialogKey ), NULL ); + g_signal_connect( G_OBJECT( dlg ), "key-press-event", G_CALLBACK( OnDialogKey ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pParentWnd->m_pWidget ) ); // replaced by only the vbox: @@ -529,7 +529,7 @@ void SurfaceDlg::BuildDialog() { gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 ); entry = gtk_entry_new(); - gtk_signal_connect( GTK_OBJECT( entry ), "key-press-event", GTK_SIGNAL_FUNC( OnTextureKey ), NULL ); + g_signal_connect( G_OBJECT( entry ), "key-press-event", G_CALLBACK( OnTextureKey ), NULL ); gtk_widget_show( entry ); gtk_box_pack_start( GTK_BOX( hbox2 ), entry, TRUE, TRUE, 0 ); g_object_set_data( G_OBJECT( m_pWidget ), "texture", entry ); @@ -550,8 +550,8 @@ void SurfaceDlg::BuildDialog() { spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 0 ); g_object_set_data( G_OBJECT( dlg ), "hshift", spin ); - gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", - GTK_SIGNAL_FUNC( OnUpdate ), NULL ); + g_signal_connect( G_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", + G_CALLBACK( OnUpdate ), NULL ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -567,8 +567,8 @@ void SurfaceDlg::BuildDialog() { entry = gtk_entry_new(); g_object_set_data( G_OBJECT( dlg ), "hshift_inc", entry ); - gtk_signal_connect( GTK_OBJECT( entry ), "changed", - GTK_SIGNAL_FUNC( OnIncrementChanged ), NULL ); + g_signal_connect( G_OBJECT( entry ), "changed", + G_CALLBACK( OnIncrementChanged ), NULL ); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -584,8 +584,8 @@ void SurfaceDlg::BuildDialog() { spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 0 ); g_object_set_data( G_OBJECT( dlg ), "vshift", spin ); - gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", - GTK_SIGNAL_FUNC( OnUpdate ), NULL ); + g_signal_connect( G_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", + G_CALLBACK( OnUpdate ), NULL ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -601,8 +601,8 @@ void SurfaceDlg::BuildDialog() { entry = gtk_entry_new(); g_object_set_data( G_OBJECT( dlg ), "vshift_inc", entry ); - gtk_signal_connect( GTK_OBJECT( entry ), "changed", - GTK_SIGNAL_FUNC( OnIncrementChanged ), NULL ); + g_signal_connect( G_OBJECT( entry ), "changed", + G_CALLBACK( OnIncrementChanged ), NULL ); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -618,8 +618,8 @@ void SurfaceDlg::BuildDialog() { spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 0 ) ), 0, 0 ); g_object_set_data( G_OBJECT( dlg ), "hscale", spin ); - gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", - GTK_SIGNAL_FUNC( OnUpdate ), NULL ); + g_signal_connect( G_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", + G_CALLBACK( OnUpdate ), NULL ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 2, 3, (GtkAttachOptions) ( GTK_FILL ), @@ -635,8 +635,8 @@ void SurfaceDlg::BuildDialog() { entry = gtk_entry_new(); g_object_set_data( G_OBJECT( dlg ), "hscale_inc", entry ); - gtk_signal_connect( GTK_OBJECT( entry ), "changed", - GTK_SIGNAL_FUNC( OnIncrementChanged ), NULL ); + g_signal_connect( G_OBJECT( entry ), "changed", + G_CALLBACK( OnIncrementChanged ), NULL ); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 2, 3, (GtkAttachOptions) ( GTK_FILL ), @@ -652,8 +652,8 @@ void SurfaceDlg::BuildDialog() { spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 0 ) ), 0, 0 ); g_object_set_data( G_OBJECT( dlg ), "vscale", spin ); - gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", - GTK_SIGNAL_FUNC( OnUpdate ), NULL ); + g_signal_connect( G_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", + G_CALLBACK( OnUpdate ), NULL ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 3, 4, (GtkAttachOptions) ( GTK_FILL ), @@ -669,8 +669,8 @@ void SurfaceDlg::BuildDialog() { entry = gtk_entry_new(); g_object_set_data( G_OBJECT( dlg ), "vscale_inc", entry ); - gtk_signal_connect( GTK_OBJECT( entry ), "changed", - GTK_SIGNAL_FUNC( OnIncrementChanged ), NULL ); + g_signal_connect( G_OBJECT( entry ), "changed", + G_CALLBACK( OnIncrementChanged ), NULL ); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 3, 4, (GtkAttachOptions) ( GTK_FILL ), @@ -686,8 +686,8 @@ void SurfaceDlg::BuildDialog() { spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -360, 360, 1, 10, 0 ) ), 1, 0 ); g_object_set_data( G_OBJECT( dlg ), "rotate", spin ); - gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", - GTK_SIGNAL_FUNC( OnUpdate ), NULL ); + g_signal_connect( G_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed", + G_CALLBACK( OnUpdate ), NULL ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 4, 5, (GtkAttachOptions) ( GTK_FILL ), @@ -704,8 +704,8 @@ void SurfaceDlg::BuildDialog() { entry = gtk_entry_new(); g_object_set_data( G_OBJECT( dlg ), "rotate_inc", entry ); - gtk_signal_connect( GTK_OBJECT( entry ), "changed", - GTK_SIGNAL_FUNC( OnIncrementChanged ), NULL ); + g_signal_connect( G_OBJECT( entry ), "changed", + G_CALLBACK( OnIncrementChanged ), NULL ); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 4, 5, (GtkAttachOptions) ( GTK_FILL ), @@ -718,8 +718,8 @@ void SurfaceDlg::BuildDialog() { gtk_table_attach( GTK_TABLE( table ), button, 2, 4, 5, 6, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnBtnMatchGrid ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnBtnMatchGrid ), NULL ); frame = gtk_frame_new( _( "Texturing" ) ); gtk_widget_show( frame ); @@ -761,8 +761,8 @@ void SurfaceDlg::BuildDialog() { gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnBtnAxial ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnBtnAxial ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Fit" ) ); @@ -770,8 +770,8 @@ void SurfaceDlg::BuildDialog() { gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnBtnFaceFit ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnBtnFaceFit ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "CAP" ) ); @@ -779,8 +779,8 @@ void SurfaceDlg::BuildDialog() { gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 3, 4, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnBtnPatchdetails ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnBtnPatchdetails ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Set..." ) ); @@ -788,8 +788,8 @@ void SurfaceDlg::BuildDialog() { gtk_table_attach( GTK_TABLE( table ), button, 1, 2, 3, 4, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnBtnPatchreset ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnBtnPatchreset ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Natural" ) ); @@ -797,8 +797,8 @@ void SurfaceDlg::BuildDialog() { gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 3, 4, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnBtnPatchnatural ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnBtnPatchnatural ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Fit" ) ); @@ -806,8 +806,8 @@ void SurfaceDlg::BuildDialog() { gtk_table_attach( GTK_TABLE( table ), button, 3, 4, 3, 4, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnBtnPatchFit ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnBtnPatchFit ), NULL ); gtk_widget_set_usize( button, 60, -2 ); spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 0 ) ), 1, 0 ); @@ -833,22 +833,22 @@ void SurfaceDlg::BuildDialog() { button = gtk_button_new_with_label( _( "Done" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnDone ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnDone ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Apply" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnApply ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnApply ), NULL ); gtk_widget_set_usize( button, 60, -2 ); button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnCancel ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnCancel ), NULL ); gtk_widget_set_usize( button, 60, -2 ); // that's a bit of trashy stuff from Textool-v2 branch @@ -857,8 +857,8 @@ void SurfaceDlg::BuildDialog() { button = gtk_button_new_with_label( _( "Test" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 ); - gtk_signal_connect( GTK_OBJECT( button ), "clicked", - GTK_SIGNAL_FUNC( OnTest ), NULL ); + g_signal_connect( G_OBJECT( button ), "clicked", + G_CALLBACK( OnTest ), NULL ); gtk_widget_set_usize( button, 60, -2 ); #endif diff --git a/radiant/texwindow.cpp b/radiant/texwindow.cpp index 3518caef..b4b7afaa 100644 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@ -637,7 +637,7 @@ void FillTextureMenu( GSList** pArray ){ gtk_widget_show( item ); CheckMenuSplitting( pSubMenu ); gtk_container_add( GTK_CONTAINER( pSubMenu ), item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( HandleCommand ), + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( HandleCommand ), GINT_TO_POINTER( CMD_TEXTUREWAD + texture_nummenus ) ); strcpy( texture_menunames[texture_nummenus], (char*)temp->data ); @@ -674,7 +674,7 @@ void FillTextureMenu( GSList** pArray ){ gtk_widget_show( item ); CheckMenuSplitting( menu ); gtk_container_add( GTK_CONTAINER( menu ), item ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( HandleCommand ), + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( HandleCommand ), GINT_TO_POINTER( CMD_TEXTUREWAD + texture_nummenus ) ); strcpy( texture_menunames[texture_nummenus], (char*)temp->data ); @@ -1662,7 +1662,7 @@ void TexWnd::OnCreate(){ g_nTextureOffset = 0; GtkAdjustment *vadjustment = gtk_range_get_adjustment( GTK_RANGE( g_qeglobals_gui.d_texture_scroll ) ); - gtk_signal_connect( GTK_OBJECT( vadjustment ), "value-changed", GTK_SIGNAL_FUNC( vertical_scroll ), this ); + g_signal_connect( G_OBJECT( vadjustment ), "value-changed", G_CALLBACK( vertical_scroll ), this ); if ( g_PrefsDlg.m_bTextureScrollbar ) { gtk_widget_show( g_qeglobals_gui.d_texture_scroll ); @@ -1671,7 +1671,7 @@ void TexWnd::OnCreate(){ } m_bNeedRange = true; - gtk_signal_connect( GTK_OBJECT( m_pFilter ), "changed", GTK_SIGNAL_FUNC( filter_changed ), this ); + g_signal_connect( G_OBJECT( m_pFilter ), "changed", G_CALLBACK( filter_changed ), this ); if ( g_PrefsDlg.m_bTextureWindow ) { gtk_widget_show( m_pFilter ); } @@ -1716,7 +1716,7 @@ void TexWnd::OnExpose() { gtk_adjustment_set_lower( vadjustment, 0 ); gtk_adjustment_set_upper( vadjustment, g_qeglobals.d_texturewin.m_nTotalHeight ); - gtk_signal_emit_by_name( GTK_OBJECT( vadjustment ), "changed" ); + g_signal_emit_by_name( G_OBJECT( vadjustment ), "changed" ); m_bNeedRange = false; } @@ -1784,7 +1784,7 @@ void TexWnd::UpdatePrefs(){ } void TexWnd::FocusEdit() { - if ( GTK_WIDGET_VISIBLE( m_pFilter ) ) { + if ( gtk_widget_get_visible( m_pFilter ) ) { gtk_window_set_focus( GTK_WINDOW( g_pParentWnd->m_pWidget ), m_pFilter ); } } @@ -1851,7 +1851,7 @@ void TexWnd::DragDropTexture( guint32 flags, int pointx, int pointy ){ m_ptXcheck = m_ptX; m_ptYcheck = m_ptY; - if ( g_pParentWnd->GetCamWnd()->GetWidget()->window != gdk_window_at_pointer( &m_ptXcheck, &m_ptYcheck ) ) { + if ( gtk_widget_get_window( g_pParentWnd->GetCamWnd()->GetWidget() ) != gdk_window_at_pointer( &m_ptXcheck, &m_ptYcheck ) ) { return; } diff --git a/radiant/ui.cpp b/radiant/ui.cpp index 62446d97..08609aeb 100644 --- a/radiant/ui.cpp +++ b/radiant/ui.cpp @@ -78,7 +78,7 @@ static gint keypress( GtkWidget* widget, GdkEventKey* event, gpointer data ){ IWindowListener *pListen = static_cast( data ); ret = pListen->OnKeyPressed( gdk_keyval_name( event->keyval ) ); if ( ret ) { - gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" ); + g_signal_stop_emission_by_name( widget, "key-press-event" ); } return ret; } @@ -133,17 +133,17 @@ bool CGtkWindow::Show(){ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK ); // Connect signal handlers - gtk_signal_connect( GTK_OBJECT( m_pGLWidget ), "expose-event", GTK_SIGNAL_FUNC( expose ), this ); - gtk_signal_connect( GTK_OBJECT( m_pGLWidget ), "motion-notify-event", - GTK_SIGNAL_FUNC( motion ), m_pListen ); - gtk_signal_connect( GTK_OBJECT( m_pGLWidget ), "button-press-event", - GTK_SIGNAL_FUNC( button_press ), m_pListen ); - gtk_signal_connect( GTK_OBJECT( m_pGLWidget ), "button-release-event", - GTK_SIGNAL_FUNC( button_release ), m_pListen ); + g_signal_connect( G_OBJECT( m_pGLWidget ), "expose-event", G_CALLBACK( expose ), this ); + g_signal_connect( G_OBJECT( m_pGLWidget ), "motion-notify-event", + G_CALLBACK( motion ), m_pListen ); + g_signal_connect( G_OBJECT( m_pGLWidget ), "button-press-event", + G_CALLBACK( button_press ), m_pListen ); + g_signal_connect( G_OBJECT( m_pGLWidget ), "button-release-event", + G_CALLBACK( button_release ), m_pListen ); - gtk_signal_connect( GTK_OBJECT( m_pWnd ), "delete-event", GTK_SIGNAL_FUNC( close_widget ), this ); - gtk_signal_connect( GTK_OBJECT( m_pWnd ), "key-press-event", - GTK_SIGNAL_FUNC( keypress ), m_pListen ); + g_signal_connect( G_OBJECT( m_pWnd ), "delete-event", G_CALLBACK( close_widget ), this ); + g_signal_connect( G_OBJECT( m_pWnd ), "key-press-event", + G_CALLBACK( keypress ), m_pListen ); gtk_widget_show( m_pGLWidget ); gtk_container_add( GTK_CONTAINER( m_pWnd ), m_pGLWidget ); diff --git a/radiant/xywindow.cpp b/radiant/xywindow.cpp index 211cb915..2f676f4e 100644 --- a/radiant/xywindow.cpp +++ b/radiant/xywindow.cpp @@ -1167,12 +1167,12 @@ void XYWnd::OnMouseMove( guint32 nFlags, int pointx, int pointy ){ if ( bCrossHair && !g_bWaitCursor ) { GdkCursor *cursor; cursor = gdk_cursor_new( GDK_CROSSHAIR ); - gdk_window_set_cursor( m_pWidget->window, cursor ); + gdk_window_set_cursor( gtk_widget_get_window( m_pWidget ), cursor ); gdk_cursor_unref( cursor ); } else { - gdk_window_set_cursor( m_pWidget->window, NULL ); + gdk_window_set_cursor( gtk_widget_get_window( m_pWidget ), NULL ); } } @@ -1428,7 +1428,7 @@ void XYWnd::XY_MouseUp( int x, int y, int buttons ){ } m_nButtonstate = 0; - gdk_window_set_cursor( m_pWidget->window, NULL ); + gdk_window_set_cursor( gtk_widget_get_window( m_pWidget ), NULL ); update_xor_rectangle_xy( m_XORRectangle ); } @@ -1471,44 +1471,44 @@ void XYWnd::HandleDrop(){ menu_in_menu = create_menu_in_menu_with_mnemonic( menu, "Select" ); create_menu_item_with_mnemonic( menu_in_menu, "Select Complete Tall", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECTCOMPLETETALL ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECTCOMPLETETALL ); create_menu_item_with_mnemonic( menu_in_menu, "Select Touching", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECTTOUCHING ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECTTOUCHING ); create_menu_item_with_mnemonic( menu_in_menu, "Select Partial Tall", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECTPARTIALTALL ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECTPARTIALTALL ); create_menu_item_with_mnemonic( menu_in_menu, "Select Inside", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SELECTINSIDE ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SELECTINSIDE ); menu_separator( menu ); nID++; // NOTE: temporary commented out until we put it back in for good (that is with actual features) /* menu_in_menu = create_menu_in_menu_with_mnemonic (menu, "Group",); create_menu_item_with_mnemonic (menu_in_menu, "Add to...", - GTK_SIGNAL_FUNC (HandleCommand), ID_DROP_GROUP_ADDTO); + G_CALLBACK (HandleCommand), ID_DROP_GROUP_ADDTO); create_menu_item_with_mnemonic (menu_in_menu, "Remove", - GTK_SIGNAL_FUNC (HandleCommand), ID_DROP_GROUP_REMOVE); + G_CALLBACK (HandleCommand), ID_DROP_GROUP_REMOVE); create_menu_item_with_mnemonic (menu_in_menu, "Name...", - GTK_SIGNAL_FUNC (HandleCommand), ID_DROP_GROUP_NAME); + G_CALLBACK (HandleCommand), ID_DROP_GROUP_NAME); menu_separator (menu_in_menu); nID++; create_menu_item_with_mnemonic (menu_in_menu, "New Group...", - GTK_SIGNAL_FUNC (HandleCommand), ID_DROP_GROUP_NEWGROUP); + G_CALLBACK (HandleCommand), ID_DROP_GROUP_NEWGROUP); */ create_menu_item_with_mnemonic( menu, "Ungroup Entity", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_UNGROUPENTITY ); + G_CALLBACK( HandleCommand ), ID_SELECTION_UNGROUPENTITY ); create_menu_item_with_mnemonic( menu, "Move into entity", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_MERGE ); + G_CALLBACK( HandleCommand ), ID_SELECTION_MERGE ); create_menu_item_with_mnemonic( menu, "Move into worldspawn", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_SEPERATE ); + G_CALLBACK( HandleCommand ), ID_SELECTION_SEPERATE ); create_menu_item_with_mnemonic( menu, "Make Detail", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_MAKE_DETAIL ); + G_CALLBACK( HandleCommand ), ID_SELECTION_MAKE_DETAIL ); create_menu_item_with_mnemonic( menu, "Make Structural", - GTK_SIGNAL_FUNC( HandleCommand ), ID_SELECTION_MAKE_STRUCTURAL ); + G_CALLBACK( HandleCommand ), ID_SELECTION_MAKE_STRUCTURAL ); menu_separator( menu ); nID++; menu_in_menu = create_menu_in_menu_with_mnemonic( menu, "Smart Entities" ); create_menu_item_with_mnemonic( menu_in_menu, "Smart__Train", - GTK_SIGNAL_FUNC( HandleCommand ), nID++ ); + G_CALLBACK( HandleCommand ), nID++ ); menu_separator( menu ); nID++; submenu = NULL; @@ -1528,7 +1528,7 @@ void XYWnd::HandleDrop(){ if ( strLeft == strActive ) { // this is a child assert( submenu ); item = gtk_menu_item_new_with_label( strName ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( HandleCommand ), + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( HandleCommand ), GINT_TO_POINTER( nID++ ) ); gtk_widget_show( item ); CheckMenuSplitting( submenu ); @@ -1552,7 +1552,7 @@ void XYWnd::HandleDrop(){ submenu = gtk_menu_new(); submenu_root = submenu; item = gtk_menu_item_new_with_label( strName ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( HandleCommand ), + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( HandleCommand ), GINT_TO_POINTER( nID++ ) ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( submenu ), item ); @@ -1574,7 +1574,7 @@ void XYWnd::HandleDrop(){ strActive = ""; item = gtk_menu_item_new_with_label( strName ); - gtk_signal_connect( GTK_OBJECT( item ), "activate", GTK_SIGNAL_FUNC( HandleCommand ), + g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( HandleCommand ), GINT_TO_POINTER( nID++ ) ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); @@ -1788,7 +1788,7 @@ void XYWnd::XY_MouseMoved( int x, int y, int buttons ){ pixmap = gdk_bitmap_create_from_data( NULL, buffer, 32, 32 ); mask = gdk_bitmap_create_from_data( NULL, buffer, 32, 32 ); GdkCursor *cursor = gdk_cursor_new_from_pixmap( pixmap, mask, &white, &black, 1, 1 ); - gdk_window_set_cursor( m_pWidget->window, cursor ); + gdk_window_set_cursor( gtk_widget_get_window( m_pWidget ), cursor ); gdk_cursor_unref( cursor ); gdk_drawable_unref( pixmap ); gdk_drawable_unref( mask );