]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Wrap gtkutil/entry
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 21 Jul 2017 14:20:42 +0000 (00:20 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 31 Jul 2017 12:35:47 +0000 (22:35 +1000)
libs/gtkutil/dialog.cpp
libs/gtkutil/entry.h
radiant/dialog.cpp
radiant/entityinspector.cpp
radiant/gtkdlgs.cpp
radiant/map.cpp
radiant/patchdialog.cpp
radiant/surfacedialog.cpp

index 188f253e2726828733a724d96dd53864b655f572..6c0c8edbb20c28af90437c21e9fc59295b653da3 100644 (file)
@@ -203,7 +203,7 @@ PathEntry PathEntry_new(){
        GtkHBox* hbox = ui::HBox( FALSE, 0 );
        gtk_widget_show( GTK_WIDGET( hbox ) );
 
-       GtkEntry* entry = ui::Entry();
+       auto entry = ui::Entry();
        gtk_entry_set_has_frame( entry, FALSE );
        gtk_widget_show( GTK_WIDGET( entry ) );
        gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
index 66beace123c47e6fe54be267ba24b6f1bb26797e..297072f5d3aa58525a4edab45d3dea2c752e91fb 100644 (file)
 #include <stdlib.h>
 #include <gtk/gtk.h>
 
-inline void entry_set_string( GtkEntry* entry, const char* string ){
+inline void entry_set_string( ui::Entry entry, const char* string ){
        gtk_entry_set_text( entry, string );
 }
 
-inline void entry_set_int( GtkEntry* entry, int i ){
+inline void entry_set_int( ui::Entry entry, int i ){
        char buf[32];
        sprintf( buf, "%d", i );
        entry_set_string( entry, buf );
 }
 
-inline void entry_set_float( GtkEntry* entry, float f ){
+inline void entry_set_float( ui::Entry entry, float f ){
        char buf[32];
        sprintf( buf, "%g", f );
        entry_set_string( entry, buf );
 }
 
-inline const char* entry_get_string( GtkEntry* entry ){
+inline const char* entry_get_string( ui::Entry entry ){
        return gtk_entry_get_text( entry );
 }
 
-inline int entry_get_int( GtkEntry* entry ){
+inline int entry_get_int( ui::Entry entry ){
        return atoi( entry_get_string( entry ) );
 }
 
-inline double entry_get_float( GtkEntry* entry ){
+inline double entry_get_float( ui::Entry entry ){
        return atof( entry_get_string( entry ) );
 }
 
index eadaf9a12a454da8393dffbd0757016ac0b24955..8786654a162983fe3c5a89adaf13b45c60598170 100644 (file)
@@ -48,7 +48,7 @@
 
 
 GtkEntry* DialogEntry_new(){
-       GtkEntry* entry = ui::Entry();
+       auto entry = ui::Entry();
        gtk_widget_show( GTK_WIDGET( entry ) );
        gtk_widget_set_size_request( GTK_WIDGET( entry ), 64, -1 );
        return entry;
@@ -159,7 +159,7 @@ typedef ImportExport<GtkEntry, const char*, TextEntryImport, TextEntryExport> Te
 
 
 void IntEntryImport( GtkEntry& widget, int value ){
-       entry_set_int( &widget, value );
+       entry_set_int( ui::Entry(&widget), value );
 }
 void IntEntryExport( GtkEntry& widget, const IntImportCallback& importCallback ){
        importCallback( atoi( gtk_entry_get_text( &widget ) ) );
@@ -168,7 +168,7 @@ typedef ImportExport<GtkEntry, int, IntEntryImport, IntEntryExport> IntEntryImpo
 
 
 void SizeEntryImport( GtkEntry& widget, std::size_t value ){
-       entry_set_int( &widget, int(value) );
+       entry_set_int( ui::Entry(&widget), int(value) );
 }
 void SizeEntryExport( GtkEntry& widget, const SizeImportCallback& importCallback ){
        int value = atoi( gtk_entry_get_text( &widget ) );
@@ -181,7 +181,7 @@ typedef ImportExport<GtkEntry, std::size_t, SizeEntryImport, SizeEntryExport> Si
 
 
 void FloatEntryImport( GtkEntry& widget, float value ){
-       entry_set_float( &widget, value );
+       entry_set_float( ui::Entry(&widget), value );
 }
 void FloatEntryExport( GtkEntry& widget, const FloatImportCallback& importCallback ){
        importCallback( (float)atof( gtk_entry_get_text( &widget ) ) );
index 3160bf47fb316e65cdedca17dd0745f2da2d09c4..42b21256aecb4bc8cce9d20542069139c31f665e 100644 (file)
@@ -64,9 +64,9 @@
 #include "textureentry.h"
 #include "groupdialog.h"
 
-GtkEntry* numeric_entry_new(){
-       GtkEntry* entry = ui::Entry();
-       gtk_widget_show( GTK_WIDGET( entry ) );
+ui::Entry numeric_entry_new(){
+       auto entry = ui::Entry();
+       entry.show();
        gtk_widget_set_size_request( GTK_WIDGET( entry ), 64, -1 );
        return entry;
 }
@@ -167,7 +167,7 @@ StringAttribute( const char* key ) :
        m_key( key ),
        m_entry( 0 ),
        m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){
-       GtkEntry* entry = ui::Entry();
+       auto entry = ui::Entry();
        gtk_widget_show( GTK_WIDGET( entry ) );
        gtk_widget_set_size_request( GTK_WIDGET( entry ), 50, -1 );
 
@@ -319,14 +319,14 @@ inline double angle_normalised( double angle ){
 class AngleAttribute : public EntityAttribute
 {
 CopiedString m_key;
-GtkEntry* m_entry;
+ui::Entry m_entry;
 NonModalEntry m_nonModal;
 public:
 AngleAttribute( const char* key ) :
        m_key( key ),
-       m_entry( 0 ),
+       m_entry( nullptr ),
        m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){
-       GtkEntry* entry = numeric_entry_new();
+       auto entry = numeric_entry_new();
        m_entry = entry;
        m_nonModal.connect( m_entry );
 }
@@ -367,7 +367,7 @@ const String buttons[] = { "up", "down", "z-axis" };
 class DirectionAttribute : public EntityAttribute
 {
 CopiedString m_key;
-GtkEntry* m_entry;
+ui::Entry m_entry;
 NonModalEntry m_nonModal;
 RadioHBox m_radio;
 NonModalRadio m_nonModalRadio;
@@ -375,11 +375,11 @@ GtkHBox* m_hbox;
 public:
 DirectionAttribute( const char* key ) :
        m_key( key ),
-       m_entry( 0 ),
+       m_entry( nullptr ),
        m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ),
        m_radio( RadioHBox_new( STRING_ARRAY_RANGE( buttons ) ) ),
        m_nonModalRadio( ApplyRadioCaller( *this ) ){
-       GtkEntry* entry = numeric_entry_new();
+       auto entry = numeric_entry_new();
        m_entry = entry;
        m_nonModal.connect( m_entry );
 
@@ -453,10 +453,10 @@ typedef MemberCaller<DirectionAttribute, &DirectionAttribute::applyRadio> ApplyR
 class AnglesEntry
 {
 public:
-GtkEntry* m_roll;
-GtkEntry* m_pitch;
-GtkEntry* m_yaw;
-AnglesEntry() : m_roll( 0 ), m_pitch( 0 ), m_yaw( 0 ){
+ui::Entry m_roll;
+ui::Entry m_pitch;
+ui::Entry m_yaw;
+AnglesEntry() : m_roll( nullptr ), m_pitch( nullptr ), m_yaw( nullptr ){
 }
 };
 
@@ -476,19 +476,19 @@ AnglesAttribute( const char* key ) :
 {
        gtk_widget_show( GTK_WIDGET( m_hbox ) );
        {
-               GtkEntry* entry = numeric_entry_new();
+               auto entry = numeric_entry_new();
                gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
                m_angles.m_pitch = entry;
                m_nonModal.connect( m_angles.m_pitch );
        }
        {
-               GtkEntry* entry = numeric_entry_new();
+               auto entry = numeric_entry_new();
                gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
                m_angles.m_yaw = entry;
                m_nonModal.connect( m_angles.m_yaw );
        }
        {
-               GtkEntry* entry = numeric_entry_new();
+               auto entry = numeric_entry_new();
                gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
                m_angles.m_roll = entry;
                m_nonModal.connect( m_angles.m_roll );
@@ -543,10 +543,10 @@ typedef MemberCaller<AnglesAttribute, &AnglesAttribute::update> UpdateCaller;
 class Vector3Entry
 {
 public:
-GtkEntry* m_x;
-GtkEntry* m_y;
-GtkEntry* m_z;
-Vector3Entry() : m_x( 0 ), m_y( 0 ), m_z( 0 ){
+ui::Entry m_x;
+ui::Entry m_y;
+ui::Entry m_z;
+Vector3Entry() : m_x( nullptr ), m_y( nullptr ), m_z( nullptr ){
 }
 };
 
@@ -563,19 +563,19 @@ Vector3Attribute( const char* key ) :
        m_hbox = ui::HBox( TRUE, 4 );
        gtk_widget_show( GTK_WIDGET( m_hbox ) );
        {
-               GtkEntry* entry = numeric_entry_new();
+               auto entry = numeric_entry_new();
                gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
                m_vector3.m_x = entry;
                m_nonModal.connect( m_vector3.m_x );
        }
        {
-               GtkEntry* entry = numeric_entry_new();
+               auto entry = numeric_entry_new();
                gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
                m_vector3.m_y = entry;
                m_nonModal.connect( m_vector3.m_y );
        }
        {
-               GtkEntry* entry = numeric_entry_new();
+               auto entry = numeric_entry_new();
                gtk_box_pack_start( m_hbox, GTK_WIDGET( entry ), TRUE, TRUE, 0 );
                m_vector3.m_z = entry;
                m_nonModal.connect( m_vector3.m_z );
@@ -1444,7 +1444,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){
                                        gtk_table_set_col_spacings( table, 5 );
 
                                        {
-                                               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 ),
@@ -1455,7 +1455,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){
                                        }
 
                                        {
-                                               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 ),
index 9209512027a035eb21c26244d87f463f7b817c1b..09e7bcc7dc2d9a48af4ec0b81d77e543d91c9855 100644 (file)
@@ -263,7 +263,7 @@ ui::Window ProjectSettingsDialog_construct( ProjectSettingsDialog& dialog, Modal
                                        gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
                                }
                                {
-                                       GtkEntry* entry = ui::Entry();
+                                       auto entry = ui::Entry();
                                        gtk_widget_show( GTK_WIDGET( entry ) );
                                        gtk_table_attach( table2, GTK_WIDGET( entry ), 1, 2, 1, 2,
                                                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
@@ -383,7 +383,7 @@ void DoSides( int type, int axis ){
                        gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
                }
                {
-                       GtkEntry* entry = ui::Entry();
+                       auto entry = ui::Entry();
                        gtk_widget_show( GTK_WIDGET( entry ) );
                        gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), FALSE, FALSE, 0 );
                        sides_entry = entry;
@@ -638,7 +638,7 @@ EMessageBoxReturn DoTextureLayout( float *fx, float *fy ){
                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                }
                                {
-                                       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 ),
@@ -647,7 +647,7 @@ EMessageBoxReturn DoTextureLayout( float *fx, float *fy ){
                                        x = 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 ),
@@ -875,7 +875,7 @@ EMessageBoxReturn DoLightIntensityDlg( int *intensity ){
                                gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
 
@@ -943,7 +943,7 @@ EMessageBoxReturn DoShaderTagDlg( CopiedString* tag, char* title ){
                                gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
 
index 7b7c2441aa4fc184fb8ba5715aa48a5e119322ef..ba9d40211e98d8c705244b20423827769dec61be 100644 (file)
@@ -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 ),
@@ -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 ),
index 9068b752d1442cacfcd875571e8993ecb520cad3..673423ca1884d58d17ee3cec9f2030effbc36533 100644 (file)
@@ -159,9 +159,9 @@ class Subdivisions
 {
 public:
 ui::CheckButton m_enabled;
-GtkEntry* m_horizontal;
-GtkEntry* m_vertical;
-Subdivisions() : m_enabled( (GtkCheckButton *) 0 ), m_horizontal( 0 ), m_vertical( 0 ){
+ui::Entry m_horizontal;
+ui::Entry m_vertical;
+Subdivisions() : m_enabled( (GtkCheckButton *) 0 ), m_horizontal( nullptr ), m_vertical( nullptr ){
 }
 void update(){
        PatchFixedSubdivisions subdivisions;
@@ -765,7 +765,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                                                                  (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, 1, 2,
                                                                                                  (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
@@ -774,14 +774,14 @@ ui::Window PatchInspector::BuildDialog(){
                                                                m_horizontalSubdivisionsEntry.connect( entry );
                                                        }
                                                        {
-                                                               GtkLabel* label = GTK_LABEL( ui::Label( "Vertical" ) );
+                                                               auto label = GTK_LABEL( ui::Label( "Vertical" ) );
                                                                gtk_widget_show( GTK_WIDGET( label ) );
                                                                gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 2, 3,
                                                                                                  (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
                                                                                                  (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, 2, 3,
                                                                                                  (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),
@@ -883,7 +883,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                                }
                                                {
-                                                       GtkEntry* entry = ui::Entry();
+                                                       auto entry = ui::Entry();
                                                        gtk_widget_show( GTK_WIDGET( entry ) );
                                                        gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 0, 1,
                                                                                          (GtkAttachOptions)( GTK_FILL ),
@@ -907,7 +907,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                                {
-                                                       GtkEntry* entry = ui::Entry();
+                                                       auto entry = ui::Entry();
                                                        gtk_widget_show( GTK_WIDGET( entry ) );
                                                        gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 1, 2,
                                                                                          (GtkAttachOptions)( GTK_FILL ),
@@ -928,7 +928,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                                {
-                                                       GtkEntry* entry = ui::Entry();
+                                                       auto entry = ui::Entry();
                                                        gtk_widget_show( GTK_WIDGET( entry ) );
                                                        gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 2, 3,
                                                                                          (GtkAttachOptions)( GTK_FILL ),
@@ -949,7 +949,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                                {
-                                                       GtkEntry* entry = ui::Entry();
+                                                       auto entry = ui::Entry();
                                                        gtk_widget_show( GTK_WIDGET( entry ) );
                                                        gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 3, 4,
                                                                                          (GtkAttachOptions)( GTK_FILL ),
@@ -970,7 +970,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                                {
-                                                       GtkEntry* entry = ui::Entry();
+                                                       auto entry = ui::Entry();
                                                        gtk_widget_show( GTK_WIDGET( entry ) );
                                                        gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 4, 5,
                                                                                          (GtkAttachOptions)( GTK_FILL ),
index 2a2d09821c13c478757ca24b038d985643d5b1d3..3a00ace5e9177f8252dd6aa856a3c91eb4aec37e 100644 (file)
@@ -120,8 +120,8 @@ class Increment
 float& m_f;
 public:
 GtkSpinButton* m_spin;
-GtkEntry* m_entry;
-Increment( float& f ) : m_f( f ), m_spin( 0 ), m_entry( 0 ){
+ui::Entry m_entry;
+Increment( float& f ) : m_f( f ), m_spin( 0 ), m_entry( nullptr ){
 }
 void cancel(){
        entry_set_float( m_entry, m_f );
@@ -158,7 +158,7 @@ GtkCheckButton* m_surfaceFlags[32];
 GtkCheckButton* m_contentFlags[32];
 
 NonModalEntry m_valueEntry;
-GtkEntry* m_valueEntryWidget;
+ui::Entry m_valueEntryWidget{nullptr};
 public:
 WindowPositionTracker m_positionTracker;
 WindowPositionTrackerImportStringCaller m_importPosition;
@@ -608,7 +608,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_box_pack_start( GTK_BOX( hbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
                                m_texture = entry;
@@ -651,7 +651,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 0, 1,
                                                                  (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
@@ -687,7 +687,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 1, 2,
                                                                  (GtkAttachOptions) ( GTK_FILL ),
@@ -723,7 +723,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                                                  (GtkAttachOptions) ( 0 ), 2, 3 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 2, 3,
                                                                  (GtkAttachOptions) ( GTK_FILL ),
@@ -759,7 +759,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 3, 4,
                                                                  (GtkAttachOptions) ( GTK_FILL ),
@@ -796,7 +796,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                                                  (GtkAttachOptions) ( 0 ), 0, 0 );
                        }
                        {
-                               GtkEntry* entry = ui::Entry();
+                               auto entry = ui::Entry();
                                gtk_widget_show( GTK_WIDGET( entry ) );
                                gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 4, 5,
                                                                  (GtkAttachOptions) ( GTK_FILL ),
@@ -1021,7 +1021,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                        gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) );
 
                                        {
-                                               GtkEntry* entry = ui::Entry();
+                                               auto entry = ui::Entry();
                                                gtk_widget_show( GTK_WIDGET( entry ) );
                                                gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
                                                m_valueEntryWidget = entry;