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 bc43e9edf8
commit 2c4b66c5d2
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(); img = IdeCommonImg::Language();
if(ext == ".icpp") if(ext == ".icpp")
img = IdeCommonImg::ISource(); 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(); img = IdeCommonImg::Source();
if(ext == ".sch") if(ext == ".sch")
img = IdeCommonImg::Sch(); img = IdeCommonImg::Sch();

View file

@ -207,7 +207,8 @@ String GetUppDir() {
bool IsCSourceFile(const char *path) bool IsCSourceFile(const char *path)
{ {
String ext = ToLower(GetFileExt(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) bool IsCHeaderFile(const char *path)

View file

@ -377,7 +377,7 @@ void Ide::FindFolder()
void Ide::ConstructFindInFiles() { void Ide::ConstructFindInFiles() {
ff.find.AddButton().SetMonoImage(CtrlImg::smallright()).Tip("Wildcard") <<= THISBACK(FindWildcard); 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 <<= String(defs);
ff.files.AddList((String)defs); ff.files.AddList((String)defs);
ff.files.AddList((String)"*.txt"); ff.files.AddList((String)"*.txt");

View file

@ -12,7 +12,8 @@ void Ide::SetupEditor(int f, String hl, String fn)
} }
if(IsNull(hl)) { if(IsNull(hl)) {
if(ext == ".c" || ext == ".cpp" || ext == ".cc" || ext == ".cxx" || 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); editor.Highlight(CodeEditor::HIGHLIGHT_CPP);
else else
if(ext == ".usc") if(ext == ".usc")