X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fconsole.cpp;h=82b08e3c2ab5468ca1919e0a094dd0a99af7a9e7;hb=6882578a4675ab8b8609d0b0421918dc664a2c18;hp=8c72bcd77b3d107291b5f7b71bda28c49de2379c;hpb=f0350b355f68497312c517c1bfd1fc216c722992;p=xonotic%2Fnetradiant.git diff --git a/radiant/console.cpp b/radiant/console.cpp index 8c72bcd7..82b08e3c 100644 --- a/radiant/console.cpp +++ b/radiant/console.cpp @@ -67,7 +67,7 @@ void Sys_LogFile( bool enable ){ << "This is NetRadiant '" RADIANT_VERSION "' compiled " __DATE__ "\n" RADIANT_ABOUTMSG "\n"; } else{ - ui::root.window().alert( "Failed to create log file, check write permissions in Radiant directory.\n", + ui::alert( ui::root, "Failed to create log file, check write permissions in Radiant directory.\n", "Console logging", ui::alert_type::OK, ui::alert_icon::Error ); } } @@ -111,7 +111,7 @@ ui::Widget Console_constructWindow( ui::Window toplevel ){ { auto text = ui::TextView(ui::New); - gtk_widget_set_size_request( text, 0, -1 ); // allow shrinking + text.dimensions(0, -1); // allow shrinking gtk_text_view_set_wrap_mode( text, GTK_WRAP_WORD ); gtk_text_view_set_editable( text, FALSE ); scr.add(text); @@ -163,19 +163,19 @@ std::size_t Sys_Print( int level, const char* buf, std::size_t length ){ if ( level != SYS_NOCON ) { if ( g_console ) { - GtkTextBuffer* buffer = gtk_text_view_get_buffer( g_console ); + auto buffer = gtk_text_view_get_buffer( g_console ); GtkTextIter iter; gtk_text_buffer_get_end_iter( buffer, &iter ); - static GtkTextMark* end = gtk_text_buffer_create_mark( buffer, "end", &iter, FALSE ); + static auto end = gtk_text_buffer_create_mark( buffer, "end", &iter, FALSE ); const GdkColor yellow = { 0, 0xb0ff, 0xb0ff, 0x0000 }; const GdkColor red = { 0, 0xffff, 0x0000, 0x0000 }; - static GtkTextTag* error_tag = gtk_text_buffer_create_tag( buffer, "red_foreground", "foreground-gdk", &red, NULL ); - static GtkTextTag* warning_tag = gtk_text_buffer_create_tag( buffer, "yellow_foreground", "foreground-gdk", &yellow, NULL ); - static GtkTextTag* standard_tag = gtk_text_buffer_create_tag( buffer, "black_foreground", NULL ); + static auto error_tag = gtk_text_buffer_create_tag( buffer, "red_foreground", "foreground-gdk", &red, NULL ); + static auto warning_tag = gtk_text_buffer_create_tag( buffer, "yellow_foreground", "foreground-gdk", &yellow, NULL ); + static auto standard_tag = gtk_text_buffer_create_tag( buffer, "black_foreground", NULL ); GtkTextTag* tag; switch ( level ) {