hResource = 0;\r
currentDialog = 0;\r
wMain = 0;\r
- wEditor = 0;\r
+ m_wEditor = 0;\r
wLocator = 0;\r
\r
m_font = 0;\r
m_TextView.Init(0);\r
m_TextView.ShowWindow( SW_SHOW);\r
//m_TextView.InsertText(_T("Abdadfasdf"));\r
- \r
+ m_wEditor = m_TextView.m_hWnd;\r
return CView::OnCreate(lpcs);\r
}\r
\r
{\r
return ((SciFnDirect) m_directFunction)(m_directPointer, Msg, wParam, lParam);\r
}\r
- return ::SendMessage(wEditor, Msg, wParam, lParam); \r
+ return ::SendMessage(m_wEditor, Msg, wParam, lParam); \r
}\r
\r
void CTortoiseGitBlameView::GetRange(int start, int end, char *text) \r
tr.chrg.cpMin = start;\r
tr.chrg.cpMax = end;\r
tr.lpstrText = text;\r
- SendMessage(wEditor, EM_GETTEXTRANGE, 0, reinterpret_cast<LPARAM>(&tr));\r
+\r
+ SendMessage(m_wEditor, EM_GETTEXTRANGE, 0, reinterpret_cast<LPARAM>(&tr));\r
#endif\r
}\r
\r
SendEditor(SCI_SETSAVEPOINT);\r
SendEditor(SCI_CANCEL);\r
SendEditor(SCI_SETUNDOCOLLECTION, 0);\r
- ::ShowWindow(wEditor, SW_HIDE);\r
+ ::ShowWindow(m_wEditor, SW_HIDE);\r
std::ifstream File;\r
File.open(fileName);\r
if (!File.good())\r
SendEditor(SCI_SETCODEPAGE, SC_CP_UTF8);\r
\r
SendEditor(SCI_SETUNDOCOLLECTION, 1);\r
- ::SetFocus(wEditor);\r
+ ::SetFocus(m_wEditor);\r
SendEditor(EM_EMPTYUNDOBUFFER);\r
SendEditor(SCI_SETSAVEPOINT);\r
SendEditor(SCI_GOTOPOS, 0);\r
\r
//check which lexer to use, depending on the filetype\r
SetupLexer(fileName);\r
- ::ShowWindow(wEditor, SW_SHOW);\r
+ ::ShowWindow(m_wEditor, SW_SHOW);\r
m_blamewidth = 0;\r
::InvalidateRect(wMain, NULL, TRUE);\r
RECT rc;\r
void CTortoiseGitBlameView::InitialiseEditor() \r
{\r
#if 0\r
- m_directFunction = SendMessage(wEditor, SCI_GETDIRECTFUNCTION, 0, 0);\r
- m_directPointer = SendMessage(wEditor, SCI_GETDIRECTPOINTER, 0, 0);\r
+ m_directFunction = SendMessage(m_wEditor, SCI_GETDIRECTFUNCTION, 0, 0);\r
+ m_directPointer = SendMessage(m_wEditor, SCI_GETDIRECTPOINTER, 0, 0);\r
// Set up the global default style. These attributes are used wherever no explicit choices are made.\r
SetAStyle(STYLE_DEFAULT, black, white, (DWORD)CRegStdWORD(_T("Software\\TortoiseGit\\BlameFontSize"), 10), \r
((stdstring)(CRegStdString(_T("Software\\TortoiseGit\\BlameFontName"), _T("Courier New")))).c_str());\r
\r
bool CTortoiseGitBlameView::GotoLine(long line)\r
{\r
+#if 0\r
--line;\r
if (line < 0)\r
return false;\r
int nPosStart = SendEditor(SCI_POSITIONFROMLINE,line);\r
int nPosEnd = SendEditor(SCI_GETLINEENDPOSITION,line);\r
SendEditor(SCI_SETSEL,nPosEnd,nPosStart);\r
-\r
+#endif\r
return true;\r
}\r
\r
// InvalidateRect(wLocator, NULL, FALSE);\r
break;\r
case SCN_GETBKCOLOR:\r
- if ((m_colorage)&&(notification->line < (int)revs.size()))\r
- {\r
- notification->lParam = InterColor(DWORD(m_regOldLinesColor), DWORD(m_regNewLinesColor), (revs[notification->line]-m_lowestrev)*100/((m_highestrev-m_lowestrev)+1));\r
- }\r
+// if ((m_colorage)&&(notification->line < (int)revs.size()))\r
+// {\r
+// notification->lParam = InterColor(DWORD(m_regOldLinesColor), DWORD(m_regNewLinesColor), (revs[notification->line]-m_lowestrev)*100/((m_highestrev-m_lowestrev)+1));\r
+// }\r
break;\r
}\r
}\r
\r
void CTortoiseGitBlameView::DrawLocatorBar(HDC hDC)\r
{\r
+#if 0\r
if (hDC == NULL)\r
return;\r
\r
lineRect.bottom = lineRect.top+1;\r
::ExtTextOut(hDC, 0, 0, ETO_OPAQUE, &lineRect, NULL, 0, NULL);\r
}\r
+#endif\r
}\r
\r
void CTortoiseGitBlameView::StringExpand(LPSTR str)\r
sourcerc.right -= LOCATOR_WIDTH;\r
}\r
::InvalidateRect(wMain, NULL, FALSE);\r
- ::SetWindowPos(wEditor, 0, sourcerc.left, sourcerc.top, sourcerc.right - sourcerc.left, sourcerc.bottom - sourcerc.top, 0);\r
+ ::SetWindowPos(m_wEditor, 0, sourcerc.left, sourcerc.top, sourcerc.right - sourcerc.left, sourcerc.bottom - sourcerc.top, 0);\r
::SetWindowPos(wBlame, 0, blamerc.left, blamerc.top, blamerc.right - blamerc.left, blamerc.bottom - blamerc.top, 0);\r
if (m_colorage)\r
::SetWindowPos(wLocator, 0, 0, blamerc.top, LOCATOR_WIDTH, blamerc.bottom - blamerc.top, SWP_SHOWWINDOW);\r
switch (message) \r
{\r
case WM_CREATE:\r
- app.wEditor = ::CreateWindow(\r
+ app.m_wEditor = ::CreateWindow(\r
"Scintilla",\r
"Source",\r
WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_CLIPCHILDREN,\r
app.hResource,\r
0);\r
app.InitialiseEditor();\r
- ::ShowWindow(app.wEditor, SW_SHOW);\r
- ::SetFocus(app.wEditor);\r
+ ::ShowWindow(app.m_wEditor, SW_SHOW);\r
+ ::SetFocus(app.m_wEditor);\r
app.wBlame = ::CreateWindow(\r
_T("TortoiseGitBlameViewBlame"), \r
_T("blame"), \r
wp.length = sizeof(WINDOWPLACEMENT);\r
GetWindowPlacement(app.wMain, &wp);\r
state = wp.showCmd;\r
- ::DestroyWindow(app.wEditor);\r
+ ::DestroyWindow(app.m_wEditor);\r
::PostQuitMessage(0);\r
}\r
return 0;\r
}\r
#endif\r
\r
-void CTortoiseGitBlameView::SetupLexer(LPCSTR filename)\r
+void CTortoiseGitBlameView::SetupLexer(CString filename)\r
{\r
-#if 0\r
- char line[20];\r
- const char * lineptr = _tcsrchr(filename, '.');\r
\r
- if (lineptr)\r
+ TCHAR *line;\r
+ //const char * lineptr = _tcsrchr(filename, '.');\r
+ int start=filename.ReverseFind(_T('.'));\r
+ if (start>0)\r
{\r
- _tcscpy_s(line, 20, lineptr+1);\r
- _tcslwr_s(line, 20);\r
+ //_tcscpy_s(line, 20, lineptr+1);\r
+ //_tcslwr_s(line, 20);\r
+ CString ext=filename.Right(filename.GetLength()-start-1);\r
+ line=ext.GetBuffer();\r
+\r
if ((_tcscmp(line, _T("py"))==0)||\r
(_tcscmp(line, _T("pyw"))==0)||\r
(_tcscmp(line, _T("pyw"))==0))\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_PYTHON);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("and assert break class continue def del elif \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("and assert break class continue def del elif \\r
else except exec finally for from global if import in is lambda None \\r
-not or pass print raise return try while yield"));\r
+not or pass print raise return try while yield")).GetBuffer()));\r
SetAStyle(SCE_P_DEFAULT, black);\r
SetAStyle(SCE_P_COMMENTLINE, darkGreen);\r
SetAStyle(SCE_P_NUMBER, RGB(0, 0x80, 0x80));\r
(_tcscmp(line, _T("mak"))==0))\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_CPP);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("and and_eq asm auto bitand bitor bool break \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("and and_eq asm auto bitand bitor bool break \\r
case catch char class compl const const_cast continue \\r
default delete do double dynamic_cast else enum explicit export extern false float for \\r
friend goto if inline int long mutable namespace new not not_eq \\r
operator or or_eq private protected public \\r
register reinterpret_cast return short signed sizeof static static_cast struct switch \\r
template this throw true try typedef typeid typename union unsigned using \\r
-virtual void volatile wchar_t while xor xor_eq"));\r
- SendEditor(SCI_SETKEYWORDS, 3, (LPARAM)_T("a addindex addtogroup anchor arg attention \\r
+virtual void volatile wchar_t while xor xor_eq")).GetBuffer()));\r
+ SendEditor(SCI_SETKEYWORDS, 3, (LPARAM)(m_TextView.StringForControl(_T("a addindex addtogroup anchor arg attention \\r
author b brief bug c class code date def defgroup deprecated dontinclude \\r
e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception \\r
f$ f[ f] file fn hideinitializer htmlinclude htmlonly \\r
p page par param post pre ref relates remarks return retval \\r
sa section see showinitializer since skip skipline struct subsection \\r
test throw todo typedef union until \\r
-var verbatim verbinclude version warning weakgroup $ @ \\ & < > # { }"));\r
+var verbatim verbinclude version warning weakgroup $ @ \\ & < > # { }")).GetBuffer()));\r
SetupCppLexer();\r
}\r
if (_tcscmp(line, _T("cs"))==0)\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_CPP);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("abstract as base bool break byte case catch char checked class \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("abstract as base bool break byte case catch char checked class \\r
const continue decimal default delegate do double else enum \\r
event explicit extern false finally fixed float for foreach goto if \\r
implicit in int interface internal is lock long namespace new null \\r
object operator out override params private protected public \\r
readonly ref return sbyte sealed short sizeof stackalloc static \\r
string struct switch this throw true try typeof uint ulong \\r
-unchecked unsafe ushort using virtual void while"));\r
+unchecked unsafe ushort using virtual void while")).GetBuffer()));\r
SetupCppLexer();\r
}\r
if ((_tcscmp(line, _T("rc"))==0)||\r
(_tcscmp(line, _T("rc2"))==0))\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_CPP);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON \\r
BEGIN BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS \\r
COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX DISCARDABLE \\r
EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE LISTBOX LTEXT \\r
MENU MENUEX MENUITEM MESSAGETABLE POPUP \\r
PUSHBUTTON RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 \\r
-STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY"));\r
+STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY")).GetBuffer()));\r
SetupCppLexer();\r
}\r
if ((_tcscmp(line, _T("idl"))==0)||\r
(_tcscmp(line, _T("odl"))==0))\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_CPP);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("aggregatable allocate appobject arrays async async_uuid \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("aggregatable allocate appobject arrays async async_uuid \\r
auto_handle \\r
bindable boolean broadcast byte byte_count \\r
call_as callback char coclass code comm_status \\r
string struct switch switch_is switch_type \\r
transmit_as typedef \\r
uidefault union unique unsigned user_marshal usesgetlasterror uuid \\r
-v1_enum vararg version void wchar_t wire_marshal"));\r
+v1_enum vararg version void wchar_t wire_marshal")).GetBuffer()));\r
SetupCppLexer();\r
}\r
if (_tcscmp(line, _T("java"))==0)\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_CPP);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("abstract assert boolean break byte case catch char class \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("abstract assert boolean break byte case catch char class \\r
const continue default do double else extends final finally float for future \\r
generic goto if implements import inner instanceof int interface long \\r
native new null outer package private protected public rest \\r
return short static super switch synchronized this throw throws \\r
-transient try var void volatile while"));\r
+transient try var void volatile while")).GetBuffer()));\r
SetupCppLexer();\r
}\r
if (_tcscmp(line, _T("js"))==0)\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_CPP);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("abstract boolean break byte case catch char class \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("abstract boolean break byte case catch char class \\r
const continue debugger default delete do double else enum export extends \\r
final finally float for function goto if implements import in instanceof \\r
int interface long native new package private protected public \\r
return short static super switch synchronized this throw throws \\r
-transient try typeof var void volatile while with"));\r
+transient try typeof var void volatile while with")).GetBuffer()));\r
SetupCppLexer();\r
}\r
if ((_tcscmp(line, _T("pas"))==0)||\r
(_tcscmp(line, _T("pp"))==0))\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_PASCAL);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("and array as begin case class const constructor \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("and array as begin case class const constructor \\r
destructor div do downto else end except file finally \\r
for function goto if implementation in inherited \\r
interface is mod not object of on or packed \\r
procedure program property raise record repeat \\r
set shl shr then threadvar to try type unit \\r
-until uses var while with xor"));\r
+until uses var while with xor")).GetBuffer()));\r
SetupCppLexer();\r
}\r
if ((_tcscmp(line, _T("as"))==0)||\r
(_tcscmp(line, _T("jsfl"))==0))\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_CPP);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("add and break case catch class continue default delete do \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("add and break case catch class continue default delete do \\r
dynamic else eq extends false finally for function ge get gt if implements import in \\r
instanceof interface intrinsic le lt ne new not null or private public return \\r
-set static super switch this throw true try typeof undefined var void while with"));\r
- SendEditor(SCI_SETKEYWORDS, 1, (LPARAM)_T("Array Arguments Accessibility Boolean Button Camera Color \\r
+set static super switch this throw true try typeof undefined var void while with")).GetBuffer()));\r
+ SendEditor(SCI_SETKEYWORDS, 1, (LPARAM)(m_TextView.StringForControl(_T("Array Arguments Accessibility Boolean Button Camera Color \\r
ContextMenu ContextMenuItem Date Error Function Key LoadVars LocalConnection Math \\r
Microphone Mouse MovieClip MovieClipLoader NetConnection NetStream Number Object \\r
PrintJob Selection SharedObject Sound Stage String StyleSheet System TextField \\r
NaN newline nextFrame nextScene on onClipEvent onUpdate ord parseFloat parseInt play \\r
prevFrame prevScene print printAsBitmap printAsBitmapNum printNum random removeMovieClip \\r
scroll set setInterval setProperty startDrag stop stopAllSounds stopDrag substring \\r
-targetPath tellTarget toggleHighQuality trace unescape unloadMovie unLoadMovieNum updateAfterEvent"));\r
+targetPath tellTarget toggleHighQuality trace unescape unloadMovie unLoadMovieNum updateAfterEvent")).GetBuffer()));\r
SetupCppLexer();\r
}\r
if ((_tcscmp(line, _T("html"))==0)||\r
{\r
SendEditor(SCI_SETLEXER, SCLEX_HTML);\r
SendEditor(SCI_SETSTYLEBITS, 7);\r
- SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)_T("a abbr acronym address applet area b base basefont \\r
+ SendEditor(SCI_SETKEYWORDS, 0, (LPARAM)(m_TextView.StringForControl(_T("a abbr acronym address applet area b base basefont \\r
bdo big blockquote body br button caption center \\r
cite code col colgroup dd del dfn dir div dl dt em \\r
fieldset font form frame frameset h1 h2 h3 h4 h5 h6 \\r
summary tabindex target text title topmargin type usemap \\r
valign value valuetype version vlink vspace width \\r
text password checkbox radio submit reset \\r
-file hidden image"));\r
- SendEditor(SCI_SETKEYWORDS, 1, (LPARAM)_T("assign audio block break catch choice clear disconnect else elseif \\r
+file hidden image")).GetBuffer()));\r
+ SendEditor(SCI_SETKEYWORDS, 1, (LPARAM)(m_TextView.StringForControl(_T("assign audio block break catch choice clear disconnect else elseif \\r
emphasis enumerate error exit field filled form goto grammar help \\r
if initial link log menu meta noinput nomatch object option p paragraph \\r
param phoneme prompt property prosody record reprompt return s say-as \\r
-script sentence subdialog submit throw transfer value var voice vxml"));\r
- SendEditor(SCI_SETKEYWORDS, 2, (LPARAM)_T("accept age alphabet anchor application base beep bridge category charset \\r
+script sentence subdialog submit throw transfer value var voice vxml")).GetBuffer()));\r
+ SendEditor(SCI_SETKEYWORDS, 2, (LPARAM)(m_TextView.StringForControl(_T("accept age alphabet anchor application base beep bridge category charset \\r
classid cond connecttimeout content contour count dest destexpr dtmf dtmfterm \\r
duration enctype event eventexpr expr expritem fetchtimeout finalsilence \\r
gender http-equiv id level maxage maxstale maxtime message messageexpr \\r
method mime modal mode name namelist next nextitem ph pitch range rate \\r
scope size sizeexpr skiplist slot src srcexpr sub time timeexpr timeout \\r
-transferaudio type value variant version volume xml:lang"));\r
- SendEditor(SCI_SETKEYWORDS, 3, (LPARAM)_T("and assert break class continue def del elif \\r
+transferaudio type value variant version volume xml:lang")).GetBuffer()));\r
+ SendEditor(SCI_SETKEYWORDS, 3, (LPARAM)(m_TextView.StringForControl(_T("and assert break class continue def del elif \\r
else except exec finally for from global if import in is lambda None \\r
-not or pass print raise return try while yield"));\r
- SendEditor(SCI_SETKEYWORDS, 4, (LPARAM)_T("and argv as argc break case cfunction class continue declare default do \\r
+not or pass print raise return try while yield")).GetBuffer()));\r
+ SendEditor(SCI_SETKEYWORDS, 4, (LPARAM)(m_TextView.StringForControl(_T("and argv as argc break case cfunction class continue declare default do \\r
die echo else elseif empty enddeclare endfor endforeach endif endswitch \\r
endwhile e_all e_parse e_error e_warning eval exit extends false for \\r
foreach function global http_cookie_vars http_get_vars http_post_vars \\r
http_post_files http_env_vars http_server_vars if include include_once \\r
list new not null old_function or parent php_os php_self php_version \\r
print require require_once return static switch stdclass this true var \\r
-xor virtual while __file__ __line__ __sleep __wakeup"));\r
+xor virtual while __file__ __line__ __sleep __wakeup")).GetBuffer()));\r
\r
SetAStyle(SCE_H_TAG, darkBlue);\r
SetAStyle(SCE_H_TAGUNKNOWN, red);\r
// Show the whole section of VBScript with light blue background\r
for (int bstyle=SCE_HB_DEFAULT; bstyle<=SCE_HB_STRINGEOL; bstyle++) {\r
SendEditor(SCI_STYLESETFONT, bstyle, \r
- reinterpret_cast<LPARAM>("Lucida Console"));\r
+ reinterpret_cast<LPARAM>(m_TextView.StringForControl(_T("Lucida Console")).GetBuffer()));\r
SendEditor(SCI_STYLESETBACK, bstyle, lightBlue);\r
// This call extends the backround colour of the last style on the line to the edge of the window\r
SendEditor(SCI_STYLESETEOLFILLED, bstyle, 1);\r
}\r
SendEditor(SCI_STYLESETBACK, SCE_HB_STRINGEOL, RGB(0x7F,0x7F,0xFF));\r
SendEditor(SCI_STYLESETFONT, SCE_HB_COMMENTLINE, \r
- reinterpret_cast<LPARAM>("Lucida Console"));\r
+ reinterpret_cast<LPARAM>(m_TextView.StringForControl(_T("Lucida Console")).GetBuffer()));\r
\r
SetAStyle(SCE_HBA_DEFAULT, black);\r
SetAStyle(SCE_HBA_COMMENTLINE, darkGreen);\r
// Show the whole section of ASP VBScript with bright yellow background\r
for (int bastyle=SCE_HBA_DEFAULT; bastyle<=SCE_HBA_STRINGEOL; bastyle++) {\r
SendEditor(SCI_STYLESETFONT, bastyle, \r
- reinterpret_cast<LPARAM>("Lucida Console"));\r
+ reinterpret_cast<LPARAM>(m_TextView.StringForControl(_T("Lucida Console")).GetBuffer()));\r
SendEditor(SCI_STYLESETBACK, bastyle, RGB(0xFF, 0xFF, 0));\r
// This call extends the backround colour of the last style on the line to the edge of the window\r
SendEditor(SCI_STYLESETEOLFILLED, bastyle, 1);\r
}\r
SendEditor(SCI_STYLESETBACK, SCE_HBA_STRINGEOL, RGB(0xCF,0xCF,0x7F));\r
SendEditor(SCI_STYLESETFONT, SCE_HBA_COMMENTLINE, \r
- reinterpret_cast<LPARAM>("Lucida Console"));\r
+ reinterpret_cast<LPARAM>(m_TextView.StringForControl(_T("Lucida Console")).GetBuffer()));\r
\r
// If there is no need to support embedded Javascript, the following code can be dropped.\r
// Javascript will still be correctly processed but will be displayed in just the default style.\r
// Show the whole section of Javascript with off white background\r
for (int jstyle=SCE_HJ_DEFAULT; jstyle<=SCE_HJ_SYMBOLS; jstyle++) {\r
SendEditor(SCI_STYLESETFONT, jstyle, \r
- reinterpret_cast<LPARAM>("Lucida Console"));\r
+ reinterpret_cast<LPARAM>(m_TextView.StringForControl(_T("Lucida Console")).GetBuffer()));\r
SendEditor(SCI_STYLESETBACK, jstyle, offWhite);\r
SendEditor(SCI_STYLESETEOLFILLED, jstyle, 1);\r
}\r
// Show the whole section of Javascript with brown background\r
for (int jastyle=SCE_HJA_DEFAULT; jastyle<=SCE_HJA_SYMBOLS; jastyle++) {\r
SendEditor(SCI_STYLESETFONT, jastyle, \r
- reinterpret_cast<LPARAM>("Lucida Console"));\r
+ reinterpret_cast<LPARAM>(m_TextView.StringForControl(_T("Lucida Console")).GetBuffer()));\r
SendEditor(SCI_STYLESETBACK, jastyle, RGB(0xDF, 0xDF, 0x7F));\r
SendEditor(SCI_STYLESETEOLFILLED, jastyle, 1);\r
}\r
SetupCppLexer();\r
}\r
SendEditor(SCI_COLOURISE, 0, -1);\r
-#endif\r
+\r
}\r
\r
void CTortoiseGitBlameView::SetupCppLexer()\r
SetAStyle(SCE_C_PREPROCESSOR, RGB(0x80, 0, 0));\r
SetAStyle(SCE_C_OPERATOR, RGB(0x80, 0x80, 0));\r
}\r
+\r
+\r
+void CTortoiseGitBlameView::UpdateInfo()\r
+{\r
+ CString &data = GetDocument()->m_BlameData;\r
+ CString one;\r
+ int pos=0;\r
+\r
+ this->m_CommitHash.clear();\r
+ this->m_Authors.clear();\r
+ this->m_ID.clear();\r
+ CString line;\r
+ SendEditor(SCI_SETREADONLY, FALSE);\r
+ SendEditor(SCI_CLEARALL);\r
+ SendEditor(EM_EMPTYUNDOBUFFER);\r
+ SendEditor(SCI_SETSAVEPOINT);\r
+ SendEditor(SCI_CANCEL);\r
+ SendEditor(SCI_SETUNDOCOLLECTION, 0);\r
+\r
+ while( pos>=0 )\r
+ {\r
+ one=data.Tokenize(_T("\n"),pos);\r
+ m_CommitHash.push_back(one.Left(40));\r
+ int start=0;\r
+ start=one.Find(_T(')'),40);\r
+ if(start>0)\r
+ {\r
+ line=one.Right(one.GetLength()-start-2);\r
+ this->m_TextView.InsertText(line,true);\r
+ }\r
+ }\r
+\r
+ SetupLexer(GetDocument()->m_CurrentFileName);\r
+\r
+ SendEditor(SCI_SETUNDOCOLLECTION, 1);\r
+ SendEditor(EM_EMPTYUNDOBUFFER);\r
+ SendEditor(SCI_SETSAVEPOINT);\r
+ SendEditor(SCI_GOTOPOS, 0);\r
+ SendEditor(SCI_SETSCROLLWIDTHTRACKING, TRUE);\r
+ SendEditor(SCI_SETREADONLY, TRUE);\r
+\r
+}
\ No newline at end of file