X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fsurfacedialog.cpp;h=b6437186bc0b7e796d62ea80389bb1aadee74a2a;hb=0110e3a8f3ab54c17a1785e17c7246adf8e13a46;hp=f97745598e2c551174ca5ea4321368f6d9614056;hpb=1ce2d1a4685918788e3f22c8f26f652e474da6c0;p=xonotic%2Fnetradiant.git diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index f9774559..b6437186 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -174,7 +174,7 @@ Increment m_vshiftIncrement; Increment m_hscaleIncrement; Increment m_vscaleIncrement; Increment m_rotateIncrement; -GtkEntry* m_texture; +ui::Entry m_texture{ui::null}; SurfaceInspector() : m_textureEntry( ApplyShaderCaller( *this ), UpdateCaller( *this ) ), @@ -210,8 +210,8 @@ void constructWindow( ui::Window main_window ){ void destroyWindow(){ Destroy(); } -bool visible() const { - return gtk_widget_get_visible( GetWidget() ); +bool visible() { + return GetWidget().visible(); } void queueDraw(){ if ( visible() ) { @@ -609,7 +609,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 ); } { - auto entry = ui::Entry(); + auto entry = ui::Entry(ui::New); entry.show(); gtk_box_pack_start( GTK_BOX( hbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); m_texture = entry; @@ -652,7 +652,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - auto entry = ui::Entry(); + auto entry = ui::Entry(ui::New); entry.show(); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -688,7 +688,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - auto entry = ui::Entry(); + auto entry = ui::Entry(ui::New); entry.show(); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -724,7 +724,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 2, 3 ); } { - auto entry = ui::Entry(); + auto entry = ui::Entry(ui::New); entry.show(); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 2, 3, (GtkAttachOptions) ( GTK_FILL ), @@ -760,7 +760,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - auto entry = ui::Entry(); + auto entry = ui::Entry(ui::New); entry.show(); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 3, 4, (GtkAttachOptions) ( GTK_FILL ), @@ -797,7 +797,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - auto entry = ui::Entry(); + auto entry = ui::Entry(ui::New); entry.show(); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 4, 5, (GtkAttachOptions) ( GTK_FILL ), @@ -1022,7 +1022,7 @@ ui::Window SurfaceInspector::BuildDialog(){ frame.add(vbox3); { - auto entry = ui::Entry(); + auto entry = ui::Entry(ui::New); entry.show(); gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); m_valueEntryWidget = entry; @@ -1112,11 +1112,11 @@ void SurfaceInspector::Update(){ const char * name = SurfaceInspector_GetSelectedShader(); if ( shader_is_texture( name ) ) { - gtk_entry_set_text( m_texture, shader_get_textureName( name ) ); + m_texture.text(shader_get_textureName(name)); } else { - gtk_entry_set_text( m_texture, "" ); + m_texture.text(""); } texdef_t shiftScaleRotate;