}
void paths_init(){
- const char* home = environment_get_home_path();
- Q_mkdir( home );
-
- {
- StringOutputStream path( 256 );
- path << home << "/";
- g_strSettingsPath = path.c_str();
- }
+ g_strSettingsPath = environment_get_home_path();
Q_mkdir( g_strSettingsPath.c_str() );
msg << "This editor binary (" RADIANT_VERSION ") doesn't match what the latest setup has configured in this directory\n"
"Make sure you run the right/latest editor binary you installed\n"
<< AppPath_get();
- ui::alert( 0, msg.c_str(), "Radiant", eMB_OK, eMB_ICONDEFAULT );
+ ui::root.alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Default);
}
return bVerIsGood;
#else
"The failure may be related to current global preferences.\n"
"Do you want to reset global preferences to defaults?";
- if ( ui::root.alert( msg.c_str(), "Radiant - Startup Failure", ui::alert_type::YESNO, ui::alert_icon::QUESTION ) == ui::alert_response::YES ) {
+ if ( ui::root.alert( msg.c_str(), "Radiant - Startup Failure", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::YES ) {
g_GamesDialog.Reset();
}
"The failure may be caused by current preferences.\n"
"Do you want to reset all preferences to defaults?";
- if ( ui::root.alert( msg.c_str(), "Radiant - Startup Failure", ui::alert_type::YESNO, ui::alert_icon::QUESTION ) == ui::alert_response::YES ) {
+ if ( ui::root.alert( msg.c_str(), "Radiant - Startup Failure", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::YES ) {
Preferences_Reset();
}
}
#endif
- static GOptionEntry entries[] = {
- { NULL }
- };
- GError *error = NULL;
const char* mapname = NULL;
-
- gtk_disable_setlocale();
- if ( !gtk_init_with_args( &argc, &argv, "<filename.map>", entries, NULL, &error) ) {
- g_print( "%s\n", error->message );
+ char const *error = NULL;
+ if ( !ui::init( &argc, &argv, "<filename.map>", &error) ) {
+ g_print( "%s\n", error );
return -1;
}
GlobalDebugMessageHandler::instance().setHandler( GlobalPopupDebugMessageHandler::instance() );
- environment_init( argc, argv );
+ environment_init(argc, (char const **) argv);
paths_init();