From: TimePath Date: Wed, 17 Feb 2016 05:00:42 +0000 (+1100) Subject: Wrap GtkSpinButton X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=07f5b13c77f5651921a01052ba4832197fdb1c9b;p=xonotic%2Fnetradiant.git Wrap GtkSpinButton --- diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index 08791cc8..4ae4d58c 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -1516,7 +1516,7 @@ GtkWidget* create_main_dialog(){ adj = ui::Adjustment( 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 ); + spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table2 ), spin, 1, 2, 3, 4, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1650,7 +1650,7 @@ GtkWidget* create_main_dialog(){ adj = ui::Adjustment( 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 ); + spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1660,7 +1660,7 @@ GtkWidget* create_main_dialog(){ adj = ui::Adjustment( 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 ); + spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1682,7 +1682,7 @@ GtkWidget* create_main_dialog(){ adj = ui::Adjustment( 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 ); + spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( spin ); gtk_box_pack_start( GTK_BOX( vbox ), spin, FALSE, TRUE, 0 ); gtk_widget_set_usize( spin, 60, -2 ); @@ -1942,7 +1942,7 @@ GtkWidget* create_main_dialog(){ adj = ui::Adjustment( 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 ); + spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND ), @@ -2058,7 +2058,7 @@ GtkWidget* create_main_dialog(){ gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 ); adj = ui::Adjustment( 60, 0, 90, 1, 10, 0 ); - spin = gtk_spin_button_new( GTK_ADJUSTMENT( adj ), 1, 0 ); + spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( spin ); gtk_box_pack_start( GTK_BOX( hbox2 ), spin, FALSE, TRUE, 0 ); g_object_set_data( G_OBJECT( dlg ), "tex_slant", spin ); diff --git a/contrib/gtkgensurf/view.cpp b/contrib/gtkgensurf/view.cpp index fc88bedc..fd245a2f 100644 --- a/contrib/gtkgensurf/view.cpp +++ b/contrib/gtkgensurf/view.cpp @@ -395,14 +395,14 @@ void CreateViewWindow(){ adj = ui::Adjustment( 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 ); + spin = ui::SpinButton( 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 = ui::Adjustment( 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 ); + spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( spin ); gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( spin ), TRUE ); gtk_box_pack_end( GTK_BOX( hbox ), spin, FALSE, TRUE, 0 ); diff --git a/contrib/sunplug/sunplug.cpp b/contrib/sunplug/sunplug.cpp index 895ec17c..7455d492 100644 --- a/contrib/sunplug/sunplug.cpp +++ b/contrib/sunplug/sunplug.cpp @@ -316,7 +316,6 @@ void GetOptimalCoordinates( AABB *levelBoundingBox ){ // MapCoordinator dialog window void MapCoordinator(){ GtkWidget *window, *vbox, *table, *label, *spinnerMinX, *spinnerMinY, *spinnerMaxX, *spinnerMaxY, *button; - GtkAdjustment *spinner_adj_MinX, *spinner_adj_MinY, *spinner_adj_MaxX, *spinner_adj_MaxY; Entity *theWorldspawn = NULL; const char *buffer; char line[20]; @@ -367,10 +366,10 @@ void MapCoordinator(){ globalOutputStream() << "SunPlug: adviced mapcoordsmins=" << minX << " " << maxY << "\n"; // console info about mapcoordsmins globalOutputStream() << "SunPlug: adviced mapcoordsmaxs=" << maxX << " " << minY << "\n"; // console info about mapcoordsmaxs - spinner_adj_MinX = ui::Adjustment( map_minX, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of minimum x value - spinner_adj_MinY = ui::Adjustment( map_minY, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of minimum y value - spinner_adj_MaxX = ui::Adjustment( map_maxX, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of maximum x value - spinner_adj_MaxY = ui::Adjustment( map_maxY, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of maximum y value + auto spinner_adj_MinX = ui::Adjustment( map_minX, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of minimum x value + auto spinner_adj_MinY = ui::Adjustment( map_minY, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of minimum y value + auto spinner_adj_MaxX = ui::Adjustment( map_maxX, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of maximum x value + auto spinner_adj_MaxY = ui::Adjustment( map_maxY, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of maximum y value button = ui::Button( "Get optimal mapcoords" ); // create button with text g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( input_optimal ), NULL ); // connect button with callback function @@ -395,20 +394,20 @@ void MapCoordinator(){ gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // align text to the left side gtk_table_attach_defaults( GTK_TABLE( table ), label, 0, 1, 1, 2 ); // insert label into table - spinnerMinX = gtk_spin_button_new( spinner_adj_MinX, 1.0, 0 ); // create textbox wiht value spin, value and value range + spinnerMinX = ui::SpinButton( spinner_adj_MinX, 1.0, 0 ); // create textbox wiht value spin, value and value range gtk_table_attach_defaults( GTK_TABLE( table ), spinnerMinX, 1, 2, 1, 2 ); // insert spinbox into table - spinnerMinY = gtk_spin_button_new( spinner_adj_MinY, 1.0, 0 ); // create textbox wiht value spin, value and value range + spinnerMinY = ui::SpinButton( spinner_adj_MinY, 1.0, 0 ); // create textbox wiht value spin, value and value range gtk_table_attach_defaults( GTK_TABLE( table ), spinnerMinY, 2, 3, 1, 2 ); // insert spinbox into table label = ui::Label( "mapcoordsmaxs" ); // create label gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // align text to the left side gtk_table_attach_defaults( GTK_TABLE( table ), label, 0, 1, 2, 3 ); // insert label into table - spinnerMaxX = gtk_spin_button_new( spinner_adj_MaxX, 1.0, 0 ); // create textbox wiht value spin, value and value range + spinnerMaxX = ui::SpinButton( spinner_adj_MaxX, 1.0, 0 ); // create textbox wiht value spin, value and value range gtk_table_attach_defaults( GTK_TABLE( table ), spinnerMaxX, 1, 2, 2, 3 ); // insert spinbox into table - spinnerMaxY = gtk_spin_button_new( spinner_adj_MaxY, 1.0, 0 ); // create textbox wiht value spin, value and value range + spinnerMaxY = ui::SpinButton( spinner_adj_MaxY, 1.0, 0 ); // create textbox wiht value spin, value and value range gtk_table_attach_defaults( GTK_TABLE( table ), spinnerMaxY, 2, 3, 2, 3 ); // insert spinbox into table // put the references to the spinboxes and the worldspawn into the global exchange diff --git a/libs/uilib/uilib.cpp b/libs/uilib/uilib.cpp index 838832f8..21a603d5 100644 --- a/libs/uilib/uilib.cpp +++ b/libs/uilib/uilib.cpp @@ -128,6 +128,9 @@ namespace ui { ScrolledWindow::ScrolledWindow() : ScrolledWindow(GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(nullptr, nullptr))) { } + SpinButton::SpinButton(Adjustment adjustment, double climb_rate, std::size_t digits) : SpinButton(GTK_SPIN_BUTTON(gtk_spin_button_new(adjustment, climb_rate, digits))) + { } + Table::Table(std::size_t rows, std::size_t columns, bool homogenous) : Table(GTK_TABLE(gtk_table_new(rows, columns, homogenous))) { } diff --git a/libs/uilib/uilib.h b/libs/uilib/uilib.h index fb4bbfe6..d42428a0 100644 --- a/libs/uilib/uilib.h +++ b/libs/uilib/uilib.h @@ -19,6 +19,7 @@ using ui_menuitem = struct _GtkMenuItem; using ui_modal = struct ModalDialog; using ui_object = struct _GtkObject; using ui_scrolledwindow = struct _GtkScrolledWindow; +using ui_spinbutton = struct _GtkSpinButton; using ui_table = struct _GtkTable; using ui_treemodel = struct _GtkTreeModel; using ui_treeview = struct _GtkTreeView; @@ -170,12 +171,14 @@ namespace ui { ScrolledWindow(); ); + WRAP(SpinButton, Widget, ui_spinbutton, + SpinButton(Adjustment adjustment, double climb_rate, std::size_t digits); + ); + WRAP(Table, Widget, ui_table, Table(std::size_t rows, std::size_t columns, bool homogenous); ); - WRAP(SpinButton, Widget, ui_widget,); - WRAP(TreeModel, Widget, ui_treemodel,); WRAP(TreeView, Widget, ui_treeview, diff --git a/radiant/dialog.cpp b/radiant/dialog.cpp index 5540be31..337f414f 100644 --- a/radiant/dialog.cpp +++ b/radiant/dialog.cpp @@ -92,7 +92,7 @@ GtkSpinButton* DialogSpinner_new( double value, double lower, double upper, int { ++digits; } - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( ui::Adjustment( value, lower, upper, step, 10, 0 ), step, digits ) ); + GtkSpinButton* spin = ui::SpinButton( ui::Adjustment( value, lower, upper, step, 10, 0 ), step, digits ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_widget_set_size_request( GTK_WIDGET( spin ), 64, -1 ); return spin; @@ -635,7 +635,7 @@ ui::SpinButton Dialog::addSpinner( ui::Widget vbox, const char* name, double val DialogSpinnerRow row( DialogSpinnerRow_new( name, value, lower, upper, 1 ) ); AddIntSpinnerData( *row.m_spin, importViewer, exportViewer ); DialogVBox_packRow( GTK_VBOX( vbox ), row.m_row ); - return ui::SpinButton(row.m_row); + return ui::SpinButton(row.m_spin); } ui::SpinButton Dialog::addSpinner( ui::Widget vbox, const char* name, int& data, double value, double lower, double upper ){ @@ -646,5 +646,5 @@ ui::SpinButton Dialog::addSpinner( ui::Widget vbox, const char* name, double val DialogSpinnerRow row( DialogSpinnerRow_new( name, value, lower, upper, 10 ) ); AddFloatSpinnerData( *row.m_spin, importViewer, exportViewer ); DialogVBox_packRow( GTK_VBOX( vbox ), row.m_row ); - return ui::SpinButton(row.m_row); + return ui::SpinButton(row.m_spin); } diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index 0f074114..eff14bd6 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -902,11 +902,11 @@ ui::Window PatchInspector::BuildDialog(){ // so we need to have at least one initialisation somewhere entry_set_float( entry, g_pi_globals.shift[0] ); - GtkAdjustment* adj = ui::Adjustment( 0, -8192, 8192, 1, 1, 0 ); + auto adj = ui::Adjustment( 0, -8192, 8192, 1, 1, 0 ); g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( window ), "hshift_adj", adj ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) ); + GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 0, 1, (GtkAttachOptions)( 0 ), @@ -923,11 +923,11 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 ); entry_set_float( entry, g_pi_globals.shift[1] ); - GtkAdjustment* adj = ui::Adjustment( 0, -8192, 8192, 1, 1, 0 ); + auto adj = ui::Adjustment( 0, -8192, 8192, 1, 1, 0 ); g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( window ), "vshift_adj", adj ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) ); + GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 1, 2, (GtkAttachOptions)( 0 ), @@ -944,11 +944,11 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 ); entry_set_float( entry, g_pi_globals.scale[0] ); - GtkAdjustment* adj = ui::Adjustment( 0, -1000, 1000, 1, 1, 0 ); + auto adj = ui::Adjustment( 0, -1000, 1000, 1, 1, 0 ); g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( window ), "hscale_adj", adj ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) ); + GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 2, 3, (GtkAttachOptions)( 0 ), @@ -965,11 +965,11 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 ); entry_set_float( entry, g_pi_globals.scale[1] ); - GtkAdjustment* adj = ui::Adjustment( 0, -1000, 1000, 1, 1, 0 ); + auto adj = ui::Adjustment( 0, -1000, 1000, 1, 1, 0 ); g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( window ), "vscale_adj", adj ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) ); + GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 3, 4, (GtkAttachOptions)( 0 ), @@ -986,11 +986,11 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_set_usize( GTK_WIDGET( entry ), 50, -2 ); entry_set_float( entry, g_pi_globals.rotate ); - GtkAdjustment* adj = ui::Adjustment( 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 + auto adj = ui::Adjustment( 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 g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( OnSpinChanged ), entry ); g_object_set_data( G_OBJECT( window ), "rotate_adj", adj ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) ); + GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 4, 5, (GtkAttachOptions)( 0 ), diff --git a/radiant/select.cpp b/radiant/select.cpp index 37f88bfa..e8f1db1d 100644 --- a/radiant/select.cpp +++ b/radiant/select.cpp @@ -945,8 +945,8 @@ void DoRotateDlg(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkAdjustment* adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) ); + auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 ); + GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -959,8 +959,8 @@ void DoRotateDlg(){ g_rotate_dialog.x = spin; } { - GtkAdjustment* adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) ); + auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 ); + GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 ); gtk_widget_show( GTK_WIDGET( spin ) ); gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -971,8 +971,8 @@ void DoRotateDlg(){ g_rotate_dialog.y = spin; } { - GtkAdjustment* adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 ); - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) ); + auto adj = ui::Adjustment( 0, -359, 359, 1, 10, 0 ); + GtkSpinButton* spin = ui::SpinButton( adj, 1, 0 ); 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 07dd1e61..f1597159 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -640,7 +640,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 ) ); + GtkSpinButton* spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 ); m_hshiftIncrement.m_spin = spin; m_hshiftSpinner.connect( spin ); gtk_widget_show( GTK_WIDGET( spin ) ); @@ -676,7 +676,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 ) ); + GtkSpinButton* spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 ); m_vshiftIncrement.m_spin = spin; m_vshiftSpinner.connect( spin ); gtk_widget_show( GTK_WIDGET( spin ) ); @@ -712,7 +712,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 5 ) ); + GtkSpinButton* spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 5 ); m_hscaleIncrement.m_spin = spin; m_hscaleSpinner.connect( spin ); gtk_widget_show( GTK_WIDGET( spin ) ); @@ -748,7 +748,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 5 ) ); + GtkSpinButton* spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 5 ); m_vscaleIncrement.m_spin = spin; m_vscaleSpinner.connect( spin ); gtk_widget_show( GTK_WIDGET( spin ) ); @@ -784,7 +784,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 ) ); + GtkSpinButton* spin = ui::SpinButton( ui::Adjustment( 0, -8192, 8192, 2, 8, 0 ), 0, 2 ); m_rotateIncrement.m_spin = spin; m_rotateSpinner.connect( spin ); gtk_widget_show( GTK_WIDGET( spin ) ); @@ -923,7 +923,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_widget_set_usize( button, 60, -2 ); } { - ui::Widget spin = ui::Widget(gtk_spin_button_new( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 )); + ui::Widget spin = ui::SpinButton( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -932,7 +932,7 @@ ui::Window SurfaceInspector::BuildDialog(){ AddDialogData( *GTK_SPIN_BUTTON( spin ), m_fitHorizontal ); } { - ui::Widget spin = ui::Widget(gtk_spin_button_new( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 )); + ui::Widget spin = ui::SpinButton( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 ); gtk_widget_show( spin ); gtk_table_attach( GTK_TABLE( table ), spin, 3, 4, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),