some more gtk spin-button cleanup ( Preferences / Surface Inspector / Patch Inspector / Arbitrary Rotation / gtkGenSurf plugin )

This commit is contained in:
Chris Brooke 2013-07-22 03:06:06 +01:00
parent 3d1b78ed2f
commit 60a0f49052
7 changed files with 43 additions and 43 deletions

View file

@ -1518,7 +1518,7 @@ GtkWidget* create_main_dialog(){
g_object_set_data( G_OBJECT( dlg ), "roughness", entry );
g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Roughness );
adj = gtk_adjustment_new( 1, 1, 32767, 1, 10, 10 );
adj = gtk_adjustment_new( 1, 1, 32767, 1, 10, 0 );
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 );
@ -1652,7 +1652,7 @@ GtkWidget* create_main_dialog(){
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
g_object_set_data( G_OBJECT( dlg ), "nv_text", label );
adj = gtk_adjustment_new( 8, 1, MAX_ROWS, 1, 10, 10 );
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 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
gtk_widget_show( spin );
@ -1662,7 +1662,7 @@ GtkWidget* create_main_dialog(){
gtk_widget_set_usize( spin, 60, -2 );
g_object_set_data( G_OBJECT( dlg ), "nh", spin );
adj = gtk_adjustment_new( 8, 1, MAX_ROWS, 1, 10, 10 );
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 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
gtk_widget_show( spin );
@ -1684,7 +1684,7 @@ GtkWidget* create_main_dialog(){
gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 );
gtk_object_set_data( GTK_OBJECT( dlg ), "snap_text", label );
adj = gtk_adjustment_new( 8, 0, 256, 1, 10, 10 );
adj = gtk_adjustment_new( 8, 0, 256, 1, 10, 0 );
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 );
@ -1701,7 +1701,7 @@ GtkWidget* create_main_dialog(){
gtk_widget_show( label );
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
adj = gtk_adjustment_new( 0, 0, 110, 1, 10, 10 );
adj = gtk_adjustment_new( 0, 0, 110, 1, 10, 0 );
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 ) );
@ -1944,7 +1944,7 @@ GtkWidget* create_main_dialog(){
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
g_object_set_data( G_OBJECT( dlg ), "fix_rate_text", label );
adj = gtk_adjustment_new( 0, -65536, 65536, 1, 16, 16 );
adj = gtk_adjustment_new( 0, -65536, 65536, 1, 16, 0 );
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 );
@ -2061,7 +2061,7 @@ GtkWidget* create_main_dialog(){
gtk_widget_show( label );
gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
adj = gtk_adjustment_new( 60, 0, 90, 1, 10, 10 );
adj = gtk_adjustment_new( 60, 0, 90, 1, 10, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
gtk_widget_show( spin );
gtk_box_pack_start( GTK_BOX( hbox2 ), spin, FALSE, TRUE, 0 );

View file

@ -393,14 +393,14 @@ void CreateViewWindow(){
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
gtk_box_pack_start( GTK_BOX( hbox ), label, FALSE, TRUE, 0 );
adj = gtk_adjustment_new( 30, -90, 90, 1, 10, 10 );
adj = gtk_adjustment_new( 30, -90, 90, 1, 10, 0 );
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 );
adj = gtk_adjustment_new( 30, 0, 359, 1, 10, 10 );
adj = gtk_adjustment_new( 30, 0, 359, 1, 10, 0 );
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 );

View file

@ -1016,7 +1016,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_container_add( GTK_CONTAINER( eventbox ), lock_valuechange_togglebutton );
// Value Spins
hshift_value_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
hshift_value_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
hshift_value_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hshift_value_spinbutton_adj ), 1, 2 );
gtk_widget_show( hshift_value_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), hshift_value_spinbutton, 1, 2, 2, 3,
@ -1026,7 +1026,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hshift_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( hshift_value_spinbutton ), FALSE );
vshift_value_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
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 );
gtk_widget_show( vshift_value_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), vshift_value_spinbutton, 1, 2, 4, 5,
@ -1036,7 +1036,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vshift_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( vshift_value_spinbutton ), FALSE );
hscale_value_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
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 );
gtk_widget_show( hscale_value_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), hscale_value_spinbutton, 1, 2, 6, 7,
@ -1046,7 +1046,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hscale_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( hscale_value_spinbutton ), FALSE );
vscale_value_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
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 );
gtk_widget_show( vscale_value_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), vscale_value_spinbutton, 1, 2, 8, 9,
@ -1056,7 +1056,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vscale_value_spinbutton ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), FALSE );
rotate_value_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 10.0 );
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 );
gtk_widget_show( rotate_value_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), rotate_value_spinbutton, 1, 2, 10, 11,
@ -1067,7 +1067,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_widget_set_sensitive( GTK_WIDGET( rotate_value_spinbutton ), FALSE );
// Offset Spins
hshift_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
hshift_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
hshift_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hshift_offset_spinbutton_adj ), 0, 2 );
gtk_widget_show( hshift_offset_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), hshift_offset_spinbutton, 2, 3, 2, 3,
@ -1077,7 +1077,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_offset_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hshift_offset_spinbutton ), TRUE );
vshift_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
vshift_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
vshift_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vshift_offset_spinbutton_adj ), 0, 2 );
gtk_widget_show( vshift_offset_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), vshift_offset_spinbutton, 2, 3, 4, 5,
@ -1087,7 +1087,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_offset_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vshift_offset_spinbutton ), TRUE );
hscale_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
hscale_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
hscale_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hscale_offset_spinbutton_adj ), 0, 4 );
gtk_widget_show( hscale_offset_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), hscale_offset_spinbutton, 2, 3, 6, 7,
@ -1097,7 +1097,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_offset_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( hscale_offset_spinbutton ), TRUE );
vscale_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
vscale_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 0.0 );
vscale_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( vscale_offset_spinbutton_adj ), 0, 4 );
gtk_widget_show( vscale_offset_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), vscale_offset_spinbutton, 2, 3, 8, 9,
@ -1107,7 +1107,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_offset_spinbutton ), GTK_UPDATE_IF_VALID );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( vscale_offset_spinbutton ), TRUE );
rotate_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 10.0 );
rotate_offset_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 0.0 );
rotate_offset_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( rotate_offset_spinbutton_adj ), 0, 4 );
gtk_widget_show( rotate_offset_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), rotate_offset_spinbutton, 2, 3, 10, 11,
@ -1118,7 +1118,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( rotate_offset_spinbutton ), TRUE );
// Step Spins
hshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
hshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 0.0 );
hshift_step_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( hshift_step_spinbutton_adj ), 1, 2 );
gtk_widget_show( hshift_step_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), hshift_step_spinbutton, 3, 4, 2, 3,
@ -1126,7 +1126,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hshift_step_spinbutton ), GTK_UPDATE_IF_VALID );
vshift_step_spinbutton_adj = gtk_adjustment_new( 0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0 );
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 );
gtk_widget_show( vshift_step_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), vshift_step_spinbutton, 3, 4, 4, 5,
@ -1134,7 +1134,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vshift_step_spinbutton ), GTK_UPDATE_IF_VALID );
hscale_step_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
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 );
gtk_widget_show( hscale_step_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), hscale_step_spinbutton, 3, 4, 6, 7,
@ -1142,7 +1142,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( hscale_step_spinbutton ), GTK_UPDATE_IF_VALID );
vscale_step_spinbutton_adj = gtk_adjustment_new( 0.0, -1024.0, 1024.0, 1.0, 4.0, 4.0 );
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 );
gtk_widget_show( vscale_step_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), vscale_step_spinbutton, 3, 4, 8, 9,
@ -1150,7 +1150,7 @@ GtkWidget* create_SurfaceInspector( void ){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( vscale_step_spinbutton ), GTK_UPDATE_IF_VALID );
rotate_step_spinbutton_adj = gtk_adjustment_new( 0.0, -360.0, 360.0, 1.0, 10.0, 10.0 );
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 );
gtk_widget_show( rotate_step_spinbutton );
gtk_table_attach( GTK_TABLE( table1 ), rotate_step_spinbutton, 3, 4, 10, 11,
@ -1216,7 +1216,7 @@ GtkWidget* create_SurfaceInspector( void ){
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT );
gtk_misc_set_alignment( GTK_MISC( label ), 0.5, 1 );
fit_width_spinbutton_adj = gtk_adjustment_new( 1, 1, 32, 1, 10, 10 );
fit_width_spinbutton_adj = gtk_adjustment_new( 1, 1, 32, 1, 10, 0 );
fit_width_spinbutton = gtk_spin_button_new( GTK_ADJUSTMENT( fit_width_spinbutton_adj ), 1, 0 );
gtk_widget_show( fit_width_spinbutton );
gtk_table_attach( GTK_TABLE( table5 ), fit_width_spinbutton, 1, 2, 1, 2,
@ -1225,7 +1225,7 @@ GtkWidget* create_SurfaceInspector( void ){
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 );
fit_height_spinbutton_adj = gtk_adjustment_new( 1, 1, 32, 1, 10, 10 );
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 );
gtk_widget_show( fit_height_spinbutton );
gtk_table_attach( GTK_TABLE( table5 ), fit_height_spinbutton, 2, 3, 1, 2,

View file

@ -1732,7 +1732,7 @@ void DoRotateDlg(){
(GtkAttachOptions) ( 0 ),
(GtkAttachOptions) ( 0 ), 0, 0 );
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 10 );
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 0 );
x = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
g_object_set_data( G_OBJECT( dlg ), "x", x );
gtk_widget_show( x );
@ -1742,7 +1742,7 @@ void DoRotateDlg(){
gtk_widget_set_usize( x, 60, -2 );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( x ), TRUE );
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 10 );
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 0 );
y = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
g_object_set_data( G_OBJECT( dlg ), "y", y );
gtk_widget_show( y );
@ -1751,7 +1751,7 @@ void DoRotateDlg(){
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( y ), TRUE );
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 10 );
adj = gtk_adjustment_new( 0, -359, 359, 1, 10, 0 );
z = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 );
g_object_set_data( G_OBJECT( dlg ), "z", z );
gtk_widget_show( z );

View file

@ -509,7 +509,7 @@ void PatchDialog::BuildDialog(){
sprintf( buf, "%g", l_pPIIncrement->shift[0] );
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 1 );
adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 0 );
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
g_object_set_data( G_OBJECT( m_pWidget ), "hshift_adj", adj );
@ -529,7 +529,7 @@ void PatchDialog::BuildDialog(){
sprintf( buf, "%g", l_pPIIncrement->shift[1] );
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 1 );
adj = gtk_adjustment_new( 0, -8192, 8192, 1, 1, 0 );
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
g_object_set_data( G_OBJECT( m_pWidget ), "vshift_adj", adj );
@ -549,7 +549,7 @@ void PatchDialog::BuildDialog(){
sprintf( buf, "%g", l_pPIIncrement->scale[0] );
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 1 );
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 );
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
g_object_set_data( G_OBJECT( m_pWidget ), "hscale_adj", adj );
@ -569,7 +569,7 @@ void PatchDialog::BuildDialog(){
sprintf( buf, "%g", l_pPIIncrement->scale[1] );
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 1 );
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 );
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
g_object_set_data( G_OBJECT( m_pWidget ), "vscale_adj", adj );
@ -589,7 +589,7 @@ void PatchDialog::BuildDialog(){
sprintf( buf, "%g", l_pPIIncrement->rotate );
gtk_entry_set_text( GTK_ENTRY( entry ), buf );
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 1 ); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
adj = gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 ); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnSpinChanged ), entry );
g_object_set_data( G_OBJECT( m_pWidget ), "rotate_adj", adj );

View file

@ -2385,7 +2385,7 @@ void PrefsDlg::BuildDialog(){
(GtkAttachOptions) ( 0 ), 0, 0 );
// spinner (allows undo levels to be set to zero)
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 0, 64, 1, 10, 10 ) ), 1, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 0, 64, 1, 10, 0 ) ), 1, 0 );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
@ -2456,7 +2456,7 @@ void PrefsDlg::BuildDialog(){
AddDialogData( check, &m_bAutoSave, DLG_CHECK_BOOL );
// spinner
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 60, 1, 10, 10 ) ), 1, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 60, 1, 10, 0 ) ), 1, 0 );
gtk_widget_show( spin );
gtk_box_pack_start( GTK_BOX( hbox2 ), spin, FALSE, FALSE, 0 );
gtk_widget_set_usize( spin, 60, -2 );

View file

@ -545,7 +545,7 @@ void SurfaceDlg::BuildDialog() {
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 8 ) ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 0 );
g_object_set_data( G_OBJECT( dlg ), "hshift", spin );
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
@ -579,7 +579,7 @@ void SurfaceDlg::BuildDialog() {
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 8 ) ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 0 );
g_object_set_data( G_OBJECT( dlg ), "vshift", spin );
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
@ -613,7 +613,7 @@ void SurfaceDlg::BuildDialog() {
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 10 ) ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 0 ) ), 0, 0 );
g_object_set_data( G_OBJECT( dlg ), "hscale", spin );
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
@ -647,7 +647,7 @@ void SurfaceDlg::BuildDialog() {
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 10 ) ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 10, 0 ) ), 0, 0 );
g_object_set_data( G_OBJECT( dlg ), "vscale", spin );
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
@ -681,7 +681,7 @@ void SurfaceDlg::BuildDialog() {
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -360, 360, 1, 10, 10 ) ), 1, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -360, 360, 1, 10, 0 ) ), 1, 0 );
g_object_set_data( G_OBJECT( dlg ), "rotate", spin );
gtk_signal_connect( GTK_OBJECT( gtk_spin_button_get_adjustment( GTK_SPIN_BUTTON( spin ) ) ), "value_changed",
GTK_SIGNAL_FUNC( OnUpdate ), NULL );
@ -807,7 +807,7 @@ void SurfaceDlg::BuildDialog() {
GTK_SIGNAL_FUNC( OnBtnPatchFit ), NULL );
gtk_widget_set_usize( button, 60, -2 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 10 ) ), 1, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 0 ) ), 1, 0 );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 2, 3, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
@ -815,7 +815,7 @@ void SurfaceDlg::BuildDialog() {
gtk_widget_set_usize( spin, 60, -2 );
AddDialogData( spin, &m_nWidth, DLG_SPIN_INT );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 10 ) ), 1, 0 );
spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 1, 32, 1, 10, 0 ) ), 1, 0 );
gtk_widget_show( spin );
gtk_table_attach( GTK_TABLE( table ), spin, 3, 4, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),