X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fselect.cpp;h=20c6f73069b952afd49283fadf5d61da49488dbd;hb=0110e3a8f3ab54c17a1785e17c7246adf8e13a46;hp=eff55f515ebd1566e4b5b6ae6ab8bd2312c7b8bc;hpb=c001d05fb1dc902a725dbf50df82e88a1a526a21;p=xonotic%2Fnetradiant.git diff --git a/radiant/select.cpp b/radiant/select.cpp index eff55f51..20c6f730 100644 --- a/radiant/select.cpp +++ b/radiant/select.cpp @@ -912,7 +912,7 @@ void DoRotateDlg(){ if ( !g_rotate_dialog.window ) { g_rotate_dialog.window = MainFrame_getWindow().create_dialog_window("Arbitrary rotation", G_CALLBACK(rotatedlg_delete ), &g_rotate_dialog ); - auto accel = ui::AccelGroup(); + auto accel = ui::AccelGroup(ui::New); g_rotate_dialog.window.add_accel_group( accel ); { @@ -1016,9 +1016,9 @@ void DoRotateDlg(){ struct ScaleDialog { - ui::Widget x; - ui::Widget y; - ui::Widget z; + ui::Entry x{ui::null}; + ui::Entry y{ui::null}; + ui::Entry z{ui::null}; ui::Window window{ui::null}; }; @@ -1041,9 +1041,9 @@ static gboolean scaledlg_apply( ui::Widget widget, ScaleDialog* scaleDialog ){ static gboolean scaledlg_cancel( ui::Widget widget, ScaleDialog* scaleDialog ){ gtk_widget_hide( GTK_WIDGET( scaleDialog->window ) ); - gtk_entry_set_text( GTK_ENTRY( scaleDialog->x ), "1.0" ); - gtk_entry_set_text( GTK_ENTRY( scaleDialog->y ), "1.0" ); - gtk_entry_set_text( GTK_ENTRY( scaleDialog->z ), "1.0" ); + scaleDialog->x.text("1.0"); + scaleDialog->y.text("1.0"); + scaleDialog->z.text("1.0"); return TRUE; } @@ -1065,7 +1065,7 @@ void DoScaleDlg(){ if ( !g_scale_dialog.window ) { g_scale_dialog.window = MainFrame_getWindow().create_dialog_window("Arbitrary scale", G_CALLBACK(scaledlg_delete ), &g_scale_dialog ); - auto accel = ui::AccelGroup(); + auto accel = ui::AccelGroup(ui::New); g_scale_dialog.window.add_accel_group( accel ); { @@ -1096,8 +1096,8 @@ void DoScaleDlg(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - ui::Widget entry = ui::Entry(); - gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" ); + auto entry = ui::Entry(ui::New); + entry.text("1.0"); entry.show(); gtk_table_attach( table, entry, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1106,8 +1106,8 @@ void DoScaleDlg(){ g_scale_dialog.x = entry; } { - ui::Widget entry = ui::Entry(); - gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" ); + auto entry = ui::Entry(ui::New); + entry.text("1.0"); entry.show(); gtk_table_attach( table, entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1116,8 +1116,8 @@ void DoScaleDlg(){ g_scale_dialog.y = entry; } { - ui::Widget entry = ui::Entry(); - gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" ); + auto entry = ui::Entry(ui::New); + entry.text("1.0"); entry.show(); gtk_table_attach( table, entry, 1, 2, 2, 3, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),