From cd77b07164cc2f2a77294b5277e8ad6994429f5b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 3 Feb 2014 00:16:35 +0100 Subject: [PATCH] Remove georges4cvs feature --- code/nel/include/nel/georges/form.h | 4 +- code/nel/include/nel/georges/form_dfn.h | 2 +- code/nel/include/nel/georges/form_loader.h | 2 +- code/nel/include/nel/georges/header.h | 5 +- code/nel/include/nel/georges/type.h | 2 +- code/nel/include/nel/georges/u_form.h | 3 +- code/nel/samples/georges/main.cpp | 2 +- code/nel/src/georges/form.cpp | 8 +-- code/nel/src/georges/form_dfn.cpp | 4 +- code/nel/src/georges/header.cpp | 38 ++----------- code/nel/src/georges/type.cpp | 4 +- .../tools/georges/georges2csv/georges2csv.cpp | 2 +- .../leveldesign/georges_dll/georges_edit.cpp | 11 ---- .../leveldesign/georges_dll/georges_edit.h | 3 - .../georges_dll/georges_edit_doc.cpp | 6 +- .../georges_dll/georges_implementation.cpp | 4 +- .../leveldesign/georges_dll/header_dialog.cpp | 55 ++----------------- .../georges_dll/settings_dialog.cpp | 4 -- .../leveldesign/georges_dll/settings_dialog.h | 1 - .../tools/leveldesign/install/georges.cfg | 1 - 20 files changed, 32 insertions(+), 129 deletions(-) diff --git a/code/nel/include/nel/georges/form.h b/code/nel/include/nel/georges/form.h index aa734cc1d..d2b6a2f2d 100644 --- a/code/nel/include/nel/georges/form.h +++ b/code/nel/include/nel/georges/form.h @@ -44,7 +44,7 @@ public: UFormElm& getRootNode (); const UFormElm& getRootNode () const; const std::string &getComment () const; - void write (class NLMISC::IStream &stream, bool georges4CVS); + void write (class NLMISC::IStream &stream); void getDependencies (std::set &dependencies) const; uint getNumParent () const; UForm *getParentForm (uint parent) const; @@ -73,7 +73,7 @@ public: // ** IO functions // Set the filename before saving the form - void write (xmlDocPtr doc, const char *filename, bool georges4CVS); + void write (xmlDocPtr doc, const char *filename); // ** Parent access diff --git a/code/nel/include/nel/georges/form_dfn.h b/code/nel/include/nel/georges/form_dfn.h index d31dd5d39..283fd0fdd 100644 --- a/code/nel/include/nel/georges/form_dfn.h +++ b/code/nel/include/nel/georges/form_dfn.h @@ -161,7 +161,7 @@ public: }; // ** IO functions - void write (xmlDocPtr root, const char *filename, bool georges4CVS); + void write (xmlDocPtr root, const char *filename); // Count parent DFN uint countParentDfn (uint32 round=0) const; diff --git a/code/nel/include/nel/georges/form_loader.h b/code/nel/include/nel/georges/form_loader.h index 83ae86490..75d7152ec 100644 --- a/code/nel/include/nel/georges/form_loader.h +++ b/code/nel/include/nel/georges/form_loader.h @@ -63,7 +63,7 @@ private: TTypeMap _MapType; // Map of filename / CRefPtr - TFormDfnMap _MapFormDfn; + TFormDfnMap _MapFormDfn; // Map of form / CRefPtr TFormMap _MapForm; diff --git a/code/nel/include/nel/georges/header.h b/code/nel/include/nel/georges/header.h index 3733f0707..21b05445e 100644 --- a/code/nel/include/nel/georges/header.h +++ b/code/nel/include/nel/georges/header.h @@ -54,9 +54,6 @@ public: /// State of the form TState State; - /// CVS Revision string - std::string Revision; - /// Comments of the form std::string Comments; @@ -65,7 +62,7 @@ public: /// ** IO functions void read (xmlNodePtr root); - void write (xmlNodePtr node, bool georges4CVS) const; + void write (xmlNodePtr node) const; // Get state string static const char *getStateString (TState state); diff --git a/code/nel/include/nel/georges/type.h b/code/nel/include/nel/georges/type.h index a57015a26..936506c7c 100644 --- a/code/nel/include/nel/georges/type.h +++ b/code/nel/include/nel/georges/type.h @@ -55,7 +55,7 @@ public: static bool uiCompatible (TType type, TUI ui); // ** IO functions - void write (xmlDocPtr doc, bool georges4CVS) const; + void write (xmlDocPtr doc) const; // Header CFileHeader Header; diff --git a/code/nel/include/nel/georges/u_form.h b/code/nel/include/nel/georges/u_form.h index 45d623340..d53e415f7 100644 --- a/code/nel/include/nel/georges/u_form.h +++ b/code/nel/include/nel/georges/u_form.h @@ -53,9 +53,8 @@ public: /** Write the form in a stream. * * \param stream is the stream used to write the form - * \param georges4CVS should be true if you use Georges with CVS false else */ - virtual void write (NLMISC::IStream &stream, bool georges4CVS) = 0; + virtual void write (NLMISC::IStream &stream) = 0; /** * Access form parents diff --git a/code/nel/samples/georges/main.cpp b/code/nel/samples/georges/main.cpp index da2f09e37..bd7624689 100644 --- a/code/nel/samples/georges/main.cpp +++ b/code/nel/samples/georges/main.cpp @@ -289,7 +289,7 @@ int main(void) // and finally save the form out in case we made changes. // if you're accessing a form read-only (not using set*) you can skip this. NLMISC::COFile saveSample(sampleConfigFile); - form->write(saveSample, false); + form->write(saveSample); nlinfo("Saved sample config file."); } else { // CPath didn't find the file, just print an error and exit. diff --git a/code/nel/src/georges/form.cpp b/code/nel/src/georges/form.cpp index 65eb5ac89..5a23441ee 100644 --- a/code/nel/src/georges/form.cpp +++ b/code/nel/src/georges/form.cpp @@ -104,7 +104,7 @@ CForm::~CForm () // *************************************************************************** -void CForm::write (xmlDocPtr doc, const char *filename, bool georges4CVS) +void CForm::write (xmlDocPtr doc, const char *filename) { // Save the filename if (filename) @@ -137,7 +137,7 @@ void CForm::write (xmlDocPtr doc, const char *filename, bool georges4CVS) } // Header - Header.write (node, georges4CVS); + Header.write (node); } // *************************************************************************** @@ -259,14 +259,14 @@ const std::string &CForm::getComment () const // *************************************************************************** -void CForm::write (class NLMISC::IStream &stream, bool georges4CVS) +void CForm::write (class NLMISC::IStream &stream) { // Xml stream COXml xmlStream; xmlStream.init (&stream); // Write the file - write (xmlStream.getDocument (), NULL, georges4CVS); + write (xmlStream.getDocument (), NULL); } // *************************************************************************** diff --git a/code/nel/src/georges/form_dfn.cpp b/code/nel/src/georges/form_dfn.cpp index 2b9e53c87..715961a72 100644 --- a/code/nel/src/georges/form_dfn.cpp +++ b/code/nel/src/georges/form_dfn.cpp @@ -41,7 +41,7 @@ void warning (bool exception, const char *format, ... ); // *************************************************************************** -void CFormDfn::write (xmlDocPtr doc, const char *filename, bool georges4CVS) +void CFormDfn::write (xmlDocPtr doc, const char *filename) { // Save filename _Filename = CFile::getFilename (filename); @@ -101,7 +101,7 @@ void CFormDfn::write (xmlDocPtr doc, const char *filename, bool georges4CVS) } // Header - Header.write (node, georges4CVS); + Header.write (node); } // *************************************************************************** diff --git a/code/nel/src/georges/header.cpp b/code/nel/src/georges/header.cpp index 1fc215eda..ff92d60ea 100644 --- a/code/nel/src/georges/header.cpp +++ b/code/nel/src/georges/header.cpp @@ -38,27 +38,16 @@ CFileHeader::CFileHeader () MajorVersion = 0; MinorVersion = 0; State = Modified; - Revision = "$R"; - Revision += "evision$"; } // *************************************************************************** -void CFileHeader::write (xmlNodePtr node, bool georges4CVS) const +void CFileHeader::write (xmlNodePtr node) const { - // Version for CVS ? - if (georges4CVS) - { - // Georges version system - xmlSetProp (node, (const xmlChar*)"Revision", (const xmlChar*)Revision.c_str ()); - } - else - { - // Georges version system - char tmp[512]; - smprintf (tmp, 512, "%d.%d", MajorVersion, MinorVersion); - xmlSetProp (node, (const xmlChar*)"Version", (const xmlChar*)tmp); - } + // Georges version system + char tmp[512]; + smprintf (tmp, 512, "%d.%d", MajorVersion, MinorVersion); + xmlSetProp (node, (const xmlChar*)"Version", (const xmlChar*)tmp); // State if (State == Modified) @@ -137,23 +126,6 @@ void CFileHeader::read (xmlNodePtr root) MinorVersion = 0; } - // Get the revision - value = (const char*)xmlGetProp (root, (xmlChar*)"Revision"); - if (value) - { - // Set the value - Revision = value; - - // Delete the value - xmlFree ((void*)value); - } - else - { - // Set default - Revision = "$R"; - Revision += "evision$"; - } - // Get the version value = (const char*)xmlGetProp (root, (xmlChar*)"State"); if (value) diff --git a/code/nel/src/georges/type.cpp b/code/nel/src/georges/type.cpp index 688a0f72f..f401c7ee8 100644 --- a/code/nel/src/georges/type.cpp +++ b/code/nel/src/georges/type.cpp @@ -54,7 +54,7 @@ CType::~CType () // *************************************************************************** -void CType::write (xmlDocPtr doc, bool georges4CVS) const +void CType::write (xmlDocPtr doc) const { // Create the first node xmlNodePtr node = xmlNewDocNode (doc, NULL, (const xmlChar*)"TYPE", NULL); @@ -98,7 +98,7 @@ void CType::write (xmlDocPtr doc, bool georges4CVS) const } // Header - Header.write (node, georges4CVS); + Header.write (node); } // *************************************************************************** diff --git a/code/nel/tools/georges/georges2csv/georges2csv.cpp b/code/nel/tools/georges/georges2csv/georges2csv.cpp index 790c308b4..f400a2976 100644 --- a/code/nel/tools/georges/georges2csv/georges2csv.cpp +++ b/code/nel/tools/georges/georges2csv/georges2csv.cpp @@ -1200,7 +1200,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType } else { - form->write(output, true); + form->write(output); output.close(); if (!CPath::exists(filename + ext)) diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp index dd10a9bb6..c1bffe96c 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.cpp @@ -73,7 +73,6 @@ CGeorgesEditApp::CGeorgesEditApp() : MemStream (false, false, 1024*1024) ResizeMain = true; ExeStandalone = false; StartExpanded = true; - Georges4CVS = true; FormClipBoardFormatStruct = RegisterClipboardFormat ("GeorgesFormStruct"); FormClipBoardFormatVirtualStruct = RegisterClipboardFormat ("GeorgesFormVirtualStruct"); @@ -547,11 +546,6 @@ bool CGeorgesEditApp::loadCfg () if (start_expanded) StartExpanded = start_expanded->asInt () != 0; - // Georges4CVS - CConfigFile::CVar *georges_for_cvs = cf.getVarPtr ("GeorgesForCvs"); - if (georges_for_cvs) - Georges4CVS = georges_for_cvs->asInt () != 0; - // MaxUndo CConfigFile::CVar *max_undo = cf.getVarPtr ("MaxUndo"); if (max_undo) @@ -633,11 +627,6 @@ bool CGeorgesEditApp::saveCfg () if (start_expanded) start_expanded->setAsInt (StartExpanded); - // Georges4CVS - CConfigFile::CVar *georges_for_cvs= cf.getVarPtr ("GeorgesForCvs"); - if (georges_for_cvs) - georges_for_cvs->setAsInt (Georges4CVS); - // MaxUndo CConfigFile::CVar *max_undo= cf.getVarPtr ("MaxUndo"); if (max_undo) diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.h b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.h index ec70cf093..6b233f590 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.h +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.h @@ -99,9 +99,6 @@ public: // If true, expand document's content node at loading bool StartExpanded; - // Georges for CVS - bool Georges4CVS; - // Clipboards ID UINT FormClipBoardFormatStruct; UINT FormClipBoardFormatVirtualStruct; diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit_doc.cpp b/code/ryzom/tools/leveldesign/georges_dll/georges_edit_doc.cpp index 4255273bf..035113bcd 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit_doc.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit_doc.cpp @@ -766,7 +766,7 @@ BOOL CGeorgesEditDoc::OnSaveDocument(LPCTSTR lpszPathName) Type->Header.MinorVersion++; flushValueChange (); } - Type->write (xmlStream.getDocument (), theApp.Georges4CVS); + Type->write (xmlStream.getDocument ()); modify (NULL, NULL, false); flushValueChange (); UpdateAllViews (NULL); @@ -782,7 +782,7 @@ BOOL CGeorgesEditDoc::OnSaveDocument(LPCTSTR lpszPathName) Dfn->Header.MinorVersion++; flushValueChange (); } - Dfn->write (xmlStream.getDocument (), lpszPathName, theApp.Georges4CVS); + Dfn->write (xmlStream.getDocument (), lpszPathName); modify (NULL, NULL, false); UpdateAllViews (NULL); return TRUE; @@ -797,7 +797,7 @@ BOOL CGeorgesEditDoc::OnSaveDocument(LPCTSTR lpszPathName) ((CForm*)(UForm*)Form)->Header.MinorVersion++; flushValueChange (); } - ((CForm*)(UForm*)Form)->write (xmlStream.getDocument (), lpszPathName, theApp.Georges4CVS); + ((CForm*)(UForm*)Form)->write (xmlStream.getDocument (), lpszPathName); if (strcmp (xmlStream.getErrorString (), "") != 0) { char message[512]; diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_implementation.cpp b/code/ryzom/tools/leveldesign/georges_dll/georges_implementation.cpp index 2422d4b65..73fa3fcd9 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_implementation.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_implementation.cpp @@ -513,7 +513,7 @@ void CGeorgesImpl::MakeTyp( const std::string& filename, TType type, TUI ui, con outputXml.init (&output); // Write - t.write (outputXml.getDocument (), theApp.Georges4CVS); + t.write (outputXml.getDocument ()); } catch (Exception &e) { @@ -560,7 +560,7 @@ void CGeorgesImpl::createInstanceFile (const std::string &_sxFullnameWithoutExt, if (f.open (fullName)) { ox.init(&f); - ((NLGEORGES::CForm*)((UForm*)Form))->write (ox.getDocument(), _sxFullnameWithoutExt.c_str (), theApp.Georges4CVS); + ((NLGEORGES::CForm*)((UForm*)Form))->write (ox.getDocument(), _sxFullnameWithoutExt.c_str ()); ox.flush(); f.close(); } diff --git a/code/ryzom/tools/leveldesign/georges_dll/header_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/header_dialog.cpp index 6ecfe13fc..8bdf3e165 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/header_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/header_dialog.cpp @@ -96,7 +96,6 @@ BOOL CHeaderDialog::OnInitDialog() IncrementVersion.Create ("Increment Version", WS_VISIBLE|WS_TABSTOP, currentPos, this, BtIncrement); initWidget (IncrementVersion); getNextPos (currentPos); - IncrementVersion.EnableWindow ( theApp.Georges4CVS ? FALSE : TRUE ); // Create the state combo setStaticSize (currentPos); @@ -243,55 +242,11 @@ void CHeaderDialog::getFromDocument (const NLGEORGES::CFileHeader &header) { if (View) { - if (theApp.Georges4CVS) - { - // CVS revision number - IncrementVersion.EnableWindow ( theApp.Georges4CVS ? FALSE : TRUE ); - - // Performs some checks - bool ok = false; - const char *revision = header.Revision.c_str (); - char name[32]; - char name2[512]; - if (strncmp (revision, "$Revision: ", 11) == 0) - { - // String start - const char *start = revision + 11; - - // String end - const char *end = strchr (start, '$'); - if (end) - { - // Build a string - int length = std::min (31, (int)(end-start)); - memcpy (name, start, length); - name[length] = 0; - - // Nice version - smprintf (name2, 512, "CVS Revision %s", name); - - // Set the label - LabelVersion.SetWindowText (name2); - - // Success - ok = true; - } - } - - // Revision not found ? - if (!ok) - { - LabelVersion.SetWindowText ("CVS Revision number not found"); - } - } - else - { - // Nel standard version number - ComboState.SetCurSel (header.State); - char name[512]; - smprintf (name, 512, "Version %d.%d", header.MajorVersion, header.MinorVersion); - LabelVersion.SetWindowText (name); - } + // Nel standard version number + ComboState.SetCurSel (header.State); + char name[512]; + smprintf (name, 512, "Version %d.%d", header.MajorVersion, header.MinorVersion); + LabelVersion.SetWindowText (name); // Set comments setEditTextMultiLine (Comments, header.Comments.c_str()); diff --git a/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.cpp index 28f50e7e1..e57888595 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.cpp @@ -39,7 +39,6 @@ CSettingsDialog::CSettingsDialog(CWnd* pParent /*=NULL*/) TypeDfnSubDirectory = _T(""); MaxUndo = 0; StartExpanded = TRUE; - Georges4CVS = TRUE; //}}AFX_DATA_INIT } @@ -55,7 +54,6 @@ void CSettingsDialog::DoDataExchange(CDataExchange* pDX) DDX_Text(pDX, IDC_TYP_DFN_PATH, TypeDfnSubDirectory); DDX_Text(pDX, IDC_MAX_UNDO, MaxUndo); DDX_Check(pDX, IDC_START_EXPANDED, StartExpanded); - DDX_Check(pDX, IDC_GEORGES_4_CVS, Georges4CVS); //}}AFX_DATA_MAP } @@ -93,7 +91,6 @@ BOOL CSettingsDialog::OnInitDialog() DefaultDfn = theApp.DefaultDfn.c_str (); DefaultType = theApp.DefaultType.c_str (); StartExpanded = theApp.StartExpanded; - Georges4CVS = theApp.Georges4CVS; UpdateData (FALSE); @@ -110,7 +107,6 @@ void CSettingsDialog::OnOK() theApp.TypeDfnSubDirectory = TypeDfnSubDirectory; theApp.RememberListSize = RememberListSize; theApp.StartExpanded = StartExpanded ? TRUE : FALSE; - theApp.Georges4CVS = Georges4CVS ? TRUE : FALSE; theApp.MaxUndo = MaxUndo; theApp.DefaultDfn = DefaultDfn; theApp.DefaultType = DefaultType; diff --git a/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.h b/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.h index 1bc3aaffe..622e959e4 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.h +++ b/code/ryzom/tools/leveldesign/georges_dll/settings_dialog.h @@ -44,7 +44,6 @@ public: CString TypeDfnSubDirectory; UINT MaxUndo; BOOL StartExpanded; - BOOL Georges4CVS; //}}AFX_DATA NLMISC::CConfigFile ConfigFile; diff --git a/code/ryzom/tools/leveldesign/install/georges.cfg b/code/ryzom/tools/leveldesign/install/georges.cfg index 12551f57e..c7d975479 100644 --- a/code/ryzom/tools/leveldesign/install/georges.cfg +++ b/code/ryzom/tools/leveldesign/install/georges.cfg @@ -11,6 +11,5 @@ SuperUser = 1; UserType = { }; StartExpanded = 1; -GeorgesForCvs = 1; SamplePath = "L:\sound_files\samplebanks"; PackedSheetPath = "L:\sound_files\";