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 )
|
||||
{
|
||||
std::string fileNameLocal, fileNameLocalLC;
|
||||
fileNameLocal = fileName.mb_str ( wxConvLocal );
|
||||
fileNameLocalLC = CaseHandler::lowerCase ( fileNameLocal );
|
||||
wxString extension;
|
||||
wxFileName::SplitPath ( fileName, NULL/*Path*/, NULL/*Name*/, &extension );
|
||||
if ( extension.size() != 3 )
|
||||
return FILE_TYPE_XML;
|
||||
|
||||
if ( fileNameLocalLC.find ( ".dtd" ) != std::string::npos ||
|
||||
fileNameLocalLC.find ( ".ent" ) != std::string::npos )
|
||||
extension.MakeLower();
|
||||
|
||||
if ( extension == _T ( "dtd" ) || extension == _T ( "ent" ) )
|
||||
return FILE_TYPE_DTD;
|
||||
else if ( fileNameLocalLC.find ( ".css" ) != std::string::npos )
|
||||
else if ( extension == _T ( "css" ) )
|
||||
return FILE_TYPE_CSS;
|
||||
else if ( fileNameLocalLC.find ( ".php" ) != std::string::npos )
|
||||
else if ( extension == _T ( "php" ) )
|
||||
return FILE_TYPE_PHP;
|
||||
else if ( fileNameLocalLC.find ( ".exe" ) != std::string::npos )
|
||||
else if ( extension == _T ( "exe" ) )
|
||||
return FILE_TYPE_BINARY;
|
||||
else if ( fileNameLocalLC.find ( ".rnc" ) != std::string::npos )
|
||||
else if ( extension == _T ( "rnc" ) )
|
||||
return FILE_TYPE_RNC;
|
||||
return FILE_TYPE_XML;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ wxCriticalSection xmlcopyeditorCriticalSection;
|
|||
|
||||
XmlCtrl::XmlCtrl (
|
||||
wxWindow *parent,
|
||||
XmlCtrlProperties propertiesParameter,
|
||||
const XmlCtrlProperties &propertiesParameter,
|
||||
bool *protectTagsParameter,
|
||||
int visibilityStateParameter,
|
||||
int typeParameter,
|
||||
|
@ -1065,7 +1065,7 @@ void XmlCtrl::updatePromptMaps ( const char *buffer, size_t bufferLen )
|
|||
}
|
||||
|
||||
void XmlCtrl::applyProperties (
|
||||
XmlCtrlProperties propertiesParameter,
|
||||
const XmlCtrlProperties &propertiesParameter,
|
||||
bool zoomOnly )
|
||||
{
|
||||
properties = propertiesParameter;
|
||||
|
|
|
@ -94,7 +94,7 @@ class XmlCtrl: public wxStyledTextCtrl
|
|||
public:
|
||||
XmlCtrl (
|
||||
wxWindow *parent,
|
||||
XmlCtrlProperties propertiesParameter,
|
||||
const XmlCtrlProperties &propertiesParameter,
|
||||
bool *protectTagsParameter,
|
||||
int visibilityStateParameter = SHOW_TAGS,
|
||||
int typeParameter = FILE_TYPE_XML,
|
||||
|
@ -112,7 +112,7 @@ class XmlCtrl: public wxStyledTextCtrl
|
|||
int getType();
|
||||
int getParentCloseAngleBracket ( int pos, int range = USHRT_MAX * 4 );
|
||||
void applyProperties (
|
||||
XmlCtrlProperties propertiesParameter,
|
||||
const XmlCtrlProperties &propertiesParameter,
|
||||
bool zoomOnly = false );
|
||||
void applyVisibilityState ( int state = SHOW_TAGS );
|
||||
void updatePromptMaps();
|
||||
|
|
Loading…
Reference in New Issue