void DoSides( int type, int axis ){
ModalDialog dialog;
- GtkEntry* sides_entry;
auto window = MainFrame_getWindow().create_dialog_window("Arbitrary sides", G_CALLBACK(dialog_delete_callback ), &dialog );
auto accel = ui::AccelGroup(ui::New);
window.add_accel_group( accel );
+ auto sides_entry = ui::Entry(ui::New);
{
auto hbox = create_dialog_hbox( 4, 4 );
window.add(hbox);
hbox.pack_start( label, FALSE, FALSE, 0 );
}
{
- auto entry = ui::Entry(ui::New);
+ auto entry = sides_entry;
entry.show();
hbox.pack_start( entry, FALSE, FALSE, 0 );
- sides_entry = entry;
gtk_widget_grab_focus( entry );
}
{
static ui::Widget text_widget{ui::null}; // slave, text widget from the gtk editor
static gint editor_delete( ui::Widget widget, gpointer data ){
- if ( widget.window().alert( "Close the shader editor ?", "Radiant", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::NO ) {
+ if ( ui::alert( widget.window(), "Close the shader editor ?", "Radiant", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::NO ) {
return TRUE;
}
gpointer text = g_object_get_data( G_OBJECT( data ), "text" );
if ( f == 0 ) {
- ui::Widget::from(data).window().alert( "Error saving file !" );
+ ui::alert( ui::Widget::from(data).window(), "Error saving file !" );
return;
}
}
static void editor_close( ui::Widget widget, gpointer data ){
- if ( text_editor.window().alert( "Close the shader editor ?", "Radiant", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::NO ) {
+ if ( ui::alert( text_editor.window(), "Close the shader editor ?", "Radiant", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::NO ) {
return;
}
EMessageBoxReturn DoShaderTagDlg( CopiedString* tag, const char* title ){
ModalDialog dialog;
- GtkEntry* textentry;
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
auto accel_group = ui::AccelGroup(ui::New);
window.add_accel_group( accel_group );
+ auto textentry = ui::Entry(ui::New);
{
auto hbox = create_dialog_hbox( 4, 4 );
window.add(hbox);
vbox.pack_start( label, FALSE, FALSE, 0 );
}
{
- auto entry = ui::Entry(ui::New);
+ auto entry = textentry;
entry.show();
vbox.pack_start( entry, TRUE, TRUE, 0 );
gtk_widget_grab_focus( entry );
-
- textentry = entry;
}
}
{