From 1f31e94aca222852c2c11eb9f95aeb54bbdbbef7 Mon Sep 17 00:00:00 2001 From: Garux Date: Sun, 4 Feb 2018 20:56:45 +0300 Subject: [PATCH] undo 'numeric GtkSpinButtons in SI, arbitrary rotation dialog' (aint flexible enough for input) --- radiant/select.cpp | 9 +++------ radiant/surfacedialog.cpp | 7 ------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/radiant/select.cpp b/radiant/select.cpp index 2b6380bb..846da18f 100644 --- a/radiant/select.cpp +++ b/radiant/select.cpp @@ -1273,8 +1273,7 @@ void DoRotateDlg(){ } { GtkAdjustment* adj = GTK_ADJUSTMENT( gtk_adjustment_new( 0, -359, 359, 1, 10, 0 ) ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 1 ) ); - gtk_spin_button_set_numeric( spin, TRUE ); + GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 2 ) ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1288,8 +1287,7 @@ void DoRotateDlg(){ } { GtkAdjustment* adj = GTK_ADJUSTMENT( gtk_adjustment_new( 0, -359, 359, 1, 10, 0 ) ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 1 ) ); - gtk_spin_button_set_numeric( spin, TRUE ); + GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 2 ) ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1301,8 +1299,7 @@ void DoRotateDlg(){ } { GtkAdjustment* adj = GTK_ADJUSTMENT( gtk_adjustment_new( 0, -359, 359, 1, 10, 0 ) ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 1 ) ); - gtk_spin_button_set_numeric( spin, TRUE ); + GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 2 ) ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 2, 3, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index b3056160..6898c7ff 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -714,7 +714,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 2 ) ); m_hshiftIncrement.m_spin = spin; m_hshiftSpinner.connect( spin ); - gtk_spin_button_set_numeric( spin, TRUE ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -751,7 +750,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 2 ) ); m_vshiftIncrement.m_spin = spin; m_vshiftSpinner.connect( spin ); - gtk_spin_button_set_numeric( spin, TRUE ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -788,7 +786,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 5 ) ); m_hscaleIncrement.m_spin = spin; m_hscaleSpinner.connect( spin ); - gtk_spin_button_set_numeric( spin, TRUE ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 2, 3, (GtkAttachOptions) ( GTK_FILL ), @@ -825,7 +822,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 8, 0 ) ), 0, 5 ) ); m_vscaleIncrement.m_spin = spin; m_vscaleSpinner.connect( spin ); - gtk_spin_button_set_numeric( spin, TRUE ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 3, 4, (GtkAttachOptions) ( GTK_FILL ), @@ -862,7 +858,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 0, -8192, 8192, 2, 45, 0 ) ), 0, 2 ) ); m_rotateIncrement.m_spin = spin; m_rotateSpinner.connect( spin ); - gtk_spin_button_set_numeric( spin, TRUE ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( spin ), 1, 2, 4, 5, (GtkAttachOptions) ( GTK_FILL ), @@ -1038,7 +1033,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ } { GtkWidget* spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 0, 1 << 16, 1, 10, 0 ) ), 0, 2 ); - gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( spin ), TRUE ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1048,7 +1042,6 @@ GtkWindow* SurfaceInspector::BuildDialog(){ } { GtkWidget* spin = gtk_spin_button_new( GTK_ADJUSTMENT( gtk_adjustment_new( 1, 0, 1 << 16, 1, 10, 0 ) ), 0, 2 ); - gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( spin ), TRUE ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 3, 4, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),