Bug #2960087 *.config files are not supported
This commit is contained in:
parent
1c963b324a
commit
90dcc75929
|
@ -5646,20 +5646,22 @@ void MyFrame::xmliseWideTextNode ( wxString& s )
|
||||||
|
|
||||||
int MyFrame::getFileType ( const wxString& fileName )
|
int MyFrame::getFileType ( const wxString& fileName )
|
||||||
{
|
{
|
||||||
std::string fileNameLocal, fileNameLocalLC;
|
wxString extension;
|
||||||
fileNameLocal = fileName.mb_str ( wxConvLocal );
|
wxFileName::SplitPath ( fileName, NULL/*Path*/, NULL/*Name*/, &extension );
|
||||||
fileNameLocalLC = CaseHandler::lowerCase ( fileNameLocal );
|
if ( extension.size() != 3 )
|
||||||
|
return FILE_TYPE_XML;
|
||||||
|
|
||||||
if ( fileNameLocalLC.find ( ".dtd" ) != std::string::npos ||
|
extension.MakeLower();
|
||||||
fileNameLocalLC.find ( ".ent" ) != std::string::npos )
|
|
||||||
|
if ( extension == _T ( "dtd" ) || extension == _T ( "ent" ) )
|
||||||
return FILE_TYPE_DTD;
|
return FILE_TYPE_DTD;
|
||||||
else if ( fileNameLocalLC.find ( ".css" ) != std::string::npos )
|
else if ( extension == _T ( "css" ) )
|
||||||
return FILE_TYPE_CSS;
|
return FILE_TYPE_CSS;
|
||||||
else if ( fileNameLocalLC.find ( ".php" ) != std::string::npos )
|
else if ( extension == _T ( "php" ) )
|
||||||
return FILE_TYPE_PHP;
|
return FILE_TYPE_PHP;
|
||||||
else if ( fileNameLocalLC.find ( ".exe" ) != std::string::npos )
|
else if ( extension == _T ( "exe" ) )
|
||||||
return FILE_TYPE_BINARY;
|
return FILE_TYPE_BINARY;
|
||||||
else if ( fileNameLocalLC.find ( ".rnc" ) != std::string::npos )
|
else if ( extension == _T ( "rnc" ) )
|
||||||
return FILE_TYPE_RNC;
|
return FILE_TYPE_RNC;
|
||||||
return FILE_TYPE_XML;
|
return FILE_TYPE_XML;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ wxCriticalSection xmlcopyeditorCriticalSection;
|
||||||
|
|
||||||
XmlCtrl::XmlCtrl (
|
XmlCtrl::XmlCtrl (
|
||||||
wxWindow *parent,
|
wxWindow *parent,
|
||||||
XmlCtrlProperties propertiesParameter,
|
const XmlCtrlProperties &propertiesParameter,
|
||||||
bool *protectTagsParameter,
|
bool *protectTagsParameter,
|
||||||
int visibilityStateParameter,
|
int visibilityStateParameter,
|
||||||
int typeParameter,
|
int typeParameter,
|
||||||
|
@ -1065,7 +1065,7 @@ void XmlCtrl::updatePromptMaps ( const char *buffer, size_t bufferLen )
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmlCtrl::applyProperties (
|
void XmlCtrl::applyProperties (
|
||||||
XmlCtrlProperties propertiesParameter,
|
const XmlCtrlProperties &propertiesParameter,
|
||||||
bool zoomOnly )
|
bool zoomOnly )
|
||||||
{
|
{
|
||||||
properties = propertiesParameter;
|
properties = propertiesParameter;
|
||||||
|
|
|
@ -94,7 +94,7 @@ class XmlCtrl: public wxStyledTextCtrl
|
||||||
public:
|
public:
|
||||||
XmlCtrl (
|
XmlCtrl (
|
||||||
wxWindow *parent,
|
wxWindow *parent,
|
||||||
XmlCtrlProperties propertiesParameter,
|
const XmlCtrlProperties &propertiesParameter,
|
||||||
bool *protectTagsParameter,
|
bool *protectTagsParameter,
|
||||||
int visibilityStateParameter = SHOW_TAGS,
|
int visibilityStateParameter = SHOW_TAGS,
|
||||||
int typeParameter = FILE_TYPE_XML,
|
int typeParameter = FILE_TYPE_XML,
|
||||||
|
@ -112,7 +112,7 @@ class XmlCtrl: public wxStyledTextCtrl
|
||||||
int getType();
|
int getType();
|
||||||
int getParentCloseAngleBracket ( int pos, int range = USHRT_MAX * 4 );
|
int getParentCloseAngleBracket ( int pos, int range = USHRT_MAX * 4 );
|
||||||
void applyProperties (
|
void applyProperties (
|
||||||
XmlCtrlProperties propertiesParameter,
|
const XmlCtrlProperties &propertiesParameter,
|
||||||
bool zoomOnly = false );
|
bool zoomOnly = false );
|
||||||
void applyVisibilityState ( int state = SHOW_TAGS );
|
void applyVisibilityState ( int state = SHOW_TAGS );
|
||||||
void updatePromptMaps();
|
void updatePromptMaps();
|
||||||
|
|
Loading…
Reference in New Issue