Makefile and formatting tweaks

This commit is contained in:
Tim Warren 2015-04-23 11:03:50 -04:00
parent 57cafd1fe1
commit a3e7c1b1f0
6 changed files with 36 additions and 33 deletions

View File

@ -52,7 +52,7 @@ build:
@mkdir -p build
sftp_o:
$(CXX) $(CXXFLAGS) $(LDLIBS) -c -o src/network/SFTP.o src/network/SFTP.cpp
$(CXX) -static $(CXXFLAGS) $(LDLIBS) -c -o src/network/SFTP.o src/network/SFTP.cpp
$(TYRO_LIB): build sftp_o
$(TYRO_LIB): OBJECTS += src/network/SFTP.o
@ -105,7 +105,7 @@ Tyro.app: all resources/platform/osx/Info.plist
cp resources/platform/osx/tyro.icns Tyro.app/Contents/Resources/
$(TESTS): $(TYRO_LIB)
$(foreach var, $(TEST_SRC), $(CXX) $(CXXFLAGS) $(var) $(TYRO_LIB) -o $(patsubst %.cpp,%, $(var));)
$(foreach var, $(TEST_SRC), $(CXX) $(CXXFLAGS) $(var) $(TYRO_LIB) $(LDLIBS) -o $(patsubst %.cpp,%, $(var));)
.PHONY: tests
tests: $(TESTS)

View File

@ -45,7 +45,8 @@
"file_pattern": "*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.xpm",
"keywords": [
"alignof and and_eq bitand bitor break case catch compl const_cast continue default delete do dynamic_cast else false for goto if namespace new not not_eq nullptr operator or or_eq reinterpret_cast return sizeof static_assert static_cast switch this throw true try typedef typeid using while xor xor_eq NULL",
"alignas asm auto bool char char16_t char32_t class const constexpr decltype double enum explicit export extern final float friend inline int long mutable noexcept override private protected public register short signed static struct template thread_local typename union unsigned virtual void volatile wchar_t"
"alignas asm auto bool char char16_t char32_t class const constexpr decltype double enum explicit export extern final float friend inline int long mutable noexcept override private protected public register short signed static struct template thread_local typename union unsigned virtual void volatile wchar_t",
"abstract access author copyright deprecated deprec example exception global ignore internal license link name package param return see since static staticvar subpackage throws todo version"
],
"lexer_map": [
"default", "comment", "comment_line", "comment_doc", "number", "keyword1", "string", "character", "uuid", "preprocessor", "operator", "identifier", "string_eol", "default", "regex", "comment_special", "keyword2", "keyword3", "error"
@ -223,7 +224,7 @@
""
],
"lexer_map": [
"default", "keyword1", "parameter", "keyword2", "identifier", "number", "string_eol", "string", "value", "comment", "label", "default", "default", "default", "script", "default", "default", "default", "default", "value"
"default", "keyword1", "error", "keyword2", "error", "number", "string", "string", "default", "comment", "preprocessor", "keyword1", "keyword3", "keyword3", "keyword4", "keyword5", "keyword6", "preprocessor", "keyword7"
]
},
"yaml": {

View File

@ -48,8 +48,8 @@
"parameter": [0, 43, 54],
"regex": [7, 54, 66],
"uuid": [0, 43, 54],
"value": [7, 54, 66],
"preprocessor": [181, 137, 0],
"value": [0, 43, 54],
"preprocessor": [88, 110, 117],
"script": [88, 110, 117],
"variable": [203, 75, 22],
"error": [220, 50, 47]
@ -59,7 +59,8 @@
"keyword2": true,
"operator": true,
"label": true,
"error": true
"error": true,
"preprocessor": true
},
"italic": {
"error": true

View File

@ -80,6 +80,7 @@ void EditPane::Highlight(wxString filePath)
// Some basic properties to set
this->SetProperty("technology", "2");
this->SetProperty("error.inline", "0");
this->SetProperty("styling.within.preprocessor", "1");
this->SetProperty("font.quality", "3"); // LCD Optimized
// Apply the theme
@ -103,8 +104,9 @@ void EditPane::Highlight(wxString filePath)
this->MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_TCORNER, "BLACK", "BLACK");
this->MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_LCORNER, "BLACK", "BLACK");
this->SetLayoutCache (wxSTC_CACHE_NONE);
this->SetUseHorizontalScrollBar(1);
this->SetLayoutCache (wxSTC_CACHE_CARET);
//this->SetViewWhiteSpace(wxSTC_WS_VISIBLEALWAYS);
// set spaces and indention
this->SetTabWidth(4);
@ -151,7 +153,12 @@ void EditPane::ApplyTheme(string lang, string theme)
wxLogDebug(output.str().c_str());
}
int offset_count = 0;//(lang == "php") ? 104 : 0;
if (lang == "php")
{
//this->SetLexerLanguage("php");
}
int offset_count = (lang == "php") ? 104 : 0;
// Do the appropriate mappings to load the selected theme
this->_ApplyTheme(lexer_map, offset_count);
@ -268,11 +275,6 @@ bool EditPane::SaveFile(const wxString &filename)
return false;
}
bool EditPane::IsModified()
{
return this->GetModify();
}
/**
* Check that the current file can be opened
*

View File

@ -27,7 +27,6 @@ public:
void Highlight(wxString filePath);
bool SaveFile();
bool SaveFile(const wxString &filename);
bool IsModified();
void ApplyTheme(string lang, string theme="Solarized");
private:
StringConstMap lexerMap;