X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=radiant%2Ffindtexturedialog.cpp;h=04983314e13bd7824bc3dc5513d7ad27e595ea52;hb=7a6d52cddfb66e7433405c9835b0995e308011dd;hp=57cce140d252703bb2388e308fbd011579a2b8da;hpb=e2b92e121264da56e42426150f338c6e2220fc09;p=xonotic%2Fnetradiant.git diff --git a/radiant/findtexturedialog.cpp b/radiant/findtexturedialog.cpp index 57cce140..04983314 100644 --- a/radiant/findtexturedialog.cpp +++ b/radiant/findtexturedialog.cpp @@ -27,6 +27,8 @@ #include "findtexturedialog.h" +#include + #include "debugging/debugging.h" #include "ishaders.h" @@ -127,13 +129,14 @@ FindTextureDialog::~FindTextureDialog(){ ui::Window FindTextureDialog::BuildDialog(){ ui::Widget vbox, hbox, table, label; - ui::Widget button, check, entry; + ui::Widget button; + ui::Entry entry{nullptr}; - ui::Window dlg = ui::Window(create_floating_window( "Find / Replace Texture(s)", m_parent )); + auto dlg = ui::Window(create_floating_window( "Find / Replace Texture(s)", m_parent )); hbox = ui::HBox( FALSE, 5 ); hbox.show(); - gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( hbox ) ); + dlg.add(hbox); gtk_container_set_border_width( GTK_CONTAINER( hbox ), 5 ); vbox = ui::VBox( FALSE, 5 ); @@ -167,8 +170,8 @@ ui::Window FindTextureDialog::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); g_signal_connect( G_OBJECT( entry ), "focus_in_event", G_CALLBACK( find_focus_in ), 0 ); - AddDialogData( *GTK_ENTRY( entry ), m_strFind ); - GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) ); + AddDialogData( *GTK_ENTRY(entry), m_strFind ); + GlobalTextureEntryCompletion::instance().connect( entry ); entry = ui::Entry(); entry.show(); @@ -177,13 +180,13 @@ ui::Window FindTextureDialog::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); g_signal_connect( G_OBJECT( entry ), "focus_in_event", G_CALLBACK( replace_focus_in ), 0 ); - AddDialogData( *GTK_ENTRY( entry ), m_strReplace ); - GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) ); + AddDialogData( *GTK_ENTRY(entry), m_strReplace ); + GlobalTextureEntryCompletion::instance().connect( entry ); - check = ui::CheckButton( "Within selected brushes only" ); + auto check = ui::CheckButton( "Within selected brushes only" ); check.show(); gtk_box_pack_start( GTK_BOX( vbox ), check, TRUE, TRUE, 0 ); - AddDialogData( *GTK_TOGGLE_BUTTON( check ), m_bSelectedOnly ); + AddDialogData( *GTK_TOGGLE_BUTTON(check), m_bSelectedOnly ); vbox = ui::VBox( FALSE, 5 ); vbox.show();