From: TimePath Date: Wed, 17 Feb 2016 04:07:28 +0000 (+1100) Subject: Wrap GtkTable X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c845abb86113794585802b2a05ef96d5e36ebefe;p=xonotic%2Fnetradiant.git Wrap GtkTable --- diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index f5da88c3..5fe84ece 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -1352,7 +1352,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 2, 3, TRUE ); + table = ui::Table( 2, 3, TRUE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -1400,7 +1400,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 2, 3, TRUE ); + table = ui::Table( 2, 3, TRUE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -1456,7 +1456,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 2, 3, TRUE ); + table = ui::Table( 2, 3, TRUE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -1512,7 +1512,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 1, 3, TRUE ); + table = ui::Table( 1, 3, TRUE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -1678,7 +1678,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 2, 3, TRUE ); + table = ui::Table( 2, 3, TRUE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -1721,7 +1721,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 2, 3, TRUE ); + table = ui::Table( 2, 3, TRUE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -1763,7 +1763,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 2, 3, TRUE ); + table = ui::Table( 2, 3, TRUE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -1806,7 +1806,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 2, 3, TRUE ); + table = ui::Table( 2, 3, TRUE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); diff --git a/contrib/camera/dialogs.cpp b/contrib/camera/dialogs.cpp index 4e2f68cd..63fde75e 100644 --- a/contrib/camera/dialogs.cpp +++ b/contrib/camera/dialogs.cpp @@ -1010,7 +1010,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ // the table // -------------------------- // - table = gtk_table_new( 3, 2, FALSE ); + table = ui::Table( 3, 2, FALSE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( window ), table ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index f255ae61..e4736401 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -1374,7 +1374,7 @@ GtkWidget* create_main_dialog(){ gtk_notebook_set_tab_pos( GTK_NOTEBOOK( notebook ), GTK_POS_TOP ); g_object_set_data( G_OBJECT( dlg ), "notebook", notebook ); - table = gtk_table_new( 2, 2, FALSE ); + table = ui::Table( 2, 2, FALSE ); gtk_widget_show( table ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -1447,7 +1447,7 @@ GtkWidget* create_main_dialog(){ g_signal_connect( G_OBJECT( radio ), "toggled", G_CALLBACK( general_plane ), GINT_TO_POINTER( i ) ); } - table2 = gtk_table_new( 4, 2, FALSE ); + table2 = ui::Table( 4, 2, FALSE ); gtk_widget_show( table2 ); gtk_table_set_row_spacings( GTK_TABLE( table2 ), 5 ); gtk_table_set_col_spacings( GTK_TABLE( table2 ), 5 ); @@ -1540,7 +1540,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( hbox2 ), frame, TRUE, TRUE, 0 ); - table = gtk_table_new( 3, 4, FALSE ); + table = ui::Table( 3, 4, FALSE ); gtk_widget_show( table ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); gtk_container_add( GTK_CONTAINER( frame ), table ); @@ -1627,7 +1627,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( hbox2 ), frame, TRUE, TRUE, 0 ); - table = gtk_table_new( 2, 2, FALSE ); + table = ui::Table( 2, 2, FALSE ); gtk_widget_show( table ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); gtk_container_add( GTK_CONTAINER( frame ), table ); @@ -1711,7 +1711,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), frame, FALSE, TRUE, 0 ); - table = gtk_table_new( 3, 4, FALSE ); + table = ui::Table( 3, 4, FALSE ); gtk_widget_show( table ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); gtk_container_add( GTK_CONTAINER( frame ), table ); @@ -1799,7 +1799,7 @@ GtkWidget* create_main_dialog(){ gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 ); g_object_set_data( G_OBJECT( dlg ), "bmp_note", label ); - table = gtk_table_new( 2, 2, FALSE ); + table = ui::Table( 2, 2, FALSE ); gtk_widget_show( table ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 ); @@ -1841,7 +1841,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "bmp_reload", button ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( bitmap_reload ), NULL ); - table = gtk_table_new( 2, 2, TRUE ); + table = ui::Table( 2, 2, TRUE ); gtk_widget_show( table ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 ); @@ -1909,7 +1909,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_show( label ); gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 ); - table = gtk_table_new( 3, 3, FALSE ); + table = ui::Table( 3, 3, FALSE ); gtk_widget_show( table ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 ); @@ -1996,7 +1996,7 @@ GtkWidget* create_main_dialog(){ gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), vbox, label ); // ^Fishman - Modified to add more labels and textboxes. - table = gtk_table_new( 5, 2, FALSE ); + table = ui::Table( 5, 2, FALSE ); gtk_widget_show( table ); gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -2063,7 +2063,7 @@ GtkWidget* create_main_dialog(){ gtk_box_pack_start( GTK_BOX( hbox2 ), spin, FALSE, TRUE, 0 ); g_object_set_data( G_OBJECT( dlg ), "tex_slant", spin ); - table = gtk_table_new( 2, 4, TRUE ); + table = ui::Table( 2, 4, TRUE ); gtk_widget_show( table ); gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, TRUE, 0 ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); diff --git a/contrib/prtview/ConfigDialog.cpp b/contrib/prtview/ConfigDialog.cpp index 71cca931..02457414 100644 --- a/contrib/prtview/ConfigDialog.cpp +++ b/contrib/prtview/ConfigDialog.cpp @@ -285,7 +285,7 @@ void DoConfigDialog(){ gtk_box_pack_start( GTK_BOX( hbox ), lw3label, FALSE, TRUE, 0 ); gtk_signal_connect( adj, "value_changed", GTK_SIGNAL_FUNC( OnScroll3d ), lw3label ); - table = gtk_table_new( 2, 4, FALSE ); + table = ui::Table( 2, 4, FALSE ); gtk_widget_show( table ); gtk_box_pack_start( GTK_BOX( vbox2 ), table, TRUE, TRUE, 0 ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -359,7 +359,7 @@ void DoConfigDialog(){ GTK_SIGNAL_FUNC( OnSelchangeZbuffer ), GINT_TO_POINTER( 2 ) ); gtk_menu_append( GTK_MENU( menu ), item ); - table = gtk_table_new( 2, 2, FALSE ); + table = ui::Table( 2, 2, FALSE ); gtk_widget_show( table ); gtk_box_pack_start( GTK_BOX( vbox2 ), table, TRUE, TRUE, 0 ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); diff --git a/contrib/sunplug/sunplug.cpp b/contrib/sunplug/sunplug.cpp index 77ce83bd..5a68dc8a 100644 --- a/contrib/sunplug/sunplug.cpp +++ b/contrib/sunplug/sunplug.cpp @@ -378,7 +378,7 @@ void MapCoordinator(){ gtk_box_pack_start( GTK_BOX( vbox ), gtk_hseparator_new(), FALSE, FALSE, 2 ); // insert separator into vbox - table = gtk_table_new( 4, 3, TRUE ); // create table + table = ui::Table( 4, 3, TRUE ); // create table gtk_table_set_row_spacings( GTK_TABLE( table ), 8 ); // set row spacings gtk_table_set_col_spacings( GTK_TABLE( table ), 8 ); // set column spacings gtk_box_pack_start( GTK_BOX( vbox ), table, FALSE, FALSE, 2 ); // insert table into vbox diff --git a/libs/gtkutil/dialog.cpp b/libs/gtkutil/dialog.cpp index 19c8f60c..ca654b9d 100644 --- a/libs/gtkutil/dialog.cpp +++ b/libs/gtkutil/dialog.cpp @@ -57,7 +57,7 @@ GtkFrame* create_dialog_frame( const char* label, GtkShadowType shadow ){ } GtkTable* create_dialog_table( unsigned int rows, unsigned int columns, unsigned int row_spacing, unsigned int col_spacing, int border ){ - GtkTable* table = GTK_TABLE( gtk_table_new( rows, columns, FALSE ) ); + GtkTable* table = ui::Table( rows, columns, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_table_set_row_spacings( table, row_spacing ); gtk_table_set_col_spacings( table, col_spacing ); @@ -254,7 +254,7 @@ GtkLabel* DialogLabel_new( const char* name ){ } GtkTable* DialogRow_new( const char* name, GtkWidget* widget ){ - GtkTable* table = GTK_TABLE( gtk_table_new( 1, 3, TRUE ) ); + GtkTable* table = ui::Table( 1, 3, TRUE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_table_set_col_spacings( table, 4 ); diff --git a/libs/uilib/uilib.cpp b/libs/uilib/uilib.cpp index c7407529..eb153982 100644 --- a/libs/uilib/uilib.cpp +++ b/libs/uilib/uilib.cpp @@ -118,6 +118,9 @@ namespace ui { ScrolledWindow::ScrolledWindow() : ScrolledWindow(GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(nullptr, nullptr))) { } + Table::Table(std::size_t rows, std::size_t columns, bool homogenous) : Table(GTK_TABLE(gtk_table_new(rows, columns, homogenous))) + { } + TreeView::TreeView(TreeModel model) : TreeView(GTK_TREE_VIEW(gtk_tree_view_new_with_model(model))) { } diff --git a/libs/uilib/uilib.h b/libs/uilib/uilib.h index 22bd9074..19ce370a 100644 --- a/libs/uilib/uilib.h +++ b/libs/uilib/uilib.h @@ -15,6 +15,7 @@ using ui_menu = struct _GtkMenu; using ui_menuitem = struct _GtkMenuItem; using ui_modal = struct ModalDialog; using ui_scrolledwindow = struct _GtkScrolledWindow; +using ui_table = struct _GtkTable; using ui_treemodel = struct _GtkTreeModel; using ui_treeview = struct _GtkTreeView; using ui_typeinst = struct _GTypeInstance; @@ -147,6 +148,10 @@ namespace ui { ScrolledWindow(); ); + 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,); diff --git a/radiant/dialog.cpp b/radiant/dialog.cpp index 6fb5161e..a77c29ff 100644 --- a/radiant/dialog.cpp +++ b/radiant/dialog.cpp @@ -559,7 +559,7 @@ void Dialog::addRadio( ui::Widget vbox, const char* name, int& data, StringArray } void Dialog::addRadioIcons( ui::Widget vbox, const char* name, StringArrayRange icons, const IntImportCallback& importViewer, const IntExportCallback& exportViewer ){ - ui::Widget table = ui::Widget(gtk_table_new( 2, static_cast( icons.last - icons.first ), FALSE )); + ui::Widget table = ui::Table( 2, icons.last - icons.first, FALSE ); gtk_widget_show( table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index 86268e31..b509432b 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -1395,7 +1395,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){ { // Spawnflags (4 colums wide max, or window gets too wide.) - GtkTable* table = GTK_TABLE( gtk_table_new( 4, 4, FALSE ) ); + GtkTable* table = ui::Table( 4, 4, FALSE ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), FALSE, TRUE, 0 ); gtk_widget_show( GTK_WIDGET( table ) ); @@ -1454,7 +1454,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){ { // key/value entry - GtkTable* table = GTK_TABLE( gtk_table_new( 2, 2, FALSE ) ); + GtkTable* table = ui::Table( 2, 2, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), FALSE, TRUE, 0 ); gtk_table_set_row_spacings( table, 3 ); diff --git a/radiant/findtexturedialog.cpp b/radiant/findtexturedialog.cpp index f89efa9c..b19fc04f 100644 --- a/radiant/findtexturedialog.cpp +++ b/radiant/findtexturedialog.cpp @@ -152,7 +152,7 @@ ui::Window FindTextureDialog::BuildDialog(){ gtk_widget_show( vbox ); gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 ); - table = ui::Widget(gtk_table_new( 2, 2, FALSE )); + table = ui::Table( 2, 2, FALSE ); gtk_widget_show( table ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 755d56da..e5c68ce6 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -2390,7 +2390,7 @@ GtkToolbar* create_main_toolbar( MainFrame::EViewStyle style ){ } ui::Widget create_main_statusbar( ui::Widget pStatusLabel[c_count_status] ){ - GtkTable* table = GTK_TABLE( gtk_table_new( 1, c_count_status, FALSE ) ); + GtkTable* table = ui::Table( 1, c_count_status, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); { diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index 8deb5bd9..5f921882 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -596,7 +596,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); { - GtkTable* table = GTK_TABLE( gtk_table_new( 2, 2, FALSE ) ); + GtkTable* table = ui::Table( 2, 2, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); gtk_table_set_row_spacings( table, 5 ); @@ -641,7 +641,7 @@ ui::Window PatchInspector::BuildDialog(){ m_pColCombo = combo; } } - GtkTable* table = GTK_TABLE( gtk_table_new( 5, 2, FALSE ) ); + GtkTable* table = ui::Table( 5, 2, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); gtk_table_set_row_spacings( table, 5 ); @@ -743,7 +743,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); { - GtkTable* table = GTK_TABLE( gtk_table_new( 3, 2, FALSE ) ); + GtkTable* table = ui::Table( 3, 2, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); gtk_table_set_row_spacings( table, 5 ); @@ -827,7 +827,7 @@ ui::Window PatchInspector::BuildDialog(){ g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 0 ); } { - GtkTable* table = GTK_TABLE( gtk_table_new( 5, 4, FALSE ) ); + GtkTable* table = ui::Table( 5, 4, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); gtk_table_set_row_spacings( table, 5 ); diff --git a/radiant/patchmanip.cpp b/radiant/patchmanip.cpp index f82c19ac..1bc56c21 100644 --- a/radiant/patchmanip.cpp +++ b/radiant/patchmanip.cpp @@ -993,7 +993,7 @@ EMessageBoxReturn DoCapDlg( ECapDialog* type ){ gtk_container_add( GTK_CONTAINER( hbox ), GTK_WIDGET( radio_vbox ) ); { - GtkTable* table = GTK_TABLE( gtk_table_new( 5, 2, FALSE ) ); + GtkTable* table = ui::Table( 5, 2, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_box_pack_start( GTK_BOX( radio_vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); gtk_table_set_row_spacings( table, 5 ); diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index fceb0ec9..cb64e940 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -626,7 +626,7 @@ ui::Window SurfaceInspector::BuildDialog(){ { - ui::Widget table = ui::Widget(gtk_table_new( 6, 4, FALSE )); + ui::Widget table = ui::Table( 6, 4, FALSE ); gtk_widget_show( table ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), FALSE, FALSE, 0 ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -828,7 +828,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_widget_show( frame ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( frame ), FALSE, FALSE, 0 ); { - ui::Widget table = ui::Widget(gtk_table_new( 4, 4, FALSE )); + ui::Widget table = ui::Table( 4, 4, FALSE ); gtk_widget_show( table ); gtk_container_add( GTK_CONTAINER( frame ), table ); gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); @@ -953,7 +953,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_widget_show( GTK_WIDGET( vbox3 ) ); gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); { - GtkTable* table = GTK_TABLE( gtk_table_new( 8, 4, FALSE ) ); + GtkTable* table = ui::Table( 8, 4, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); gtk_table_set_row_spacings( table, 0 ); @@ -989,7 +989,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); { - GtkTable* table = GTK_TABLE( gtk_table_new( 8, 4, FALSE ) ); + GtkTable* table = ui::Table( 8, 4, FALSE ); gtk_widget_show( GTK_WIDGET( table ) ); gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); gtk_table_set_row_spacings( table, 0 ); diff --git a/radiant/texwindow.cpp b/radiant/texwindow.cpp index 33568023..95fdbd0f 100644 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@ -1949,7 +1949,7 @@ ui::Widget TextureBrowser_constructWindow( ui::Window toplevel ){ g_TextureBrowser.m_parent = toplevel; - ui::Widget table = ui::Widget(gtk_table_new( 3, 3, FALSE )); + ui::Widget table = ui::Table( 3, 3, FALSE ); ui::Widget frame_table; ui::Widget vbox = ui::VBox( FALSE, 0 ); gtk_table_attach( GTK_TABLE( table ), vbox, 0, 1, 1, 3, GTK_FILL, GTK_FILL, 0, 0 ); @@ -2056,7 +2056,7 @@ ui::Widget TextureBrowser_constructWindow( ui::Window toplevel ){ gtk_box_pack_end( GTK_BOX( vbox ), g_TextureBrowser.m_search_button, FALSE, FALSE, 0 ); } { // Tag frame - frame_table = ui::Widget(gtk_table_new( 3, 3, FALSE )); + frame_table = ui::Table( 3, 3, FALSE ); g_TextureBrowser.m_tag_frame = ui::Widget(gtk_frame_new( "Tag assignment" )); gtk_frame_set_label_align( GTK_FRAME( g_TextureBrowser.m_tag_frame ), 0.5, 0.5 );