ide: Mac OSX11 patches (thanks arilect)

git-svn-id: svn://ultimatepp.org/upp/trunk@3950 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-10-03 18:45:03 +00:00
parent 84c6015214
commit 83b2f7db49
4 changed files with 7 additions and 4 deletions

View file

@ -23,7 +23,8 @@ void IdeFileIcon0(bool dir, const String& filename, Image& img)
img = IdeCommonImg::Language();
if(ext == ".icpp")
img = IdeCommonImg::ISource();
if(ext == ".c" || ext == ".cpp" || ext == ".cc" || ext == ".cxx")
if(ext == ".c" || ext == ".cpp" || ext == ".cc" || ext == ".cxx"
|| ext == ".m" || ext == ".mm") //should later have diff img?
img = IdeCommonImg::Source();
if(ext == ".sch")
img = IdeCommonImg::Sch();

View file

@ -207,7 +207,8 @@ String GetUppDir() {
bool IsCSourceFile(const char *path)
{
String ext = ToLower(GetFileExt(path));
return ext == ".cpp" || ext == ".c" || ext == ".cc" || ext == ".cxx" || ext == ".icpp";
return ext == ".cpp" || ext == ".c" || ext == ".cc" || ext == ".cxx"
|| ext == ".m" || ext == ".mm" || ext == ".icpp";
}
bool IsCHeaderFile(const char *path)

View file

@ -377,7 +377,7 @@ void Ide::FindFolder()
void Ide::ConstructFindInFiles() {
ff.find.AddButton().SetMonoImage(CtrlImg::smallright()).Tip("Wildcard") <<= THISBACK(FindWildcard);
static const char *defs = "*.cpp *.h *.hpp *.c *.C *.cxx *.cc *.icpp *.sch *.lay *.rc";
static const char *defs = "*.cpp *.h *.hpp *.c *.m *.C *.M *.cxx *.cc *.mm *.MM *.icpp *.sch *.lay *.rc";
ff.files <<= String(defs);
ff.files.AddList((String)defs);
ff.files.AddList((String)"*.txt");

View file

@ -12,7 +12,8 @@ void Ide::SetupEditor(int f, String hl, String fn)
}
if(IsNull(hl)) {
if(ext == ".c" || ext == ".cpp" || ext == ".cc" || ext == ".cxx" ||
ext == ".h" || ext == ".hpp" || ext == ".hh" || ext == ".hxx" || ext == ".icpp")
ext == ".h" || ext == ".hpp" || ext == ".hh" || ext == ".hxx" ||
ext == ".m" || ext == ".mm" || ext == ".icpp")
editor.Highlight(CodeEditor::HIGHLIGHT_CPP);
else
if(ext == ".usc")