Merge branch 'master' into gtk-i81n

This commit is contained in:
Timothee "TTimo" Besset 2017-03-12 12:42:16 -05:00 committed by GitHub
commit f3f2e0262f
44 changed files with 747 additions and 997 deletions

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "bspc"]
path = bspc
url = git@github.com:TTimo/bspc.git

1
bspc

@ -1 +0,0 @@
Subproject commit 2c8407838398608cb9c52abae046987bb7a39c08

View file

@ -325,11 +325,11 @@ void InitBackgroundDialog(){
// GTK_STOCK_CLOSE,
// GTK_RESPONSE_CLOSE,
NULL );
gtk_signal_connect( GTK_OBJECT( pDialogWnd ), "delete_event",
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 );
// gtk_signal_connect( GTK_OBJECT (pDialogWnd), "expose-event", GTK_SIGNAL_FUNC( ci_expose ), NULL );
pTooltips = gtk_tooltips_new();

View file

@ -207,7 +207,7 @@ 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_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 );
@ -321,7 +321,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_title( GTK_WINDOW( window ), "Intersect" );
@ -417,7 +417,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_title( GTK_WINDOW( window ), "Polygon Builder" );
@ -592,7 +592,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_title( GTK_WINDOW( window ), "Stair Builder" );
@ -849,7 +849,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_title( GTK_WINDOW( window ), "Door Builder" );
@ -1063,7 +1063,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_title( GTK_WINDOW( window ), "Texture Reset" );
@ -1233,7 +1233,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_title( GTK_WINDOW( window ), "CTF Colour Changer" );
@ -1303,7 +1303,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_title( GTK_WINDOW( window ), "Texture Reset" );
@ -1640,7 +1640,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_title( GTK_WINDOW( window ), "Train Thing" );

View file

@ -73,7 +73,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) );
@ -107,17 +107,17 @@ static gint ci_new( GtkWidget *widget, gpointer data ){
fixed = gtk_radio_button_new_with_label( targetTypeRadio, "Fixed" );
gtk_box_pack_start( GTK_BOX( vbox2 ), fixed, FALSE, FALSE, 3 );
gtk_widget_show( fixed );
targetTypeRadio = gtk_radio_button_group( GTK_RADIO_BUTTON( fixed ) );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( fixed ) );
interpolated = gtk_radio_button_new_with_label( targetTypeRadio, "Interpolated" );
gtk_box_pack_start( GTK_BOX( vbox2 ), interpolated, FALSE, FALSE, 3 );
gtk_widget_show( interpolated );
targetTypeRadio = gtk_radio_button_group( GTK_RADIO_BUTTON( interpolated ) );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( interpolated ) );
spline = gtk_radio_button_new_with_label( targetTypeRadio, "Spline" );
gtk_box_pack_start( GTK_BOX( vbox2 ), spline, FALSE, FALSE, 3 );
gtk_widget_show( spline );
targetTypeRadio = gtk_radio_button_group( GTK_RADIO_BUTTON( spline ) );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( spline ) );
// -------------------------- //
@ -228,7 +228,7 @@ static gint ci_apply( GtkWidget *widget, gpointer data ){
gtk_label_set_text( g_pTotalTime, buf );
gtk_adjustment_set_value( g_pTimeLine, 0.f );
g_pTimeLine->upper = GetCurrentCam()->GetCam()->getTotalTime() * 1000;
gtk_adjustment_set_upper( g_pTimeLine, GetCurrentCam()->GetCam()->getTotalTime() * 1000 );
GetCurrentCam()->HasBeenModified();
}
@ -348,7 +348,7 @@ static void RefreshEventList( void ){
gtk_label_set_text( g_pTotalTime, buf );
gtk_adjustment_set_value( g_pTimeLine, 0.f );
g_pTimeLine->upper = ( GetCurrentCam()->GetCam()->getTotalTime() * 1000 );
gtk_adjustment_set_upper( g_pTimeLine, ( GetCurrentCam()->GetCam()->getTotalTime() * 1000 ) );
}
gtk_clist_thaw( GTK_CLIST( g_pEventsList ) );
@ -365,7 +365,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) );
@ -483,7 +483,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) );
@ -534,17 +534,17 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){
fixed = gtk_radio_button_new_with_label( targetTypeRadio, _( "Fixed" ) );
gtk_box_pack_start( GTK_BOX( vbox2 ), fixed, FALSE, FALSE, 3 );
gtk_widget_show( fixed );
targetTypeRadio = gtk_radio_button_group( GTK_RADIO_BUTTON( fixed ) );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( fixed ) );
interpolated = gtk_radio_button_new_with_label( targetTypeRadio, _( "Interpolated" ) );
gtk_box_pack_start( GTK_BOX( vbox2 ), interpolated, FALSE, FALSE, 3 );
gtk_widget_show( interpolated );
targetTypeRadio = gtk_radio_button_group( GTK_RADIO_BUTTON( interpolated ) );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( interpolated ) );
spline = gtk_radio_button_new_with_label( targetTypeRadio, _( "Spline" ) );
gtk_box_pack_start( GTK_BOX( vbox2 ), spline, FALSE, FALSE, 3 );
gtk_widget_show( spline );
targetTypeRadio = gtk_radio_button_group( GTK_RADIO_BUTTON( spline ) );
targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( spline ) );
// -------------------------- //
@ -729,7 +729,7 @@ static gint ci_camlist_changed( GtkWidget *widget, gpointer data ){
gtk_label_set_text( g_pTotalTime, buf );
gtk_adjustment_set_value( g_pTimeLine, 0.f );
g_pTimeLine->upper = GetCurrentCam()->GetCam()->getTotalTime() * 1000;
gtk_adjustment_set_upper( g_pTimeLine, GetCurrentCam()->GetCam()->getTotalTime() * 1000 );
}
else {
// Set Name
@ -745,7 +745,7 @@ static gint ci_camlist_changed( GtkWidget *widget, gpointer data ){
gtk_label_set_text( g_pTotalTime, "30.00" );
gtk_adjustment_set_value( g_pTimeLine, 0.f );
g_pTimeLine->upper = 30000;
gtk_adjustment_set_upper( g_pTimeLine, 30000 );
}
// Refresh event list
@ -830,7 +830,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_signal_connect( GTK_OBJECT( window ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );
gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) );
@ -865,7 +865,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){
eventWidget[i] = gtk_radio_button_new_with_label( eventTypeRadio, camEventStr[i] );
gtk_box_pack_start( GTK_BOX( vbox2 ), eventWidget[i], FALSE, FALSE, 3 );
gtk_widget_show( eventWidget[i] );
eventTypeRadio = gtk_radio_button_group( GTK_RADIO_BUTTON( eventWidget[i] ) );
eventTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( eventWidget[i] ) );
if ( camEventFlags[i][1] == false ) {
gtk_widget_set_sensitive( eventWidget[i], FALSE );
}
@ -939,7 +939,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){
}
// Add the event
GetCurrentCam()->GetCam()->addEvent( static_cast<idCameraEvent::eventType>( type ), str, (long)( g_pTimeLine->value ) );
GetCurrentCam()->GetCam()->addEvent( static_cast<idCameraEvent::eventType>( type ), str, (long)( gtk_adjustment_get_value( g_pTimeLine ) ) );
// Refresh event list
RefreshEventList();
@ -970,7 +970,7 @@ static gint ci_del( GtkWidget *widget, gpointer data ){
static gint ci_timeline_changed( GtkAdjustment *adjustment ){
char buf[128];
sprintf( buf, "%.2f", adjustment->value / 1000.f );
sprintf( buf, "%.2f", gtk_adjustment_get_value( adjustment ) / 1000.f );
gtk_label_set_text( g_pCurrentTime, buf );
// FIXME: this will never work completely perfect. Startcamera calls buildcamera, which sets all events to 'nottriggered'.
@ -982,7 +982,7 @@ static gint ci_timeline_changed( GtkAdjustment *adjustment ){
GetCurrentCam()->GetCam()->startCamera( 0 );
GetCurrentCam()->GetCam()->getCameraInfo( (long)( adjustment->value ), &origin[0], &dir[0], &fov );
GetCurrentCam()->GetCam()->getCameraInfo( (long)( gtk_adjustment_get_value( adjustment ) ), &origin[0], &dir[0], &fov );
VectorSet( angles, asin( dir[2] ) * 180 / 3.14159, atan2( dir[1], dir[0] ) * 180 / 3.14159, 0 );
g_CameraTable.m_pfnSetCamera( origin, angles );
}
@ -996,8 +996,8 @@ 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 ), "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 );
gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pRadiantWnd ) );
@ -1108,14 +1108,14 @@ GtkWidget *CreateCameraInspectorDialog( void ){
g_pEditModeEditRadioButton = gtk_radio_button_new_with_label( g_pEditTypeRadio, _( "Edit Points" ) );
gtk_box_pack_start( GTK_BOX( hbox ), g_pEditModeEditRadioButton, FALSE, FALSE, 3 );
gtk_widget_show( g_pEditModeEditRadioButton );
g_pEditTypeRadio = gtk_radio_button_group( GTK_RADIO_BUTTON( 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_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_group( GTK_RADIO_BUTTON( 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 );
@ -1186,6 +1186,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){
g_pSecondsEntry = gtk_entry_new();
gtk_box_pack_start( GTK_BOX( hbox ), g_pSecondsEntry, FALSE, FALSE, 0 );
g_object_set( g_pSecondsEntry, "xalign", 1.0, NULL );
gtk_widget_show( g_pSecondsEntry );
// -------------------------- //
@ -1219,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 );
gtk_signal_connect( GTK_OBJECT( g_pTimeLine ), "value-changed", GTK_SIGNAL_FUNC( 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 );

View file

@ -1361,7 +1361,7 @@ GtkWidget* create_main_dialog(){
g_pWnd = dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_title( GTK_WINDOW( dlg ), gszCaption );
g_signal_connect( G_OBJECT( dlg ), "delete_event", G_CALLBACK( main_close ), NULL );
g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( main_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_pRadiantWnd ) );
@ -1373,7 +1373,7 @@ GtkWidget* create_main_dialog(){
notebook = gtk_notebook_new();
gtk_widget_show( notebook );
gtk_box_pack_start( GTK_BOX( hbox ), notebook, TRUE, TRUE, 0 );
g_signal_connect( G_OBJECT( notebook ), "switch_page",
g_signal_connect( G_OBJECT( notebook ), "switch-page",
G_CALLBACK( switch_page ), NULL );
gtk_notebook_set_tab_pos( GTK_NOTEBOOK( notebook ), GTK_POS_TOP );
g_object_set_data( G_OBJECT( dlg ), "notebook", notebook );
@ -1498,7 +1498,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "wavelength", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &WaveLength );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &WaveLength );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1507,7 +1507,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "amplitude", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Amplitude );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Amplitude );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1516,10 +1516,10 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "roughness", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Roughness );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Roughness );
adj = gtk_adjustment_new( 1, 1, 32767, 1, 10, 0 );
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( general_random ), NULL );
g_signal_connect( G_OBJECT( adj ), "value-changed", G_CALLBACK( general_random ), NULL );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table2 ), spin, 1, 2, 3, 4,
@ -1598,7 +1598,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "hmin", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hll );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Hll );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1607,7 +1607,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "hmax", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hur );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Hur );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1616,7 +1616,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "vmin", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vll );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Vll );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1625,7 +1625,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "vmax", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vur );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Vur );
frame = gtk_frame_new( _( "Divisions" ) );
gtk_widget_show( frame );
@ -1653,7 +1653,7 @@ GtkWidget* create_main_dialog(){
g_object_set_data( G_OBJECT( dlg ), "nv_text", label );
adj = gtk_adjustment_new( 8, 1, MAX_ROWS, 1, 10, 0 );
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( extents_nhnv_spin ), &NH );
g_signal_connect( G_OBJECT( adj ), "value-changed", G_CALLBACK( extents_nhnv_spin ), &NH );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1,
@ -1663,7 +1663,7 @@ GtkWidget* create_main_dialog(){
g_object_set_data( G_OBJECT( dlg ), "nh", spin );
adj = gtk_adjustment_new( 8, 1, MAX_ROWS, 1, 10, 0 );
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( extents_nhnv_spin ), &NV );
g_signal_connect( G_OBJECT( adj ), "value-changed", G_CALLBACK( extents_nhnv_spin ), &NV );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 1, 2,
@ -1685,7 +1685,7 @@ GtkWidget* create_main_dialog(){
gtk_object_set_data( GTK_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 );
g_signal_connect( G_OBJECT( adj ), "value-changed", G_CALLBACK( extents_snaptogrid_spin ), &SP );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
gtk_widget_show( spin );
gtk_box_pack_start( GTK_BOX( vbox ), spin, FALSE, TRUE, 0 );
@ -1702,7 +1702,7 @@ GtkWidget* create_main_dialog(){
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
adj = gtk_adjustment_new( 0, 0, 110, 1, 10, 0 );
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( extents_decimate ), NULL );
g_signal_connect( G_OBJECT( adj ), "value-changed", G_CALLBACK( extents_decimate ), NULL );
g_object_set_data( G_OBJECT( dlg ), "decimate_adj", adj );
scale = gtk_hscale_new( GTK_ADJUSTMENT( adj ) );
gtk_widget_show( scale );
@ -1753,7 +1753,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "z01", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z01 );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Z01 );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1762,7 +1762,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "z00", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z00 );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Z00 );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1771,7 +1771,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "z11", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z11 );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Z11 );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1780,7 +1780,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "z10", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z10 );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Z10 );
check = gtk_check_button_new_with_label( "Linear borders" );
gtk_widget_show( check );
@ -1823,7 +1823,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
g_object_set_data( G_OBJECT( dlg ), "bmp_file", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( bitmap_file_entryfocusout ), NULL );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( bitmap_file_entryfocusout ), NULL );
hbox2 = gtk_hbox_new( TRUE, 5 );
gtk_widget_show( hbox2 );
@ -1881,7 +1881,7 @@ GtkWidget* create_main_dialog(){
gtk_box_pack_start( GTK_BOX( hbox2 ), entry, FALSE, FALSE, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "bmp_black", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.black_value );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.black_value );
hbox2 = gtk_hbox_new( FALSE, 5 );
gtk_widget_show( hbox2 );
@ -1894,7 +1894,7 @@ GtkWidget* create_main_dialog(){
gtk_box_pack_start( GTK_BOX( hbox2 ), entry, FALSE, FALSE, 0 );
gtk_widget_set_usize( entry, 50, -2 );
g_object_set_data( G_OBJECT( dlg ), "bmp_white", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.white_value );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.white_value );
vbox = gtk_vbox_new( FALSE, 10 );
gtk_widget_show( vbox );
@ -1945,7 +1945,7 @@ GtkWidget* create_main_dialog(){
g_object_set_data( G_OBJECT( dlg ), "fix_rate_text", label );
adj = gtk_adjustment_new( 0, -65536, 65536, 1, 16, 0 );
g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( fix_value_changed ), NULL );
g_signal_connect( G_OBJECT( adj ), "value-changed", G_CALLBACK( fix_value_changed ), NULL );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1,
@ -1953,7 +1953,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND ), 0, 0 );
gtk_widget_set_usize( spin, 60, -2 );
g_object_set_data( G_OBJECT( dlg ), "fix_value", spin );
g_signal_connect( G_OBJECT( spin ), "focus_out_event", G_CALLBACK( fix_value_entryfocusout ), NULL );
g_signal_connect( G_OBJECT( spin ), "focus-out-event", G_CALLBACK( fix_value_entryfocusout ), NULL );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1962,7 +1962,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 60, -2 );
g_object_set_data( G_OBJECT( dlg ), "fix_range", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( fix_range_entryfocusout ), NULL );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( fix_range_entryfocusout ), NULL );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -1971,7 +1971,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 60, -2 );
g_object_set_data( G_OBJECT( dlg ), "fix_rate", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( fix_rate_entryfocusout ), NULL );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( fix_rate_entryfocusout ), NULL );
button = gtk_button_new_with_label( _( "Free" ) );
gtk_widget_show( button );
@ -2034,7 +2034,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 60, -2 );
g_object_set_data( G_OBJECT( dlg ), "texture1", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 0 ) );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 0 ) );
entry = gtk_entry_new();
gtk_widget_show( entry );
@ -2043,7 +2043,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
gtk_widget_set_usize( entry, 60, -2 );
g_object_set_data( G_OBJECT( dlg ), "texture2", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 1 ) );
g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 1 ) );
entry = gtk_entry_new();
gtk_widget_show( entry );

View file

@ -373,7 +373,7 @@ 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 ), "delete-event", GTK_SIGNAL_FUNC( preview_close ), NULL );
gtk_signal_connect( GTK_OBJECT( dlg ), "destroy", GTK_SIGNAL_FUNC( 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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( 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 );
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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( 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 );
@ -411,7 +411,7 @@ void CreateViewWindow(){
gtk_widget_show( label );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_box_pack_end( GTK_BOX( hbox ), label, FALSE, TRUE, 0 );
g_signal_connect( G_OBJECT( spin ), "focus_out_event", G_CALLBACK( doublevariable_spinfocusout ), &azimuth );
g_signal_connect( G_OBJECT( spin ), "focus-out-event", G_CALLBACK( doublevariable_spinfocusout ), &azimuth );
#endif
frame = gtk_frame_new( NULL );
@ -422,9 +422,9 @@ 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_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 );
gtk_widget_show( g_pPreviewWidget );

View file

@ -59,7 +59,7 @@ 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_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 );

View file

@ -69,7 +69,7 @@ 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_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 );
@ -280,7 +280,7 @@ 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_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 );
@ -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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScroll3d ), lw3label );
table = gtk_table_new( 2, 4, FALSE );
gtk_widget_show( table );
@ -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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( 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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScrollClip ), cliplabel );
hbox = gtk_hbox_new( TRUE, 5 );
gtk_widget_show( hbox );
@ -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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScroll2d ), lw2label );
hbox = gtk_hbox_new( FALSE, 5 );
gtk_widget_show( hbox );

View file

@ -75,7 +75,7 @@ static void change_clicked( GtkWidget *widget, gpointer data ){
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_connect( GTK_OBJECT( file_sel ), "delete-event",
GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_file_selection_hide_fileop_buttons( GTK_FILE_SELECTION( file_sel ) );
@ -105,7 +105,7 @@ 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_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 );

View file

@ -74,7 +74,7 @@ static void change_clicked( GtkWidget *widget, gpointer data ){
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_connect( GTK_OBJECT( file_sel ), "delete-event",
GTK_SIGNAL_FUNC( dialog_delete_callback ), NULL );
gtk_file_selection_hide_fileop_buttons( GTK_FILE_SELECTION( file_sel ) );
@ -107,7 +107,7 @@ 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_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 );
@ -200,7 +200,7 @@ 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_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 );
@ -254,7 +254,7 @@ 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_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 );
@ -465,7 +465,7 @@ 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_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 );
@ -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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScroll3d ), lw3label );
table = gtk_table_new( 2, 4, FALSE );
gtk_widget_show( table );
@ -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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( 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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScrollClip ), cliplabel );
hbox = gtk_hbox_new( TRUE, 5 );
gtk_widget_show( hbox );
@ -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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnScroll2d ), lw2label );
hbox = gtk_hbox_new( FALSE, 5 );
gtk_widget_show( hbox );

View file

@ -445,6 +445,7 @@ typedef void ( *PFN_QERAPP_POINTFILECLEAR )();
typedef void ( *PFN_QERAPP_SYSSETTITLE )( const char *text );
typedef void ( *PFN_QERAPP_CSGMAKEHOLLOW )();
typedef void ( *PFN_QERAPP_CSGMAKEHOLLOWMODE )( int mode );
typedef void ( *PFN_QERAPP_REGIONSPAWNPOINT )( FILE *f );
@ -490,13 +491,6 @@ typedef bfilter_t* ( *PFN_QERPLUG_FILTERADD )( int type, int bmask, const char *
typedef void ( *PFN_QERPLUG_FILTERACTIVATE )( void );
// FIXME:
// add map format extensions
// add texture format handlers
// add surface dialog handler
// add model handler/displayer
// v1 func table
// Plugins need to declare one of these and implement the getfunctable as described above
struct _QERFuncTable_1
{
@ -530,7 +524,6 @@ struct _QERFuncTable_1
PFN_QERAPP_RELEASEACTIVEBRUSHHANDLES m_pfnReleaseActiveBrushHandles;
PFN_QERAPP_GETACTIVEBRUSHHANDLE m_pfnGetActiveBrushHandle;
//++timo this would need to be removed and replaced by the IShaders interface
PFN_QERAPP_TEXTURECOUNT m_pfnTextureCount;
PFN_QERAPP_GETTEXTURE m_pfnGetTexture;
PFN_QERAPP_GETCURRENTTEXTURE m_pfnGetCurrentTexture;
@ -616,11 +609,10 @@ struct _QERFuncTable_1
PFN_QERAPP_MAPSTARTPOSITION m_pfnMapStartPosition;
PFN_QERAPP_MAPREGIONOFF m_pfnMapRegionOff;
PFN_QERAPP_SETBUILDWINDINGSNOTEXBUILD m_pfnSetBuildWindingsNoTexBuild;
// PFN_QERAPP_SAVEASDIALOG m_pfnSaveAsDialog;
PFN_QERAPP_POINTFILECLEAR m_pfnPointFileClear;
// FIXME TTimo prolly want to move that somewhere else
PFN_QERAPP_CSGMAKEHOLLOW m_pfnCSG_MakeHollow;
PFN_QERAPP_CSGMAKEHOLLOWMODE m_pfnCSG_MakeHollowMode;
PFN_QERAPP_REGIONSPAWNPOINT m_pfnRegionSpawnPoint;
PFN_QERAPP_GETTICKCOUNT m_pfnQGetTickCount;
@ -642,6 +634,7 @@ struct _QERFuncTable_1
#define __QERTABLENAME g_FuncTable
#endif
#define CSG_MakeHollow __QERTABLENAME.m_pfnCSG_MakeHollow
#define CSG_MakeHollowMode __QERTABLENAME.m_pfnCSG_MakeHollowMode
#define Sys_Beep __QERTABLENAME.m_pfnSysBeep
#define Sys_Printf __QERTABLENAME.m_pfnSysPrintf
#define Sys_FPrintf __QERTABLENAME.m_pfnSysFPrintf

View file

@ -96,7 +96,7 @@ texdef_t g_old_texdef;
// when TRUE, this thing means the surface inspector is currently being displayed
bool g_surfwin = FALSE;
// turn on/off processing of the "changed" "value_changed" messages
// turn on/off processing of the "changed" "value-changed" messages
// (need to turn off when we are feeding data in)
bool g_bListenChanged = true;
// turn on/off listening of the update messages
@ -549,31 +549,31 @@ void SetTexMods(){
spin = GTK_SPIN_BUTTON( hshift_value_spinbutton );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->shift[0];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->shift[0] );
spin = GTK_SPIN_BUTTON( hshift_step_spinbutton );
gtk_spin_button_set_value( spin, l_pIncrement->shift[0] );
spin = GTK_SPIN_BUTTON( vshift_value_spinbutton );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->shift[1];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->shift[1] );
spin = GTK_SPIN_BUTTON( vshift_step_spinbutton );
gtk_spin_button_set_value( spin, l_pIncrement->shift[1] );
spin = GTK_SPIN_BUTTON( hscale_value_spinbutton );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->scale[0];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->scale[0] );
spin = GTK_SPIN_BUTTON( hscale_step_spinbutton );
gtk_spin_button_set_value( spin, l_pIncrement->scale[0] );
spin = GTK_SPIN_BUTTON( vscale_value_spinbutton );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->scale[1];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->scale[1] );
spin = GTK_SPIN_BUTTON( vscale_step_spinbutton );
gtk_spin_button_set_value( spin, l_pIncrement->scale[1] );
spin = GTK_SPIN_BUTTON( rotate_value_spinbutton );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->rotate;
gtk_adjustment_set_step_increment( adjust, l_pIncrement->rotate );
spin = GTK_SPIN_BUTTON( rotate_step_spinbutton );
gtk_spin_button_set_value( spin, l_pIncrement->rotate );
@ -937,6 +937,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hshift_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( hshift_value_spinbutton ), TRUE );
g_object_set( hshift_value_spinbutton, "xalign", 1.0, NULL );
vshift_value_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
vshift_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vshift_value_spinbutton_adj ), 1, 2 );
@ -947,6 +948,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vshift_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( vshift_value_spinbutton ), TRUE );
g_object_set( vshift_value_spinbutton, "xalign", 1.0, NULL );
hscale_value_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
hscale_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hscale_value_spinbutton_adj ), 1, 4 );
@ -957,6 +959,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hscale_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( hscale_value_spinbutton ), TRUE );
g_object_set( hscale_value_spinbutton, "xalign", 1.0, NULL );
vscale_value_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
vscale_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vscale_value_spinbutton_adj ), 1, 4 );
@ -967,6 +970,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vscale_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), TRUE );
g_object_set( vscale_value_spinbutton, "xalign", 1.0, NULL );
rotate_value_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 0.0 );
rotate_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( rotate_value_spinbutton_adj ), 1, 4 );
@ -977,6 +981,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( rotate_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( rotate_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( rotate_value_spinbutton ), TRUE );
g_object_set( rotate_value_spinbutton, "xalign", 1.0, NULL );
// Step Spins
hshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
@ -986,6 +991,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( hshift_step_spinbutton, "xalign", 1.0, NULL );
vshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
vshift_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vshift_step_spinbutton_adj ), 1, 2 );
@ -994,6 +1000,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( vshift_step_spinbutton, "xalign", 1.0, NULL );
hscale_step_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
hscale_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hscale_step_spinbutton_adj ), 1, 4 );
@ -1002,6 +1009,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( hscale_step_spinbutton, "xalign", 1.0, NULL );
vscale_step_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
vscale_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vscale_step_spinbutton_adj ), 1, 4 );
@ -1010,6 +1018,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( vscale_step_spinbutton, "xalign", 1.0, NULL );
rotate_step_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 0.0 );
rotate_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( rotate_step_spinbutton_adj ), 1, 4 );
@ -1018,6 +1027,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( rotate_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( rotate_step_spinbutton, "xalign", 1.0, NULL );
eventbox = gtk_event_box_new();
gtk_widget_show( eventbox );
@ -1085,6 +1095,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_FILL ), 0, 0 );
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( fit_width_spinbutton ), TRUE );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( fit_width_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( fit_width_spinbutton, "xalign", 1.0, NULL );
fit_height_spinbutton_adj = gtk_adjustment_new( 1, 1, 32, 1, 10, 0 );
fit_height_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( fit_height_spinbutton_adj ), 1, 0 );
@ -1094,6 +1105,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_FILL ), 3, 0 );
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( fit_height_spinbutton ), TRUE );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( fit_height_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( fit_height_spinbutton, "xalign", 1.0, NULL );
eventbox = gtk_event_box_new();
gtk_widget_show( eventbox );
@ -1141,7 +1153,7 @@ GtkWidget* create_SurfaceInspector( void ){
// closing the window (upper right window manager click)
g_signal_connect( (gpointer) SurfaceInspector,
"delete_event",
"delete-event",
G_CALLBACK( apply_and_hide ),
NULL );
@ -1149,11 +1161,11 @@ GtkWidget* create_SurfaceInspector( void ){
G_CALLBACK( gtk_widget_destroy ),
NULL );
g_signal_connect( (gpointer) texture_combo_entry, "key_press_event",
g_signal_connect( (gpointer) texture_combo_entry, "key-press-event",
G_CALLBACK( on_texture_combo_entry_key_press_event ),
NULL );
g_signal_connect( (gpointer) SurfaceInspector, "key_press_event",
g_signal_connect( (gpointer) SurfaceInspector, "key-press-event",
G_CALLBACK( surface_dialog_key_press ),
NULL );
@ -1161,35 +1173,35 @@ GtkWidget* create_SurfaceInspector( void ){
G_CALLBACK( on_texture_combo_entry_activate ),
NULL );
g_signal_connect( (gpointer) hshift_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) hshift_value_spinbutton, "value-changed",
G_CALLBACK( on_hshift_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) vshift_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) vshift_value_spinbutton, "value-changed",
G_CALLBACK( on_vshift_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) hscale_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) hscale_value_spinbutton, "value-changed",
G_CALLBACK( on_hscale_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) vscale_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) vscale_value_spinbutton, "value-changed",
G_CALLBACK( on_vscale_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) rotate_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) rotate_value_spinbutton, "value-changed",
G_CALLBACK( on_rotate_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) hshift_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) hshift_step_spinbutton, "value-changed",
G_CALLBACK( on_hshift_step_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) vshift_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) vshift_step_spinbutton, "value-changed",
G_CALLBACK( on_vshift_step_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) hscale_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) hscale_step_spinbutton, "value-changed",
G_CALLBACK( on_hscale_step_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) vscale_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) vscale_step_spinbutton, "value-changed",
G_CALLBACK( on_vscale_step_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) rotate_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) rotate_step_spinbutton, "value-changed",
G_CALLBACK( on_rotate_step_spinbutton_value_changed ),
NULL );
@ -1197,10 +1209,10 @@ GtkWidget* create_SurfaceInspector( void ){
G_CALLBACK( on_match_grid_button_clicked ),
NULL );
g_signal_connect( (gpointer) fit_width_spinbutton, "value_changed",
g_signal_connect( (gpointer) fit_width_spinbutton, "value-changed",
G_CALLBACK( on_fit_width_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) fit_height_spinbutton, "value_changed",
g_signal_connect( (gpointer) fit_height_spinbutton, "value-changed",
G_CALLBACK( on_fit_height_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) fit_button, "clicked",
@ -1386,7 +1398,7 @@ static void on_hshift_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hshift_step_spinbutton ) );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( hshift_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->shift[0] = val;
}
@ -1406,7 +1418,7 @@ static void on_vshift_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vshift_step_spinbutton ) );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( vshift_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->shift[1] = val;
}
@ -1426,7 +1438,7 @@ static void on_hscale_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hscale_step_spinbutton ) );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( hscale_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->scale[0] = val;
}
@ -1446,7 +1458,7 @@ static void on_vscale_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vscale_step_spinbutton ) );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( vscale_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->scale[1] = val;
}
@ -1466,7 +1478,7 @@ static void on_rotate_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( rotate_step_spinbutton ) );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( rotate_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->rotate = val;
}

View file

@ -74,7 +74,7 @@ char old_texture_entry[128];
// when TRUE, this thing means the surface inspector is currently being displayed
bool g_surfwin = FALSE;
// turn on/off processing of the "changed" "value_changed" messages
// turn on/off processing of the "changed" "value-changed" messages
// (need to turn off when we are feeding data in)
bool g_bListenChanged = TRUE;
// turn on/off listening of the update messages
@ -644,6 +644,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hshift_value_spinbutton ), TRUE );
g_object_set( hshift_value_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
vshift_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 2 );
@ -653,6 +654,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vshift_value_spinbutton ), TRUE );
g_object_set( vshift_value_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
hscale_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 4 );
@ -662,6 +664,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hscale_value_spinbutton ), TRUE );
g_object_set( hscale_value_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
vscale_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 4 );
@ -670,6 +673,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_value_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( vscale_value_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 0.0 );
rotate_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 2 );
@ -679,6 +683,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( rotate_value_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( rotate_value_spinbutton ), TRUE );
g_object_set( rotate_value_spinbutton, "xalign", 1.0, NULL );
// Step Spins
adjustment = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
@ -688,6 +693,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( hshift_step_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
vshift_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 2 );
@ -696,6 +702,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( vshift_step_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
hscale_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 4 );
@ -704,6 +711,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( hscale_step_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
vscale_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 4 );
@ -712,6 +720,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( vscale_step_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 0.0 );
rotate_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 2 );
@ -720,6 +729,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( rotate_step_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( rotate_step_spinbutton, "xalign", 1.0, NULL );
match_grid_button = gtk_button_new_with_mnemonic( "Match Grid" );
gtk_widget_show( match_grid_button );
@ -764,6 +774,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( fit_height_spinbutton ), TRUE );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( fit_height_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( fit_height_spinbutton, "xalign", 1.0, NULL );
adjustment = gtk_adjustment_new( 1, 1, 32, 1, 10, 0 );
fit_width_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( adjustment ), 1, 0 );
@ -773,6 +784,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( fit_width_spinbutton ), TRUE );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( fit_width_spinbutton ), GTK_UPDATE_IF_VALID );
g_object_set( fit_width_spinbutton, "xalign", 1.0, NULL );
fit_button = gtk_button_new_with_mnemonic( "Fit" );
gtk_widget_show( fit_button );
@ -790,52 +802,52 @@ GtkWidget* create_SurfaceInspector( void ){
create_SurfaceFlagsFrame( vbox1 );
g_signal_connect( (gpointer) SurfaceInspector,
"delete_event",
"delete-event",
G_CALLBACK( delete_event_callback ),
NULL );
g_signal_connect( (gpointer) SurfaceInspector, "destroy",
G_CALLBACK( gtk_widget_destroy ),
NULL );
g_signal_connect( (gpointer) SurfaceInspector, "key_press_event",
g_signal_connect( (gpointer) SurfaceInspector, "key-press-event",
G_CALLBACK( surface_inspector_key_press_event ),
NULL );
g_signal_connect( (gpointer) texture_combo_entry, "key_press_event",
g_signal_connect( (gpointer) texture_combo_entry, "key-press-event",
G_CALLBACK( on_texture_combo_entry_key_press_event ),
NULL );
g_signal_connect( (gpointer) texture_combo_entry, "activate",
G_CALLBACK( on_texture_combo_entry_activate ),
NULL );
g_signal_connect( (gpointer) hshift_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) hshift_value_spinbutton, "value-changed",
G_CALLBACK( on_hshift_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) vshift_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) vshift_value_spinbutton, "value-changed",
G_CALLBACK( on_vshift_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) hscale_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) hscale_value_spinbutton, "value-changed",
G_CALLBACK( on_hscale_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) vscale_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) vscale_value_spinbutton, "value-changed",
G_CALLBACK( on_vscale_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) rotate_value_spinbutton, "value_changed",
g_signal_connect( (gpointer) rotate_value_spinbutton, "value-changed",
G_CALLBACK( on_rotate_value_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) hshift_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) hshift_step_spinbutton, "value-changed",
G_CALLBACK( on_hshift_step_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) vshift_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) vshift_step_spinbutton, "value-changed",
G_CALLBACK( on_vshift_step_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) hscale_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) hscale_step_spinbutton, "value-changed",
G_CALLBACK( on_hscale_step_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) vscale_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) vscale_step_spinbutton, "value-changed",
G_CALLBACK( on_vscale_step_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) rotate_step_spinbutton, "value_changed",
g_signal_connect( (gpointer) rotate_step_spinbutton, "value-changed",
G_CALLBACK( on_rotate_step_spinbutton_value_changed ),
NULL );
@ -843,10 +855,10 @@ GtkWidget* create_SurfaceInspector( void ){
G_CALLBACK( on_match_grid_button_clicked ),
NULL );
g_signal_connect( (gpointer) fit_width_spinbutton, "value_changed",
g_signal_connect( (gpointer) fit_width_spinbutton, "value-changed",
G_CALLBACK( on_fit_width_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) fit_height_spinbutton, "value_changed",
g_signal_connect( (gpointer) fit_height_spinbutton, "value-changed",
G_CALLBACK( on_fit_height_spinbutton_value_changed ),
NULL );
g_signal_connect( (gpointer) fit_button, "clicked",
@ -1036,7 +1048,7 @@ static void on_hshift_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hshift_step_spinbutton ) ) ;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( hshift_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->shift[0] = val;
}
@ -1056,7 +1068,7 @@ static void on_vshift_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vshift_step_spinbutton ) ) ;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( vshift_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->shift[1] = val;
}
@ -1076,7 +1088,7 @@ static void on_hscale_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( hscale_step_spinbutton ) ) ;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( hscale_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->scale[0] = val;
}
@ -1096,7 +1108,7 @@ static void on_vscale_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( vscale_step_spinbutton ) ) ;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( vscale_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->scale[1] = val;
}
@ -1116,7 +1128,7 @@ static void on_rotate_step_spinbutton_value_changed( GtkSpinButton *spinbutton,
val = gtk_spin_button_get_value( GTK_SPIN_BUTTON( rotate_step_spinbutton ) ) ;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( rotate_value_spinbutton ) );
adjust->step_increment = val;
gtk_adjustment_set_step_increment( adjust, val );
l_pIncrement->rotate = val;
}

View file

@ -231,13 +231,13 @@ inline void change_contentflag( GtkWidget *togglebutton, int content_flag, gbool
// Surface Flags Callbacks
void on_surface_button_toggled( GtkToggleButton *togglebutton, gpointer user_data ){
int flag = GPOINTER_TO_INT( user_data );
change_surfaceflag( GTK_WIDGET( togglebutton ), flag, ( GTK_TOGGLE_BUTTON( togglebutton )->active ) );
change_surfaceflag( GTK_WIDGET( togglebutton ), flag, gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( togglebutton ) ) );
}
// Content Flags Callbacks
void on_content_button_toggled( GtkToggleButton *togglebutton, gpointer user_data ){
int flag = GPOINTER_TO_INT( user_data );
change_contentflag( GTK_WIDGET( togglebutton ), flag, ( GTK_TOGGLE_BUTTON( togglebutton )->active ) );
change_contentflag( GTK_WIDGET( togglebutton ), flag, gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( togglebutton ) ) );
}
// Value Entry Callback
@ -272,17 +272,17 @@ void on_value_entry_insert_text( GtkEditable *editable, gchar *new_text, gint ne
GTK_SIGNAL_FUNC( on_value_entry_insert_text ),
user_data );
}
gtk_signal_emit_stop_by_name( GTK_OBJECT( editable ), "insert_text" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( editable ), "insert-text" );
g_free( result );
}
void on_surfacebutton_clicked( GtkButton *button, gpointer user_data ){
gtk_notebook_set_page( GTK_NOTEBOOK( notebook1 ), 0 );
gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook1 ), 0 );
}
void on_contentbutton_clicked( GtkButton *button, gpointer user_data ){
gtk_notebook_set_page( GTK_NOTEBOOK( notebook1 ), 1 );
gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook1 ), 1 );
}
#define IDTECH2_FLAG_BUTTON_BORDER 3
@ -365,7 +365,7 @@ GtkWidget* create_SurfaceFlagsFrame( GtkWidget* surfacedialog_widget ){
gtk_signal_connect( GTK_OBJECT( value_entry ), "changed",
GTK_SIGNAL_FUNC( on_value_entry_changed ),
NULL );
gtk_signal_connect( GTK_OBJECT( value_entry ), "insert_text",
gtk_signal_connect( GTK_OBJECT( value_entry ), "insert-text",
GTK_SIGNAL_FUNC( on_value_entry_insert_text ),
NULL );
gtk_entry_set_max_length( (GtkEntry *)value_entry, 11 );

View file

@ -55,7 +55,7 @@ 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_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 );
@ -641,16 +641,16 @@ 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_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_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_connect( GTK_OBJECT( g_pToolWidget ), "button-release-event",
GTK_SIGNAL_FUNC( 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_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 );
return g_pToolWidget;

View file

@ -59,7 +59,7 @@ 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_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 );

View file

@ -57,7 +57,7 @@ CamWnd::~CamWnd (){
void CamWnd::OnCreate(){
if ( !MakeCurrent() ) {
Error( "glMakeCurrent failed" );
Error( "camwindow: glMakeCurrent failed" );
}
// report OpenGL information
@ -514,7 +514,7 @@ 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",
m_FocusOutHandler_id = gtk_signal_connect( GTK_OBJECT( widget ), "focus-out-event",
GTK_SIGNAL_FUNC( camwindow_focusout ), g_pParentWnd );
{

View file

@ -39,7 +39,10 @@ void Brush_Scale( brush_t* b ){
}
}
void CSG_MakeHollow( void ){
void CSG_MakeHollow(){
CSG_MakeHollowMode( CSG_HOLLOW_MODE_OVERLAP );
}
void CSG_MakeHollowMode( int mode ){
brush_t *b, *front, *back, *next;
face_t *f;
face_t split;
@ -59,8 +62,11 @@ void CSG_MakeHollow( void ){
split = *f;
VectorScale( f->plane.normal, g_qeglobals.d_gridsize, move );
for ( i = 0 ; i < 3 ; i++ )
VectorSubtract( split.planepts[i], move, split.planepts[i] );
if( mode == CSG_HOLLOW_MODE_TOUCH ) {
VectorAdd( f->planepts[i], move, f->planepts[i] );
} else {
VectorSubtract( split.planepts[i], move, split.planepts[i] );
}
Brush_SplitBrushByFace( b, &split, &front, &back );
if ( back ) {
Brush_Free( back );
@ -68,6 +74,9 @@ void CSG_MakeHollow( void ){
if ( front ) {
Brush_AddToList( front, &selected_brushes );
}
if( mode == CSG_HOLLOW_MODE_TOUCH ) {
*f = split;
}
}
Brush_Free( b );
}

View file

@ -81,7 +81,7 @@ 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_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 );
@ -133,7 +133,7 @@ void Dialog::UpdateData( bool retrieve ){
break;
case DLG_RADIO_INT:
{
GSList *radio = gtk_radio_button_group( GTK_RADIO_BUTTON( data->object ) );
GSList *radio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( data->object ) );
*(int*)data->buffer = g_slist_length( radio ) - 1;
for (; radio; radio = g_slist_next( radio ) )
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( radio->data ) ) ) {
@ -158,13 +158,13 @@ void Dialog::UpdateData( bool retrieve ){
*(int*)data->buffer = atoi( gtk_entry_get_text( GTK_ENTRY( data->object ) ) );
break;
case DLG_SPIN_FLOAT:
*(float*)data->buffer = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( data->object ) );
*(float*)data->buffer = gtk_spin_button_get_value( GTK_SPIN_BUTTON( data->object ) );
break;
case DLG_SPIN_INT:
*(int*)data->buffer = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( data->object ) );
break;
case DLG_ADJ_INT:
*(int*)data->buffer = (int) GTK_ADJUSTMENT( data->object )->value;
*(int*)data->buffer = (int) gtk_adjustment_get_value( GTK_ADJUSTMENT( data->object ) );
break;
case DLG_COMBO_INT:
{
@ -178,7 +178,7 @@ void Dialog::UpdateData( bool retrieve ){
for ( i = 0; lst != NULL; lst = g_list_next( lst ) )
{
gtk_label_get( GTK_LABEL( GTK_BIN( lst->data )->child ), &label );
label = gtk_label_get_text( GTK_LABEL( lst->data ) );
if ( strcmp( label, entry ) == 0 ) {
*(int*)data->buffer = i;
@ -209,7 +209,7 @@ void Dialog::UpdateData( bool retrieve ){
break;
case DLG_RADIO_INT:
{
GSList *radio = gtk_radio_button_group( GTK_RADIO_BUTTON( data->object ) );
GSList *radio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( data->object ) );
gpointer btn = g_slist_nth_data( radio, g_slist_length( radio ) - ( *(int*)data->buffer ) - 1 );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( btn ), TRUE );
} break;
@ -244,7 +244,7 @@ void Dialog::UpdateData( bool retrieve ){
if ( *(int*)data->buffer != -1 ) {
lst = g_list_nth( lst, *(int*)data->buffer );
if ( lst != NULL ) {
gtk_label_get( GTK_LABEL( GTK_BIN( lst->data )->child ), &entry );
entry = gtk_label_get_text( GTK_LABEL( lst->data ) );
}
}
if ( entry ) {

View file

@ -57,9 +57,9 @@ static void OnClose( GtkWidget *widget, gpointer data ){
}
static void popup_selected( GtkWidget *widget, gpointer data ){
gchar *str;
const gchar *str;
gtk_label_get( GTK_LABEL( GTK_BIN( widget )->child ), &str );
str = gtk_label_get_text( GTK_LABEL( widget ) );
gtk_entry_set_text( GTK_ENTRY( data ), str );
}
@ -146,7 +146,7 @@ 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_connect( GTK_OBJECT( entry ), "focus-in-event",
GTK_SIGNAL_FUNC( find_focus_in ), NULL );
AddDialogData( entry, &m_strFind, DLG_ENTRY_TEXT );
@ -167,7 +167,7 @@ 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_connect( GTK_OBJECT( entry ), "focus-in-event",
GTK_SIGNAL_FUNC( replace_focus_in ), NULL );
AddDialogData( entry, &m_strReplace, DLG_ENTRY_TEXT );

View file

@ -195,7 +195,7 @@ GLWindow::GLWindow( bool zbuffer ) {
m_pParent = NULL;
m_pWidget = gtk_glwidget_new( zbuffer, g_qeglobals_gui.d_glBase );
GTK_WIDGET_SET_FLAGS( m_pWidget, GTK_CAN_FOCUS );
gtk_widget_set_can_focus( m_pWidget, TRUE );
#ifdef DBG_GLWINDOW
Sys_Printf( "GLWindow::GLWindow m_pWidget = %p\n", m_pWidget );
@ -215,13 +215,13 @@ GLWindow::GLWindow( bool zbuffer ) {
// 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 );
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 );
#if GTK_CHECK_VERSION( 1,3,0 )
gtk_signal_connect( GTK_OBJECT( m_pWidget ), "scroll_event", GTK_SIGNAL_FUNC( scroll_event ), this );
gtk_signal_connect( GTK_OBJECT( m_pWidget ), "scroll-event", GTK_SIGNAL_FUNC( scroll_event ), this );
#endif
}

View file

@ -1116,8 +1116,8 @@ static gint entityentry_keypress( GtkWidget* widget, GdkEventKey* event, gpointe
}
static void switch_page( GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer data ){
char *text;
gtk_label_get( GTK_LABEL( gtk_notebook_get_tab_label( notebook, gtk_notebook_get_nth_page( notebook, page_num ) ) ), &text );
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 );
gpointer item = g_object_get_data( G_OBJECT( g_pParentWnd->m_pWidget ), "menu_misc_selectentitycolor" );
@ -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 );
gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", GTK_SIGNAL_FUNC( OnDeleteHide ), NULL );
// catch 'Esc'
gtk_signal_connect( GTK_OBJECT( dlg ), "key_press_event", GTK_SIGNAL_FUNC( OnDialogKey ), NULL );
gtk_signal_connect( GTK_OBJECT( dlg ), "key-press-event", GTK_SIGNAL_FUNC( OnDialogKey ), NULL );
gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pParentWnd->m_pWidget ) );
g_qeglobals_gui.d_entity = dlg;
@ -1283,8 +1283,8 @@ void GroupDlg::Create(){
GtkWidget* view = gtk_tree_view_new_with_model( GTK_TREE_MODEL( store ) );
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
g_signal_connect( G_OBJECT( view ), "button_press_event", G_CALLBACK( eclasslist_button_press ), NULL );
g_signal_connect( G_OBJECT( view ), "key_press_event", G_CALLBACK( eclasslist_keypress ), this );
g_signal_connect( G_OBJECT( view ), "button-press-event", G_CALLBACK( eclasslist_button_press ), NULL );
g_signal_connect( G_OBJECT( view ), "key-press-event", G_CALLBACK( eclasslist_keypress ), this );
{
GtkCellRenderer* renderer = gtk_cell_renderer_text_new();
@ -1411,7 +1411,7 @@ 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_connect( GTK_OBJECT( entry ), "key-press-event",
GTK_SIGNAL_FUNC( entityentry_keypress ), this );
EntWidgets[EntKeyField] = entry;
}
@ -1423,7 +1423,7 @@ 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_connect( GTK_OBJECT( entry ), "key-press-event",
GTK_SIGNAL_FUNC( entityentry_keypress ), this );
EntWidgets[EntValueField] = entry;
}
@ -1628,6 +1628,6 @@ void GroupDlg::Create(){
inspector_mode = W_ENTITY;
m_pWidget = dlg;
g_signal_connect( G_OBJECT( notebook ), "switch_page", G_CALLBACK( switch_page ), dlg );
g_signal_connect( G_OBJECT( notebook ), "switch-page", G_CALLBACK( switch_page ), dlg );
}
}

File diff suppressed because it is too large Load diff

View file

@ -758,9 +758,9 @@ gtk_file_selection_init( GtkFileSelection *filesel ){
gtk_widget_show( label );
filesel->selection_entry = gtk_entry_new();
gtk_signal_connect( GTK_OBJECT( filesel->selection_entry ), "key_press_event",
gtk_signal_connect( GTK_OBJECT( filesel->selection_entry ), "key-press-event",
(GtkSignalFunc) gtk_file_selection_key_press, filesel );
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "focus_in_event",
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "focus-in-event",
(GtkSignalFunc) gtk_widget_grab_default,
GTK_OBJECT( filesel->ok_button ) );
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "activate",
@ -1396,7 +1396,7 @@ gtk_file_selection_key_press( GtkWidget *widget,
g_free( text );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
return TRUE;
}
@ -1606,7 +1606,7 @@ gtk_file_selection_history_combo_callback( GtkWidget *widget, GdkEventKey *event
strcat( path,"/" );
gtk_file_selection_populate( fs,path,TRUE );
g_free( path );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
return TRUE;
}
else

View file

@ -1362,7 +1362,7 @@ gtk_file_selection_init( GtkFileSelection *filesel ){
gtk_signal_connect( GTK_OBJECT( filesel->dir_list ), "unselect_row",
(GtkSignalFunc) gtk_file_selection_undir_button,
(gpointer) filesel );
gtk_signal_connect( GTK_OBJECT( filesel->dir_list ), "button_press_event",
gtk_signal_connect( GTK_OBJECT( filesel->dir_list ), "button-press-event",
GTK_SIGNAL_FUNC( gtk_file_selection_show_fileop_menu ),
(gpointer) filesel );
@ -1432,7 +1432,7 @@ gtk_file_selection_init( GtkFileSelection *filesel ){
(GtkSignalFunc) gtk_file_selection_files_list_key_callback,
(gpointer) filesel );
gtk_signal_connect( GTK_OBJECT( filesel->file_list ), "button_press_event",
gtk_signal_connect( GTK_OBJECT( filesel->file_list ), "button-press-event",
GTK_SIGNAL_FUNC( gtk_file_selection_show_fileop_menu ),
(gpointer) filesel );
@ -1479,7 +1479,7 @@ gtk_file_selection_init( GtkFileSelection *filesel ){
filesel->selection_entry = gtk_entry_new();
gtk_signal_connect( GTK_OBJECT( filesel->selection_entry ), "key_press_event",
gtk_signal_connect( GTK_OBJECT( filesel->selection_entry ), "key-press-event",
(GtkSignalFunc) gtk_file_selection_key_press, filesel );
gtk_table_attach( GTK_TABLE( table ), filesel->selection_entry, 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
@ -1527,7 +1527,7 @@ gtk_file_selection_init( GtkFileSelection *filesel ){
filesel->ok_button = gtk_button_new_with_label( _( "OK" ) );
GTK_WIDGET_SET_FLAGS( filesel->ok_button, GTK_CAN_DEFAULT );
gtk_box_pack_start( GTK_BOX( confirm_area ), filesel->ok_button, TRUE, TRUE, 0 );
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "focus_in_event",
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "focus-in-event",
(GtkSignalFunc) gtk_widget_grab_default,
GTK_OBJECT( filesel->ok_button ) );
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "activate",
@ -2854,7 +2854,7 @@ gtk_file_selection_key_press( GtkWidget *widget,
g_free( text );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
return TRUE;
}
@ -3064,7 +3064,7 @@ static gint gtk_file_selection_files_list_key_callback( GtkWidget *widget, GdkEv
g_print( "complete: %s\n",fs->saved_entry1 );
/* gtk_label_set_text(GTK_LABEL(fs->completion_label),fs->saved_entry1);*/
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
}
else {
if ( fs->saved_entry1 ) {
@ -3095,7 +3095,7 @@ static gint gtk_file_selection_mask_entry_key_callback( GtkWidget *widget, GdkEv
gtk_file_selection_refresh_button( widget,fs );
if ( event->keyval == GDK_Return ) {
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
}
return TRUE;
}
@ -3181,7 +3181,7 @@ gtk_file_selection_history_combo_callback( GtkWidget *widget, GdkEventKey *event
strcat( path,"/" );
gtk_file_selection_populate( fs,path,TRUE );
g_free( path );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
return TRUE;
}
else

View file

@ -737,9 +737,9 @@ gtk_file_selection_init( GtkFileSelection *filesel ){
gtk_widget_show( label );
filesel->selection_entry = gtk_entry_new();
gtk_signal_connect( GTK_OBJECT( filesel->selection_entry ), "key_press_event",
gtk_signal_connect( GTK_OBJECT( filesel->selection_entry ), "key-press-event",
(GtkSignalFunc) gtk_file_selection_key_press, filesel );
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "focus_in_event",
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "focus-in-event",
(GtkSignalFunc) gtk_widget_grab_default,
GTK_OBJECT( filesel->ok_button ) );
gtk_signal_connect_object( GTK_OBJECT( filesel->selection_entry ), "activate",
@ -1375,7 +1375,7 @@ gtk_file_selection_key_press( GtkWidget *widget,
g_free( text );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
return TRUE;
}
@ -1585,7 +1585,7 @@ gtk_file_selection_history_combo_callback( GtkWidget *widget, GdkEventKey *event
strcat( path,"/" );
gtk_file_selection_populate( fs,path,TRUE );
g_free( path );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
return TRUE;
}
else

View file

@ -801,10 +801,10 @@ GtkWidget* create_radio_menu_item_with_mnemonic( GtkWidget *menu, GtkWidget *las
GSList *group = (GSList*)NULL;
if ( last != NULL ) {
group = gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( last ) );
group = gtk_radio_menu_item_get_group( GTK_RADIO_MENU_ITEM( last ) );
}
item = gtk_radio_menu_item_new_with_mnemonic( group, mnemonic );
gtk_check_menu_item_set_state( GTK_CHECK_MENU_ITEM( item ), state );
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( item ), state );
gtk_widget_show( item );
gtk_container_add( GTK_CONTAINER( menu ), item );
@ -865,7 +865,7 @@ static GtkWidget * gtk_AddDlgButton( GtkWidget *container, const char *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 ) );
GTK_WIDGET_SET_FLAGS( btn, GTK_CAN_DEFAULT );
gtk_widget_set_can_default( btn, TRUE );
if( setGrabDefault )
gtk_widget_grab_default( btn );
@ -889,7 +889,7 @@ 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_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 );
@ -1046,7 +1046,7 @@ 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_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 );
@ -1668,7 +1668,7 @@ 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_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 );

View file

@ -924,7 +924,7 @@ int mainRadiant( int argc, char* argv[] ) {
}
#if defined( _WIN32 ) && defined( _MSC_VER )
#if defined( _WIN32 ) && defined( _MSC_VER ) && !defined( _DEBUG )
#include <dbghelp.h>
#include <shellapi.h>
#include <shlobj.h>
@ -967,7 +967,7 @@ int GenerateDump( EXCEPTION_POINTERS* pExceptionPointers ) {
int main( int argc, char* argv[] ) {
#if defined( _WIN32 ) && defined( _MSC_VER )
#if defined( _WIN32 ) && defined( _MSC_VER ) && !defined( _DEBUG )
__try {
return mainRadiant( argc, argv );
} __except( GenerateDump( GetExceptionInformation() ) ) {

View file

@ -297,6 +297,7 @@ SCommandInfo g_Commands[] =
{"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"},
{"Help", GDK_KEY_F1, 0, ID_HELP, "menu_help"},
};
int g_nCommandCount = sizeof( g_Commands ) / sizeof( SCommandInfo );
@ -509,6 +510,7 @@ gint HandleCommand( GtkWidget *widget, gpointer data ){
case ID_SELECTION_ARBITRARYROTATION: g_pParentWnd->OnSelectionArbitraryrotation(); break;
case ID_SELECT_SCALE: g_pParentWnd->OnSelectScale(); break;
case ID_SELECTION_MAKEHOLLOW: g_pParentWnd->OnSelectionMakehollow(); break;
case ID_SELECTION_MAKEHOLLOW_TOUCH: g_pParentWnd->OnSelectionMakehollowTouch(); break;
case ID_SELECTION_CSGSUBTRACT: g_pParentWnd->OnSelectionCsgsubtract(); break;
case ID_SELECTION_CSGMERGE: g_pParentWnd->OnSelectionCsgmerge(); break;
case ID_SELECTION_NOOUTLINE: g_pParentWnd->OnSelectionNoOutline(); break;
@ -806,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" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
return FALSE;
}
}
@ -837,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" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-release-event" );
}
}
@ -1209,8 +1211,10 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){
menu_separator( menu );
create_menu_item_with_mnemonic( menu, _( "Scale..." ), GTK_SIGNAL_FUNC( 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" ),
create_menu_item_with_mnemonic( menu_in_menu, _( "Make _Hollow Overlap" ),
GTK_SIGNAL_FUNC( 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 );
create_menu_item_with_mnemonic( menu_in_menu, _( "CSG _Merge" ),
@ -1595,7 +1599,8 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){
item = create_menu_item_with_mnemonic( menu, _( "GtkRadiant Manual" ),
GTK_SIGNAL_FUNC( HandleCommand ), ID_HELP );
gtk_widget_add_accelerator( item, "activate", accel, GDK_F1, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
// does not work, using g_Commands for the key binding
//gtk_widget_add_accelerator( item, "activate", accel, GDK_F1, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
// this creates all the per-game drop downs for the game pack helps
// it will take care of hooking the Sys_OpenURL calls etc.
@ -1768,10 +1773,14 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){
g_object_set_data( G_OBJECT( window ), "tb_selection_csgmerge", w );
}
w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Hollow" ), "",
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_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"),
G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_SELECTION_MAKEHOLLOW_TOUCH ) );
g_object_set_data( G_OBJECT( window ), "tb_selection_makehollow_touch", w );
if ( g_PrefsDlg.m_bWideToolbar ) {
w = gtk_toolbar_append_element( GTK_TOOLBAR( toolbar ), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL,
@ -2052,6 +2061,13 @@ static void mainframe_unmap( GtkWidget *widget ){
CHECK_MINIMIZE( g_pGroupDlg->m_pWidget );
}
}
static gboolean mainframe_state( GtkWidget *widget, GdkEventWindowState *e, gpointer user_data ){
if( e->changed_mask & GDK_WINDOW_STATE_ICONIFIED && !( e->new_window_state & GDK_WINDOW_STATE_ICONIFIED ) ) {
mainframe_map( widget );
}
return FALSE;
}
static GtkWidget* create_floating( MainFrame* mainframe ){
GtkWidget *wnd = gtk_window_new( GTK_WINDOW_TOPLEVEL );
@ -2060,13 +2076,13 @@ 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 ), "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_connect( GTK_OBJECT( wnd ), "key-press-event",
GTK_SIGNAL_FUNC( mainframe_keypress ), mainframe );
gtk_signal_connect( GTK_OBJECT( wnd ), "key_release_event",
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_connect( GTK_OBJECT( wnd ), "map-event",
GTK_SIGNAL_FUNC( mainframe_map ), mainframe );
gtk_window_set_default_size( GTK_WINDOW( wnd ), 100, 100 );
@ -2370,8 +2386,8 @@ GtkWidget* create_framed_texwnd( TexWnd* texwnd ){
w = gtk_entry_new();
gtk_box_pack_start( GTK_BOX( texbox ), w, FALSE, FALSE, 0 );
texwnd->m_pFilter = w;
g_signal_connect( G_OBJECT( w ), "focus_in_event", G_CALLBACK( entry_focus_in ), NULL );
g_signal_connect( G_OBJECT( w ), "focus_out_event", G_CALLBACK( entry_focus_out ), NULL );
g_signal_connect( G_OBJECT( w ), "focus-in-event", G_CALLBACK( entry_focus_in ), NULL );
g_signal_connect( G_OBJECT( w ), "focus-out-event", G_CALLBACK( entry_focus_out ), NULL );
w = texwnd->GetWidget();
gtk_box_pack_start( GTK_BOX( texbox ), w, TRUE, TRUE, 0 );
@ -2429,18 +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_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_connect( GTK_OBJECT( window ), "key-press-event",
GTK_SIGNAL_FUNC( mainframe_keypress ), this );
gtk_signal_connect( GTK_OBJECT( window ), "key_release_event",
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_connect( GTK_OBJECT( window ), "map-event",
GTK_SIGNAL_FUNC( mainframe_map ), this );
gtk_signal_connect( GTK_OBJECT( window ), "unmap_event",
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_qeglobals_gui.d_main_window = window;
@ -3024,31 +3042,7 @@ static void Sys_Iconify( GtkWidget *w ){
return;
}
#if defined ( __linux__ ) || defined ( __APPLE__ )
Sys_FPrintf( SYS_WRN, "FIXME: Sys_Iconify\n" );
#if 0
XWindowAttributes xattr;
GdkWindowPrivate *Private;
Private = (GdkWindowPrivate*)w->window;
g_object_set_data( G_OBJECT( w ), "was_mapped", GINT_TO_POINTER( 0 ) );
if ( !Private->destroyed ) {
xattr.map_state = IsUnmapped;
XGetWindowAttributes( Private->xdisplay, Private->xwindow, &xattr );
if ( xattr.map_state != IsUnmapped ) {
g_object_set_data( G_OBJECT( w ), "was_mapped", GINT_TO_POINTER( 1 ) );
}
XIconifyWindow( Private->xdisplay, Private->xwindow, 0 );
}
#endif
#endif
#ifdef _WIN32
ShowWindow( (HWND)GDK_WINDOW_HWND( w->window ), SW_MINIMIZE );
#endif
gtk_window_iconify( GTK_WINDOW( w ) );
}
static void Sys_Restore( GtkWidget *w ){
@ -3274,7 +3268,7 @@ void MainFrame::OnDelete(){
save_window_pos( m_pZWnd->m_pParent, g_PrefsDlg.mWindowInfo.posZWnd );
}
else{
g_PrefsDlg.mWindowInfo.nZFloatWidth = GTK_PANED( m_pSplits[0] )->child1_size;
g_PrefsDlg.mWindowInfo.nZFloatWidth = gtk_paned_get_position( GTK_PANED( m_pSplits[0] ) );
}
if ( CurrentStyle() == eFloating ) {
@ -3311,9 +3305,9 @@ void MainFrame::OnDestroy(){
gpointer w;
w = g_object_get_data( G_OBJECT( g_pGroupDlg->m_pWidget ), "split1" );
g_PrefsDlg.mWindowInfo.nEntitySplit1 = GTK_PANED( w )->child1_size;
g_PrefsDlg.mWindowInfo.nEntitySplit1 = gtk_paned_get_position( GTK_PANED( w ) );
w = g_object_get_data( G_OBJECT( g_pGroupDlg->m_pWidget ), "split2" );
g_PrefsDlg.mWindowInfo.nEntitySplit2 = GTK_PANED( w )->child1_size;
g_PrefsDlg.mWindowInfo.nEntitySplit2 = gtk_paned_get_position( GTK_PANED( w ) );
if ( !FloatingGroupDialog() ) {
GtkWidget *vsplit, *hsplit, *vsplit2, *hsplit2;
@ -3323,17 +3317,17 @@ void MainFrame::OnDestroy(){
hsplit = m_pSplits[2];
hsplit2 = m_pSplits[3];
g_PrefsDlg.mWindowInfo.nXYHeight = GTK_PANED( vsplit )->child1_size;
g_PrefsDlg.mWindowInfo.nXYWidth = GTK_PANED( hsplit2 )->child1_size;
g_PrefsDlg.mWindowInfo.nXYHeight = gtk_paned_get_position( GTK_PANED( vsplit ) );
g_PrefsDlg.mWindowInfo.nXYWidth = gtk_paned_get_position( GTK_PANED( hsplit2 ) );
if ( CurrentStyle() == eRegular ) {
g_PrefsDlg.mWindowInfo.nZWidth = GTK_PANED( hsplit )->child1_size;
g_PrefsDlg.mWindowInfo.nZWidth = gtk_paned_get_position( GTK_PANED( hsplit ) );
}
else{
g_PrefsDlg.mWindowInfo.nCamWidth = GTK_PANED( hsplit )->child1_size;
g_PrefsDlg.mWindowInfo.nCamWidth = gtk_paned_get_position( GTK_PANED( hsplit ) );
}
g_PrefsDlg.mWindowInfo.nCamHeight = GTK_PANED( vsplit2 )->child1_size;
g_PrefsDlg.mWindowInfo.nCamHeight = gtk_paned_get_position( GTK_PANED( vsplit2 ) );
}
else
{
@ -5381,6 +5375,16 @@ void MainFrame::OnSelectionMakehollow(){
Undo_End();
}
void MainFrame::OnSelectionMakehollowTouch(){
//if (ActiveXY())
// ActiveXY()->UndoCopy();
Undo_Start( "hollow" );
Undo_AddBrushList( &selected_brushes );
CSG_MakeHollowMode( CSG_HOLLOW_MODE_TOUCH );
Undo_EndBrushList( &selected_brushes );
Undo_End();
}
void MainFrame::OnSelectionCsgsubtract(){
Undo_Start( "CSG subtract" );
CSG_Subtract();

View file

@ -263,6 +263,7 @@ struct SKeyInfo
#define ID_REGION_SETXY 40044
#define ID_REGION_SETBRUSH 40045
#define ID_SELECTION_MAKEHOLLOW 40046
#define ID_SELECTION_MAKEHOLLOW_TOUCH 40051
#define ID_SELECTION_SELECTPARTIALTALL 40047
#define ID_SELECTION_SELECTCOMPLETETALL 40048
#define ID_SELECTION_CSGSUBTRACT 40049
@ -682,6 +683,7 @@ void OnSelectionDragvertecies();
void OnSelectionMakeDetail();
void OnSelectionMakeStructural();
void OnSelectionMakehollow();
void OnSelectionMakehollowTouch();
void OnSelectionSelectcompletetall();
void OnSelectionSelectinside();
void OnSelectionSelectpartialtall();

View file

@ -814,8 +814,9 @@ void Map_SaveFile( const char *filename, qboolean use_region ){
time( &timer );
Sys_Beep();
if( g_PrefsDlg.m_bSaveBeep ) {
Sys_Beep();
}
Sys_Status( "Saved.", 0 );
}
}

View file

@ -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 );
gtk_signal_connect( GTK_OBJECT( dlg ), "delete-event", GTK_SIGNAL_FUNC( OnDone ), NULL );
// catch 'Esc' and 'Enter'
gtk_signal_connect( GTK_OBJECT( dlg ), "key_press_event", GTK_SIGNAL_FUNC( OnDialogKey ), NULL );
gtk_signal_connect( GTK_OBJECT( dlg ), "key-press-event", GTK_SIGNAL_FUNC( OnDialogKey ), NULL );
gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pParentWnd->m_pWidget ) );
@ -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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( 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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( 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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( 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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( 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 );
gtk_signal_connect( adj, "value-changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
g_object_set_data( G_OBJECT( m_pWidget ), "rotate_adj", adj );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );

View file

@ -69,7 +69,7 @@ GtkWidget *GetWidget() { return m_pWidget; }
// 0 is invalid, otherwise it's the Id of the last 'do' we are responsible for
// int m_nUndoId;
// turn on/off processing of the "changed" "value_changed" messages
// turn on/off processing of the "changed" "value-changed" messages
// (need to turn off when we are feeding data in)
// NOTE: much more simple than blocking signals
bool m_bListenChanged;

View file

@ -33,7 +33,7 @@
#endif
//#include "qe3.h"
int QERApp_EClassScanDir( char *path, void* hPlug ){
int QERApp_EClassScanDir( const char *path, void* hPlug ){
char temp[NAME_MAX];
char filebase[NAME_MAX];
char filename[NAME_MAX];

View file

@ -2063,6 +2063,7 @@ bool CSynapseClientRadiant::RequestAPI( APIDescriptor_t *pAPI ){
pTable->m_pfnSetBuildWindingsNoTexBuild = &Brush_SetBuildWindingsNoTexBuild;
pTable->m_pfnPointFileClear = &Pointfile_Clear;
pTable->m_pfnCSG_MakeHollow = &CSG_MakeHollow;
pTable->m_pfnCSG_MakeHollowMode = &CSG_MakeHollowMode;
pTable->m_pfnRegionSpawnPoint = &Region_SpawnPoint;
pTable->m_pfnQGetTickCount = &QERApp_GetTickCount;
pTable->m_pfnGetModelCache = &GetModelCache;

View file

@ -64,6 +64,7 @@
#define VERTEX_KEY "NewVertex"
#define AUTOSAVE_KEY "Autosave"
#define AUTOSAVETIME_KEY "AutosaveMinutes"
#define SAVEBEEP_KEY "SaveBeep"
#define PAK_KEY "UsePAK"
#define NEWAPPLY_KEY "ApplyDismissesSurface"
#define HACK_KEY "Gatewayescapehack"
@ -587,6 +588,7 @@ PrefsDlg::PrefsDlg (){
m_bSetGame = FALSE;
m_bAutoSave = TRUE;
m_nAutoSave = 5;
m_bSaveBeep = TRUE;
m_bLoadLastMap = FALSE;
m_bTextureWindow = FALSE;
m_bSnapShots = FALSE;
@ -1008,12 +1010,14 @@ void CGameDialog::DoGameInstall() {
void CGameDialog::DoGameDialog() {
// allow looping the game selection dialog with calls to the game configure dialog in between
// NOTE: This is *very early* in the process lifetime, we can't call Error() for instance
while ( m_bDoGameInstall ) {
m_bDoGameInstall = false;
if ( DoModal() == IDCANCEL ) {
Error( "game selection dialog canceled, cannot continue" );
gtk_MessageBox( NULL, _( "Run again once you have decided which game you are interested in :-)" ), _( "Message" ), MB_OK );
exit( 0 );
return;
}
@ -1065,7 +1069,7 @@ GtkWidget* CGameDialog::GetGlobalFrame(){
gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 );
AddDialogData( check, &m_bAutoLoadGame, DLG_CHECK_BOOL );
text = gtk_label_new( _( "(this frame is available in the prefs menu if you set auto-select)" ) );
text = gtk_label_new( _( "(use preferences to undo this)" ) );
gtk_widget_show( text );
gtk_box_pack_start( GTK_BOX( vbox ), text, FALSE, FALSE, 0 );
@ -1140,18 +1144,18 @@ void CGameDialog::BuildDialog() {
gtk_container_add( GTK_CONTAINER( vbox1 ), GetGlobalFrame() );
mTopBox = vbox1;
setup_button = gtk_button_new_with_label( _( "Configure more games" ) );
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 );
button = gtk_button_new_with_label( _( "OK" ) );
button = gtk_button_new_with_label( _( "Start editor on selected game" ) );
gtk_widget_show( button );
gtk_box_pack_start( GTK_BOX( vbox1 ), button, FALSE, FALSE, 0 );
AddModalButton( button, IDOK );
button = gtk_button_new_with_label( _( "Cancel" ) );
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 );
button = gtk_button_new_with_label( _( "Exit" ) );
gtk_widget_show( button );
gtk_box_pack_start( GTK_BOX( vbox1 ), button, FALSE, FALSE, 0 );
AddModalButton( button, IDCANCEL );
@ -2462,6 +2466,11 @@ void PrefsDlg::BuildDialog(){
gtk_widget_show( label );
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, FALSE, 0 );
check = gtk_check_button_new_with_label( _( "Beep on save" ) );
gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 );
gtk_widget_show( check );
AddDialogData( check, &m_bSaveBeep, DLG_CHECK_BOOL );
// Add the page to the notebook
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
@ -2753,7 +2762,7 @@ void PrefsDlg::BuildDialog(){
// Add the page to the notebook
gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), pageframe, preflabel );
gtk_notebook_set_page( GTK_NOTEBOOK( notebook ), PTAB_FRONT );
gtk_notebook_set_current_page( GTK_NOTEBOOK( notebook ), PTAB_FRONT );
}
// end new prefs dialog
@ -2949,6 +2958,7 @@ void PrefsDlg::LoadPrefs(){
mLocalPrefs.GetPref( TINYBRUSH_KEY, &m_bCleanTiny, FALSE );
mLocalPrefs.GetPref( TINYSIZE_KEY, &m_fTinySize, 0.5f );
mLocalPrefs.GetPref( AUTOSAVETIME_KEY, &m_nAutoSave, 5 );
mLocalPrefs.GetPref( SAVEBEEP_KEY, &m_bSaveBeep, TRUE );
mLocalPrefs.GetPref( SNAPSHOT_KEY, &m_bSnapShots, FALSE );
mLocalPrefs.GetPref( MOVESPEED_KEY, &m_nMoveSpeed, 100 );
mLocalPrefs.GetPref( ANGLESPEED_KEY, &m_nAngleSpeed, 3 );

View file

@ -589,6 +589,7 @@ bool m_bInternalBSP;
bool m_bRightClick;
bool m_bSetGame;
bool m_bAutoSave;
bool m_bSaveBeep;
bool m_bLoadLastMap;
bool m_bTextureWindow;
bool m_bSnapShots;

View file

@ -1294,27 +1294,12 @@ void WINAPI Sys_EndWait( void ){
}
void Sys_GetCursorPos( int *x, int *y ){
#ifdef _WIN32
POINT p;
if ( !GetCursorPos( &p ) ) {
Sys_Printf( "GetCursorPos failed: GetLastError()=0x%08x", GetLastError() );
return;
}
*x = p.x;
*y = p.y;
#else
gdk_window_get_pointer( NULL, x, y, NULL );
#endif
gdk_display_get_pointer( gdk_display_get_default(), 0, x, y, 0 );
}
void Sys_SetCursorPos( int x, int y ){
#ifdef _WIN32
if ( !SetCursorPos( x, y ) ) {
Sys_Printf( "SetCursorPos failed: GetLastError()=0x%08x", GetLastError() );
}
#else
XWarpPointer( GDK_DISPLAY(), None, GDK_ROOT_WINDOW(), 0, 0, 0, 0, x, y );
#endif
GdkDisplay *display = gdk_display_get_default();
gdk_display_warp_pointer( display, gdk_display_get_default_screen( display ), x, y );
}
void Sys_Beep( void ){

View file

@ -222,7 +222,10 @@ void Drag_MouseUp( int nButtons = 0 );
//
// csg.c
//
#define CSG_HOLLOW_MODE_OVERLAP (0)
#define CSG_HOLLOW_MODE_TOUCH (1)
void CSG_MakeHollow( void );
void CSG_MakeHollowMode( int mode );
void CSG_Subtract( void );
void CSG_Merge( void );

View file

@ -51,7 +51,7 @@ texdef_t g_old_texdef;
// when != NULL, this thing means the surface inspector is currently being displayed
// NOTE a boolean flag would have been more explicit, this is totally so ugly
GtkWidget* g_surfwin = NULL;
// turn on/off processing of the "changed" "value_changed" messages
// turn on/off processing of the "changed" "value-changed" messages
// (need to turn off when we are feeding data in)
bool g_bListenChanged = true;
// the struct used to store the increments (saved in registry)
@ -313,27 +313,27 @@ static void OnIncrementChanged( GtkWidget *widget, gpointer data ){
if ( widget == g_dlgSurface.GetDlgWidget( "hshift_inc" ) ) {
l_pIncrement->shift[0] = val;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "hshift" ) ) );
adjust->step_increment = l_pIncrement->shift[0];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->shift[0] );
}
else if ( widget == g_dlgSurface.GetDlgWidget( "vshift_inc" ) ) {
l_pIncrement->shift[1] = val;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "vshift" ) ) );
adjust->step_increment = l_pIncrement->shift[1];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->shift[1] );
}
else if ( widget == g_dlgSurface.GetDlgWidget( "hscale_inc" ) ) {
l_pIncrement->scale[0] = val;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "hscale" ) ) );
adjust->step_increment = l_pIncrement->scale[0];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->scale[0] );
}
else if ( widget == g_dlgSurface.GetDlgWidget( "vscale_inc" ) ) {
l_pIncrement->scale[1] = val;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "vscale" ) ) );
adjust->step_increment = l_pIncrement->scale[1];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->scale[1] );
}
else if ( widget == g_dlgSurface.GetDlgWidget( "rotate_inc" ) ) {
l_pIncrement->rotate = val;
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( g_dlgSurface.GetDlgWidget( "rotate" ) ) );
adjust->step_increment = l_pIncrement->rotate;
gtk_adjustment_set_step_increment( adjust, l_pIncrement->rotate );
}
}
@ -509,9 +509,9 @@ void SurfaceDlg::BuildDialog() {
load_window_pos( dlg, g_PrefsDlg.mWindowInfo.posSurfaceWnd );
gtk_window_set_title( GTK_WINDOW( dlg ), _( "Surface inspector" ) );
//g_signal_connect (G_OBJECT (dlg), "delete_event", G_CALLBACK (OnCancel), NULL);
//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 );
gtk_signal_connect( GTK_OBJECT( dlg ), "key-press-event", GTK_SIGNAL_FUNC( 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 );
gtk_signal_connect( GTK_OBJECT( entry ), "key-press-event", GTK_SIGNAL_FUNC( 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,7 +550,7 @@ 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_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1,
@ -584,7 +584,7 @@ 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_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 1, 2,
@ -618,7 +618,7 @@ 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_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 2, 3,
@ -652,7 +652,7 @@ 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_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 3, 4,
@ -686,7 +686,7 @@ 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_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value-changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 4, 5,
@ -928,13 +928,13 @@ void SurfaceDlg::SetTexMods(){
gtk_spin_button_set_value( spin, pt->shift[0] );
}
GtkAdjustment *adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->shift[0];
gtk_adjustment_set_step_increment( adjust, l_pIncrement->shift[0] );
char buf[10]; // got into snprintf paranoia after BoundChecker detected a stack overrun
#ifdef _WIN32
// TTimo: THIS IS UGLY
#define snprintf _snprintf
#endif
snprintf( buf, 10, "%g", l_pIncrement->shift[0] );
snprintf( buf, sizeof( buf ), "%g", l_pIncrement->shift[0] );
gtk_entry_set_text( GTK_ENTRY( GetDlgWidget( "hshift_inc" ) ), buf );
spin = GTK_SPIN_BUTTON( GetDlgWidget( "vshift" ) );
@ -946,8 +946,8 @@ void SurfaceDlg::SetTexMods(){
gtk_spin_button_set_value( spin, pt->shift[1] );
}
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->shift[1];
snprintf( buf, 10, "%g", l_pIncrement->shift[1] );
gtk_adjustment_set_step_increment( adjust, l_pIncrement->shift[1] );
snprintf( buf, sizeof( buf ), "%g", l_pIncrement->shift[1] );
gtk_entry_set_text( GTK_ENTRY( GetDlgWidget( "vshift_inc" ) ), buf );
spin = GTK_SPIN_BUTTON( GetDlgWidget( "hscale" ) );
@ -955,8 +955,8 @@ void SurfaceDlg::SetTexMods(){
gtk_spin_button_set_value( spin, g_qeglobals.m_bBrushPrimitMode ? m_scale[0] : pt->scale[0] );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->scale[0];
snprintf( buf, 10, "%g", l_pIncrement->scale[0] );
gtk_adjustment_set_step_increment( adjust, l_pIncrement->scale[0] );
snprintf( buf, sizeof( buf ), "%g", l_pIncrement->scale[0] );
gtk_entry_set_text( GTK_ENTRY( GetDlgWidget( "hscale_inc" ) ), buf );
spin = GTK_SPIN_BUTTON( GetDlgWidget( "vscale" ) );
@ -964,8 +964,8 @@ void SurfaceDlg::SetTexMods(){
gtk_spin_button_set_value( spin, g_qeglobals.m_bBrushPrimitMode ? m_scale[1] : pt->scale[1] );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->scale[1];
snprintf( buf, 10, "%g", l_pIncrement->scale[1] );
gtk_adjustment_set_step_increment( adjust, l_pIncrement->scale[1] );
snprintf( buf, sizeof( buf ), "%g", l_pIncrement->scale[1] );
gtk_entry_set_text( GTK_ENTRY( GetDlgWidget( "vscale_inc" ) ), buf );
//++timo compute BProtate as int ..
@ -974,8 +974,8 @@ void SurfaceDlg::SetTexMods(){
gtk_spin_button_set_value( spin, g_qeglobals.m_bBrushPrimitMode ? m_rotate : pt->rotate );
adjust = gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) );
adjust->step_increment = l_pIncrement->rotate;
snprintf( buf, 10, "%g", l_pIncrement->rotate );
gtk_adjustment_set_step_increment( adjust, l_pIncrement->rotate );
snprintf( buf, sizeof( buf ), "%g", l_pIncrement->rotate );
gtk_entry_set_text( GTK_ENTRY( GetDlgWidget( "rotate_inc" ) ), buf );
g_bListenChanged = true;
@ -1042,15 +1042,15 @@ void SurfaceDlg::GetTexMods(){
( g_qeglobals.m_bBrushPrimitMode ? m_shift[0] : pt->shift[0] ) =
gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( GetDlgWidget( "hshift" ) ) );
gtk_spin_button_get_value( GTK_SPIN_BUTTON( GetDlgWidget( "hshift" ) ) );
( g_qeglobals.m_bBrushPrimitMode ? m_shift[1] : pt->shift[1] ) =
gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( GetDlgWidget( "vshift" ) ) );
gtk_spin_button_get_value( GTK_SPIN_BUTTON( GetDlgWidget( "vshift" ) ) );
( g_qeglobals.m_bBrushPrimitMode ? m_scale[0] : pt->scale[0] ) =
gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( GetDlgWidget( "hscale" ) ) );
gtk_spin_button_get_value( GTK_SPIN_BUTTON( GetDlgWidget( "hscale" ) ) );
( g_qeglobals.m_bBrushPrimitMode ? m_scale[1] : pt->scale[1] ) =
gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( GetDlgWidget( "vscale" ) ) );
gtk_spin_button_get_value( GTK_SPIN_BUTTON( GetDlgWidget( "vscale" ) ) );
( g_qeglobals.m_bBrushPrimitMode ? m_rotate : pt->rotate ) =
gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( GetDlgWidget( "rotate" ) ) );
gtk_spin_button_get_value( GTK_SPIN_BUTTON( GetDlgWidget( "rotate" ) ) );
// a local copy of the texture matrix, given for a qtexture_t with width=2 height=2
brushprimit_texdef_t local_bp;

View file

@ -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 );
gtk_signal_connect( GTK_OBJECT( vadjustment ), "value-changed", GTK_SIGNAL_FUNC( vertical_scroll ), this );
if ( g_PrefsDlg.m_bTextureScrollbar ) {
gtk_widget_show( g_qeglobals_gui.d_texture_scroll );
@ -1709,12 +1709,12 @@ void TexWnd::OnExpose() {
if ( g_PrefsDlg.m_bTextureScrollbar && ( m_bNeedRange || g_qeglobals.d_texturewin.m_nTotalHeight != nOld ) ) {
GtkAdjustment *vadjustment = gtk_range_get_adjustment( GTK_RANGE( g_qeglobals_gui.d_texture_scroll ) );
vadjustment->value = -g_qeglobals.d_texturewin.originy;
vadjustment->page_size = m_pWidget->allocation.height;
vadjustment->page_increment = m_pWidget->allocation.height / 2;
vadjustment->step_increment = 20;
vadjustment->lower = 0;
vadjustment->upper = g_qeglobals.d_texturewin.m_nTotalHeight;
gtk_adjustment_set_value( vadjustment, -g_qeglobals.d_texturewin.originy );
gtk_adjustment_set_page_size( vadjustment, m_pWidget->allocation.height );
gtk_adjustment_set_page_increment( vadjustment, m_pWidget->allocation.height / 2 );
gtk_adjustment_set_step_increment( vadjustment, 20 );
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" );
@ -1761,7 +1761,7 @@ void TexWnd::OnMouseMove( guint32 flags, int pointx, int pointy ){
void TexWnd::OnVScroll(){
GtkAdjustment *vadjustment = gtk_range_get_adjustment( GTK_RANGE( g_qeglobals_gui.d_texture_scroll ) );
g_qeglobals.d_texturewin.originy = -(int)vadjustment->value;
g_qeglobals.d_texturewin.originy = -(int)gtk_adjustment_get_value( vadjustment );
RedrawWindow();
}

View file

@ -78,7 +78,7 @@ static gint keypress( GtkWidget* widget, GdkEventKey* event, gpointer data ){
IWindowListener *pListen = static_cast<IWindowListener *>( data );
ret = pListen->OnKeyPressed( gdk_keyval_name( event->keyval ) );
if ( ret ) {
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key_press_event" );
gtk_signal_emit_stop_by_name( GTK_OBJECT( widget ), "key-press-event" );
}
return ret;
}
@ -133,16 +133,16 @@ 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_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_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_connect( GTK_OBJECT( m_pGLWidget ), "button-release-event",
GTK_SIGNAL_FUNC( 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_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 );
gtk_widget_show( m_pGLWidget );

View file

@ -3185,7 +3185,7 @@ bool XYWnd::AreaSelectOK(){
void XYWnd::OnCreate(){
if ( !MakeCurrent() ) {
Error( "glXMakeCurrent failed" );
Error( "xywindow: glXMakeCurrent failed" );
}
qglPolygonStipple( (unsigned char *)s_stipple );