From: Thomas Debesse Date: Wed, 5 Jun 2019 01:17:06 +0000 (+0200) Subject: radiant/tools: use RADIANT_NAME instead of hardcoding NetRadiant or Radiant X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1c26c420f1b5dabd39b492ab017447172ef5a6c8;p=xonotic%2Fnetradiant.git radiant/tools: use RADIANT_NAME instead of hardcoding NetRadiant or Radiant --- diff --git a/contrib/bobtoolz/ctfToolz-GTK.cpp b/contrib/bobtoolz/ctfToolz-GTK.cpp index 4e5231d1..a69a1a12 100644 --- a/contrib/bobtoolz/ctfToolz-GTK.cpp +++ b/contrib/bobtoolz/ctfToolz-GTK.cpp @@ -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"; diff --git a/contrib/brushexport/export.cpp b/contrib/brushexport/export.cpp index cbc4abf6..86a7767b 100644 --- a/contrib/brushexport/export.cpp +++ b/contrib/brushexport/export.cpp @@ -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::const_iterator it( materials.begin() ); it != materials.end(); ++it ) { diff --git a/contrib/camera/camera.cpp b/contrib/camera/camera.cpp index 635b3679..338d28ed 100644 --- a/contrib/camera/camera.cpp +++ b/contrib/camera/camera.cpp @@ -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(){ diff --git a/contrib/camera/funchandlers.cpp b/contrib/camera/funchandlers.cpp index 5d72242b..70e3eb40 100644 --- a/contrib/camera/funchandlers.cpp +++ b/contrib/camera/funchandlers.cpp @@ -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; } diff --git a/contrib/prtview/AboutDialog.cpp b/contrib/prtview/AboutDialog.cpp index f320de22..3b996d88 100644 --- a/contrib/prtview/AboutDialog.cpp +++ b/contrib/prtview/AboutDialog.cpp @@ -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(); diff --git a/contrib/shaderplug/shaderplug.cpp b/contrib/shaderplug/shaderplug.cpp index 9d7bc4c5..b71efcb3 100644 --- a/contrib/shaderplug/shaderplug.cpp +++ b/contrib/shaderplug/shaderplug.cpp @@ -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 , diff --git a/contrib/sunplug/sunplug.cpp b/contrib/sunplug/sunplug.cpp index ac8233d1..41689042 100644 --- a/contrib/sunplug/sunplug.cpp +++ b/contrib/sunplug/sunplug.cpp @@ -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 diff --git a/include/qerplugin.h b/include/qerplugin.h index 1868b745..b18651fa 100644 --- a/include/qerplugin.h +++ b/include/qerplugin.h @@ -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) diff --git a/libs/gtkutil/messagebox.h b/libs/gtkutil/messagebox.h index 4ae8a3f8..05754604 100644 --- a/libs/gtkutil/messagebox.h +++ b/libs/gtkutil/messagebox.h @@ -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 diff --git a/radiant/console.cpp b/radiant/console.cpp index 82b08e3c..dbcf64cd 100644 --- a/radiant/console.cpp +++ b/radiant/console.cpp @@ -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 ); } } diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index ed2e45a4..817cdbf3 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -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"; diff --git a/radiant/main.cpp b/radiant/main.cpp index 0047cf25..386f7106 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -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) diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 3186c67f..2bd3ce44 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -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 ); diff --git a/radiant/watchbsp.cpp b/radiant/watchbsp.cpp index bbae3fab..bb65e573 100644 --- a/radiant/watchbsp.cpp +++ b/radiant/watchbsp.cpp @@ -273,8 +273,8 @@ static void saxStartElement( message_info_t *data, const xmlChar *name, const xm else if ( strcmp( reinterpret_cast( 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( 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( attrs[1] ) << "\n" + "Please make sure your versions of " RADIANT_NAME " and q3map are matching.\n"; abortStream( data ); return; } diff --git a/tools/quake3/q3data/q3data.c b/tools/quake3/q3data/q3data.c index 0b75861e..e52ce690 100644 --- a/tools/quake3/q3data/q3data.c +++ b/tools/quake3/q3data/q3data.c @@ -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 ); diff --git a/tools/quake3/q3map2/help.c b/tools/quake3/q3map2/help.c index 104213b2..32917090 100644 --- a/tools/quake3/q3map2/help.c +++ b/tools/quake3/q3map2/help.c @@ -350,7 +350,7 @@ void HelpMinimap() void HelpCommon() { struct HelpOption common[] = { - {"-connect
", "Talk to a NetRadiant instance using a specific XML based protocol"}, + {"-connect
", "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 ", "Sets the given path as main directory of the game (can be used more than once to look in multiple paths)"}, {"-fs_game ", "Sets a different game directory name (default for Q3A: baseq3, can be used more than once)"}, diff --git a/tools/quake3/q3map2/main.c b/tools/quake3/q3map2/main.c index 90fc5d90..e4d4250b 100644 --- a/tools/quake3/q3map2/main.c +++ b/tools/quake3/q3map2/main.c @@ -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 */