]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/map.cpp
Wrap gtkutil/entry
[xonotic/netradiant.git] / radiant / map.cpp
index 0dc0798d4ce4d82790ebbf80033b25a2278a1c69..ba9d40211e98d8c705244b20423827769dec61be 100644 (file)
@@ -764,7 +764,7 @@ void DoMapInfo(){
        ModalDialog dialog;
        GtkEntry* brushes_entry;
        GtkEntry* entities_entry;
-       GtkListStore* EntityBreakdownWalker;
+       ui::ListStore EntityBreakdownWalker{nullptr};
 
        ui::Window window = MainFrame_getWindow().create_dialog_window("Map Info", G_CALLBACK(dialog_delete_callback ), &dialog );
 
@@ -783,7 +783,7 @@ void DoMapInfo(){
                                gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
 
                                {
-                                       GtkEntry* entry = ui::Entry();
+                                       auto entry = ui::Entry();
                                        gtk_widget_show( GTK_WIDGET( entry ) );
                                        gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
                                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
@@ -793,7 +793,7 @@ void DoMapInfo(){
                                        brushes_entry = entry;
                                }
                                {
-                                       GtkEntry* entry = ui::Entry();
+                                       auto entry = ui::Entry();
                                        gtk_widget_show( GTK_WIDGET( entry ) );
                                        gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
                                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
@@ -840,7 +840,7 @@ void DoMapInfo(){
                        gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( scr ), TRUE, TRUE, 0 );
 
                        {
-                               GtkListStore* store = gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_STRING );
+                               ui::ListStore store = ui::ListStore(gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_STRING ));
 
                                ui::Widget view = ui::TreeView(ui::TreeModel( GTK_TREE_MODEL( store ) ));
                                gtk_tree_view_set_headers_clickable( GTK_TREE_VIEW( view ), TRUE );
@@ -2040,8 +2040,8 @@ void DoFind(){
 
        ui::Window window = MainFrame_getWindow().create_dialog_window("Find Brush", G_CALLBACK(dialog_delete_callback ), &dialog );
 
-       GtkAccelGroup* accel = ui::AccelGroup();
-       gtk_window_add_accel_group( window, accel );
+       auto accel = ui::AccelGroup();
+       window.add_accel_group( accel );
 
        {
                GtkVBox* vbox = create_dialog_vbox( 4, 4 );
@@ -2064,7 +2064,7 @@ void DoFind(){
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
                                                                  (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
@@ -2073,7 +2073,7 @@ void DoFind(){
                                entity = entry;
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
                                                                  (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),