]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/build.cpp
GTK: wrap GTK_WIDGET
[xonotic/netradiant.git] / radiant / build.cpp
index 83767446ec417d4b301a07b13c24fdb197d8a191..d4285bf457cff5d061868254bbc9424be9adc876 100644 (file)
@@ -838,22 +838,22 @@ ui::Window BuildMenuDialog_construct( ModalDialog& modal, ProjectList& projectLi
                auto table1 = create_dialog_table( 2, 2, 4, 4, 4 );
                window.add(table1);
                {
-                       GtkVBox* vbox = create_dialog_vbox( 4 );
-                       gtk_table_attach( table1, GTK_WIDGET( vbox ), 1, 2, 0, 1,
+                       auto vbox = create_dialog_vbox( 4 );
+                       gtk_table_attach( table1, vbox , 1, 2, 0, 1,
                                                          (GtkAttachOptions) ( GTK_FILL ),
                                                          (GtkAttachOptions) ( GTK_FILL ), 0, 0 );
                        {
-                               GtkButton* button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &modal );
-                               gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+                               auto button = create_dialog_button( "OK", G_CALLBACK( dialog_button_ok ), &modal );
+                               vbox.pack_start( button, FALSE, FALSE, 0 );
                        }
                        {
-                               GtkButton* button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &modal );
-                               gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
+                               auto button = create_dialog_button( "Cancel", G_CALLBACK( dialog_button_cancel ), &modal );
+                               vbox.pack_start( button, FALSE, FALSE, 0 );
                        }
                }
                {
                        auto frame = create_dialog_frame( "Build menu" );
-                       gtk_table_attach( table1, GTK_WIDGET( frame ), 0, 1, 0, 1,
+                       gtk_table_attach( table1, frame , 0, 1, 0, 1,
                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
                        {
@@ -890,7 +890,7 @@ ui::Window BuildMenuDialog_construct( ModalDialog& modal, ProjectList& projectLi
                }
                {
                        auto frame = create_dialog_frame( "Commandline" );
-                       gtk_table_attach( table1, GTK_WIDGET( frame ), 0, 1, 1, 2,
+                       gtk_table_attach( table1, frame , 0, 1, 1, 2,
                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
                        {
@@ -1003,9 +1003,9 @@ void Build_constructMenu( ui::Menu menu ){
 
 
 void Build_refreshMenu( ui::Menu menu ){
-       for ( BuildMenuItems::iterator i = g_BuildMenuItems.begin(); i != g_BuildMenuItems.end(); ++i )
+       for (auto i = g_BuildMenuItems.begin(); i != g_BuildMenuItems.end(); ++i )
        {
-               menu.remove(ui::Widget(GTK_WIDGET((*i).m_item)));
+               menu.remove(ui::MenuItem(i->m_item));
        }
 
        g_BuildMenuItems.clear();