]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/map.cpp
Purge gtk_widget_show from radiant/*
[xonotic/netradiant.git] / radiant / map.cpp
index 7b7c2441aa4fc184fb8ba5715aa48a5e119322ef..244001ea15455fe3f3817442d399feb448a52791 100644 (file)
@@ -42,7 +42,6 @@ MapModules& ReferenceAPI_getMapModules();
 
 #include <set>
 
-#include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 #include "uilib/uilib.h"
 
@@ -783,8 +782,8 @@ void DoMapInfo(){
                                gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
 
                                {
-                                       GtkEntry* entry = ui::Entry();
-                                       gtk_widget_show( GTK_WIDGET( entry ) );
+                                       auto entry = ui::Entry();
+                                       entry.show();
                                        gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
                                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
@@ -793,8 +792,8 @@ void DoMapInfo(){
                                        brushes_entry = entry;
                                }
                                {
-                                       GtkEntry* entry = ui::Entry();
-                                       gtk_widget_show( GTK_WIDGET( entry ) );
+                                       auto entry = ui::Entry();
+                                       entry.show();
                                        gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
                                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
@@ -804,7 +803,7 @@ void DoMapInfo(){
                                }
                                {
                                        ui::Widget label = ui::Label( "Total Brushes" );
-                                       gtk_widget_show( label );
+                                       label.show();
                                        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
                                                                          (GtkAttachOptions) ( GTK_FILL ),
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
@@ -812,7 +811,7 @@ void DoMapInfo(){
                                }
                                {
                                        ui::Widget label = ui::Label( "Total Entities" );
-                                       gtk_widget_show( label );
+                                       label.show();
                                        gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
                                                                          (GtkAttachOptions) ( GTK_FILL ),
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
@@ -831,7 +830,7 @@ void DoMapInfo(){
                }
                {
                        ui::Widget label = ui::Label( "Entity breakdown" );
-                       gtk_widget_show( label );
+                       label.show();
                        gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, TRUE, 0 );
                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                }
@@ -859,7 +858,7 @@ void DoMapInfo(){
                                        gtk_tree_view_column_set_sort_column_id( column, 1 );
                                }
 
-                               gtk_widget_show( view );
+                               view.show();
 
                                gtk_container_add( GTK_CONTAINER( scr ), view );
 
@@ -2051,21 +2050,21 @@ void DoFind(){
                        gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
                        {
                                ui::Widget label = ui::Label( "Entity number" );
-                               gtk_widget_show( label );
+                               label.show();
                                gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
                                                                  (GtkAttachOptions) ( 0 ),
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
                        }
                        {
                                ui::Widget label = ui::Label( "Brush number" );
-                               gtk_widget_show( label );
+                               label.show();
                                gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
                                                                  (GtkAttachOptions) ( 0 ),
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
-                               gtk_widget_show( GTK_WIDGET( entry ) );
+                               auto entry = ui::Entry();
+                               entry.show();
                                gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
                                                                  (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
@@ -2073,8 +2072,8 @@ void DoFind(){
                                entity = entry;
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
-                               gtk_widget_show( GTK_WIDGET( entry ) );
+                               auto entry = ui::Entry();
+                               entry.show();
                                gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
                                                                  (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
@@ -2086,9 +2085,9 @@ void DoFind(){
                        GtkHBox* hbox = create_dialog_hbox( 4 );
                        gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), TRUE, TRUE, 0 );
                        {
-                               GtkButton* button = create_dialog_button( "Find", G_CALLBACK( dialog_button_ok ), &dialog );
+                               auto button = create_dialog_button( "Find", G_CALLBACK( dialog_button_ok ), &dialog );
                                gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
-                               widget_make_default( GTK_WIDGET( button ) );
+                               widget_make_default( button );
                                gtk_widget_add_accelerator( GTK_WIDGET( button ), "clicked", accel, GDK_KEY_Return, (GdkModifierType)0, (GtkAccelFlags)0 );
                        }
                        {