]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
radiant/tools: use RADIANT_NAME instead of hardcoding NetRadiant or Radiant
authorThomas Debesse <dev@illwieckz.net>
Wed, 5 Jun 2019 01:17:06 +0000 (03:17 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sun, 16 Jun 2019 13:22:23 +0000 (15:22 +0200)
17 files changed:
contrib/bobtoolz/ctfToolz-GTK.cpp
contrib/brushexport/export.cpp
contrib/camera/camera.cpp
contrib/camera/funchandlers.cpp
contrib/prtview/AboutDialog.cpp
contrib/shaderplug/shaderplug.cpp
contrib/sunplug/sunplug.cpp
include/qerplugin.h
libs/gtkutil/messagebox.h
radiant/console.cpp
radiant/gtkdlgs.cpp
radiant/main.cpp
radiant/preferences.cpp
radiant/watchbsp.cpp
tools/quake3/q3data/q3data.c
tools/quake3/q3map2/help.c
tools/quake3/q3map2/main.c

index 4e5231d13fa80acc4e55f543d0105a23da4c9a3b..a69a1a1236c9c4b53bdadb9ed6a6eea2d695a8aa 100644 (file)
@@ -39,7 +39,7 @@ static const char *PLUGIN_COMMANDS = "About...,Colour Changer...,Swap Light Colo
 // globals
 GtkWidget *g_pRadiantWnd = NULL;
 
-static const char *PLUGIN_ABOUT = "ctfToolz for NetRadiant\n"
+static const char *PLUGIN_ABOUT = "ctfToolz for " RADIANT_NAME "\n"
                                                                  "by djbob\n"
                                                                  "http://www.planetquake.com/toolz\n\n";
 
index cbc4abf608fc26dae7fbb56e20c5b3df6bee9829..86a7767ba4f542298444394a0b68a1e57b3b6348 100644 (file)
@@ -296,7 +296,7 @@ bool ExportDataAsWavefront::WriteToFile( const std::string& path, collapsemode m
                        return false;
                }
 
-               outMtl << "# Wavefront material file exported with NetRadiants brushexport plugin.\n";
+               outMtl << "# Wavefront material file exported with " RADIANT_NAME " brushexport plugin.\n";
                outMtl << "# Material Count: " << (const Unsigned)materials.size() << "\n\n";
                for ( std::set<std::string>::const_iterator it( materials.begin() ); it != materials.end(); ++it )
                {
index 635b36796133c1eb08af4c2e824453a19932e81b..338d28ed021612a967ec649c8eb9c6c546c4499c 100644 (file)
@@ -49,7 +49,7 @@ int g_iEditMode = 0;                    // 0: editting points 1: adding points
 int g_iActiveTarget = -1;
 int g_iPreviewRunning = 0;              // 0: no preview 1: start preview 2: preview in progress
 
-static const char *PLUGIN_ABOUT = "Camera v1.0 for NetRadiant\n"
+static const char *PLUGIN_ABOUT = "Camera v1.0 for " RADIANT_NAME "\n"
                                                                  "by Arnout van Meer (rr2do2@splashdamage.com)\n\n"
                                                                  "This product contains software technology\n"
                                                                  "from id Software, Inc. ('id Technology').\n"
@@ -84,7 +84,7 @@ const char* QERPlug_Init( void* hApp, void* pMainWidget ){
 
        GetFileTypeRegistry()->addType( "camera", "", filetype_t( "Camera file", "*.camera" ) );
 
-       return "Camera for NetRadiant";
+       return "Camera for " RADIANT_NAME;
 }
 
 const char* QERPlug_GetName(){
index 5d72242b5eb48654cd2e96b6d990632feb75c5be..70e3eb403188941857bfe056249a52be2e96517f 100644 (file)
@@ -194,7 +194,7 @@ void DoSaveCamera() {
                        }
                        else if ( !strcmp( fullpathtofile, checkCam->GetFileName() ) ) {
                                char error[PATH_MAX + 64];
-                               sprintf( error, "Camera file \'%s\' is currently loaded by NetRadiant.\nPlease select a different filename.", fullpathtofile );
+                               sprintf( error, "Camera file \'%s\' is currently loaded by " RADIANT_NAME "\nPlease select a different filename.", fullpathtofile );
                                g_FuncTable.m_pfnMessageBox( (GtkWidget *)g_pRadiantWnd, error, "Save error", eMB_OK );
                                return;
                        }
index f320de22e74b9771c2dd3ac697ebbacb9a51bb21..3b996d8866b5532a1c69d3a4334472642866e52e 100644 (file)
@@ -63,7 +63,7 @@ void DoAboutDlg(){
        char const *label_text = "Version 1.000\n\n"
                        "Gtk port by Leonardo Zide\nleo@lokigames.com\n\n"
                        "Written by Geoffrey DeWan\ngdewan@prairienet.org\n\n"
-                       "Built against NetRadiant " RADIANT_VERSION "\n"
+                       "Built against " RADIANT_NAME " " RADIANT_VERSION "\n"
                        __DATE__;
        auto label = ui::Label(label_text);
        label.show();
index 9d7bc4c52c78eca92c1e9d80095534675e5dc5d0..b71efcb39305ba0f3d9022a3d0538cac13285fc3 100644 (file)
@@ -172,7 +172,7 @@ void CreateTagFile(){
                char message[256];
                strcpy( message, "Tag file saved to\n" );
                strcat( message, tagFile );
-               strcat( message, "\nPlease restart Radiant now.\n" );
+               strcat( message, "\nPlease restart " RADIANT_NAME " now.\n" );
 
                if ( file_exists( tagFile ) ) {
                        EMessageBoxReturn result = GlobalRadiant().m_pfnMessageBox( g_window ,
index ac8233d1fd87f29d2986fd21d8134c1fece223fa..41689042edc46523ce668d3fe720abab12db1f6e 100644 (file)
@@ -266,7 +266,7 @@ void about_plugin_window(){
        auto vbox = ui::VBox( FALSE, 10 ); // create a box to arrange new objects vertically
        window.add(vbox);
 
-       auto label = ui::Label( "SunPlug v1.0 for NetRadiant 1.5\nby Topsun" ); // create a label
+       auto label = ui::Label( "SunPlug v1.0 for " RADIANT_NAME " 1.5\nby Topsun" ); // create a label
        gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // text align left
        vbox.pack_start( label, FALSE, FALSE, 2 ); // insert the label in the box
 
index 1868b74555fd7ea82129fdc4206c063d5c60d466..b18651fa956d9c3d88b3b4fd2ee4774883352a62 100644 (file)
@@ -65,7 +65,7 @@ enum EMessageBoxReturn
 
 // simple Message Box, see above for the 'type' flags
 
-typedef EMessageBoxReturn ( *PFN_QERAPP_MESSAGEBOX )( ui::Window parent, const char* text, const char* caption /* = "NetRadiant"*/, EMessageBoxType type /* = eMB_OK*/, EMessageBoxIcon icon /* = eMB_ICONDEFAULT*/ );
+typedef EMessageBoxReturn ( *PFN_QERAPP_MESSAGEBOX )( ui::Window parent, const char* text, const char* caption /* = RADIANT_NAME */, EMessageBoxType type /* = eMB_OK*/, EMessageBoxIcon icon /* = eMB_ICONDEFAULT*/ );
 
 // file and directory selection functions return null if the user hits cancel
 // - 'title' is the dialog title (can be null)
index 4ae8a3f8a52c5b7fc44c6004de32847e4f538c18..05754604c4e2aa1eda5af6b627512e3f55a96080 100644 (file)
@@ -25,6 +25,6 @@
 #include "qerplugin.h"
 
 /// \brief Shows a modal message-box.
-EMessageBoxReturn gtk_MessageBox( ui::Window parent, const char* text, const char* title = "NetRadiant", EMessageBoxType type = eMB_OK, EMessageBoxIcon icon = eMB_ICONDEFAULT );
+EMessageBoxReturn gtk_MessageBox( ui::Window parent, const char* text, const char* title = RADIANT_NAME, EMessageBoxType type = eMB_OK, EMessageBoxIcon icon = eMB_ICONDEFAULT );
 
 #endif
index 82b08e3c2ab5468ca1919e0a094dd0a99af7a9e7..dbcf64cd7aec17a9dcc42f2f356fe62a8f70fbed 100644 (file)
@@ -64,10 +64,10 @@ void Sys_LogFile( bool enable ){
                        time_t localtime;
                        time( &localtime );
                        globalOutputStream() << "Today is: " << ctime( &localtime )
-                                                                << "This is NetRadiant '" RADIANT_VERSION "' compiled " __DATE__ "\n" RADIANT_ABOUTMSG "\n";
+                                                                << "This is " RADIANT_NAME " '" RADIANT_VERSION "' compiled " __DATE__ "\n" RADIANT_ABOUTMSG "\n";
                }
                else{
-                       ui::alert( ui::root, "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_NAME " directory.\n",
                                                        "Console logging", ui::alert_type::OK, ui::alert_icon::Error );
                }
        }
index ed2e45a46f05aa0ddd73357b47f9406c90298ef1..817cdbf309f896e50726d0e1f55fe77d17c776f8 100644 (file)
@@ -425,7 +425,7 @@ void DoAbout(){
        ModalDialog dialog;
        ModalDialogButton ok_button( dialog, eIDOK );
 
-       auto window = MainFrame_getWindow().create_modal_dialog_window("About NetRadiant", dialog );
+       auto window = MainFrame_getWindow().create_modal_dialog_window("About " RADIANT_NAME, dialog );
 
        {
                auto vbox = create_dialog_vbox( 4, 4 );
@@ -450,12 +450,12 @@ void DoAbout(){
                        }
 
                        {
-                               char const *label_text = "NetRadiant " RADIANT_VERSION_STRING "\n"
+                               char const *label_text = RADIANT_NAME " " RADIANT_VERSION_STRING "\n"
                                                                                __DATE__ "\n\n"
                                                                                RADIANT_ABOUTMSG "\n\n"
                                                                                "This program is free software\n"
                                                                                "licensed under the GNU GPL.\n\n"
-                                                                               "NetRadiant is unsupported, however\n"
+                                                                               RADIANT_NAME " is unsupported, however\n"
                                                                                "you may report your problems at\n"
                                                                                "https://gitlab.com/xonotic/netradiant/issues";
 
index 0047cf259e1d3d9c678583d1f95c922589f1f0b5..386f7106c2dacbd8e5e5b7e88b1481052b3aa7c7 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::alert(ui::root, m_buffer.c_str(), "Radiant - Runtime Error", ui::alert_type::YESNO, ui::alert_icon::Error) == ui::alert_response::NO;
+            bool handled = ui::alert(ui::root, m_buffer.c_str(), RADIANT_NAME " - 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::alert(ui::root, m_buffer.c_str(), "Radiant - Runtime Error", ui::alert_type::OK, ui::alert_icon::Error);
+            ui::alert(ui::root, m_buffer.c_str(), RADIANT_NAME " - Runtime Error", ui::alert_type::OK, ui::alert_icon::Error);
             m_buffer.clear();
         }
        }
@@ -384,25 +384,25 @@ void create_global_pid(){
                if ( remove( g_pidFile.c_str() ) == -1 ) {
                        StringOutputStream msg( 256 );
                        msg << "WARNING: Could not delete " << g_pidFile.c_str();
-                       ui::alert( ui::root, msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
+                       ui::alert( ui::root, msg.c_str(), RADIANT_NAME, ui::alert_type::OK, ui::alert_icon::Error );
                }
 
                // in debug, never prompt to clean registry, turn console logging auto after a failed start
                if (!GDEF_DEBUG) {
                        StringOutputStream msg(256);
-                       msg << "Radiant failed to start properly the last time it was run.\n"
+                       msg << RADIANT_NAME " failed to start properly the last time it was run.\n"
                                        "The failure may be related to current global preferences.\n"
                                        "Do you want to reset global preferences to defaults?";
 
-                       if (ui::alert(ui::root, msg.c_str(), "Radiant - Startup Failure", ui::alert_type::YESNO, ui::alert_icon::Question) == ui::alert_response::YES) {
+                       if (ui::alert(ui::root, msg.c_str(), RADIANT_NAME " - 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.";
+                               << "radiant.log\nRefer to the log if " RADIANT_NAME " fails to start again.";
 
-                       ui::alert(ui::root, msg.c_str(), "Radiant - Console Log", ui::alert_type::OK);
+                       ui::alert(ui::root, msg.c_str(), RADIANT_NAME " - Console Log", ui::alert_type::OK);
                }
 
                // set without saving, the class is not in a coherent state yet
@@ -426,7 +426,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::alert( ui::root, msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
+               ui::alert( ui::root, msg.c_str(), RADIANT_NAME, ui::alert_type::OK, ui::alert_icon::Error );
        }
 }
 
@@ -444,25 +444,25 @@ void create_local_pid(){
                if ( remove( g_pidGameFile.c_str() ) == -1 ) {
                        StringOutputStream msg;
                        msg << "WARNING: Could not delete " << g_pidGameFile.c_str();
-                       ui::alert( ui::root, msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Error );
+                       ui::alert( ui::root, msg.c_str(), RADIANT_NAME, ui::alert_type::OK, ui::alert_icon::Error );
                }
 
                // in debug, never prompt to clean registry, turn console logging auto after a failed start
                if (!GDEF_DEBUG) {
                        StringOutputStream msg;
-                       msg << "Radiant failed to start properly the last time it was run.\n"
+                       msg << RADIANT_NAME " failed to start properly the last time it was run.\n"
                                        "The failure may be caused by current preferences.\n"
                                        "Do you want to reset all preferences to defaults?";
 
-                       if (ui::alert(ui::root, msg.c_str(), "Radiant - Startup Failure", ui::alert_type::YESNO, ui::alert_icon::Question) == ui::alert_response::YES) {
+                       if (ui::alert(ui::root, msg.c_str(), RADIANT_NAME " - 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.";
+                               << "radiant.log\nRefer to the log if " RADIANT_NAME " fails to start again.";
 
-                       ui::alert(ui::root, msg.c_str(), "Radiant - Console Log", ui::alert_type::OK);
+                       ui::alert(ui::root, msg.c_str(), RADIANT_NAME " - Console Log", ui::alert_type::OK);
                }
 
                // force console logging on! (will go in prefs too)
index 3186c67f0df223751ccf770bd885085ba4615b98..2bd3ce44736ef7647bb1751fc13c5c076f416cd0 100644 (file)
@@ -475,8 +475,8 @@ CGameDialog g_GamesDialog;
 
 static void OnButtonClean( ui::Widget widget, gpointer data ){
        // make sure this is what the user wants
-       if ( ui::alert( g_Preferences.GetWidget(), "This will close Radiant and clean the corresponding registry entries.\n"
-                                                                                                                                 "Next time you start Radiant it will be good as new. Do you wish to continue?",
+       if ( ui::alert( g_Preferences.GetWidget(), "This will close " RADIANT_NAME " and clean the corresponding registry entries.\n"
+                                                                                                                                 "Next time you start " RADIANT_NAME " it will be good as new. Do you wish to continue?",
                                                 "Reset Registry", ui::alert_type::YESNO, ui::alert_icon::Asterisk ) == ui::alert_response::YES ) {
                PrefsDlg *dlg = (PrefsDlg*)data;
                dlg->EndModal( eIDCANCEL );
@@ -676,7 +676,7 @@ ui::Window PrefsDlg::BuildDialog(){
        PreferencesDialog_addInterfacePreferences( makeCallbackF(Interface_constructPreferences) );
        Mouse_registerPreferencesPage();
 
-       ui::Window dialog = ui::Window(create_floating_window( "NetRadiant Preferences", m_parent ));
+       ui::Window dialog = ui::Window(create_floating_window( RADIANT_NAME " Preferences", m_parent ));
 
        {
                auto mainvbox = ui::VBox( FALSE, 5 );
index bbae3fab77af86854c191e8d4656fd249961213e..bb65e57337b331c5161a7f894e9c00111481899b 100644 (file)
@@ -273,8 +273,8 @@ static void saxStartElement( message_info_t *data, const xmlChar *name, const xm
                                else if ( strcmp( reinterpret_cast<const char*>( attrs[1] ), Q3MAP_STREAM_VERSION ) != 0 ) {
                                        message_flush( data );
                                        globalErrorStream() <<
-                                       "This version of Radiant reads version " Q3MAP_STREAM_VERSION " debug streams, I got an incoming connection with version " << reinterpret_cast<const char*>( attrs[1] ) << "\n"
-                                                                                                                                                                                                                                                                                                                                                                                          "Please make sure your versions of Radiant and q3map are matching.\n";
+                                       "This version of " RADIANT_NAME " reads version " Q3MAP_STREAM_VERSION " debug streams, I got an incoming connection with version " << reinterpret_cast<const char*>( attrs[1] ) << "\n"
+                                                                                                                                                                                                                                                                                                                                                                                          "Please make sure your versions of " RADIANT_NAME " and q3map are matching.\n";
                                        abortStream( data );
                                        return;
                                }
index 0b75861e5712c62d26d7bc36a878cac1811874ad..e52ce690abc7eb2a3ee7960f964a610c61536ff9 100644 (file)
@@ -576,7 +576,7 @@ int main( int argc, char **argv ){
 
        // using GtkRadiant's versioning next to Id's versioning
        printf( "Q3Data      - (c) 1999 Id Software Inc.\n" );
-       printf( "NetRadiant  - v" RADIANT_VERSION " " __DATE__ "\n" );
+       printf( RADIANT_NAME " - v" RADIANT_VERSION " " __DATE__ "\n" );
 
        ExpandWildcards( &argc, &argv );
 
index 104213b2724062f39389878b2e37dab4bcf83032..32917090a3cf88cb6e56b516849865e85476c63f 100644 (file)
@@ -350,7 +350,7 @@ void HelpMinimap()
 void HelpCommon()
 {
        struct HelpOption common[] = {
-               {"-connect <address>", "Talk to a NetRadiant instance using a specific XML based protocol"},
+               {"-connect <address>", "Talk to a " RADIANT_NAME " instance using a specific XML based protocol"},
                {"-force", "Allow reading some broken/unsupported BSP files e.g. when decompiling, may also crash"},
                {"-fs_basepath <path>", "Sets the given path as main directory of the game (can be used more than once to look in multiple paths)"},
                {"-fs_game <gamename>", "Sets a different game directory name (default for Q3A: baseq3, can be used more than once)"},
index 90fc5d90f624641d70def6513081f940874ca75a..e4d4250bfa9ff200601785a0107ba13e9f80fdc2 100644 (file)
@@ -197,7 +197,7 @@ int main( int argc, char **argv ){
 
        Sys_Printf( "Q3Map         - v1.0r (c) 1999 Id Software Inc.\n" );
        Sys_Printf( "Q3Map (ydnar) - v" Q3MAP_VERSION "\n" );
-       Sys_Printf( "NetRadiant    - v" RADIANT_VERSION " " __DATE__ " " __TIME__ "\n" );
+       Sys_Printf( RADIANT_NAME "    - v" RADIANT_VERSION " " __DATE__ " " __TIME__ "\n" );
        Sys_Printf( "%s\n", Q3MAP_MOTD );
 
        /* ydnar: new path initialization */