• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision12676 (tree)
Zeit2008-04-17 01:31:51
Autorstefankueng

Log Message

Apply our patch to Scintilla for the background colors.

Ändern Zusammenfassung

Diff

--- trunk/src/Utils/scintilla/backgroundcolors.patch (revision 12675)
+++ trunk/src/Utils/scintilla/backgroundcolors.patch (revision 12676)
@@ -1,8 +1,8 @@
1-Index: include/Scintilla.h
2-===================================================================
3---- include/Scintilla.h (revision 12674)
4-+++ include/Scintilla.h (working copy)
5-@@ -748,6 +748,7 @@
1+Index: include/Scintilla.h
2+===================================================================
3+--- include/Scintilla.h (revision 12675)
4++++ include/Scintilla.h (working copy)
5+@@ -750,6 +750,7 @@
66 #define SCN_AUTOCSELECTION 2022
77 #define SCN_INDICATORCLICK 2023
88 #define SCN_INDICATORRELEASE 2024
@@ -10,11 +10,11 @@
1010 //--Autogenerated -- end of section automatically generated from Scintilla.iface
1111
1212 // These structures are defined to be exactly the same shape as the Win32
13-Index: src/Editor.cxx
14-===================================================================
15---- src/Editor.cxx (revision 12674)
16-+++ src/Editor.cxx (working copy)
17-@@ -2270,6 +2270,16 @@
13+Index: src/Editor.cxx
14+===================================================================
15+--- src/Editor.cxx (revision 12675)
16++++ src/Editor.cxx (working copy)
17+@@ -2277,6 +2277,17 @@
1818 }
1919 }
2020
@@ -28,14 +28,15 @@
2828 + background = scn.lParam;
2929 + overrideBackground = true;
3030 + }
31++
3132 bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) &&
3233 (!overrideBackground) && (vsDraw.whitespaceBackgroundSet);
3334
34-Index: src/Editor.h
35-===================================================================
36---- src/Editor.h (revision 12674)
37-+++ src/Editor.h (working copy)
38-@@ -356,6 +356,7 @@
35+Index: src/Editor.h
36+===================================================================
37+--- src/Editor.h (revision 12675)
38++++ src/Editor.h (working copy)
39+@@ -360,6 +360,7 @@
3940 virtual void NotifyFocus(bool focus);
4041 virtual int GetCtrlID() { return ctrlID; }
4142 virtual void NotifyParent(SCNotification scn) = 0;
@@ -43,11 +44,11 @@
4344 virtual void NotifyStyleToNeeded(int endStyleNeeded);
4445 void NotifyChar(int ch);
4546 void NotifyMove(int position);
46-Index: win32/ScintillaWin.cxx
47-===================================================================
48---- win32/ScintillaWin.cxx (revision 12674)
49-+++ win32/ScintillaWin.cxx (working copy)
50-@@ -203,6 +203,7 @@
47+Index: win32/ScintillaWin.cxx
48+===================================================================
49+--- win32/ScintillaWin.cxx (revision 12675)
50++++ win32/ScintillaWin.cxx (working copy)
51+@@ -204,6 +204,7 @@
5152 virtual void NotifyFocus(bool focus);
5253 virtual int GetCtrlID();
5354 virtual void NotifyParent(SCNotification scn);
@@ -54,8 +55,8 @@
5455 + virtual void NotifyParent(SCNotification * scn);
5556 virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
5657 virtual void Copy();
57- virtual bool CanPaste();
58-@@ -1215,6 +1216,13 @@
58+ virtual void CopyAllowLine();
59+@@ -1221,6 +1222,13 @@
5960 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
6061 }
6162
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
--- trunk/src/Utils/scintilla/include/Scintilla.h (revision 12675)
+++ trunk/src/Utils/scintilla/include/Scintilla.h (revision 12676)
@@ -750,6 +750,7 @@
750750 #define SCN_AUTOCSELECTION 2022
751751 #define SCN_INDICATORCLICK 2023
752752 #define SCN_INDICATORRELEASE 2024
753+#define SCN_GETBKCOLOR 2025
753754 //--Autogenerated -- end of section automatically generated from Scintilla.iface
754755
755756 // These structures are defined to be exactly the same shape as the Win32
--- trunk/src/Utils/scintilla/src/Editor.cxx (revision 12675)
+++ trunk/src/Utils/scintilla/src/Editor.cxx (revision 12676)
@@ -2277,6 +2277,17 @@
22772277 }
22782278 }
22792279
2280+ SCNotification scn = {0};
2281+ scn.nmhdr.code = SCN_GETBKCOLOR;
2282+ scn.line = line;
2283+ scn.lParam = -1;
2284+ NotifyParent(&scn);
2285+ if (scn.lParam != -1)
2286+ {
2287+ background = scn.lParam;
2288+ overrideBackground = true;
2289+ }
2290+
22802291 bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) &&
22812292 (!overrideBackground) && (vsDraw.whitespaceBackgroundSet);
22822293
--- trunk/src/Utils/scintilla/src/Editor.h (revision 12675)
+++ trunk/src/Utils/scintilla/src/Editor.h (revision 12676)
@@ -360,6 +360,7 @@
360360 virtual void NotifyFocus(bool focus);
361361 virtual int GetCtrlID() { return ctrlID; }
362362 virtual void NotifyParent(SCNotification scn) = 0;
363+ virtual void NotifyParent(SCNotification * scn) = 0;
363364 virtual void NotifyStyleToNeeded(int endStyleNeeded);
364365 void NotifyChar(int ch);
365366 void NotifyMove(int position);
--- trunk/src/Utils/scintilla/win32/ScintillaWin.cxx (revision 12675)
+++ trunk/src/Utils/scintilla/win32/ScintillaWin.cxx (revision 12676)
@@ -204,6 +204,7 @@
204204 virtual void NotifyFocus(bool focus);
205205 virtual int GetCtrlID();
206206 virtual void NotifyParent(SCNotification scn);
207+ virtual void NotifyParent(SCNotification * scn);
207208 virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
208209 virtual void Copy();
209210 virtual void CopyAllowLine();
@@ -1221,6 +1222,13 @@
12211222 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
12221223 }
12231224
1225+void ScintillaWin::NotifyParent(SCNotification * scn) {
1226+ scn->nmhdr.hwndFrom = MainHWND();
1227+ scn->nmhdr.idFrom = GetCtrlID();
1228+ ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
1229+ GetCtrlID(), reinterpret_cast<LPARAM>(scn));
1230+}
1231+
12241232 void ScintillaWin::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
12251233 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
12261234 ScintillaBase::NotifyDoubleClick(pt, shift, ctrl, alt);
Show on old repository browser