XMLterm changes only.
Fixed missing caret problem. Updated jar.mn for locale stuff.
This commit is contained in:
svn%xmlterm.org 2000-09-19 23:01:42 +00:00
Родитель bb7322f783
Коммит a3325e5e32
4 изменённых файлов: 63 добавлений и 25 удалений

Просмотреть файл

@ -52,6 +52,7 @@
#include "nsFont.h" #include "nsFont.h"
#include "nsIFontMetrics.h" #include "nsIFontMetrics.h"
#include "nsILookAndFeel.h"
#include "mozXMLT.h" #include "mozXMLT.h"
#include "mozXMLTermUtils.h" #include "mozXMLTermUtils.h"
@ -67,6 +68,7 @@ static NS_DEFINE_IID(kXMLTerminalCID, MOZXMLTERMINAL_CID);
static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID); static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID);
static NS_DEFINE_CID(kCTransferableCID, NS_TRANSFERABLE_CID); static NS_DEFINE_CID(kCTransferableCID, NS_TRANSFERABLE_CID);
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// mozXMLTerminal factory // mozXMLTerminal factory
@ -715,20 +717,37 @@ NS_IMETHODIMP mozXMLTerminal::ShowCaret(void)
if (!mPresShell) if (!mPresShell)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
//mPresShell->SetCaretEnabled(PR_TRUE); nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(mPresShell);
if (!selCon) {
return NS_ERROR_FAILURE;
XMLT_WARNING("mozXMLTerminal::ShowCaret: Warning - Failed to get SelectionController\n");
}
PRInt32 pixelWidth;
nsresult result;
NS_WITH_SERVICE(nsILookAndFeel, look, kLookAndFeelCID, &result);
if (NS_SUCCEEDED(result) && look) {
look->GetMetric(nsILookAndFeel::eMetric_SingleLineCaretWidth, pixelWidth);
selCon->SetCaretWidth(pixelWidth);
}
selCon->SetCaretEnabled(PR_TRUE);
selCon->SetCaretReadOnly(PR_FALSE);
nsCOMPtr<nsICaret> caret; nsCOMPtr<nsICaret> caret;
if (NS_SUCCEEDED(mPresShell->GetCaret(getter_AddRefs(caret)))) { if (NS_SUCCEEDED(mPresShell->GetCaret(getter_AddRefs(caret)))) {
nsCOMPtr<nsISelectionController> selCon = do_QueryInterface(mPresShell);
if (selCon) caret->SetCaretVisible(PR_TRUE);
{ caret->SetCaretReadOnly(PR_FALSE);
nsCOMPtr<nsISelection> sel;
if (NS_SUCCEEDED(selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(sel))) && sel) nsCOMPtr<nsISelection> sel;
{
caret->SetCaretDOMSelection(sel); if (NS_SUCCEEDED(selCon->GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(sel))) && sel) {
caret->SetCaretVisible(PR_TRUE); caret->SetCaretDOMSelection(sel);
caret->SetCaretReadOnly(PR_FALSE);
}
} }
} }

Просмотреть файл

@ -1,15 +1,17 @@
packages/xmlterm.jar: packages/xmlterm.jar:
xmlterm/content/xmlterm.xul (xul/content/xmlterm.xul) xmlterm/content/xmlterm.xul (ui/content/xmlterm.xul)
xmlterm/content/XMLTermOverlay.xul (xul/contentXMLTermOverlay.xul) xmlterm/content/xmltermOverlay.xul (ui/content/xmltermOverlay.xul)
xmlterm/content/XMLTermChrome.js (xul/contentXMLTermChrome.js) xmlterm/content/xmltermOverlay.js (ui/content/xmltermOverlay.js)
xmlterm/content/XMLTermCommands.js (xul/contentXMLTermCommands.js) xmlterm/content/xmlterm.html (ui/content/xmlterm.html)
xmlterm/content/XMLTermOverlay.js (xul/contentXMLTermOverlay.js) xmlterm/content/xmltermAbout.html (ui/content/xmltermAbout.html)
xmlterm/content/xmlterm.html (xul/content/xmlterm.html) xmlterm/content/xmltermTips.html (ui/content/xmltermTips.html)
xmlterm/content/xmltermAbout.html (xul/content/xmltermAbout.html) xmlterm/content/XMLTermChrome.js (ui/contentXMLTermChrome.js)
xmlterm/content/xmltermTips.html (xul/content/xmltermTips.html) xmlterm/content/XMLTermCommands.js (ui/contentXMLTermCommands.js)
xmlterm/skin/xmlterm.css (xul/skin/xmlterm.css) xmlterm/skin/xmlterm.css (ui/skin/xmlterm.css)
xmlterm/skin/xmltpage.css (xul/skin/xmltpage.css) xmlterm/skin/xmltpage.css (ui/skin/xmltpage.css)
xmlterm/skin/wheel.gif (xul/skin/wheel.gif) xmlterm/skin/wheel.gif (ui/skin/wheel.gif)
manifest.rdf (xul/manifest.rdf) xmlterm/locale/xmltermOverlay.dtd (ui/locale/en-US/xmltermOverlay.dtd)
manifest.rdf (ui/manifest.rdf)

Просмотреть файл

@ -39,11 +39,11 @@ VPATH = @srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk
DIRS = content skin DIRS = content skin locale
CHROME_DIR = packages/xmlterm CHROME_DIR = packages/xmlterm
CHROME_TYPE = content skin CHROME_TYPE = content skin locale
CHROME_MISC_DIR = . CHROME_MISC_DIR = .
CHROME_MISC = \ CHROME_MISC = \
manifest.rdf \ manifest.rdf \

Просмотреть файл

@ -9,6 +9,9 @@
<RDF:Seq about="urn:mozilla:skin:root"> <RDF:Seq about="urn:mozilla:skin:root">
<RDF:li resource="urn:mozilla:skin:modern/1.0" /> <RDF:li resource="urn:mozilla:skin:modern/1.0" />
</RDF:Seq> </RDF:Seq>
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<!-- xmlterm package information --> <!-- xmlterm package information -->
<RDF:Description about="urn:mozilla:package:xmlterm" <RDF:Description about="urn:mozilla:package:xmlterm"
@ -26,6 +29,19 @@
<RDF:li>chrome://xmlterm/content/xmltermOverlay.xul</RDF:li> <RDF:li>chrome://xmlterm/content/xmltermOverlay.xul</RDF:li>
</RDF:Seq> </RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:displayName="English(US)"
chrome:author="mozilla.org"
chrome:name="en-US"
chrome:previewURL="http://www.mozilla.org/locales/en-US.gif">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:xmlterm"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- xmlterm skin information --> <!-- xmlterm skin information -->
<RDF:Description about="urn:mozilla:skin:modern/1.0" <RDF:Description about="urn:mozilla:skin:modern/1.0"
chrome:displayName="Modern" chrome:displayName="Modern"
@ -37,4 +53,5 @@
</RDF:Seq> </RDF:Seq>
</chrome:packages> </chrome:packages>
</RDF:Description> </RDF:Description>
</RDF:RDF> </RDF:RDF>