]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/main.cpp
Wrap more GTK
[xonotic/netradiant.git] / radiant / main.cpp
index 4fa42d272a364ddda471e230184fe5a00c4ee302..fd4515242549d951b1dbe59c50311b96f5490d6e 100644 (file)
@@ -304,12 +304,12 @@ bool handleMessage(){
                ScopedLock lock( m_lock );
 #if GDEF_DEBUG
                m_buffer << "Break into the debugger?\n";
-               bool handled = ui::root.alert( m_buffer.c_str(), "Radiant - Runtime Error", ui::alert_type::YESNO, ui::alert_icon::Error ) == ui::alert_response::NO;
+               bool handled = ui::root.window().alert( m_buffer.c_str(), "Radiant - Runtime Error", ui::alert_type::YESNO, ui::alert_icon::Error ) == ui::alert_response::NO;
                m_buffer.clear();
                return handled;
 #else
                m_buffer << "Please report this error to the developers\n";
-               ui::root.alert( m_buffer.c_str(), "Radiant - Runtime Error", ui::alert_type::OK, ui::alert_icon::Error );
+               ui::root.window().alert( m_buffer.c_str(), "Radiant - Runtime Error", ui::alert_type::OK, ui::alert_icon::Error );
                m_buffer.clear();
 #endif
        }
@@ -390,7 +390,7 @@ bool check_version(){
                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::root.alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Default);
+               ui::root.window().alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Default);
        }
        return bVerIsGood;
 #else
@@ -418,7 +418,7 @@ void create_global_pid(){
                if ( remove( g_pidFile.c_str() ) == -1 ) {
                        StringOutputStream msg( 256 );
                        msg << "WARNING: Could not delete " << g_pidFile.c_str();
-                       ui::root.alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
+                       ui::root.window().alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
                }
 
                // in debug, never prompt to clean registry, turn console logging auto after a failed start
@@ -428,14 +428,14 @@ void create_global_pid(){
                           "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.window().alert( msg.c_str(), "Radiant - Startup Failure", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::YES ) {
                        g_GamesDialog.Reset();
                }
 
                msg.clear();
                msg << "Logging console output to " << SettingsPath_get() << "radiant.log\nRefer to the log if Radiant fails to start again.";
 
-               ui::root.alert( msg.c_str(), "Radiant - Console Log", ui::alert_type::OK );
+               ui::root.window().alert( msg.c_str(), "Radiant - Console Log", ui::alert_type::OK );
 #endif
 
                // set without saving, the class is not in a coherent state yet
@@ -459,7 +459,7 @@ void remove_global_pid(){
        if ( remove( g_pidFile.c_str() ) == -1 ) {
                StringOutputStream msg( 256 );
                msg << "WARNING: Could not delete " << g_pidFile.c_str();
-               ui::root.alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
+               ui::root.window().alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
        }
 }
 
@@ -477,7 +477,7 @@ void create_local_pid(){
                if ( remove( g_pidGameFile.c_str() ) == -1 ) {
                        StringOutputStream msg;
                        msg << "WARNING: Could not delete " << g_pidGameFile.c_str();
-                       ui::root.alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
+                       ui::root.window().alert( msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
                }
 
                // in debug, never prompt to clean registry, turn console logging auto after a failed start
@@ -487,14 +487,14 @@ void create_local_pid(){
                           "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.window().alert( msg.c_str(), "Radiant - Startup Failure", ui::alert_type::YESNO, ui::alert_icon::Question ) == ui::alert_response::YES ) {
                        Preferences_Reset();
                }
 
                msg.clear();
                msg << "Logging console output to " << SettingsPath_get() << "radiant.log\nRefer to the log if Radiant fails to start again.";
 
-               ui::root.alert( msg.c_str(), "Radiant - Console Log", ui::alert_type::OK );
+               ui::root.window().alert( msg.c_str(), "Radiant - Console Log", ui::alert_type::OK );
 #endif
 
                // force console logging on! (will go in prefs too)