зеркало из https://github.com/mozilla/pjs.git
Part of the fix for bug 52154, 'Make gui for view source coloring pref' r=akkana@netscape.com sr=hewitt@netscape.com
This commit is contained in:
Родитель
7061496242
Коммит
61467f1444
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* jce2@po.cwru.edu <Jason Eager>: Added pref to turn on/off
|
||||
* syntax hilighting in view source
|
||||
* syntax highlighting in view source
|
||||
* window.
|
||||
*
|
||||
*
|
||||
|
@ -875,10 +875,10 @@ nsresult CViewSourceHTML::WriteTag(nsString &theXMLTagName,const nsAReadableStri
|
|||
CSharedVSContext& theContext=CSharedVSContext::GetSharedContext();
|
||||
#ifdef VIEW_SOURCE_COLORING
|
||||
// This determines the value of the boolean syntax_highlight preference.
|
||||
PRBool syntaxHilight = PR_FALSE;
|
||||
PRBool syntaxHighlight = PR_FALSE;
|
||||
NS_WITH_SERVICE(nsIPref, thePrefsService, kPrefCID, &result);
|
||||
if (NS_SUCCEEDED(result) && thePrefsService)
|
||||
thePrefsService->GetBoolPref("browser.view_source.syntax_highlight", &syntaxHilight);
|
||||
thePrefsService->GetBoolPref("view_source.syntax_highlight", &syntaxHighlight);
|
||||
#endif // VIEW_SOURCE_COLORING
|
||||
|
||||
#ifdef VIEW_SOURCE_HTML
|
||||
|
@ -898,7 +898,7 @@ nsresult CViewSourceHTML::WriteTag(nsString &theXMLTagName,const nsAReadableStri
|
|||
#endif // VIEW_SOURCE_HTML
|
||||
|
||||
#ifdef VIEW_SOURCE_COLORING
|
||||
if (syntaxHilight)
|
||||
if (syntaxHighlight)
|
||||
{
|
||||
theContext.mStartNode.Init(&theTagToken,mLineNumber);
|
||||
#ifdef VIEW_SOURCE_HTML
|
||||
|
@ -939,7 +939,7 @@ nsresult CViewSourceHTML::WriteTag(nsString &theXMLTagName,const nsAReadableStri
|
|||
|
||||
#ifdef VIEW_SOURCE_HTML
|
||||
#ifdef VIEW_SOURCE_COLORING
|
||||
if (syntaxHilight)
|
||||
if (syntaxHighlight)
|
||||
{
|
||||
theContext.mStartNode.ReleaseAll();
|
||||
CEndToken theEndToken(eHTMLTag_span);
|
||||
|
|
|
@ -106,6 +106,9 @@ pref("browser.PICS.service.http___home_netscape_com_default_rating.s", 0);
|
|||
|
||||
pref("browser.target_new_blocked", false);
|
||||
|
||||
// view source
|
||||
pref("view_source.syntax_highlight", true);
|
||||
|
||||
// gfx widgets
|
||||
pref("nglayout.widget.mode", 2);
|
||||
pref("nglayout.widget.gfxscrollbars", true);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* jce2@po.cwru.edu <Jason Eager>: Added pref to turn on/off
|
||||
* syntax hilighting in view source
|
||||
* syntax highlighting in view source
|
||||
* window.
|
||||
*
|
||||
*
|
||||
|
@ -875,10 +875,10 @@ nsresult CViewSourceHTML::WriteTag(nsString &theXMLTagName,const nsAReadableStri
|
|||
CSharedVSContext& theContext=CSharedVSContext::GetSharedContext();
|
||||
#ifdef VIEW_SOURCE_COLORING
|
||||
// This determines the value of the boolean syntax_highlight preference.
|
||||
PRBool syntaxHilight = PR_FALSE;
|
||||
PRBool syntaxHighlight = PR_FALSE;
|
||||
NS_WITH_SERVICE(nsIPref, thePrefsService, kPrefCID, &result);
|
||||
if (NS_SUCCEEDED(result) && thePrefsService)
|
||||
thePrefsService->GetBoolPref("browser.view_source.syntax_highlight", &syntaxHilight);
|
||||
thePrefsService->GetBoolPref("view_source.syntax_highlight", &syntaxHighlight);
|
||||
#endif // VIEW_SOURCE_COLORING
|
||||
|
||||
#ifdef VIEW_SOURCE_HTML
|
||||
|
@ -898,7 +898,7 @@ nsresult CViewSourceHTML::WriteTag(nsString &theXMLTagName,const nsAReadableStri
|
|||
#endif // VIEW_SOURCE_HTML
|
||||
|
||||
#ifdef VIEW_SOURCE_COLORING
|
||||
if (syntaxHilight)
|
||||
if (syntaxHighlight)
|
||||
{
|
||||
theContext.mStartNode.Init(&theTagToken,mLineNumber);
|
||||
#ifdef VIEW_SOURCE_HTML
|
||||
|
@ -939,7 +939,7 @@ nsresult CViewSourceHTML::WriteTag(nsString &theXMLTagName,const nsAReadableStri
|
|||
|
||||
#ifdef VIEW_SOURCE_HTML
|
||||
#ifdef VIEW_SOURCE_COLORING
|
||||
if (syntaxHilight)
|
||||
if (syntaxHighlight)
|
||||
{
|
||||
theContext.mStartNode.ReleaseAll();
|
||||
CEndToken theEndToken(eHTMLTag_span);
|
||||
|
|
|
@ -26,3 +26,6 @@
|
|||
<!-- LOCALIZATION NOTE (ignoreDocColors.label): This is option two, and it appends to 'someProvColors' above. -->
|
||||
<!ENTITY useMyColors.label "Use my chosen colors, ignoring the colors specified">
|
||||
<!ENTITY useMyColors.accesskey "i">
|
||||
<!ENTITY viewsource "View Source Window">
|
||||
<!ENTITY syntaxHighlight.label "Enable syntax highlighting">
|
||||
<!ENTITY syntaxHighlight.accesskey "e">
|
||||
|
|
Загрузка…
Ссылка в новой задаче