[Pkg-mozext-commits] [sage-extension] 09/54: normalized source to unix line endings
David Prévot
taffit at moszumanska.debian.org
Fri May 1 03:10:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag sage_1_3
in repository sage-extension.
commit 46187cc33ba7e4dae5edbf9103b38833ad6cd2ed
Author: Peter Andrews <petea at jhu.edu>
Date: Sat Sep 11 06:57:54 2004 +0000
normalized source to unix line endings
---
src/install.js | 80 +-
src/sage/content/bookmarksTree.xml | 116 +-
src/sage/content/commonfunc.js | 720 ++++-----
src/sage/content/createhtml.js | 240 +--
src/sage/content/getrsstitle.js | 110 +-
src/sage/content/opml/opml.js | 546 +++----
src/sage/content/opml/opml.xul | 96 +-
src/sage/content/popupex.xml | 120 +-
src/sage/content/res/sage.css | 182 +--
src/sage/content/res/template-html.txt | 42 +-
src/sage/content/res/template-item.txt | 18 +-
src/sage/content/sage-Overlay.xul | 70 +-
src/sage/content/sage.js | 1570 ++++++++++----------
src/sage/content/search/feedsearch.js | 206 +--
src/sage/content/search/searchEngine.rdf | 108 +-
.../content/settings/bookmarkfoldermenulist.js | 144 +-
src/sage/content/settings/exUnregisterer.js | 1080 +++++++-------
src/sage/content/settings/settings.js | 264 ++--
src/sage/content/updatechecker.js | 300 ++--
src/sage/locale/de-DE/contents.rdf | 32 +-
src/sage/locale/de-DE/opml.dtd | 20 +-
src/sage/locale/de-DE/sage.dtd | 102 +-
src/sage/locale/de-DE/sage.properties | 166 +--
src/sage/locale/en-US/contents.rdf | 34 +-
src/sage/locale/en-US/opml.dtd | 22 +-
src/sage/locale/en-US/sage.dtd | 104 +-
src/sage/locale/en-US/sage.properties | 180 +--
src/sage/locale/es-ES/contents.rdf | 34 +-
src/sage/locale/es-ES/opml.dtd | 22 +-
src/sage/locale/fr-FR/sage.properties | 180 +--
src/sage/locale/hu-HU/contents.rdf | 34 +-
src/sage/locale/hu-HU/opml.dtd | 22 +-
src/sage/locale/hu-HU/sage.dtd | 106 +-
src/sage/locale/hu-HU/sage.properties | 182 +--
src/sage/locale/it-IT/sage.dtd | 106 +-
src/sage/locale/it-IT/sage.properties | 180 +--
src/sage/locale/ja-JP/contents.rdf | 34 +-
src/sage/locale/ja-JP/opml.dtd | 22 +-
src/sage/locale/ja-JP/sage.dtd | 108 +-
src/sage/locale/ja-JP/sage.properties | 182 +--
src/sage/locale/nl-NL/contents.rdf | 34 +-
src/sage/locale/nl-NL/opml.dtd | 22 +-
src/sage/locale/nl-NL/sage.dtd | 104 +-
src/sage/locale/nl-NL/sage.properties | 180 +--
src/sage/locale/ru-RU/contents.rdf | 34 +-
src/sage/locale/ru-RU/opml.dtd | 20 +-
src/sage/locale/ru-RU/sage.dtd | 100 +-
src/sage/locale/ru-RU/sage.properties | 166 +--
src/sage/locale/zh-TW/contents.rdf | 34 +-
src/sage/locale/zh-TW/opml.dtd | 22 +-
src/sage/skin/classic/contents.rdf | 58 +-
src/sage/skin/classic/sage-button.css | 16 +-
src/sage/skin/classic/sage.css | 270 ++--
53 files changed, 4472 insertions(+), 4472 deletions(-)
diff --git a/src/install.js b/src/install.js
index 456c26d..6295a35 100755
--- a/src/install.js
+++ b/src/install.js
@@ -1,40 +1,40 @@
-const APP_NAME = "Sage";
-const APP_CHROME_NAME = "sage";
-const APP_VERSION = "1.2.2";
-const APP_FILE = "sage.jar";
-const APP_CONTENTS_PATH = "content/";
-const APP_SKIN_CLASSIC_PATH = "skin/classic/";
-const APP_LOCALE_ENUS_PATH = "locale/en-US/";
-const APP_LOCALE_JAJP_PATH = "locale/ja-JP/";
-const APP_LOCALE_FRFR_PATH = "locale/fr-FR/";
-const APP_LOCALE_HUHU_PATH = "locale/hu-HU/";
-const APP_LOCALE_ITIT_PATH = "locale/it-IT/";
-const APP_LOCALE_NLNL_PATH = "locale/nl-NL/";
-const APP_LOCALE_CACA_PATH = "locale/ca-CA/";
-const APP_LOCALE_ZHTW_PATH = "locale/zh-TW/";
-
-
-initInstall(APP_NAME, APP_CHROME_NAME, APP_VERSION);
-
-var chromeFolder = getFolder("Current User", "chrome");
-setPackageFolder(chromeFolder);
-addFile(APP_NAME, "chrome/" + APP_FILE, chromeFolder, "");
-
-var jarFolder = getFolder(chromeFolder, APP_FILE);
-registerChrome(CONTENT | PROFILE_CHROME, jarFolder, APP_CONTENTS_PATH);
-registerChrome(SKIN | PROFILE_CHROME, jarFolder, APP_SKIN_CLASSIC_PATH);
-registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_ENUS_PATH);
-registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_JAJP_PATH);
-registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_FRFR_PATH);
-registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_HUHU_PATH);
-registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_ITIT_PATH);
-registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_NLNL_PATH);
-registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_CACA_PATH);
-registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_ZHTW_PATH);
-
-var result = getLastError();
-if(result == SUCCESS) {
- performInstall();
-} else {
- cancelInstall(result);
-}
+const APP_NAME = "Sage";
+const APP_CHROME_NAME = "sage";
+const APP_VERSION = "1.2.2";
+const APP_FILE = "sage.jar";
+const APP_CONTENTS_PATH = "content/";
+const APP_SKIN_CLASSIC_PATH = "skin/classic/";
+const APP_LOCALE_ENUS_PATH = "locale/en-US/";
+const APP_LOCALE_JAJP_PATH = "locale/ja-JP/";
+const APP_LOCALE_FRFR_PATH = "locale/fr-FR/";
+const APP_LOCALE_HUHU_PATH = "locale/hu-HU/";
+const APP_LOCALE_ITIT_PATH = "locale/it-IT/";
+const APP_LOCALE_NLNL_PATH = "locale/nl-NL/";
+const APP_LOCALE_CACA_PATH = "locale/ca-CA/";
+const APP_LOCALE_ZHTW_PATH = "locale/zh-TW/";
+
+
+initInstall(APP_NAME, APP_CHROME_NAME, APP_VERSION);
+
+var chromeFolder = getFolder("Current User", "chrome");
+setPackageFolder(chromeFolder);
+addFile(APP_NAME, "chrome/" + APP_FILE, chromeFolder, "");
+
+var jarFolder = getFolder(chromeFolder, APP_FILE);
+registerChrome(CONTENT | PROFILE_CHROME, jarFolder, APP_CONTENTS_PATH);
+registerChrome(SKIN | PROFILE_CHROME, jarFolder, APP_SKIN_CLASSIC_PATH);
+registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_ENUS_PATH);
+registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_JAJP_PATH);
+registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_FRFR_PATH);
+registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_HUHU_PATH);
+registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_ITIT_PATH);
+registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_NLNL_PATH);
+registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_CACA_PATH);
+registerChrome(LOCALE | PROFILE_CHROME, jarFolder, APP_LOCALE_ZHTW_PATH);
+
+var result = getLastError();
+if(result == SUCCESS) {
+ performInstall();
+} else {
+ cancelInstall(result);
+}
diff --git a/src/sage/content/bookmarksTree.xml b/src/sage/content/bookmarksTree.xml
index 21b1083..8378d28 100755
--- a/src/sage/content/bookmarksTree.xml
+++ b/src/sage/content/bookmarksTree.xml
@@ -1,58 +1,58 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE window [
- <!ENTITY % bookmarksDTD SYSTEM "chrome://browser/locale/bookmarks/bookmarks.dtd">
- %bookmarksDTD;
-]>
-
-<bindings id="bookmarksBindings"
- xmlns="http://www.mozilla.org/xbl"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:xbl="http://www.mozilla.org/xbl">
-
- <binding id="bookmarks-tree-name" extends="chrome://browser/content/bookmarks/bookmarksTree.xml#bookmarks-tree">
- <xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:xbl="http://www.mozilla.org/xbl" contextmenu="_child">
- <!-- context menu -->
- <menupopup xbl:inherits="onpopupshowing"
- onpopupshowing="this.parentNode.createTreeContextMenu(event);createTreeContextMenu2(event)"
- onpopuphidden="if (content) content.focus()"
- onclick="event.preventBubble();"
- onkeypress="event.preventBubble();"/>
- <tree anonid="bookmarks-tree" flex="1" class="plain" hidecolumnpicker="true"
- datasources="rdf:bookmarks rdf:internetsearch rdf:localsearch" ref="NC:BookmarksRoot" flags="dont-build-content"
- onselect="this.parentNode.treeBoxObject.view.selectionChanged();" seltype="single">
- <template xmlns:nc="http://home.netscape.com/NC-rdf#">
- <rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
- <treechildren>
- <treeitem uri="rdf:*">
- <treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type separator">
- <treecell properties="separator" label="rdf:http://home.netscape.com/NC-rdf#Name"/>
- </treerow>
- </treeitem>
- </treechildren>
- </rule>
- <rule>
- <treechildren>
- <treeitem uri="rdf:*">
- <treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
- <treecell label="rdf:http://home.netscape.com/NC-rdf#Name"
- properties="rdf:http://home.netscape.com/NC-rdf#Description rss"/>
- </treerow>
- </treeitem>
- </treechildren>
- </rule>
- </template>
- <treecols anonid="treecols">
- <treecol id="Name" flex="1" primary="true" hideheader="true"
- sort="rdf:http://home.netscape.com/NC-rdf#Name"
- sortActive="true" sortDirection="none"/>
- </treecols>
- </tree>
- </xbl:content>
- <implementation>
- <field name="clickCount">1</field>
- </implementation>
- </binding>
-</bindings>
+<?xml version="1.0"?>
+
+<!DOCTYPE window [
+ <!ENTITY % bookmarksDTD SYSTEM "chrome://browser/locale/bookmarks/bookmarks.dtd">
+ %bookmarksDTD;
+]>
+
+<bindings id="bookmarksBindings"
+ xmlns="http://www.mozilla.org/xbl"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:xbl="http://www.mozilla.org/xbl">
+
+ <binding id="bookmarks-tree-name" extends="chrome://browser/content/bookmarks/bookmarksTree.xml#bookmarks-tree">
+ <xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:xbl="http://www.mozilla.org/xbl" contextmenu="_child">
+ <!-- context menu -->
+ <menupopup xbl:inherits="onpopupshowing"
+ onpopupshowing="this.parentNode.createTreeContextMenu(event);createTreeContextMenu2(event)"
+ onpopuphidden="if (content) content.focus()"
+ onclick="event.preventBubble();"
+ onkeypress="event.preventBubble();"/>
+ <tree anonid="bookmarks-tree" flex="1" class="plain" hidecolumnpicker="true"
+ datasources="rdf:bookmarks rdf:internetsearch rdf:localsearch" ref="NC:BookmarksRoot" flags="dont-build-content"
+ onselect="this.parentNode.treeBoxObject.view.selectionChanged();" seltype="single">
+ <template xmlns:nc="http://home.netscape.com/NC-rdf#">
+ <rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
+ <treechildren>
+ <treeitem uri="rdf:*">
+ <treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type separator">
+ <treecell properties="separator" label="rdf:http://home.netscape.com/NC-rdf#Name"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </rule>
+ <rule>
+ <treechildren>
+ <treeitem uri="rdf:*">
+ <treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
+ <treecell label="rdf:http://home.netscape.com/NC-rdf#Name"
+ properties="rdf:http://home.netscape.com/NC-rdf#Description rss"/>
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </rule>
+ </template>
+ <treecols anonid="treecols">
+ <treecol id="Name" flex="1" primary="true" hideheader="true"
+ sort="rdf:http://home.netscape.com/NC-rdf#Name"
+ sortActive="true" sortDirection="none"/>
+ </treecols>
+ </tree>
+ </xbl:content>
+ <implementation>
+ <field name="clickCount">1</field>
+ </implementation>
+ </binding>
+</bindings>
diff --git a/src/sage/content/commonfunc.js b/src/sage/content/commonfunc.js
index 269552e..9538575 100755
--- a/src/sage/content/commonfunc.js
+++ b/src/sage/content/commonfunc.js
@@ -1,360 +1,360 @@
-
-var aConsoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
-
-function logMessage(message) {
- aConsoleService.logStringMessage("Sage: " + message);
-}
-
-function dateFormat(date, twelveHourClock, format) {
- function padout(number) { return (number < 10) ? '0' + number : number; }
-
- if(!format) {
- format = 0;
- }
-
- var dayOfMonth = date.getDate();
-
- var day;
- switch (date.getDay()) {
- case 0: day = strRes.getString("date_sunday_short"); break
- case 1: day = strRes.getString("date_monday_short"); break
- case 2: day = strRes.getString("date_tuesday_short"); break
- case 3: day = strRes.getString("date_wednesday_short"); break
- case 4: day = strRes.getString("date_thursday_short"); break
- case 5: day = strRes.getString("date_friday_short"); break
- case 6: day = strRes.getString("date_saturday_short"); break
- }
-
- var month, monthNum;
- monthNum = date.getMonth() + 1;
- switch (monthNum) {
- case 1: month = strRes.getString("date_january_short"); break
- case 2: month = strRes.getString("date_february_short"); break
- case 3: month = strRes.getString("date_march_short"); break
- case 4: month = strRes.getString("date_april_short"); break
- case 5: month = strRes.getString("date_may_short"); break
- case 6: month = strRes.getString("date_june_short"); break
- case 7: month = strRes.getString("date_july_short"); break
- case 8: month = strRes.getString("date_august_short"); break
- case 9: month = strRes.getString("date_september_short"); break
- case 10: month = strRes.getString("date_october_short"); break
- case 11: month = strRes.getString("date_november_short"); break
- case 12: month = strRes.getString("date_december_short"); break
- }
-
- var year = date.getYear() + 1900;
-
- var date_str;
- switch(format) {
- case 0:
- date_str = day + ", " + month + " " + dayOfMonth + ", " + year;
- break
- case 1:
- date_str = monthNum + "/" + dayOfMonth + "/" + year;
- break
- }
-
- var hours = date.getHours(), minutes = padout(date.getMinutes()), seconds = padout(date.getSeconds());
- var adjhours, time_str;
- if(twelveHourClock) {
- adjhours = (hours == 0) ? 12 : ((hours < 13) ? hours : hours-12);
- time_str = adjhours + ":" + minutes + ((hours < 12) ? " AM" : " PM");
- } else {
- time_str = hours + ":" + minutes;
- }
- return date_str + " " + time_str;
-}
-
-
-
-var CommonFunc = {
-
- RSS_READER_FOLDER_ID: "sage.folder_id",
- USER_AGENT: "Mozilla/5.0 (Sage)",
-
- USER_CSS_ENABLE: "sage.user_css.enable",
- USER_CSS_PATH: "sage.user_css.path",
- ALLOW_ENCODED_CONTENT: "sage.allow_encoded_content",
- AUTO_FEED_TITLE: "sage.auto_feed_title",
- RENDER_FEEDS: "sage.render_feeds",
- TWELVE_HOUR_CLOCK: "sage.twelve_hour_clock",
- FEED_ITEM_ORDER: "sage.feed_item_order",
- FEED_DISCOVERY_MODE: "sage.feed_discovery_mode",
-
-
-// ++++++++++ ++++++++++ Bookmark RDF ++++++++++ ++++++++++
-
- BM_LAST_VISIT: "http://home.netscape.com/WEB-rdf#LastVisitDate",
- BM_LAST_MODIFIED: "http://home.netscape.com/WEB-rdf#LastModifiedDate",
- BM_DESCRIPTION: "http://home.netscape.com/NC-rdf#Description",
- BM_NAME: "http://home.netscape.com/NC-rdf#Name",
- BM_URL: "http://home.netscape.com/NC-rdf#URL",
-
- STATUS_UPDATE: "updated",
- STATUS_NO_UPDATE: "no-updated",
- STATUS_UNKNOWN: "unknown",
- STATUS_ERROR: "error",
- STATUS_NO_CHECK: "no-check",
-
- setBMDSProperty: function(aInput, aArcURI, aNewValue) {
- var changed = false;
- var aOldValue = this.getBMDSTargetByURL(aInput, aArcURI);
- if(typeof(aInput) == "string") {
- aInput = RDF.GetResource(aInput);
- }
- if(typeof(aArcURI) == "string") {
- aArcURI = RDF.GetResource(aArcURI);
- }
-
- if(typeof(aNewValue) == "string") {
- aNewValue = RDF.GetLiteral(aNewValue);
- } else if(typeof(aNewValue) == "number") {
- aNewValue = RDF.GetIntLiteral(aNewValue);
- }
-
- if(aArcURI && (aOldValue || aNewValue) && aOldValue != aNewValue) {
- if(aOldValue && !aNewValue) {
- BMDS.Unassert(aInput, aArcURI, aOldValue);
- } else if(!aOldValue && aNewValue) {
- BMDS.Assert(aInput, aArcURI, aNewValue, true);
- } else /* if(aOldValue && aNewValue) */ {
- BMDS.Change(aInput, aArcURI, aOldValue, aNewValue);
- }
- changed = true;
- }
- return changed;
- },
-
- getBMDSProperty: function(aInput, aArcURI){
- if(typeof(aInput) == "string"){
- aInput = RDF.GetResource(aInput);
- }
- if(typeof(aArcURI) == "string"){
- aArcURI = RDF.GetResource(aArcURI);
- }
- return this.getBMDSTargetByURL(aInput, aArcURI).Value;
- },
-
- getBMDSTargetByURL: function(aInput, aArcURI){
- if(typeof(aArcURI) == "string"){
- aArcURI = RDF.GetResource(aArcURI);
- }
- var node = BMDS.GetTarget(aInput, aArcURI, true);
- try{
- return node.QueryInterface(kRDFRSCIID);
- }catch(e){
- try{
- return node.QueryInterface(Components.interfaces.nsIRDFDate);
- }catch(e){
- return node? node.QueryInterface(kRDFLITIID) : RDF.GetLiteral("");
- }
- }
- },
-
- getBMDSCChildren: function(aResource){
- if(typeof(aResource) == "string"){
- aResource = RDF.GetResource(aResource);
- }
-
- var rdfContainer = Components.classes["@mozilla.org/rdf/container;1"]
- .getService(Components.interfaces.nsIRDFContainer);
- rdfContainer.Init(BMDS, aResource);
- var containerChildren = rdfContainer.GetElements();
-
- var resultArray = new Array();
- while(containerChildren.hasMoreElements()){
- var res = containerChildren.getNext().QueryInterface(kRDFRSCIID);
-
- if(RDFCU.IsContainer(BMDS, res)){
- resultArray = resultArray.concat(this.getBMDSCChildren(res));
- }else{
- resultArray.push(res);
- }
- }
- return resultArray;
- },
-
-
-
-// ++++++++++ ++++++++++ CharCode ++++++++++ ++++++++++
-
- convertCharCodeFrom: function(aString, aCharCode){
- var UConvID = "@mozilla.org/intl/scriptableunicodeconverter";
- var UConvIF = Components.interfaces.nsIScriptableUnicodeConverter;
- var UConv = Components.classes[UConvID].getService(UConvIF);
-
- var tmpString = "";
- try{
- UConv.charset = aCharCode;
- tmpString = UConv.ConvertFromUnicode(aString);
- }catch(e){
- tmpString = null;
- }
- return tmpString;
- },
-
-
-
- // node ��̃e�L�X�g��Ԃ�
- getInnerText: function(aNode) {
- if(!aNode.hasChildNodes()) return "";
-
- var resultArray = new Array();
- var walker = aNode.ownerDocument.createTreeWalker(aNode, NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_TEXT, null, false);
- while(walker.nextNode()) {
- resultArray.push(walker.currentNode.nodeValue);
- }
- return resultArray.join('').replace(/^\s+|\s+$/g, "");
- },
-
-
- loadText: function(aURI){
- var URI = Components.classes["@mozilla.org/network/standard-url;1"]
- .createInstance(Components.interfaces.nsIURI);
- URI.spec = aURI;
-
- var IOService = Components.classes['@mozilla.org/network/io-service;1']
- .getService(Components.interfaces.nsIIOService);
- var channel = IOService.newChannelFromURI(URI);
- var stream = channel.open();
- var scriptableStream = Components.classes['@mozilla.org/scriptableinputstream;1']
- .createInstance(Components.interfaces.nsIScriptableInputStream);
- scriptableStream.init(stream);
-
- var fileContents = scriptableStream.read(scriptableStream.available());
-
- scriptableStream.close();
- stream.close();
-
- return fileContents;
- },
-
-// ++++++++++ ++++++++++ preferences ++++++++++ ++++++++++
-
-
- // preferences �̒l��������
- setPrefValue : function(aPrefString, aPrefType, aValue){
- var nsISupportsString = Components.interfaces.nsISupportsString;
- var xpPref = Components.classes["@mozilla.org/preferences;1"]
- .getService(Components.interfaces.nsIPrefBranch);
-
- var prefType = xpPref.getPrefType(aPrefString);
-
- try{
- switch (aPrefType){
- case "wstr":
- var string = Components.classes['@mozilla.org/supports-string;1']
- .createInstance(nsISupportsString);
- string.data = aValue;
- return xpPref.setComplexValue(aPrefString, nsISupportsString, string);
- break;
- case "str":
- return xpPref.setCharPref(aPrefString, aValue);
- break;
- case "int":
- aValue = parseInt(aValue); // ������𐮐��l�ɕϊ�
- return xpPref.setIntPref(aPrefString, aValue);
- break;
- case "bool":
- default:
- if(typeof(aValue) == "string"){
- aValue = (aValue == "true"); // �������^�U�l�ɕϊ�
- }
- return xpPref.setBoolPref(aPrefString, aValue);
- break;
- }
- }catch(e){
- }
- return null;
- },
-
- // preferences �̒l��ǂݍ���
- getPrefValue : function(aPrefString, aPrefType, aDefault){
- var nsISupportsString = Components.interfaces.nsISupportsString;
- var xpPref = Components.classes["@mozilla.org/preferences;1"]
- .getService(Components.interfaces.nsIPrefBranch);
-
- if(xpPref.getPrefType(aPrefString) == xpPref.PREF_INVALID){
- return aDefault;
- }
- try{
- switch (aPrefType){
- case "wstr":
- return xpPref.getComplexValue(aPrefString, nsISupportsString).data;
- break;
- case "str":
- return xpPref.getCharPref(aPrefString).toString();
- break;
- case "int":
- return xpPref.getIntPref(aPrefString);
- break;
- case "bool":
- default:
- return xpPref.getBoolPref(aPrefString);
- break;
- }
- }catch(e){
- }
- return aDefault;
- },
-
- // preferences �̓�e�����
- clearPref: function(aPrefString) {
- var xpPref = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
-
- try {
- xpPref.clearUserPref(aPrefString);
- return true;
- } catch(e) {
- return false;
- }
- },
-
- // remove all preferences
- removePrefs: function() {
- var xpPref = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);
-
- var prefBranch = xpPref.getBranch("sage.");
-
- try {
- prefBranch.deleteBranch("");
- return true;
- } catch(e) {
- return false;
- }
- },
-
- // ����J�n����
- addPrefListener: function(aPrefString, aFunc){
- var prefObserver;
- try {
- prefObserver = {
- domain: aPrefString,
- observe: aFunc
- };
-
- var pbi = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranchInternal);
- pbi.addObserver(prefObserver.domain, prefObserver, false);
- } catch(e){
- alert(e);
- prefObserver = null;
- }
-
- return prefObserver;
- },
-
- // ����I������
- removePrefListener: function(aObserver){
- var prefObserver;
- try {
- var pbi = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranchInternal);
- pbi.removeObserver(aObserver.domain, aObserver);
- } catch(e) {
- alert(e)
- }
- }
-
-
-}
+
+var aConsoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
+
+function logMessage(message) {
+ aConsoleService.logStringMessage("Sage: " + message);
+}
+
+function dateFormat(date, twelveHourClock, format) {
+ function padout(number) { return (number < 10) ? '0' + number : number; }
+
+ if(!format) {
+ format = 0;
+ }
+
+ var dayOfMonth = date.getDate();
+
+ var day;
+ switch (date.getDay()) {
+ case 0: day = strRes.getString("date_sunday_short"); break
+ case 1: day = strRes.getString("date_monday_short"); break
+ case 2: day = strRes.getString("date_tuesday_short"); break
+ case 3: day = strRes.getString("date_wednesday_short"); break
+ case 4: day = strRes.getString("date_thursday_short"); break
+ case 5: day = strRes.getString("date_friday_short"); break
+ case 6: day = strRes.getString("date_saturday_short"); break
+ }
+
+ var month, monthNum;
+ monthNum = date.getMonth() + 1;
+ switch (monthNum) {
+ case 1: month = strRes.getString("date_january_short"); break
+ case 2: month = strRes.getString("date_february_short"); break
+ case 3: month = strRes.getString("date_march_short"); break
+ case 4: month = strRes.getString("date_april_short"); break
+ case 5: month = strRes.getString("date_may_short"); break
+ case 6: month = strRes.getString("date_june_short"); break
+ case 7: month = strRes.getString("date_july_short"); break
+ case 8: month = strRes.getString("date_august_short"); break
+ case 9: month = strRes.getString("date_september_short"); break
+ case 10: month = strRes.getString("date_october_short"); break
+ case 11: month = strRes.getString("date_november_short"); break
+ case 12: month = strRes.getString("date_december_short"); break
+ }
+
+ var year = date.getYear() + 1900;
+
+ var date_str;
+ switch(format) {
+ case 0:
+ date_str = day + ", " + month + " " + dayOfMonth + ", " + year;
+ break
+ case 1:
+ date_str = monthNum + "/" + dayOfMonth + "/" + year;
+ break
+ }
+
+ var hours = date.getHours(), minutes = padout(date.getMinutes()), seconds = padout(date.getSeconds());
+ var adjhours, time_str;
+ if(twelveHourClock) {
+ adjhours = (hours == 0) ? 12 : ((hours < 13) ? hours : hours-12);
+ time_str = adjhours + ":" + minutes + ((hours < 12) ? " AM" : " PM");
+ } else {
+ time_str = hours + ":" + minutes;
+ }
+ return date_str + " " + time_str;
+}
+
+
+
+var CommonFunc = {
+
+ RSS_READER_FOLDER_ID: "sage.folder_id",
+ USER_AGENT: "Mozilla/5.0 (Sage)",
+
+ USER_CSS_ENABLE: "sage.user_css.enable",
+ USER_CSS_PATH: "sage.user_css.path",
+ ALLOW_ENCODED_CONTENT: "sage.allow_encoded_content",
+ AUTO_FEED_TITLE: "sage.auto_feed_title",
+ RENDER_FEEDS: "sage.render_feeds",
+ TWELVE_HOUR_CLOCK: "sage.twelve_hour_clock",
+ FEED_ITEM_ORDER: "sage.feed_item_order",
+ FEED_DISCOVERY_MODE: "sage.feed_discovery_mode",
+
+
+// ++++++++++ ++++++++++ Bookmark RDF ++++++++++ ++++++++++
+
+ BM_LAST_VISIT: "http://home.netscape.com/WEB-rdf#LastVisitDate",
+ BM_LAST_MODIFIED: "http://home.netscape.com/WEB-rdf#LastModifiedDate",
+ BM_DESCRIPTION: "http://home.netscape.com/NC-rdf#Description",
+ BM_NAME: "http://home.netscape.com/NC-rdf#Name",
+ BM_URL: "http://home.netscape.com/NC-rdf#URL",
+
+ STATUS_UPDATE: "updated",
+ STATUS_NO_UPDATE: "no-updated",
+ STATUS_UNKNOWN: "unknown",
+ STATUS_ERROR: "error",
+ STATUS_NO_CHECK: "no-check",
+
+ setBMDSProperty: function(aInput, aArcURI, aNewValue) {
+ var changed = false;
+ var aOldValue = this.getBMDSTargetByURL(aInput, aArcURI);
+ if(typeof(aInput) == "string") {
+ aInput = RDF.GetResource(aInput);
+ }
+ if(typeof(aArcURI) == "string") {
+ aArcURI = RDF.GetResource(aArcURI);
+ }
+
+ if(typeof(aNewValue) == "string") {
+ aNewValue = RDF.GetLiteral(aNewValue);
+ } else if(typeof(aNewValue) == "number") {
+ aNewValue = RDF.GetIntLiteral(aNewValue);
+ }
+
+ if(aArcURI && (aOldValue || aNewValue) && aOldValue != aNewValue) {
+ if(aOldValue && !aNewValue) {
+ BMDS.Unassert(aInput, aArcURI, aOldValue);
+ } else if(!aOldValue && aNewValue) {
+ BMDS.Assert(aInput, aArcURI, aNewValue, true);
+ } else /* if(aOldValue && aNewValue) */ {
+ BMDS.Change(aInput, aArcURI, aOldValue, aNewValue);
+ }
+ changed = true;
+ }
+ return changed;
+ },
+
+ getBMDSProperty: function(aInput, aArcURI){
+ if(typeof(aInput) == "string"){
+ aInput = RDF.GetResource(aInput);
+ }
+ if(typeof(aArcURI) == "string"){
+ aArcURI = RDF.GetResource(aArcURI);
+ }
+ return this.getBMDSTargetByURL(aInput, aArcURI).Value;
+ },
+
+ getBMDSTargetByURL: function(aInput, aArcURI){
+ if(typeof(aArcURI) == "string"){
+ aArcURI = RDF.GetResource(aArcURI);
+ }
+ var node = BMDS.GetTarget(aInput, aArcURI, true);
+ try{
+ return node.QueryInterface(kRDFRSCIID);
+ }catch(e){
+ try{
+ return node.QueryInterface(Components.interfaces.nsIRDFDate);
+ }catch(e){
+ return node? node.QueryInterface(kRDFLITIID) : RDF.GetLiteral("");
+ }
+ }
+ },
+
+ getBMDSCChildren: function(aResource){
+ if(typeof(aResource) == "string"){
+ aResource = RDF.GetResource(aResource);
+ }
+
+ var rdfContainer = Components.classes["@mozilla.org/rdf/container;1"]
+ .getService(Components.interfaces.nsIRDFContainer);
+ rdfContainer.Init(BMDS, aResource);
+ var containerChildren = rdfContainer.GetElements();
+
+ var resultArray = new Array();
+ while(containerChildren.hasMoreElements()){
+ var res = containerChildren.getNext().QueryInterface(kRDFRSCIID);
+
+ if(RDFCU.IsContainer(BMDS, res)){
+ resultArray = resultArray.concat(this.getBMDSCChildren(res));
+ }else{
+ resultArray.push(res);
+ }
+ }
+ return resultArray;
+ },
+
+
+
+// ++++++++++ ++++++++++ CharCode ++++++++++ ++++++++++
+
+ convertCharCodeFrom: function(aString, aCharCode){
+ var UConvID = "@mozilla.org/intl/scriptableunicodeconverter";
+ var UConvIF = Components.interfaces.nsIScriptableUnicodeConverter;
+ var UConv = Components.classes[UConvID].getService(UConvIF);
+
+ var tmpString = "";
+ try{
+ UConv.charset = aCharCode;
+ tmpString = UConv.ConvertFromUnicode(aString);
+ }catch(e){
+ tmpString = null;
+ }
+ return tmpString;
+ },
+
+
+
+ // node ��̃e�L�X�g��Ԃ�
+ getInnerText: function(aNode) {
+ if(!aNode.hasChildNodes()) return "";
+
+ var resultArray = new Array();
+ var walker = aNode.ownerDocument.createTreeWalker(aNode, NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_TEXT, null, false);
+ while(walker.nextNode()) {
+ resultArray.push(walker.currentNode.nodeValue);
+ }
+ return resultArray.join('').replace(/^\s+|\s+$/g, "");
+ },
+
+
+ loadText: function(aURI){
+ var URI = Components.classes["@mozilla.org/network/standard-url;1"]
+ .createInstance(Components.interfaces.nsIURI);
+ URI.spec = aURI;
+
+ var IOService = Components.classes['@mozilla.org/network/io-service;1']
+ .getService(Components.interfaces.nsIIOService);
+ var channel = IOService.newChannelFromURI(URI);
+ var stream = channel.open();
+ var scriptableStream = Components.classes['@mozilla.org/scriptableinputstream;1']
+ .createInstance(Components.interfaces.nsIScriptableInputStream);
+ scriptableStream.init(stream);
+
+ var fileContents = scriptableStream.read(scriptableStream.available());
+
+ scriptableStream.close();
+ stream.close();
+
+ return fileContents;
+ },
+
+// ++++++++++ ++++++++++ preferences ++++++++++ ++++++++++
+
+
+ // preferences �̒l��������
+ setPrefValue : function(aPrefString, aPrefType, aValue){
+ var nsISupportsString = Components.interfaces.nsISupportsString;
+ var xpPref = Components.classes["@mozilla.org/preferences;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+
+ var prefType = xpPref.getPrefType(aPrefString);
+
+ try{
+ switch (aPrefType){
+ case "wstr":
+ var string = Components.classes['@mozilla.org/supports-string;1']
+ .createInstance(nsISupportsString);
+ string.data = aValue;
+ return xpPref.setComplexValue(aPrefString, nsISupportsString, string);
+ break;
+ case "str":
+ return xpPref.setCharPref(aPrefString, aValue);
+ break;
+ case "int":
+ aValue = parseInt(aValue); // ������𐮐��l�ɕϊ�
+ return xpPref.setIntPref(aPrefString, aValue);
+ break;
+ case "bool":
+ default:
+ if(typeof(aValue) == "string"){
+ aValue = (aValue == "true"); // �������^�U�l�ɕϊ�
+ }
+ return xpPref.setBoolPref(aPrefString, aValue);
+ break;
+ }
+ }catch(e){
+ }
+ return null;
+ },
+
+ // preferences �̒l��ǂݍ���
+ getPrefValue : function(aPrefString, aPrefType, aDefault){
+ var nsISupportsString = Components.interfaces.nsISupportsString;
+ var xpPref = Components.classes["@mozilla.org/preferences;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+
+ if(xpPref.getPrefType(aPrefString) == xpPref.PREF_INVALID){
+ return aDefault;
+ }
+ try{
+ switch (aPrefType){
+ case "wstr":
+ return xpPref.getComplexValue(aPrefString, nsISupportsString).data;
+ break;
+ case "str":
+ return xpPref.getCharPref(aPrefString).toString();
+ break;
+ case "int":
+ return xpPref.getIntPref(aPrefString);
+ break;
+ case "bool":
+ default:
+ return xpPref.getBoolPref(aPrefString);
+ break;
+ }
+ }catch(e){
+ }
+ return aDefault;
+ },
+
+ // preferences �̓�e�����
+ clearPref: function(aPrefString) {
+ var xpPref = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
+
+ try {
+ xpPref.clearUserPref(aPrefString);
+ return true;
+ } catch(e) {
+ return false;
+ }
+ },
+
+ // remove all preferences
+ removePrefs: function() {
+ var xpPref = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);
+
+ var prefBranch = xpPref.getBranch("sage.");
+
+ try {
+ prefBranch.deleteBranch("");
+ return true;
+ } catch(e) {
+ return false;
+ }
+ },
+
+ // ����J�n����
+ addPrefListener: function(aPrefString, aFunc){
+ var prefObserver;
+ try {
+ prefObserver = {
+ domain: aPrefString,
+ observe: aFunc
+ };
+
+ var pbi = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranchInternal);
+ pbi.addObserver(prefObserver.domain, prefObserver, false);
+ } catch(e){
+ alert(e);
+ prefObserver = null;
+ }
+
+ return prefObserver;
+ },
+
+ // ����I������
+ removePrefListener: function(aObserver){
+ var prefObserver;
+ try {
+ var pbi = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranchInternal);
+ pbi.removeObserver(aObserver.domain, aObserver);
+ } catch(e) {
+ alert(e)
+ }
+ }
+
+
+}
diff --git a/src/sage/content/createhtml.js b/src/sage/content/createhtml.js
index bf25306..1ffcb39 100755
--- a/src/sage/content/createhtml.js
+++ b/src/sage/content/createhtml.js
@@ -1,121 +1,121 @@
-var CreateHTML = {
- HTML_SOURCE: CommonFunc.loadText("chrome://sage/content/res/template-html.txt"),
- ITEM_SOURCE: CommonFunc.loadText("chrome://sage/content/res/template-item.txt"),
- DEFAULT_CSS: "chrome://sage/content/res/sage.css",
-
- _tabbed: false,
-
- set tabbed(aValue){ this._tabbed = aValue },
-
- openHTML: function(feed) {
- if(!feed) return;
-
- try {
- var htmlURL = this.createHTML(feed);
- if(this._tabbed) {
- getContentBrowser().addTab(htmlURL);
- } else {
- getContentBrowser().loadURI(htmlURL);
- }
- } catch(e) {}
- },
-
- createHTML: function(feed) {
- var tmpFile = this.getSpecialDir("UChrm");
- tmpFile.appendRelativePath("sage.html");
-
- var ioService = Components.classes["@mozilla.org/network/io-service;1"]
- .getService(Components.interfaces.nsIIOService);
- var xmlFilePath = ioService.newFileURI(tmpFile).spec;
-
- if(tmpFile.exists()) {
- tmpFile.remove(true);
- }
- tmpFile.create(tmpFile.NORMAL_FILE_TYPE, 0666);
-
- var stream = Components.classes['@mozilla.org/network/file-output-stream;1']
- .createInstance(Components.interfaces.nsIFileOutputStream);
- stream.init(tmpFile, 2, 0x200, false); // open as "write only"
-
- var content = this.createHTMLSource(feed);
- stream.write(content, content.length);
- stream.flush();
- stream.close();
-
- return xmlFilePath;
- },
-
- getUserCssURL: function() {
- var userCssEnable = CommonFunc.getPrefValue(CommonFunc.USER_CSS_ENABLE, "bool", false);
- var userCssPath = CommonFunc.getPrefValue(CommonFunc.USER_CSS_PATH, "wstr", "");
- if(!userCssEnable || !userCssPath) return null;
-
- var ioService = Components.classes["@mozilla.org/network/io-service;1"]
- .getService(Components.interfaces.nsIIOService);
- var tmpFile = Components.classes['@mozilla.org/file/local;1']
- .createInstance(Components.interfaces.nsILocalFile);
- try {
- tmpFile.initWithPath(userCssPath);
- var cssUrl = ioService.newFileURI(tmpFile);
- var contentType = ioService.newChannelFromURI(cssUrl).contentType;
- if(contentType != "text/css") return null;
-
- return cssUrl.spec;
- } catch(e) {
- return null;
- }
- },
-
- createHTMLSource: function(feed) {
- var allowEContent = CommonFunc.getPrefValue(CommonFunc.ALLOW_ENCODED_CONTENT, "bool", true);
- var twelveHourClock = CommonFunc.getPrefValue(CommonFunc.TWELVE_HOUR_CLOCK, "bool", false);
- var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
-
- var htmlSource = this.HTML_SOURCE;
- var cssUrl = this.getUserCssURL();
- if(cssUrl) {
- htmlSource = htmlSource.replace("**CSSURL**", cssUrl);
- } else {
- htmlSource = htmlSource.replace("**CSSURL**", this.DEFAULT_CSS);
- }
- htmlSource = htmlSource.replace("**HTMLTITLE**", feed.getTitle());
- htmlSource = htmlSource.replace("**TITLE**", feed.getTitle());
- htmlSource = htmlSource.replace(/\*\*LINK\*\*/g, feed.getLink());
- htmlSource = htmlSource.replace("**DESCRIPTION**", feed.getDescription());
-
- var itemsSource = "";
- var items = feed.getItems(feedItemOrder);
- for(var i = 0; i < items.length; i++) {
- var link = items[i].getLink();
- var title = items[i].getTitle();
- var description = "";
- var pubDate = "";
-
- if(items[i].hasContent()) {
- description = allowEContent ? items[i].getContent() : htmlToText(items[i].getContent());
- description = "<div class=\"item-desc\">" + description + "</div>";
- }
-
- if(items[i].hasPubDate()) {
- pubDate = "<div class=\"item-pubDate\">" + dateFormat(items[i].getPubDate(), twelveHourClock) + "</div>";
- }
-
- var itemSource = this.ITEM_SOURCE;
- itemSource = itemSource.replace("**NUMBER**", i+1);
- itemSource = itemSource.replace("**LINK**", link);
- itemSource = itemSource.replace("**TECHNORATI**", encodeURIComponent(link));
- itemSource = itemSource.replace("**TITLE**", title);
- itemSource = itemSource.replace("**DESCRIPTION**", description);
- itemSource = itemSource.replace("**PUBDATE**", pubDate);
- itemsSource += itemSource;
- }
- htmlSource = htmlSource.replace("**ITEMS**", itemsSource);
-
- return CommonFunc.convertCharCodeFrom(htmlSource, "UTF-8");
- },
-
- getSpecialDir: function(aProp) {
- var dirService = Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsIProperties);
- return dirService.get(aProp, Components.interfaces.nsILocalFile);
- }
+var CreateHTML = {
+ HTML_SOURCE: CommonFunc.loadText("chrome://sage/content/res/template-html.txt"),
+ ITEM_SOURCE: CommonFunc.loadText("chrome://sage/content/res/template-item.txt"),
+ DEFAULT_CSS: "chrome://sage/content/res/sage.css",
+
+ _tabbed: false,
+
+ set tabbed(aValue){ this._tabbed = aValue },
+
+ openHTML: function(feed) {
+ if(!feed) return;
+
+ try {
+ var htmlURL = this.createHTML(feed);
+ if(this._tabbed) {
+ getContentBrowser().addTab(htmlURL);
+ } else {
+ getContentBrowser().loadURI(htmlURL);
+ }
+ } catch(e) {}
+ },
+
+ createHTML: function(feed) {
+ var tmpFile = this.getSpecialDir("UChrm");
+ tmpFile.appendRelativePath("sage.html");
+
+ var ioService = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService);
+ var xmlFilePath = ioService.newFileURI(tmpFile).spec;
+
+ if(tmpFile.exists()) {
+ tmpFile.remove(true);
+ }
+ tmpFile.create(tmpFile.NORMAL_FILE_TYPE, 0666);
+
+ var stream = Components.classes['@mozilla.org/network/file-output-stream;1']
+ .createInstance(Components.interfaces.nsIFileOutputStream);
+ stream.init(tmpFile, 2, 0x200, false); // open as "write only"
+
+ var content = this.createHTMLSource(feed);
+ stream.write(content, content.length);
+ stream.flush();
+ stream.close();
+
+ return xmlFilePath;
+ },
+
+ getUserCssURL: function() {
+ var userCssEnable = CommonFunc.getPrefValue(CommonFunc.USER_CSS_ENABLE, "bool", false);
+ var userCssPath = CommonFunc.getPrefValue(CommonFunc.USER_CSS_PATH, "wstr", "");
+ if(!userCssEnable || !userCssPath) return null;
+
+ var ioService = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService);
+ var tmpFile = Components.classes['@mozilla.org/file/local;1']
+ .createInstance(Components.interfaces.nsILocalFile);
+ try {
+ tmpFile.initWithPath(userCssPath);
+ var cssUrl = ioService.newFileURI(tmpFile);
+ var contentType = ioService.newChannelFromURI(cssUrl).contentType;
+ if(contentType != "text/css") return null;
+
+ return cssUrl.spec;
+ } catch(e) {
+ return null;
+ }
+ },
+
+ createHTMLSource: function(feed) {
+ var allowEContent = CommonFunc.getPrefValue(CommonFunc.ALLOW_ENCODED_CONTENT, "bool", true);
+ var twelveHourClock = CommonFunc.getPrefValue(CommonFunc.TWELVE_HOUR_CLOCK, "bool", false);
+ var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
+
+ var htmlSource = this.HTML_SOURCE;
+ var cssUrl = this.getUserCssURL();
+ if(cssUrl) {
+ htmlSource = htmlSource.replace("**CSSURL**", cssUrl);
+ } else {
+ htmlSource = htmlSource.replace("**CSSURL**", this.DEFAULT_CSS);
+ }
+ htmlSource = htmlSource.replace("**HTMLTITLE**", feed.getTitle());
+ htmlSource = htmlSource.replace("**TITLE**", feed.getTitle());
+ htmlSource = htmlSource.replace(/\*\*LINK\*\*/g, feed.getLink());
+ htmlSource = htmlSource.replace("**DESCRIPTION**", feed.getDescription());
+
+ var itemsSource = "";
+ var items = feed.getItems(feedItemOrder);
+ for(var i = 0; i < items.length; i++) {
+ var link = items[i].getLink();
+ var title = items[i].getTitle();
+ var description = "";
+ var pubDate = "";
+
+ if(items[i].hasContent()) {
+ description = allowEContent ? items[i].getContent() : htmlToText(items[i].getContent());
+ description = "<div class=\"item-desc\">" + description + "</div>";
+ }
+
+ if(items[i].hasPubDate()) {
+ pubDate = "<div class=\"item-pubDate\">" + dateFormat(items[i].getPubDate(), twelveHourClock) + "</div>";
+ }
+
+ var itemSource = this.ITEM_SOURCE;
+ itemSource = itemSource.replace("**NUMBER**", i+1);
+ itemSource = itemSource.replace("**LINK**", link);
+ itemSource = itemSource.replace("**TECHNORATI**", encodeURIComponent(link));
+ itemSource = itemSource.replace("**TITLE**", title);
+ itemSource = itemSource.replace("**DESCRIPTION**", description);
+ itemSource = itemSource.replace("**PUBDATE**", pubDate);
+ itemsSource += itemSource;
+ }
+ htmlSource = htmlSource.replace("**ITEMS**", itemsSource);
+
+ return CommonFunc.convertCharCodeFrom(htmlSource, "UTF-8");
+ },
+
+ getSpecialDir: function(aProp) {
+ var dirService = Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsIProperties);
+ return dirService.get(aProp, Components.interfaces.nsILocalFile);
+ }
}
\ No newline at end of file
diff --git a/src/sage/content/getrsstitle.js b/src/sage/content/getrsstitle.js
index 9e2346d..666797b 100755
--- a/src/sage/content/getrsstitle.js
+++ b/src/sage/content/getrsstitle.js
@@ -1,56 +1,56 @@
-var GetRssTitle = {
- checking: false,
- httpReq: null,
- res: null,
- url: "",
-
- getRssTitle: function(aBookmrkID){
- if(this.checking) return;
-
- this.res = RDF.GetResource(aBookmrkID);
- this.url = CommonFunc.getBMDSProperty(this.res, CommonFunc.BM_URL);
-
- this.httpReq = new XMLHttpRequest();
- this.httpReq.onload = this.httpLoaded;
- this.httpReq.onreadystatechange = this.httpReadyStateChange;
- this.httpReq.open("GET", this.url);
- this.httpReq.setRequestHeader("User-Agent", USER_AGENT);
- this.httpReq.overrideMimeType("application/xml");
- try {
- this.httpReq.send(null);
- } catch(e) {
- // FAILURE
- this.httpReq.abort();
- this.checking = false;
- }
- },
-
- httpReadyStateChange: function() {
- if(GetRssTitle.httpReq.readyState == 2) {
- try {
- GetRssTitle.httpReq.status;
- } catch(e) {
- // URL NOT AVAILABLE
- GetRssTitle.httpReq.abort();
- GetRssTitle.checking = false;
- }
- }
- },
-
- httpLoaded: function() {
- this.checking = false;
-
- var feed = new Feed(GetRssTitle.httpReq.responseXML);
- var rssTitle = feed.getTitle();
-
- if(!rssTitle) return;
-
- var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
- var resultValue = { value: rssTitle };
- var result = prompt.prompt(window, "Sage", strRes.getString("get_feed_title"), resultValue, null, {});
-
- if(result) {
- CommonFunc.setBMDSProperty(GetRssTitle.res, CommonFunc.BM_NAME, resultValue.value);
- }
- }
+var GetRssTitle = {
+ checking: false,
+ httpReq: null,
+ res: null,
+ url: "",
+
+ getRssTitle: function(aBookmrkID){
+ if(this.checking) return;
+
+ this.res = RDF.GetResource(aBookmrkID);
+ this.url = CommonFunc.getBMDSProperty(this.res, CommonFunc.BM_URL);
+
+ this.httpReq = new XMLHttpRequest();
+ this.httpReq.onload = this.httpLoaded;
+ this.httpReq.onreadystatechange = this.httpReadyStateChange;
+ this.httpReq.open("GET", this.url);
+ this.httpReq.setRequestHeader("User-Agent", USER_AGENT);
+ this.httpReq.overrideMimeType("application/xml");
+ try {
+ this.httpReq.send(null);
+ } catch(e) {
+ // FAILURE
+ this.httpReq.abort();
+ this.checking = false;
+ }
+ },
+
+ httpReadyStateChange: function() {
+ if(GetRssTitle.httpReq.readyState == 2) {
+ try {
+ GetRssTitle.httpReq.status;
+ } catch(e) {
+ // URL NOT AVAILABLE
+ GetRssTitle.httpReq.abort();
+ GetRssTitle.checking = false;
+ }
+ }
+ },
+
+ httpLoaded: function() {
+ this.checking = false;
+
+ var feed = new Feed(GetRssTitle.httpReq.responseXML);
+ var rssTitle = feed.getTitle();
+
+ if(!rssTitle) return;
+
+ var prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
+ var resultValue = { value: rssTitle };
+ var result = prompt.prompt(window, "Sage", strRes.getString("get_feed_title"), resultValue, null, {});
+
+ if(result) {
+ CommonFunc.setBMDSProperty(GetRssTitle.res, CommonFunc.BM_NAME, resultValue.value);
+ }
+ }
}
\ No newline at end of file
diff --git a/src/sage/content/opml/opml.js b/src/sage/content/opml/opml.js
index cb881aa..7c03b02 100755
--- a/src/sage/content/opml/opml.js
+++ b/src/sage/content/opml/opml.js
@@ -1,274 +1,274 @@
-const WIZ_MODE_IMPORT = 0;
-const WIZ_MODE_EXPORT = 1;
-
-var wizMode = WIZ_MODE_IMPORT;
-
- // XUL Object
-var winMain;
-var txtImportFile;
-var txtExportFile;
-var strRes;
-
-
-function init() {
- // Bookmarks Service
- initServices();
- initBMService();
-
- strRes = document.getElementById("strRes");
-
- winMain = document.getElementById("winMain");
- txtImportFile = document.getElementById("txtImportFile");
- txtExportFile = document.getElementById("txtExportFile");
-}
-
-function finish() {
- if(wizMode == WIZ_MODE_IMPORT) {
- if(!checkFilePath(txtImportFile.value, true)) return false;
- if(!importOPML()) return false;
- alert(strRes.getString("opml_import_done"));
- } else {
- if(!checkFilePath(txtExportFile.value, false)) return false;
- exportOPML();
- alert(strRes.getString("opml_export_done"));
- }
-
- return true;
-}
-
-
-function browseImportFile() {
- var fpicker = Components.classes["@mozilla.org/filepicker;1"].createInstance(Components.interfaces.nsIFilePicker);
- fpicker.init(window, "Select OPML File", fpicker.modeOpen);
- fpicker.appendFilter("OPML File(*.xml, *.opml)", "*.xml;*.opml");
- fpicker.appendFilters(fpicker.filterAll);
-
- var showResult = fpicker.show();
- if(showResult == fpicker.returnOK) {
- txtImportFile.value = fpicker.file.path;
- }
-}
-
-function browseExportFile() {
- var fpicker = Components.classes["@mozilla.org/filepicker;1"].createInstance(Components.interfaces.nsIFilePicker);
- fpicker.init(window, strRes.getString("opml_select_file"), fpicker.modeSave);
- fpicker.appendFilter(strRes.getString("opml_opml_file") + "(*.xml, *.opml)", "*.xml;*.opml");
- fpicker.appendFilters(fpicker.filterAll);
- fpicker.defaultString = "export.opml";
-
- var showResult = fpicker.show();
- if(showResult == fpicker.returnOK || showResult == fpicker.returnReplace) {
- txtExportFile.value = fpicker.file.path;
- }
-}
-
-
-
-function checkFilePath(aFilePath, aExistCheck) {
- if(!aFilePath) {
- alert(strRes.getString("opml_path_blank"));
- return false;
- }
-
- var tmpFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
- try {
- tmpFile.initWithPath(aFilePath);
- if(aExistCheck) {
- if(!tmpFile.exists()) {
- // �t�@�C�������݂��Ȃ�
- alert(strRes.getString("opml_path_nofile"));
- return false;
- }
- }
- } catch(e) {
- // �s���ȃt�@�C���p�X
- alert(strRes.getString("opml_path_invalid"));
- return false;
- }
-
- return true;
-}
-
-
-
-// ********** ********** Import OPML ********** **********
-
-function importOPML() {
- var uriFixup = Components.classes['@mozilla.org/docshell/urifixup;1'].getService(Components.interfaces.nsIURIFixup);
- var opmlUrl = uriFixup.createFixupURI(txtImportFile.value, uriFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP);
-
- var httpReq = new XMLHttpRequest();
- try {
- httpReq.open("GET", opmlUrl.spec, false);
- httpReq.overrideMimeType("application/xml");
- httpReq.send(null);
- } catch(e) {
- alert(strRes.getString("opml_import_fail"));
- return false;
- }
-
- opmlDoc = httpReq.responseXML;
- if(opmlDoc.documentElement.localName != "opml") {
- alert(strRes.getString("opml_import_badfile"));
- return false;
- }
- var rssReaderFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", "NC:BookmarksRoot");
-
- var folderName = "OPML Import";
- var opmlTitles = opmlDoc.getElementsByTagName("title");
- if(opmlTitles.length > 0) {
- var opmlTitle = CommonFunc.getInnerText(opmlTitles[0]);
- folderName += " - " + opmlTitle;
- }
- var rootFolder = BMSVC.createFolderInContainer(folderName, RDF.GetResource(rssReaderFolderID), 1);
-
- var treeWalker = opmlDoc.createTreeWalker(opmlDoc, NodeFilter.SHOW_ELEMENT, outlineFilter, true);
-
- while(treeWalker.nextNode()) {
- var cNode = treeWalker.currentNode;
- var pNode = cNode.parentNode;
- var parentFolder = ("_folder" in pNode) ? pNode._folder : rootFolder;
- if(cNode.hasChildNodes()) {
- var title = cNode.getAttribute("title");
- if(!title) title = cNode.getAttribute("text");
- if(!title) title = "folder";
- cNode._folder = BMSVC.createFolderInContainer(title, parentFolder, null);
- } else {
- createRssItem(cNode, parentFolder);
- }
- }
-
- // �u�b�N�}�[�N�̕ۑ�
- BookmarksUtils.flushDataSource();
-
- return true;
-}
-
-function outlineFilter(aNode) {
- if(aNode.localName == "outline") {
- return NodeFilter.FILTER_ACCEPT;
- } else {
- return NodeFilter.FILTER_SKIP;
- }
-}
-
-function createRssItem(aOutlineNode, aRssFolder) {
- var type = aOutlineNode.getAttribute("type");
- var title = aOutlineNode.getAttribute("title");
- if(!title) title = aOutlineNode.getAttribute("text");
- if(aOutlineNode.hasAttribute("xmlUrl")) {
- var xmlUrl = aOutlineNode.getAttribute("xmlUrl");
- } else {
- var xmlUrl = aOutlineNode.getAttribute("xmlurl");
- }
-
- if(type!="rss" && !title && xmlUrl) return;
-
- if(BMSVC.createBookmarkInContainer.length == 7) { // firefox 0.8 and lower
- BMSVC.createBookmarkInContainer(title, xmlUrl, null, "no-updated", null, aRssFolder, null);
- } else {
- BMSVC.createBookmarkInContainer(title, xmlUrl, null, "no-updated", null, null, aRssFolder, null);
- }
-
-}
-
-
-
-
-// ********** ********** Export OPML ********** **********
-
-function exportOPML() {
- var opmlSource = createOpmlSource();
- opmlSource = CommonFunc.convertCharCodeFrom(opmlSource, "UTF-8");
-
- var tmpFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
- try {
- tmpFile.initWithPath(txtExportFile.value);
- if(tmpFile.exists()) {
- tmpFile.remove(true);
- }
- tmpFile.create(tmpFile.NORMAL_FILE_TYPE, 0666);
- var stream = Components.classes['@mozilla.org/network/file-output-stream;1'].createInstance(Components.interfaces.nsIFileOutputStream);
- stream.init(tmpFile, 2, 0x200, false); // open as "write only"
- stream.write(opmlSource, opmlSource.length);
- stream.flush();
- stream.close();
- } catch(e) {
- alert(strRes.getString("opml_export_nocreate"));
- }
-}
-
-
-function createOpmlSource() {
- var rssReaderFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID,"str", "NC:BookmarksRoot");
- var rssReaderFolderRes = RDF.GetResource(rssReaderFolderID);
-
- var srcTemplate = '<?xml version="1.0" encoding="UTF-8"?>';
- srcTemplate += '<opml version="1.0">';
- srcTemplate += '<head><title>RSS Reader Panel Export OPML</title></head>';
- srcTemplate += '<body/></opml>';
-
- var opmlDoc = new DOMParser().parseFromString(srcTemplate, "text/xml");
- var opmlBody = opmlDoc.getElementsByTagName("body")[0];
-
- opmlBody.appendChild(createOpmlOutline(opmlDoc, rssReaderFolderRes));
- xmlIndent(opmlDoc);
-
- var opmlSource = new XMLSerializer().serializeToString(opmlDoc);
- return opmlSource;
-}
-
-
-function createOpmlOutline(aOpmlDoc, aRssItem) {
- var url = CommonFunc.getBMDSProperty(aRssItem, CommonFunc.BM_URL);
- var title = CommonFunc.getBMDSProperty(aRssItem, CommonFunc.BM_NAME);
- var isContainer = RDFCU.IsContainer(BMDS, aRssItem);
- var outlineNode = aOpmlDoc.createElement("outline");
-
- if(isContainer) {
- outlineNode.setAttribute("text", title);
-
- var rdfContainer = Components.classes["@mozilla.org/rdf/container;1"].getService(Components.interfaces.nsIRDFContainer);
- rdfContainer.Init(BMDS, aRssItem);
- var containerChildren = rdfContainer.GetElements();
-
- while(containerChildren.hasMoreElements()) {
- var res = containerChildren.getNext().QueryInterface(kRDFRSCIID);
- outlineNode.appendChild(createOpmlOutline(aOpmlDoc, res));
- }
- } else {
- outlineNode.setAttribute("type", "rss");
- outlineNode.setAttribute("text", title);
- outlineNode.setAttribute("title", title);
- outlineNode.setAttribute("xmlUrl", url);
- }
- return outlineNode;
-}
-
-
-
- // XML �\�[�X�̃C���f���g
-function xmlIndent(aDoc) {
- var treeWalker = aDoc.createTreeWalker(aDoc, NodeFilter.SHOW_ELEMENT, null, true);
- aDoc._depth = 0;
- while(treeWalker.nextNode()) {
- var cNode = treeWalker.currentNode;
- var pNode = cNode.parentNode;
- var tmpTextNode;
-
- if(pNode) {
- cNode._depth = pNode._depth + 1;
- if(cNode == aDoc.documentElement) continue;
- tmpTextNode = aDoc.createTextNode("\n" + getIndent(cNode._depth));
- pNode.insertBefore(tmpTextNode, cNode);
- }
- if(!cNode.nextSibling) {
- tmpTextNode = aDoc.createTextNode("\n" + getIndent(cNode._depth - 1));
- pNode.appendChild(tmpTextNode);
- }
- }
- function getIndent(aDepth) {
- var result = new Array(aDepth);
- return result.join("\t");
- }
+const WIZ_MODE_IMPORT = 0;
+const WIZ_MODE_EXPORT = 1;
+
+var wizMode = WIZ_MODE_IMPORT;
+
+ // XUL Object
+var winMain;
+var txtImportFile;
+var txtExportFile;
+var strRes;
+
+
+function init() {
+ // Bookmarks Service
+ initServices();
+ initBMService();
+
+ strRes = document.getElementById("strRes");
+
+ winMain = document.getElementById("winMain");
+ txtImportFile = document.getElementById("txtImportFile");
+ txtExportFile = document.getElementById("txtExportFile");
+}
+
+function finish() {
+ if(wizMode == WIZ_MODE_IMPORT) {
+ if(!checkFilePath(txtImportFile.value, true)) return false;
+ if(!importOPML()) return false;
+ alert(strRes.getString("opml_import_done"));
+ } else {
+ if(!checkFilePath(txtExportFile.value, false)) return false;
+ exportOPML();
+ alert(strRes.getString("opml_export_done"));
+ }
+
+ return true;
+}
+
+
+function browseImportFile() {
+ var fpicker = Components.classes["@mozilla.org/filepicker;1"].createInstance(Components.interfaces.nsIFilePicker);
+ fpicker.init(window, "Select OPML File", fpicker.modeOpen);
+ fpicker.appendFilter("OPML File(*.xml, *.opml)", "*.xml;*.opml");
+ fpicker.appendFilters(fpicker.filterAll);
+
+ var showResult = fpicker.show();
+ if(showResult == fpicker.returnOK) {
+ txtImportFile.value = fpicker.file.path;
+ }
+}
+
+function browseExportFile() {
+ var fpicker = Components.classes["@mozilla.org/filepicker;1"].createInstance(Components.interfaces.nsIFilePicker);
+ fpicker.init(window, strRes.getString("opml_select_file"), fpicker.modeSave);
+ fpicker.appendFilter(strRes.getString("opml_opml_file") + "(*.xml, *.opml)", "*.xml;*.opml");
+ fpicker.appendFilters(fpicker.filterAll);
+ fpicker.defaultString = "export.opml";
+
+ var showResult = fpicker.show();
+ if(showResult == fpicker.returnOK || showResult == fpicker.returnReplace) {
+ txtExportFile.value = fpicker.file.path;
+ }
+}
+
+
+
+function checkFilePath(aFilePath, aExistCheck) {
+ if(!aFilePath) {
+ alert(strRes.getString("opml_path_blank"));
+ return false;
+ }
+
+ var tmpFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
+ try {
+ tmpFile.initWithPath(aFilePath);
+ if(aExistCheck) {
+ if(!tmpFile.exists()) {
+ // �t�@�C�������݂��Ȃ�
+ alert(strRes.getString("opml_path_nofile"));
+ return false;
+ }
+ }
+ } catch(e) {
+ // �s���ȃt�@�C���p�X
+ alert(strRes.getString("opml_path_invalid"));
+ return false;
+ }
+
+ return true;
+}
+
+
+
+// ********** ********** Import OPML ********** **********
+
+function importOPML() {
+ var uriFixup = Components.classes['@mozilla.org/docshell/urifixup;1'].getService(Components.interfaces.nsIURIFixup);
+ var opmlUrl = uriFixup.createFixupURI(txtImportFile.value, uriFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP);
+
+ var httpReq = new XMLHttpRequest();
+ try {
+ httpReq.open("GET", opmlUrl.spec, false);
+ httpReq.overrideMimeType("application/xml");
+ httpReq.send(null);
+ } catch(e) {
+ alert(strRes.getString("opml_import_fail"));
+ return false;
+ }
+
+ opmlDoc = httpReq.responseXML;
+ if(opmlDoc.documentElement.localName != "opml") {
+ alert(strRes.getString("opml_import_badfile"));
+ return false;
+ }
+ var rssReaderFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", "NC:BookmarksRoot");
+
+ var folderName = "OPML Import";
+ var opmlTitles = opmlDoc.getElementsByTagName("title");
+ if(opmlTitles.length > 0) {
+ var opmlTitle = CommonFunc.getInnerText(opmlTitles[0]);
+ folderName += " - " + opmlTitle;
+ }
+ var rootFolder = BMSVC.createFolderInContainer(folderName, RDF.GetResource(rssReaderFolderID), 1);
+
+ var treeWalker = opmlDoc.createTreeWalker(opmlDoc, NodeFilter.SHOW_ELEMENT, outlineFilter, true);
+
+ while(treeWalker.nextNode()) {
+ var cNode = treeWalker.currentNode;
+ var pNode = cNode.parentNode;
+ var parentFolder = ("_folder" in pNode) ? pNode._folder : rootFolder;
+ if(cNode.hasChildNodes()) {
+ var title = cNode.getAttribute("title");
+ if(!title) title = cNode.getAttribute("text");
+ if(!title) title = "folder";
+ cNode._folder = BMSVC.createFolderInContainer(title, parentFolder, null);
+ } else {
+ createRssItem(cNode, parentFolder);
+ }
+ }
+
+ // �u�b�N�}�[�N�̕ۑ�
+ BookmarksUtils.flushDataSource();
+
+ return true;
+}
+
+function outlineFilter(aNode) {
+ if(aNode.localName == "outline") {
+ return NodeFilter.FILTER_ACCEPT;
+ } else {
+ return NodeFilter.FILTER_SKIP;
+ }
+}
+
+function createRssItem(aOutlineNode, aRssFolder) {
+ var type = aOutlineNode.getAttribute("type");
+ var title = aOutlineNode.getAttribute("title");
+ if(!title) title = aOutlineNode.getAttribute("text");
+ if(aOutlineNode.hasAttribute("xmlUrl")) {
+ var xmlUrl = aOutlineNode.getAttribute("xmlUrl");
+ } else {
+ var xmlUrl = aOutlineNode.getAttribute("xmlurl");
+ }
+
+ if(type!="rss" && !title && xmlUrl) return;
+
+ if(BMSVC.createBookmarkInContainer.length == 7) { // firefox 0.8 and lower
+ BMSVC.createBookmarkInContainer(title, xmlUrl, null, "no-updated", null, aRssFolder, null);
+ } else {
+ BMSVC.createBookmarkInContainer(title, xmlUrl, null, "no-updated", null, null, aRssFolder, null);
+ }
+
+}
+
+
+
+
+// ********** ********** Export OPML ********** **********
+
+function exportOPML() {
+ var opmlSource = createOpmlSource();
+ opmlSource = CommonFunc.convertCharCodeFrom(opmlSource, "UTF-8");
+
+ var tmpFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
+ try {
+ tmpFile.initWithPath(txtExportFile.value);
+ if(tmpFile.exists()) {
+ tmpFile.remove(true);
+ }
+ tmpFile.create(tmpFile.NORMAL_FILE_TYPE, 0666);
+ var stream = Components.classes['@mozilla.org/network/file-output-stream;1'].createInstance(Components.interfaces.nsIFileOutputStream);
+ stream.init(tmpFile, 2, 0x200, false); // open as "write only"
+ stream.write(opmlSource, opmlSource.length);
+ stream.flush();
+ stream.close();
+ } catch(e) {
+ alert(strRes.getString("opml_export_nocreate"));
+ }
+}
+
+
+function createOpmlSource() {
+ var rssReaderFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID,"str", "NC:BookmarksRoot");
+ var rssReaderFolderRes = RDF.GetResource(rssReaderFolderID);
+
+ var srcTemplate = '<?xml version="1.0" encoding="UTF-8"?>';
+ srcTemplate += '<opml version="1.0">';
+ srcTemplate += '<head><title>RSS Reader Panel Export OPML</title></head>';
+ srcTemplate += '<body/></opml>';
+
+ var opmlDoc = new DOMParser().parseFromString(srcTemplate, "text/xml");
+ var opmlBody = opmlDoc.getElementsByTagName("body")[0];
+
+ opmlBody.appendChild(createOpmlOutline(opmlDoc, rssReaderFolderRes));
+ xmlIndent(opmlDoc);
+
+ var opmlSource = new XMLSerializer().serializeToString(opmlDoc);
+ return opmlSource;
+}
+
+
+function createOpmlOutline(aOpmlDoc, aRssItem) {
+ var url = CommonFunc.getBMDSProperty(aRssItem, CommonFunc.BM_URL);
+ var title = CommonFunc.getBMDSProperty(aRssItem, CommonFunc.BM_NAME);
+ var isContainer = RDFCU.IsContainer(BMDS, aRssItem);
+ var outlineNode = aOpmlDoc.createElement("outline");
+
+ if(isContainer) {
+ outlineNode.setAttribute("text", title);
+
+ var rdfContainer = Components.classes["@mozilla.org/rdf/container;1"].getService(Components.interfaces.nsIRDFContainer);
+ rdfContainer.Init(BMDS, aRssItem);
+ var containerChildren = rdfContainer.GetElements();
+
+ while(containerChildren.hasMoreElements()) {
+ var res = containerChildren.getNext().QueryInterface(kRDFRSCIID);
+ outlineNode.appendChild(createOpmlOutline(aOpmlDoc, res));
+ }
+ } else {
+ outlineNode.setAttribute("type", "rss");
+ outlineNode.setAttribute("text", title);
+ outlineNode.setAttribute("title", title);
+ outlineNode.setAttribute("xmlUrl", url);
+ }
+ return outlineNode;
+}
+
+
+
+ // XML �\�[�X�̃C���f���g
+function xmlIndent(aDoc) {
+ var treeWalker = aDoc.createTreeWalker(aDoc, NodeFilter.SHOW_ELEMENT, null, true);
+ aDoc._depth = 0;
+ while(treeWalker.nextNode()) {
+ var cNode = treeWalker.currentNode;
+ var pNode = cNode.parentNode;
+ var tmpTextNode;
+
+ if(pNode) {
+ cNode._depth = pNode._depth + 1;
+ if(cNode == aDoc.documentElement) continue;
+ tmpTextNode = aDoc.createTextNode("\n" + getIndent(cNode._depth));
+ pNode.insertBefore(tmpTextNode, cNode);
+ }
+ if(!cNode.nextSibling) {
+ tmpTextNode = aDoc.createTextNode("\n" + getIndent(cNode._depth - 1));
+ pNode.appendChild(tmpTextNode);
+ }
+ }
+ function getIndent(aDepth) {
+ var result = new Array(aDepth);
+ return result.join("\t");
+ }
}
\ No newline at end of file
diff --git a/src/sage/content/opml/opml.xul b/src/sage/content/opml/opml.xul
index 44f34ea..e8ca895 100755
--- a/src/sage/content/opml/opml.xul
+++ b/src/sage/content/opml/opml.xul
@@ -1,48 +1,48 @@
-<?xml version="1.0" encoding="Shift_JIS"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
-<!DOCTYPE wizard SYSTEM "chrome://sage/locale/opml.dtd">
-
-<wizard id="winMain" title="&pageStart.label;"
- onload="init()" onwizardfinish="return finish()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/x-javascript" src="chrome://browser/content/bookmarks/bookmarks.js"></script>
-<script type="application/x-javascript" src="chrome://sage/content/commonfunc.js"></script>
-<script type="application/x-javascript" src="chrome://sage/content/opml/opml.js"></script>
-
-<stringbundleset>
- <stringbundle id="strRes" src="chrome://sage/locale/sage.properties"/>
-</stringbundleset>
-
-<wizardpage pageid="pageStart" next="pageImport"
- label="&pageStart.label;" description="&pageStart.desc;">
- <spacer height="40px"/>
- <hbox>
- <radiogroup>
- <radio id="rdoImport" label="&rdoImport.label;" selected="true"
- onclick="winMain.currentPage.next='pageImport'; wizMode=WIZ_MODE_IMPORT"/>
- <radio id="rdoExport" label="&rdoExport.label;"
- onclick="winMain.currentPage.next='pageExport'; wizMode=WIZ_MODE_EXPORT"/>
- </radiogroup>
- <spacer flex="1"/>
- </hbox>
-</wizardpage>
-
-<wizardpage pageid="pageImport" label="&pageImport.label;" description="&pageImport.desc;">
- <spacer height="40px"/>
- <hbox align="center">
- <textbox flex="1" id="txtImportFile"/>
- <button label="&browseButton.label;" oncommand="browseImportFile()"/>
- </hbox>
-</wizardpage>
-
-<wizardpage pageid="pageExport" label="&pageExport.label;" description="&pageExport.desc;">
- <spacer height="40px"/>
- <hbox align="center">
- <textbox flex="1" id="txtExportFile"/>
- <button label="&browseButton.label;" oncommand="browseExportFile()"/>
- </hbox>
-</wizardpage>
-
-</wizard>
+<?xml version="1.0" encoding="Shift_JIS"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+
+<!DOCTYPE wizard SYSTEM "chrome://sage/locale/opml.dtd">
+
+<wizard id="winMain" title="&pageStart.label;"
+ onload="init()" onwizardfinish="return finish()"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script type="application/x-javascript" src="chrome://browser/content/bookmarks/bookmarks.js"></script>
+<script type="application/x-javascript" src="chrome://sage/content/commonfunc.js"></script>
+<script type="application/x-javascript" src="chrome://sage/content/opml/opml.js"></script>
+
+<stringbundleset>
+ <stringbundle id="strRes" src="chrome://sage/locale/sage.properties"/>
+</stringbundleset>
+
+<wizardpage pageid="pageStart" next="pageImport"
+ label="&pageStart.label;" description="&pageStart.desc;">
+ <spacer height="40px"/>
+ <hbox>
+ <radiogroup>
+ <radio id="rdoImport" label="&rdoImport.label;" selected="true"
+ onclick="winMain.currentPage.next='pageImport'; wizMode=WIZ_MODE_IMPORT"/>
+ <radio id="rdoExport" label="&rdoExport.label;"
+ onclick="winMain.currentPage.next='pageExport'; wizMode=WIZ_MODE_EXPORT"/>
+ </radiogroup>
+ <spacer flex="1"/>
+ </hbox>
+</wizardpage>
+
+<wizardpage pageid="pageImport" label="&pageImport.label;" description="&pageImport.desc;">
+ <spacer height="40px"/>
+ <hbox align="center">
+ <textbox flex="1" id="txtImportFile"/>
+ <button label="&browseButton.label;" oncommand="browseImportFile()"/>
+ </hbox>
+</wizardpage>
+
+<wizardpage pageid="pageExport" label="&pageExport.label;" description="&pageExport.desc;">
+ <spacer height="40px"/>
+ <hbox align="center">
+ <textbox flex="1" id="txtExportFile"/>
+ <button label="&browseButton.label;" oncommand="browseExportFile()"/>
+ </hbox>
+</wizardpage>
+
+</wizard>
diff --git a/src/sage/content/popupex.xml b/src/sage/content/popupex.xml
index 28a6d83..f49a3b6 100755
--- a/src/sage/content/popupex.xml
+++ b/src/sage/content/popupex.xml
@@ -1,61 +1,61 @@
-<?xml version="1.0"?>
-
-<bindings id="popupBindings"
- xmlns="http://www.mozilla.org/xbl"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:xbl="http://www.mozilla.org/xbl">
-
- <binding id="popupex" extends="chrome://global/content/bindings/popup.xml#tooltip">
- <content>
- <xul:vbox anonid="popupExBox" class="popupex-internal-box" align="stretch">
- <children/>
- <xul:label anonid="popupExTitleBox" class="popupex-title" xbl:inherits="value=title"/>
- <xul:vbox anonid="popupExDescBox" class="popupex-description"/>
- </xul:vbox>
- </content>
-
- <implementation>
-
-
- <property name="title" onget="return this.getAttribute('title');">
- <setter><![CDATA[
- this.setAttribute('title', val);
- return val;
- ]]></setter>
- </property>
-
-
- <property name="description" onget="return this.getAttribute('description');">
- <setter><![CDATA[
- this.setAttribute('description', val);
-
- var popupExDescBox = document.getAnonymousElementByAttribute(this, "anonid", "popupExDescBox")
- while(popupExDescBox.hasChildNodes()){
- popupExDescBox.removeChild(popupExDescBox.firstChild);
- }
-
- if(val == ""){
- return val;
- }
- const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- var popupDesc = document.createElementNS( XUL_NS, "label" );
- popupDesc.appendChild( document.createTextNode(val) )
- popupExDescBox.appendChild( popupDesc );
-
- return val;
- ]]></setter>
- </property>
- </implementation>
-
- <handlers>
- <handler event="popupshowing"><![CDATA[
- this.height = this.boxObject.height;
- ]]></handler>
- <handler event="popuphiding"><![CDATA[
- this.height = "";
- ]]></handler>
-
- </handlers>
-
-</binding>
+<?xml version="1.0"?>
+
+<bindings id="popupBindings"
+ xmlns="http://www.mozilla.org/xbl"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:xbl="http://www.mozilla.org/xbl">
+
+ <binding id="popupex" extends="chrome://global/content/bindings/popup.xml#tooltip">
+ <content>
+ <xul:vbox anonid="popupExBox" class="popupex-internal-box" align="stretch">
+ <children/>
+ <xul:label anonid="popupExTitleBox" class="popupex-title" xbl:inherits="value=title"/>
+ <xul:vbox anonid="popupExDescBox" class="popupex-description"/>
+ </xul:vbox>
+ </content>
+
+ <implementation>
+
+
+ <property name="title" onget="return this.getAttribute('title');">
+ <setter><![CDATA[
+ this.setAttribute('title', val);
+ return val;
+ ]]></setter>
+ </property>
+
+
+ <property name="description" onget="return this.getAttribute('description');">
+ <setter><![CDATA[
+ this.setAttribute('description', val);
+
+ var popupExDescBox = document.getAnonymousElementByAttribute(this, "anonid", "popupExDescBox")
+ while(popupExDescBox.hasChildNodes()){
+ popupExDescBox.removeChild(popupExDescBox.firstChild);
+ }
+
+ if(val == ""){
+ return val;
+ }
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ var popupDesc = document.createElementNS( XUL_NS, "label" );
+ popupDesc.appendChild( document.createTextNode(val) )
+ popupExDescBox.appendChild( popupDesc );
+
+ return val;
+ ]]></setter>
+ </property>
+ </implementation>
+
+ <handlers>
+ <handler event="popupshowing"><![CDATA[
+ this.height = this.boxObject.height;
+ ]]></handler>
+ <handler event="popuphiding"><![CDATA[
+ this.height = "";
+ ]]></handler>
+
+ </handlers>
+
+</binding>
</bindings>
\ No newline at end of file
diff --git a/src/sage/content/res/sage.css b/src/sage/content/res/sage.css
index 6e08079..bace357 100755
--- a/src/sage/content/res/sage.css
+++ b/src/sage/content/res/sage.css
@@ -1,92 +1,92 @@
-html * {
- -moz-box-sizing: border-box;
-}
-
-html {
- line-height: 1.3;
- background-color: #FFF;
-}
-
-body {
- margin: 0px;
- color: #222;
- font-family: verdana;
-}
-
-a:link { text-decoration: none; color: #436976; font-weight: bold; }
-a:visited { text-decoration: none; color: #537986; }
-a:hover { text-decoration: underline; }
-a:active { text-decoration: none; }
-
-p.item-desc a:link { color: #029; }
-
-#rss-header {
- background-color: #dee7ec;
- border: 1px solid #8cacbb;
- padding: 6px 8px;
- margin: 10px 2%;
-}
-
-#rss-title {
- font-size: large;
- line-height: 1;
- margin: 0px;
- padding: 0px;
-}
-
-#rss-desc {
- font-size: small;
- margin: 0px;
- padding: 5px 0px 0px 20px;
-}
-
-div.item {
- border: 1px solid #8cacbb;
- width: 47%;
- min-width: 14em;
- margin: 0px 0px 8px 2%;
- padding: 0px;
- float: left;
-}
-
-h2.item-title {
- background-color: #dee7ec;
- font-size: x-small;
- font-weight: normal;
- line-height: 1.1;
- margin: 0px;
- padding: 5px 5px 8px 8px;
-}
-
-span.item-ordinal {
- padding-right: 0.2em;
-}
-
-div.item-desc {
- min-height: 6em;
- font-size: x-small;
- margin: 0px;
- padding: 8px 10px;
-}
-
-div.item-pubDate {
- font-size: x-small;
- margin: 0px;
- padding: 8px 10px;
- width: 80%;
- float: left;
-}
-
-div.item-technorati {
- font-size: x-small;
- margin: 0px;
- padding: 8px 10px;
- width: 20%;
- float: right;
- text-align: right;
-}
-
-img {
- max-width: 100%;
- height: auto;
+html * {
+ -moz-box-sizing: border-box;
+}
+
+html {
+ line-height: 1.3;
+ background-color: #FFF;
+}
+
+body {
+ margin: 0px;
+ color: #222;
+ font-family: verdana;
+}
+
+a:link { text-decoration: none; color: #436976; font-weight: bold; }
+a:visited { text-decoration: none; color: #537986; }
+a:hover { text-decoration: underline; }
+a:active { text-decoration: none; }
+
+p.item-desc a:link { color: #029; }
+
+#rss-header {
+ background-color: #dee7ec;
+ border: 1px solid #8cacbb;
+ padding: 6px 8px;
+ margin: 10px 2%;
+}
+
+#rss-title {
+ font-size: large;
+ line-height: 1;
+ margin: 0px;
+ padding: 0px;
+}
+
+#rss-desc {
+ font-size: small;
+ margin: 0px;
+ padding: 5px 0px 0px 20px;
+}
+
+div.item {
+ border: 1px solid #8cacbb;
+ width: 47%;
+ min-width: 14em;
+ margin: 0px 0px 8px 2%;
+ padding: 0px;
+ float: left;
+}
+
+h2.item-title {
+ background-color: #dee7ec;
+ font-size: x-small;
+ font-weight: normal;
+ line-height: 1.1;
+ margin: 0px;
+ padding: 5px 5px 8px 8px;
+}
+
+span.item-ordinal {
+ padding-right: 0.2em;
+}
+
+div.item-desc {
+ min-height: 6em;
+ font-size: x-small;
+ margin: 0px;
+ padding: 8px 10px;
+}
+
+div.item-pubDate {
+ font-size: x-small;
+ margin: 0px;
+ padding: 8px 10px;
+ width: 80%;
+ float: left;
+}
+
+div.item-technorati {
+ font-size: x-small;
+ margin: 0px;
+ padding: 8px 10px;
+ width: 20%;
+ float: right;
+ text-align: right;
+}
+
+img {
+ max-width: 100%;
+ height: auto;
}
\ No newline at end of file
diff --git a/src/sage/content/res/template-html.txt b/src/sage/content/res/template-html.txt
index 215b94b..fbca639 100755
--- a/src/sage/content/res/template-html.txt
+++ b/src/sage/content/res/template-html.txt
@@ -1,22 +1,22 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <link rel="stylesheet" type="text/css" title="standard Style" href="**CSSURL**">
- <base href="**LINK**">
- <title>Sage - **HTMLTITLE**</title>
-</head>
-
-<body>
- <div id="rss-header">
- <h1 id="rss-title"><a id="rss-link" href="**LINK**">**TITLE**</a></h1>
- <p id="rss-desc">**DESCRIPTION**</p>
- </div>
-
- **ITEMS**
-</body>
-
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" type="text/css" title="standard Style" href="**CSSURL**">
+ <base href="**LINK**">
+ <title>Sage - **HTMLTITLE**</title>
+</head>
+
+<body>
+ <div id="rss-header">
+ <h1 id="rss-title"><a id="rss-link" href="**LINK**">**TITLE**</a></h1>
+ <p id="rss-desc">**DESCRIPTION**</p>
+ </div>
+
+ **ITEMS**
+</body>
+
</html>
\ No newline at end of file
diff --git a/src/sage/content/res/template-item.txt b/src/sage/content/res/template-item.txt
index 3c9cdfd..b973368 100755
--- a/src/sage/content/res/template-item.txt
+++ b/src/sage/content/res/template-item.txt
@@ -1,9 +1,9 @@
- <div class="item">
- <h2 class="item-title">
- <span class="item-ordinal">**NUMBER**.</span>
- <a href="**LINK**">**TITLE**</a>
- </h2>
- **DESCRIPTION**
- **PUBDATE**
- <div class="item-technorati"><a href="http://www.technorati.com/cosmos/search.html?url=**TECHNORATI**" title="Technorati Trackback"><img src="chrome://sage/skin/technorati.gif" border="0"></a></div>
- </div>
+ <div class="item">
+ <h2 class="item-title">
+ <span class="item-ordinal">**NUMBER**.</span>
+ <a href="**LINK**">**TITLE**</a>
+ </h2>
+ **DESCRIPTION**
+ **PUBDATE**
+ <div class="item-technorati"><a href="http://www.technorati.com/cosmos/search.html?url=**TECHNORATI**" title="Technorati Trackback"><img src="chrome://sage/skin/technorati.gif" border="0"></a></div>
+ </div>
diff --git a/src/sage/content/sage-Overlay.xul b/src/sage/content/sage-Overlay.xul
index 51e4d93..342ef66 100755
--- a/src/sage/content/sage-Overlay.xul
+++ b/src/sage/content/sage-Overlay.xul
@@ -1,35 +1,35 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://sage/skin/sage-button.css" type="text/css"?>
-
-<!DOCTYPE overlay SYSTEM "chrome://sage/locale/sage.dtd">
-<overlay id="sageOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <menupopup id="viewSidebarMenu">
- <menuitem key="key_openSageSidebar" observes="viewSageSidebar"/>
- </menupopup>
-
- <menupopup id="menu_ToolsPopup">
- <menuitem key="key_openSageSidebar" observes="viewSageSidebar" position="1"/>
- </menupopup>
-
- <keyset id="mainKeyset">
- <key id="key_openSageSidebar" command="viewSageSidebar"
- key="&openSageSidebar.commandkey;"
- modifiers="&openSageSidebar.modifiersKey;"/>
- </keyset>
-
- <broadcasterset id="mainBroadcasterSet">
- <broadcaster id="viewSageSidebar"
- autoCheck="false"
- label="&sage.toolbarLabel;"
- type="checkbox" group="sidebar"
- sidebarurl="chrome://sage/content/sage.xul"
- sidebartitle="&sage.sidebarTitle;"
- oncommand="toggleSidebar('viewSageSidebar');"/>
- </broadcasterset>
-
-
- <toolbarpalette id="BrowserToolbarPalette">
- <toolbarbutton id="sage-button" tooltiptext="&sage.tooltip;" observes="viewSageSidebar" class="toolbarbutton-1"/>
- </toolbarpalette>
-</overlay>
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://sage/skin/sage-button.css" type="text/css"?>
+
+<!DOCTYPE overlay SYSTEM "chrome://sage/locale/sage.dtd">
+<overlay id="sageOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <menupopup id="viewSidebarMenu">
+ <menuitem key="key_openSageSidebar" observes="viewSageSidebar"/>
+ </menupopup>
+
+ <menupopup id="menu_ToolsPopup">
+ <menuitem key="key_openSageSidebar" observes="viewSageSidebar" position="1"/>
+ </menupopup>
+
+ <keyset id="mainKeyset">
+ <key id="key_openSageSidebar" command="viewSageSidebar"
+ key="&openSageSidebar.commandkey;"
+ modifiers="&openSageSidebar.modifiersKey;"/>
+ </keyset>
+
+ <broadcasterset id="mainBroadcasterSet">
+ <broadcaster id="viewSageSidebar"
+ autoCheck="false"
+ label="&sage.toolbarLabel;"
+ type="checkbox" group="sidebar"
+ sidebarurl="chrome://sage/content/sage.xul"
+ sidebartitle="&sage.sidebarTitle;"
+ oncommand="toggleSidebar('viewSageSidebar');"/>
+ </broadcasterset>
+
+
+ <toolbarpalette id="BrowserToolbarPalette">
+ <toolbarbutton id="sage-button" tooltiptext="&sage.tooltip;" observes="viewSageSidebar" class="toolbarbutton-1"/>
+ </toolbarpalette>
+</overlay>
diff --git a/src/sage/content/sage.js b/src/sage/content/sage.js
index 3904315..29521a0 100755
--- a/src/sage/content/sage.js
+++ b/src/sage/content/sage.js
@@ -1,785 +1,785 @@
-const USER_AGENT = CommonFunc.USER_AGENT;
-
-const RESULT_OK = 0;
-const RESULT_PARSE_ERROR = 1;
-const RESULT_NOT_RSS = 2;
-const RESULT_NOT_FOUND = 3;
-const RESULT_NOT_AVAILABLE = 4;
-const RESULT_ERROR_FAILURE = 5;
-
-var resultStrArray = null;
-
- // XUL Object
-var strRes, bmStrRes; // stringbundle Object
-var bookmarksTree;
-var rssItemListBox;
-var rssStatusImage;
-var rssStatusLabel;
-var rssTitleLabel;
-var rssItemToolTip;
-
-var currentFeed;
-var httpReq;
-var prefObserverSageFolder;
-var responseXML;
-var lastResource;
-var rssLoading = false;
-var sageFolderID = "";
-var enableTooltip = true;
-var popupTimeoutId=0;
-
-
-function init() {
- bookmarksTree = document.getElementById("bookmarksTree");
- rssItemListBox = document.getElementById("rssItemListBox");
- rssStatusImage = document.getElementById("rssStatusImage");
- rssStatusLabel = document.getElementById("rssStatusLabel");
- rssTitleLabel = document.getElementById("rssTitleLabel");
- rssItemToolTip = document.getElementById("rssItemToolTip");
-
- strRes = document.getElementById("strRes");
- bmStrRes = document.getElementById("bmStrRes");
- resultStrArray = new Array(
- strRes.getString("RESULT_OK_STR"),
- strRes.getString("RESULT_PARSE_ERROR_STR"),
- strRes.getString("RESULT_NOT_RSS_STR"),
- strRes.getString("RESULT_NOT_FOUND_STR"),
- strRes.getString("RESULT_NOT_AVAILABLE_STR"),
- strRes.getString("RESULT_ERROR_FAILURE_STR")
- );
-
- // if feed folder has not been set, assume new user and install default feed folder and demo feeds
- if(!CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", null)) {
- logMessage("setting default preferences...");
- var new_folder = BMSVC.createFolderInContainer("Sage Feeds", RDF.GetResource("NC:BookmarksRoot"), null);
- CommonFunc.setPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", new_folder.Value);
- if(BMSVC.createBookmarkInContainer.length == 7) { // firefox 0.8 and lower
- BMSVC.createBookmarkInContainer("BBC News | News Front Page | World Edition", "http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml", null, "updated", null, new_folder, null);
- BMSVC.createBookmarkInContainer("Yahoo! News - Sports", "http://rss.news.yahoo.com/rss/sports", null, "updated", null, new_folder, null);
- BMSVC.createBookmarkInContainer("Sage Project News", "http://sage.mozdev.org/rss.xml", null, "updated", null, new_folder, null);
- } else {
- BMSVC.createBookmarkInContainer("BBC News | News Front Page | World Edition", "http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml", null, "updated", null, null, new_folder, null);
- BMSVC.createBookmarkInContainer("Yahoo! News - Sports", "http://rss.news.yahoo.com/rss/sports", null, "updated", null, null, new_folder, null);
- BMSVC.createBookmarkInContainer("Sage Project News", "http://sage.mozdev.org/rss.xml", null, "updated", null, null, new_folder, null);
- }
- setCheckbox("chkShowSearchBar", "false");
- setCheckbox("chkShowTooltip", "true");
- setCheckbox("chkShowFeedItemList", "true");
- }
-
- // get feed folder location
- sageFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", "NC:BookmarksRoot");
- // check for changes to the feed folder
- prefObserverSageFolder = CommonFunc.addPrefListener(CommonFunc.RSS_READER_FOLDER_ID, sageFolderChanged);
- // set feed folder location
- bookmarksTree.tree.setAttribute("ref", sageFolderID);
- // select first entry
- bookmarksTree.treeBoxObject.selection.select(0);
-
- FeedSearch.init();
- toggleShowSearchBar();
- toggleShowFeedItemList();
-
- logMessage("initialized");
-}
-
-function discoverFeeds() {
- window.openDialog("chrome://sage/contents/discover_feeds.xul", "sage_discover_feeds", "chrome,modal,close", bookmarksTree);
-}
-
-// TODO: This does not work in 0.9.x since the implementation for smart bookmarks
-// has been removed. Too bad because this feature was really nice
-function showOnlyUpdated() {
- if(getCheckboxCheck("chkOnlyUpdate")) {
- var findURL = "find:datasource=rdf:bookmarks&match=";
- findURL += CommonFunc.BM_DESCRIPTION;
- findURL += "&method=is&text=updated";
- bookmarksTree.tree.setAttribute("ref", findURL);
- } else {
- bookmarksTree.tree.setAttribute("ref", sageFolderID);
- }
-}
-
-function sageFolderChanged(subject, topic, prefName) {
- // observe Preference
- sageFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", "NC:BookmarksRoot");
- bookmarksTree.tree.setAttribute("ref", sageFolderID);
- bookmarksTree.treeBoxObject.selection.select(0);
-}
-
-function done() {
- if(prefObserverSageFolder) {
- CommonFunc.removePrefListener(prefObserverSageFolder);
- }
-
- if(rssLoading) {
- httpReq.abort();
- rssLoading = false;
- }
- UpdateChecker.done();
-
- logMessage("shutdown");
-}
-
-function openOPMLWizard() {
- var dialogURL = "chrome://sage/content/opml/opml.xul";
- window.openDialog(dialogURL, "", "chrome,modal,close");
-}
-
-function openSettingDialog() {
- var dialogURL = "chrome://sage/content/settings/settings.xul";
- window.openDialog(dialogURL, "", "chrome,modal,close");
-}
-
-function openSageProjectFeed() {
- lastResource = null;
- var feedURL = "http://sage.mozdev.org/rss.xml";
- setStatusLoading("Sage Project News");
- httpGet(feedURL);
-}
-
-function manageRSSList() {
- var dialogURL = "chrome://browser/content/bookmarks/bookmarksManager.xul";
- window.openDialog(dialogURL, "", "chrome,all,dialog=no", sageFolderID);
-}
-
-function updateCheck(aCheckFolderId) {
- UpdateChecker.onCheck = function(aName, aURL) {
- rssStatusImage.setAttribute("loading", "true");
- rssStatusLabel.value = strRes.getString("RESULT_CHECKING") + ": " + aName;
- }
- UpdateChecker.onChecked = function(aName, aURL) {
- setStatusDone();
- }
-
- if(aCheckFolderId) {
- UpdateChecker.startCheck(aCheckFolderId);
- } else {
- UpdateChecker.startCheck(sageFolderID);
- }
-}
-
-function BookmarkResource(aRes, aDB){
- this.res = aRes;
- this.db = aDB;
- this.name = BookmarksUtils.getProperty(this.res, NC_NS + "Name", this.db);
- this.url = BookmarksUtils.getProperty(this.res, NC_NS + "URL", this.db);
-}
-
-function bookmarksOpen(){
- lastResource = new BookmarkResource(bookmarksTree.currentResource, bookmarksTree.db);
- setStatusLoading();
- httpGet(lastResource.url);
-}
-
-function createTreeContextMenu2(aEvent) {
- var popup = aEvent.target;
- if(popup.localName != "menupopup") return;
-
- var selection = bookmarksTree._selection;
- var itemId = selection.item[0].Value;
- var cmdSrc = "";
- var tempMenuItem;
-
- if(selection.type == "Bookmark") {
- cmdSrc = "GetRssTitle.getRssTitle('" + itemId + "')";
- tempMenuItem = document.createElement("menuitem");
- tempMenuItem.setAttribute("label", strRes.getString("GET_RSS_TITLE"));
- tempMenuItem.setAttribute("oncommand", cmdSrc);
- popup.appendChild(document.createElement("menuseparator"));
- popup.appendChild(tempMenuItem);
- } else if(selection.type == "Folder") {
- cmdSrc = "updateCheck('" + itemId + "')";
- tempMenuItem = document.createElement("menuitem");
- tempMenuItem.setAttribute("label", strRes.getString("CHECK_UPDATE"));
- tempMenuItem.setAttribute("oncommand", cmdSrc);
- popup.appendChild(document.createElement("menuseparator"));
- popup.appendChild(tempMenuItem);
- }
-}
-
-function bookmarksTreeClick(aEvent){
- if(aEvent.type == "click") {
- if(aEvent.button == 2 || aEvent.originalTarget.localName != "treechildren") {
- return;
- }
- var obj = {};
- bookmarksTree.treeBoxObject.getCellAt(aEvent.clientX, aEvent.clientY, {}, {}, obj);
- if(obj.value == "twisty") return;
- } else if(aEvent.type == "keypress") {
- if(aEvent.originalTarget.localName != "tree") {
- return;
- }
- }
-
- CreateHTML.tabbed = false;
- if(aEvent.button == 1) { CreateHTML.tabbed = true; } // click middle button
- if(aEvent.ctrlKey) { CreateHTML.tabbed = true; } // press Ctrl Key
-
- const BOOKMARK_TYPE = RDF_NS + "type";
- const BOOKMARK_SEPARATOR = NC_NS + "BookmarkSeparator";
- const BOOKMARK_FOLDER = NC_NS + "Folder"
- var bookmarkType = (BookmarksUtils.getProperty(bookmarksTree.currentResource, BOOKMARK_TYPE , bookmarksTree.db))
- if(bookmarkType == BOOKMARK_SEPARATOR || bookmarkType == BOOKMARK_FOLDER) {
- return;
- }
-
- bookmarksOpen();
-}
-
-function rssItemListBoxClick(aEvent) {
- if(aEvent.type == "click") {
- if(aEvent.button == 2 || aEvent.originalTarget.localName != "listitem") {
- return;
- }
- } else if(aEvent.type == "keypress") {
- if(aEvent.originalTarget.localName != "listbox") {
- return;
- }
- }
-
- var listItem = rssItemListBox.selectedItem;
- var feedItem = getFeedItemFromListItem( listItem );
-
- openURI( feedItem.getLink(), aEvent );
- listItem.setAttribute("visited", "true");
-}
-
-function rssTitleLabelClick(aNode, aEvent){
- var tabbed = false;
- if(!aNode.hasAttribute("href") || aEvent.button == 2) {
- return;
- }
-
- var link = aNode.getAttribute("href");
- openURI( link, aEvent );
-}
-
-function setStatusLoading(label) {
- rssStatusImage.setAttribute("loading", "true");
- if(label) {
- rssStatusLabel.value = strRes.getString("RESULT_LOADING") + ": " + label;
- } else {
- rssStatusLabel.value = strRes.getString("RESULT_LOADING") + ": " + lastResource.name;
- }
-}
-
-function setStatusDone() {
- rssStatusImage.setAttribute("loading", "false");
- rssStatusLabel.value = "";
-
- if(currentFeed) {
- rssTitleLabel.value = htmlToText(currentFeed.getTitle());
- if(currentFeed.getLink()) {
- rssTitleLabel.setAttribute("href", currentFeed.getLink());
- rssTitleLabel.tooltipText = currentFeed.getLink();
- } else {
- rssTitleLabel.removeAttribute("href");
- rssTitleLabel.tooltipText = "";
- }
- }
-}
-
-function setStatusError(aStatus) {
- rssStatusImage.setAttribute("loading", "error");
- rssStatusLabel.value = "Error: " + aStatus;
-}
-
-function getContentBrowser() {
- var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator);
- var topWindowOfType = windowManager.getMostRecentWindow("navigator:browser");
- if (topWindowOfType) {
- return topWindowOfType.document.getElementById('content');
- }
- return null;
-}
-
-function toggleShowSearchBar() {
- var showSearchBar = getCheckboxCheck("chkShowSearchBar");
- document.getElementById("barSearch").hidden = !showSearchBar;
-}
-
-function toggleShowFeedItemList() {
- var showFeedItemList = getCheckboxCheck("chkShowFeedItemList");
- document.getElementById("sage-splitter").hidden = !showFeedItemList;
- document.getElementById("rssItemListBoxBox").hidden = !showFeedItemList;
- if(showFeedItemList) setRssItemListBox();
-}
-
-function setRssItemListBox() {
- if(!currentFeed) return;
- if(document.getElementById("rssItemListBoxBox").hidden) return;
-
- while(rssItemListBox.getRowCount() != 0) {
- rssItemListBox.removeItemAt(0);
- }
-
- var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
-
- var items = currentFeed.getItems(feedItemOrder);
-
- for(var i = 0; items.length > i; i++) {
- var item = items[i];
- var itemLabel = item.getTitle();
- itemLabel = (i+1) + ". " + itemLabel;
- var listItem = rssItemListBox.appendItem(itemLabel, i);
- if(isVisited(item.getLink())) {
- listItem.setAttribute("visited", "true");
- }
- }
-}
-
-function getCheckboxCheck(element_id) {
- var checkboxNode = document.getElementById(element_id);
- return checkboxNode.getAttribute("checked") == "true";
-}
-
-function setCheckbox(element_id, value) {
- var checkboxNode = document.getElementById(element_id);
- checkboxNode.setAttribute("checked", value);
-}
-
-// TODO: Is this still used?
-function showRssItemListPopup(aEvent) {
- if(aEvent.originalTarget.localName != "listitem") {
- rssItemListPopup.hidePopup();
- return;
- }
- if(!getCheckboxCheck("chkShowTooltip")) {
- rssItemListPopup.hidePopup();
- return;
- }
-
- var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
-
- var items = currentFeed.getItems(feedItemOrder);
-
- var description = htmlToText(items[aEvent.originalTarget.value].getContent());
- if(description.indexOf("/") != -1) {
- description = description.replace(/\//gm, "/\u200B");
- }
- // description 400ȓɂ
- if(description.length > 400) {
- description = description.substring(0,400) + "...";
- }
-
- var popX = aEvent.screenX + 10;
- var popY = aEvent.screenY + 20;
-
- rssItemListPopup.title = aEvent.originalTarget.label;
- rssItemListPopup.description = description;
- rssItemListPopup.autoPosition = false;
- rssItemListPopup.moveTo(popX, popY);
- popupTimeoutId = setTimeout("rssItemListPopup.showPopup(rssItemListBox)", 150);
-}
-
-function populateToolTip(e) {
- // if setting disabled
- if(!getCheckboxCheck("chkShowTooltip")) {
- e.preventDefault();
- return;
- }
-
- if(document.tooltipNode == rssItemListBox) {
- e.preventDefault();
- return;
- }
- var listItem = document.tooltipNode;
- var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
- var items = currentFeed.getItems(feedItemOrder);
- var description = htmlToText(items[listItem.value].getContent());
- if(description.indexOf("/") != -1) {
- description = description.replace(/\//gm, "/\u200B");
- }
- if(description.length > 400) {
- description = description.substring(0,400) + "...";
- }
-
- rssItemToolTip.title = listItem.label;
- rssItemToolTip.description = description;
-}
-
-// TODO: Is this still used?
-function hideRssItemListPopup(aEvent) {
- clearTimeout(popupTimeoutId);
- rssItemListPopup.hidePopup();
-}
-
-function htmlToText(aStr) {
- var formatConverter = Components.classes["@mozilla.org/widget/htmlformatconverter;1"].createInstance(Components.interfaces.nsIFormatConverter);
- var fromStr = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
- fromStr.data = aStr;
- var toStr = { value: null };
-
- try {
- formatConverter.convert("text/html", fromStr, fromStr.toString().length, "text/unicode", toStr, {});
- } catch(e) {
- return aStr;
- }
- if(toStr.value) {
- toStr = toStr.value.QueryInterface(Components.interfaces.nsISupportsString);
- return toStr.toString();
- }
- return aStr;
-}
-
-
-
-// ++++++++++ +++++++++ HTTP ++++++++++ +++++++++
-
-function httpGet(aURL) {
- if(rssLoading) {
- httpReq.abort();
- rssLoading = false;
- }
-
- responseXML = null;
-
- httpReq = new XMLHttpRequest();
-
- httpReq.open("GET", aURL);
-
- httpReq.onload = httpLoaded;
- httpReq.onerror = httpError;
- httpReq.onreadystatechange = httpReadyStateChange;
-
- try {
- httpReq.setRequestHeader("User-Agent", USER_AGENT);
- httpReq.overrideMimeType("application/xml");
- } catch(e) {
- httpGetResult(RESULT_ERROR_FAILURE);
- }
-
- try {
- httpReq.send(null);
- rssLoading = true;
- } catch(e) {
- httpGetResult(RESULT_ERROR_FAILURE);
- }
-}
-
-function httpError(e) {
- logMessage("HTTP Error: " + e.target.status + " - " + e.target.statusText);
- httpGetResult(RESULT_NOT_AVAILABLE);
-}
-
-function httpReadyStateChange() {
-
- if(httpReq.readyState == 2) {
- try {
- if(httpReq.status == 404) {
- httpGetResult(RESULT_NOT_FOUND);
- }
- } catch(e) {
- httpGetResult(RESULT_NOT_AVAILABLE);
- return;
- }
- } else if(httpReq.readyState == 3) {}
-}
-
-function httpLoaded(e) {
- responseXML = httpReq.responseXML;
- var rootNodeName = responseXML.documentElement.localName.toLowerCase();
-
- switch(rootNodeName) {
- case "parsererror":
- // XML Parse Error
- httpGetResult(RESULT_PARSE_ERROR);
- break;
- case "rss":
- case "rdf":
- case "feed":
- httpGetResult(RESULT_OK);
- break;
- default:
- // Not RSS or Atom
- httpGetResult(RESULT_NOT_RSS);
- break;
- }
-}
-
-function httpGetResult(aResultCode) {
- httpReq.abort();
- rssLoading = false;
-
- if(aResultCode == RESULT_OK) {
- currentFeed = new Feed(responseXML);
-
- if(lastResource && lastResource.res) {
- if(CommonFunc.getPrefValue(CommonFunc.AUTO_FEED_TITLE, "bool", true)) {
- if(CommonFunc.getBMDSProperty(lastResource.res, CommonFunc.BM_NAME) != currentFeed.getTitle()) {
- CommonFunc.setBMDSProperty(lastResource.res, CommonFunc.BM_NAME, currentFeed.getTitle());
- }
- }
-
- BMSVC.updateLastVisitedDate(lastResource.url, "UTF-8");
- CommonFunc.setBMDSProperty(lastResource.res, CommonFunc.BM_DESCRIPTION, CommonFunc.STATUS_NO_UPDATE + " " + currentFeed.getSignature());
- }
-
- setStatusDone();
- setRssItemListBox();
-
- if(CommonFunc.getPrefValue(CommonFunc.RENDER_FEEDS, "bool", true)) {
- CreateHTML.openHTML(currentFeed);
- }
- } else {
- setStatusError(resultStrArray[aResultCode]);
- }
-}
-
-
-// link visit code based on LinkVisitor.mozdev.org
-
-
-const _uriFixup = Components.classes["@mozilla.org/docshell/urifixup;1"].getService(Components.interfaces.nsIURIFixup);
-const _globalHistory = Components.classes['@mozilla.org/browser/global-history;2'].getService(Components.interfaces.nsIGlobalHistory2);
-const _browserHistory = Components.classes["@mozilla.org/browser/global-history;2"].getService(Components.interfaces.nsIBrowserHistory);
-
-function markURIAsRead( sURI )
-{
- markURIReadState( sURI, true );
-}
-
-function markURIAsUnread( sURI )
-{
- markURIReadState( sURI, false );
-}
-
-function markURIReadState( sURI, bRead )
-{
- if ( !sURI )
- return;
-
- // why do we need to fixup the URI?
- var fixupURI = _getFixupURI( sURI );
- var visited = _globalHistory.isVisited( fixupURI );
- if ( visited == bRead )
- return;
-
- if ( bRead )
- _globalHistory.addURI( fixupURI, false, true );
- else
- _browserHistory.removePage( fixupURI.spec );
-}
-
-function _getFixupURI( sURI )
-{
- try
- {
- return _uriFixup.createFixupURI( sURI, 0 );
- }
- catch( e )
- {
- return null;
- }
-}
-
-function isVisited( sURI )
-{
- var fixupURI = _getFixupURI( sURI );
- return _globalHistory.isVisited( fixupURI );
-}
-
-
-// RSS Item Context Menu
-
-/**
- * This is called before the context menu for the listbox is shown. Here we enabled/disable
- * menu items as well as change the text to correctly reflect the read state
- * @param e : Event
- * @returns void
- */
-function updateItemContextMenu( e )
-{
- var popupNode = document.popupNode;
-
- var menuItemIds = ["rssOpenItem", "rssOpenNewTabItem", "rssOpenNewWindowItem",
- "rssMarkAsReadItem", "rssMarkAllAsReadItem", "rssMarkAllAsUnreadItem"];
- var menuItems = {};
- for ( var i = 0; i < menuItemIds.length; i++ )
- {
- menuItems[ menuItemIds[i] ] = document.getElementById( menuItemIds[i] );
- }
-
- // cmd_bm_open
- // cmd_bm_openinnewwindow
- // cmd_bm_openinnewtab
- menuItems.rssOpenItem.label = bmStrRes.getString("cmd_bm_open");
- menuItems.rssOpenNewTabItem.label = bmStrRes.getString("cmd_bm_openinnewtab");
- menuItems.rssOpenNewWindowItem.label = bmStrRes.getString("cmd_bm_openinnewwindow");
-
- menuItems.rssMarkAsReadItem.label = strRes.getString("itemcontext_markasread");
- menuItems.rssMarkAllAsReadItem.label = strRes.getString("itemcontext_markallasread");
- menuItems.rssMarkAllAsUnreadItem.label = strRes.getString("itemcontext_markallasunread");
-
- if ( popupNode.localName == "listbox" )
- {
- // only mark all should work
- for ( var id in menuItems )
- {
- if ( (id == "rssMarkAllAsReadItem" || id == "rssMarkAllAsUnreadItem") &&
- currentFeed && rssItemListBox.getRowCount() > 0 )
- menuItems[id].removeAttribute( "disabled" );
- else
- menuItems[id].setAttribute( "disabled", "true" );;
- }
- }
- else
- {
- for ( id in menuItems )
- menuItems[id].removeAttribute( "disabled" );
-
- // need to figure out if the current list item is visited
- var listItem = popupNode;
- var feedItem = getFeedItemFromListItem( listItem );
- var visited = isVisited( feedItem.getLink() );
- menuItems.rssMarkAsReadItem.label =
- strRes.getString( visited ? "itemcontext_markasunread" : "itemcontext_markasread" );
-
- // lets make sure the visited flag is correct in the ui
- if ( visited )
- listItem.setAttribute( "visited", "true" );
- else
- listItem.removeAttribute( "visited" );
- }
-}
-
-
-/**
- * This marks the selected items as read/unread. This works with multiple
- * selection as well if we want to enable that in the future.
- * @param e : Event
- * @returns void
- */
-function toggleMarkAsRead( e )
-{
- var listItems = rssItemListBox.selectedItems;
- for ( var i = 0; i < listItems.length; i++ )
- {
- var listItem = listItems[i];
- var feedItem = getFeedItemFromListItem( listItem );
- var uri = feedItem.getLink();
- var visited = isVisited( uri );
- markURIReadState( uri, !visited );
- if ( !visited )
- listItem.setAttribute( "visited", "true" );
- else
- listItem.removeAttribute( "visited" );
- }
-}
-
-/**
- * This called from the context menu.
- * @param e : Event
- * @returns void
- */
-function markAllAsRead( e )
-{
- markAllReadState( true );
-}
-
-/**
- * This called from the context menu.
- * @param e : Event
- * @returns void
- */
-function markAllAsUnread( e )
-{
- markAllReadState( false );
-}
-
-/**
- * Marks all read or unread
- * @param bRead : Boolean Whether to mark as read or unread
- * @returns void
- */
-function markAllReadState( bRead )
-{
- if ( currentFeed )
- {
- var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
- var feedItems = currentFeed.getItems( feedItemOrder );
-
- for ( var i = 0; i < feedItems.length; i++ )
- markURIReadState( feedItems[i].getLink(), bRead );
-
- var listItem;
- for ( var y = 0; y < rssItemListBox.getRowCount(); y++ )
- {
- listItem = rssItemListBox.getItemAtIndex( y );
- if ( bRead )
- listItem.setAttribute( "visited", "true" );
- else
- listItem.removeAttribute( "visited" );
- }
- }
-}
-
-// This takes a list item from the rss list box and returns the uri it represents
-// this seems a bit inefficient. Shouldn't there be a direct mapping between these?
-
-/**
- * This takes a listitem element and returns the FeedItem it represents
- * @param oListItem : XULListItem
- * @returns FeedItem
- */
-function getFeedItemFromListItem( oListItem )
-{
- var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
- var items = currentFeed.getItems( feedItemOrder );
- return items[ oListItem.value ];
-}
-
-
-
-/**
- * Opens a link in the same window, a new tab or a new window
- *
- * @param sURI : String
- * @param oType : Object If this is an Event object we check the modifiers.
- * Otherwise we assume it is a string describing the
- * window type.
- * @returns void
- */
-function openURI( sURI, oType )
-{
- var windowType;
- if ( oType instanceof Event )
- {
- // figure out what kind of open we want
- if ( oType.button == 1 || oType.ctrlKey ) // click middle button or ctrl click
- windowType = "tab";
- else if ( oType.shiftKey )
- windowType = "window";
- }
- else
- {
- windowType = oType;
- }
-
- switch ( windowType )
- {
- case "tab":
- getContentBrowser().addTab( sURI );
- break;
- case "window":
- document.commandDispatcher.focusedWindow.open( sURI );
- break;
-
- default:
- getContentBrowser().loadURI( sURI );
- }
-}
-
-/**
- * This is called by the context menu
- * @param oType : String
- * @returns void
- */
-function openListItem( oType )
-{
- var listItem = document.popupNode;
- var feedItem = getFeedItemFromListItem( listItem );
- openURI( feedItem.getLink(), oType );
- listItem.setAttribute( "visited", "true" );
-}
+const USER_AGENT = CommonFunc.USER_AGENT;
+
+const RESULT_OK = 0;
+const RESULT_PARSE_ERROR = 1;
+const RESULT_NOT_RSS = 2;
+const RESULT_NOT_FOUND = 3;
+const RESULT_NOT_AVAILABLE = 4;
+const RESULT_ERROR_FAILURE = 5;
+
+var resultStrArray = null;
+
+ // XUL Object
+var strRes, bmStrRes; // stringbundle Object
+var bookmarksTree;
+var rssItemListBox;
+var rssStatusImage;
+var rssStatusLabel;
+var rssTitleLabel;
+var rssItemToolTip;
+
+var currentFeed;
+var httpReq;
+var prefObserverSageFolder;
+var responseXML;
+var lastResource;
+var rssLoading = false;
+var sageFolderID = "";
+var enableTooltip = true;
+var popupTimeoutId=0;
+
+
+function init() {
+ bookmarksTree = document.getElementById("bookmarksTree");
+ rssItemListBox = document.getElementById("rssItemListBox");
+ rssStatusImage = document.getElementById("rssStatusImage");
+ rssStatusLabel = document.getElementById("rssStatusLabel");
+ rssTitleLabel = document.getElementById("rssTitleLabel");
+ rssItemToolTip = document.getElementById("rssItemToolTip");
+
+ strRes = document.getElementById("strRes");
+ bmStrRes = document.getElementById("bmStrRes");
+ resultStrArray = new Array(
+ strRes.getString("RESULT_OK_STR"),
+ strRes.getString("RESULT_PARSE_ERROR_STR"),
+ strRes.getString("RESULT_NOT_RSS_STR"),
+ strRes.getString("RESULT_NOT_FOUND_STR"),
+ strRes.getString("RESULT_NOT_AVAILABLE_STR"),
+ strRes.getString("RESULT_ERROR_FAILURE_STR")
+ );
+
+ // if feed folder has not been set, assume new user and install default feed folder and demo feeds
+ if(!CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", null)) {
+ logMessage("setting default preferences...");
+ var new_folder = BMSVC.createFolderInContainer("Sage Feeds", RDF.GetResource("NC:BookmarksRoot"), null);
+ CommonFunc.setPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", new_folder.Value);
+ if(BMSVC.createBookmarkInContainer.length == 7) { // firefox 0.8 and lower
+ BMSVC.createBookmarkInContainer("BBC News | News Front Page | World Edition", "http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml", null, "updated", null, new_folder, null);
+ BMSVC.createBookmarkInContainer("Yahoo! News - Sports", "http://rss.news.yahoo.com/rss/sports", null, "updated", null, new_folder, null);
+ BMSVC.createBookmarkInContainer("Sage Project News", "http://sage.mozdev.org/rss.xml", null, "updated", null, new_folder, null);
+ } else {
+ BMSVC.createBookmarkInContainer("BBC News | News Front Page | World Edition", "http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml", null, "updated", null, null, new_folder, null);
+ BMSVC.createBookmarkInContainer("Yahoo! News - Sports", "http://rss.news.yahoo.com/rss/sports", null, "updated", null, null, new_folder, null);
+ BMSVC.createBookmarkInContainer("Sage Project News", "http://sage.mozdev.org/rss.xml", null, "updated", null, null, new_folder, null);
+ }
+ setCheckbox("chkShowSearchBar", "false");
+ setCheckbox("chkShowTooltip", "true");
+ setCheckbox("chkShowFeedItemList", "true");
+ }
+
+ // get feed folder location
+ sageFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", "NC:BookmarksRoot");
+ // check for changes to the feed folder
+ prefObserverSageFolder = CommonFunc.addPrefListener(CommonFunc.RSS_READER_FOLDER_ID, sageFolderChanged);
+ // set feed folder location
+ bookmarksTree.tree.setAttribute("ref", sageFolderID);
+ // select first entry
+ bookmarksTree.treeBoxObject.selection.select(0);
+
+ FeedSearch.init();
+ toggleShowSearchBar();
+ toggleShowFeedItemList();
+
+ logMessage("initialized");
+}
+
+function discoverFeeds() {
+ window.openDialog("chrome://sage/contents/discover_feeds.xul", "sage_discover_feeds", "chrome,modal,close", bookmarksTree);
+}
+
+// TODO: This does not work in 0.9.x since the implementation for smart bookmarks
+// has been removed. Too bad because this feature was really nice
+function showOnlyUpdated() {
+ if(getCheckboxCheck("chkOnlyUpdate")) {
+ var findURL = "find:datasource=rdf:bookmarks&match=";
+ findURL += CommonFunc.BM_DESCRIPTION;
+ findURL += "&method=is&text=updated";
+ bookmarksTree.tree.setAttribute("ref", findURL);
+ } else {
+ bookmarksTree.tree.setAttribute("ref", sageFolderID);
+ }
+}
+
+function sageFolderChanged(subject, topic, prefName) {
+ // observe Preference
+ sageFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", "NC:BookmarksRoot");
+ bookmarksTree.tree.setAttribute("ref", sageFolderID);
+ bookmarksTree.treeBoxObject.selection.select(0);
+}
+
+function done() {
+ if(prefObserverSageFolder) {
+ CommonFunc.removePrefListener(prefObserverSageFolder);
+ }
+
+ if(rssLoading) {
+ httpReq.abort();
+ rssLoading = false;
+ }
+ UpdateChecker.done();
+
+ logMessage("shutdown");
+}
+
+function openOPMLWizard() {
+ var dialogURL = "chrome://sage/content/opml/opml.xul";
+ window.openDialog(dialogURL, "", "chrome,modal,close");
+}
+
+function openSettingDialog() {
+ var dialogURL = "chrome://sage/content/settings/settings.xul";
+ window.openDialog(dialogURL, "", "chrome,modal,close");
+}
+
+function openSageProjectFeed() {
+ lastResource = null;
+ var feedURL = "http://sage.mozdev.org/rss.xml";
+ setStatusLoading("Sage Project News");
+ httpGet(feedURL);
+}
+
+function manageRSSList() {
+ var dialogURL = "chrome://browser/content/bookmarks/bookmarksManager.xul";
+ window.openDialog(dialogURL, "", "chrome,all,dialog=no", sageFolderID);
+}
+
+function updateCheck(aCheckFolderId) {
+ UpdateChecker.onCheck = function(aName, aURL) {
+ rssStatusImage.setAttribute("loading", "true");
+ rssStatusLabel.value = strRes.getString("RESULT_CHECKING") + ": " + aName;
+ }
+ UpdateChecker.onChecked = function(aName, aURL) {
+ setStatusDone();
+ }
+
+ if(aCheckFolderId) {
+ UpdateChecker.startCheck(aCheckFolderId);
+ } else {
+ UpdateChecker.startCheck(sageFolderID);
+ }
+}
+
+function BookmarkResource(aRes, aDB){
+ this.res = aRes;
+ this.db = aDB;
+ this.name = BookmarksUtils.getProperty(this.res, NC_NS + "Name", this.db);
+ this.url = BookmarksUtils.getProperty(this.res, NC_NS + "URL", this.db);
+}
+
+function bookmarksOpen(){
+ lastResource = new BookmarkResource(bookmarksTree.currentResource, bookmarksTree.db);
+ setStatusLoading();
+ httpGet(lastResource.url);
+}
+
+function createTreeContextMenu2(aEvent) {
+ var popup = aEvent.target;
+ if(popup.localName != "menupopup") return;
+
+ var selection = bookmarksTree._selection;
+ var itemId = selection.item[0].Value;
+ var cmdSrc = "";
+ var tempMenuItem;
+
+ if(selection.type == "Bookmark") {
+ cmdSrc = "GetRssTitle.getRssTitle('" + itemId + "')";
+ tempMenuItem = document.createElement("menuitem");
+ tempMenuItem.setAttribute("label", strRes.getString("GET_RSS_TITLE"));
+ tempMenuItem.setAttribute("oncommand", cmdSrc);
+ popup.appendChild(document.createElement("menuseparator"));
+ popup.appendChild(tempMenuItem);
+ } else if(selection.type == "Folder") {
+ cmdSrc = "updateCheck('" + itemId + "')";
+ tempMenuItem = document.createElement("menuitem");
+ tempMenuItem.setAttribute("label", strRes.getString("CHECK_UPDATE"));
+ tempMenuItem.setAttribute("oncommand", cmdSrc);
+ popup.appendChild(document.createElement("menuseparator"));
+ popup.appendChild(tempMenuItem);
+ }
+}
+
+function bookmarksTreeClick(aEvent){
+ if(aEvent.type == "click") {
+ if(aEvent.button == 2 || aEvent.originalTarget.localName != "treechildren") {
+ return;
+ }
+ var obj = {};
+ bookmarksTree.treeBoxObject.getCellAt(aEvent.clientX, aEvent.clientY, {}, {}, obj);
+ if(obj.value == "twisty") return;
+ } else if(aEvent.type == "keypress") {
+ if(aEvent.originalTarget.localName != "tree") {
+ return;
+ }
+ }
+
+ CreateHTML.tabbed = false;
+ if(aEvent.button == 1) { CreateHTML.tabbed = true; } // click middle button
+ if(aEvent.ctrlKey) { CreateHTML.tabbed = true; } // press Ctrl Key
+
+ const BOOKMARK_TYPE = RDF_NS + "type";
+ const BOOKMARK_SEPARATOR = NC_NS + "BookmarkSeparator";
+ const BOOKMARK_FOLDER = NC_NS + "Folder"
+ var bookmarkType = (BookmarksUtils.getProperty(bookmarksTree.currentResource, BOOKMARK_TYPE , bookmarksTree.db))
+ if(bookmarkType == BOOKMARK_SEPARATOR || bookmarkType == BOOKMARK_FOLDER) {
+ return;
+ }
+
+ bookmarksOpen();
+}
+
+function rssItemListBoxClick(aEvent) {
+ if(aEvent.type == "click") {
+ if(aEvent.button == 2 || aEvent.originalTarget.localName != "listitem") {
+ return;
+ }
+ } else if(aEvent.type == "keypress") {
+ if(aEvent.originalTarget.localName != "listbox") {
+ return;
+ }
+ }
+
+ var listItem = rssItemListBox.selectedItem;
+ var feedItem = getFeedItemFromListItem( listItem );
+
+ openURI( feedItem.getLink(), aEvent );
+ listItem.setAttribute("visited", "true");
+}
+
+function rssTitleLabelClick(aNode, aEvent){
+ var tabbed = false;
+ if(!aNode.hasAttribute("href") || aEvent.button == 2) {
+ return;
+ }
+
+ var link = aNode.getAttribute("href");
+ openURI( link, aEvent );
+}
+
+function setStatusLoading(label) {
+ rssStatusImage.setAttribute("loading", "true");
+ if(label) {
+ rssStatusLabel.value = strRes.getString("RESULT_LOADING") + ": " + label;
+ } else {
+ rssStatusLabel.value = strRes.getString("RESULT_LOADING") + ": " + lastResource.name;
+ }
+}
+
+function setStatusDone() {
+ rssStatusImage.setAttribute("loading", "false");
+ rssStatusLabel.value = "";
+
+ if(currentFeed) {
+ rssTitleLabel.value = htmlToText(currentFeed.getTitle());
+ if(currentFeed.getLink()) {
+ rssTitleLabel.setAttribute("href", currentFeed.getLink());
+ rssTitleLabel.tooltipText = currentFeed.getLink();
+ } else {
+ rssTitleLabel.removeAttribute("href");
+ rssTitleLabel.tooltipText = "";
+ }
+ }
+}
+
+function setStatusError(aStatus) {
+ rssStatusImage.setAttribute("loading", "error");
+ rssStatusLabel.value = "Error: " + aStatus;
+}
+
+function getContentBrowser() {
+ var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator);
+ var topWindowOfType = windowManager.getMostRecentWindow("navigator:browser");
+ if (topWindowOfType) {
+ return topWindowOfType.document.getElementById('content');
+ }
+ return null;
+}
+
+function toggleShowSearchBar() {
+ var showSearchBar = getCheckboxCheck("chkShowSearchBar");
+ document.getElementById("barSearch").hidden = !showSearchBar;
+}
+
+function toggleShowFeedItemList() {
+ var showFeedItemList = getCheckboxCheck("chkShowFeedItemList");
+ document.getElementById("sage-splitter").hidden = !showFeedItemList;
+ document.getElementById("rssItemListBoxBox").hidden = !showFeedItemList;
+ if(showFeedItemList) setRssItemListBox();
+}
+
+function setRssItemListBox() {
+ if(!currentFeed) return;
+ if(document.getElementById("rssItemListBoxBox").hidden) return;
+
+ while(rssItemListBox.getRowCount() != 0) {
+ rssItemListBox.removeItemAt(0);
+ }
+
+ var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
+
+ var items = currentFeed.getItems(feedItemOrder);
+
+ for(var i = 0; items.length > i; i++) {
+ var item = items[i];
+ var itemLabel = item.getTitle();
+ itemLabel = (i+1) + ". " + itemLabel;
+ var listItem = rssItemListBox.appendItem(itemLabel, i);
+ if(isVisited(item.getLink())) {
+ listItem.setAttribute("visited", "true");
+ }
+ }
+}
+
+function getCheckboxCheck(element_id) {
+ var checkboxNode = document.getElementById(element_id);
+ return checkboxNode.getAttribute("checked") == "true";
+}
+
+function setCheckbox(element_id, value) {
+ var checkboxNode = document.getElementById(element_id);
+ checkboxNode.setAttribute("checked", value);
+}
+
+// TODO: Is this still used?
+function showRssItemListPopup(aEvent) {
+ if(aEvent.originalTarget.localName != "listitem") {
+ rssItemListPopup.hidePopup();
+ return;
+ }
+ if(!getCheckboxCheck("chkShowTooltip")) {
+ rssItemListPopup.hidePopup();
+ return;
+ }
+
+ var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
+
+ var items = currentFeed.getItems(feedItemOrder);
+
+ var description = htmlToText(items[aEvent.originalTarget.value].getContent());
+ if(description.indexOf("/") != -1) {
+ description = description.replace(/\//gm, "/\u200B");
+ }
+ // description 400ȓɂ
+ if(description.length > 400) {
+ description = description.substring(0,400) + "...";
+ }
+
+ var popX = aEvent.screenX + 10;
+ var popY = aEvent.screenY + 20;
+
+ rssItemListPopup.title = aEvent.originalTarget.label;
+ rssItemListPopup.description = description;
+ rssItemListPopup.autoPosition = false;
+ rssItemListPopup.moveTo(popX, popY);
+ popupTimeoutId = setTimeout("rssItemListPopup.showPopup(rssItemListBox)", 150);
+}
+
+function populateToolTip(e) {
+ // if setting disabled
+ if(!getCheckboxCheck("chkShowTooltip")) {
+ e.preventDefault();
+ return;
+ }
+
+ if(document.tooltipNode == rssItemListBox) {
+ e.preventDefault();
+ return;
+ }
+ var listItem = document.tooltipNode;
+ var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
+ var items = currentFeed.getItems(feedItemOrder);
+ var description = htmlToText(items[listItem.value].getContent());
+ if(description.indexOf("/") != -1) {
+ description = description.replace(/\//gm, "/\u200B");
+ }
+ if(description.length > 400) {
+ description = description.substring(0,400) + "...";
+ }
+
+ rssItemToolTip.title = listItem.label;
+ rssItemToolTip.description = description;
+}
+
+// TODO: Is this still used?
+function hideRssItemListPopup(aEvent) {
+ clearTimeout(popupTimeoutId);
+ rssItemListPopup.hidePopup();
+}
+
+function htmlToText(aStr) {
+ var formatConverter = Components.classes["@mozilla.org/widget/htmlformatconverter;1"].createInstance(Components.interfaces.nsIFormatConverter);
+ var fromStr = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
+ fromStr.data = aStr;
+ var toStr = { value: null };
+
+ try {
+ formatConverter.convert("text/html", fromStr, fromStr.toString().length, "text/unicode", toStr, {});
+ } catch(e) {
+ return aStr;
+ }
+ if(toStr.value) {
+ toStr = toStr.value.QueryInterface(Components.interfaces.nsISupportsString);
+ return toStr.toString();
+ }
+ return aStr;
+}
+
+
+
+// ++++++++++ +++++++++ HTTP ++++++++++ +++++++++
+
+function httpGet(aURL) {
+ if(rssLoading) {
+ httpReq.abort();
+ rssLoading = false;
+ }
+
+ responseXML = null;
+
+ httpReq = new XMLHttpRequest();
+
+ httpReq.open("GET", aURL);
+
+ httpReq.onload = httpLoaded;
+ httpReq.onerror = httpError;
+ httpReq.onreadystatechange = httpReadyStateChange;
+
+ try {
+ httpReq.setRequestHeader("User-Agent", USER_AGENT);
+ httpReq.overrideMimeType("application/xml");
+ } catch(e) {
+ httpGetResult(RESULT_ERROR_FAILURE);
+ }
+
+ try {
+ httpReq.send(null);
+ rssLoading = true;
+ } catch(e) {
+ httpGetResult(RESULT_ERROR_FAILURE);
+ }
+}
+
+function httpError(e) {
+ logMessage("HTTP Error: " + e.target.status + " - " + e.target.statusText);
+ httpGetResult(RESULT_NOT_AVAILABLE);
+}
+
+function httpReadyStateChange() {
+
+ if(httpReq.readyState == 2) {
+ try {
+ if(httpReq.status == 404) {
+ httpGetResult(RESULT_NOT_FOUND);
+ }
+ } catch(e) {
+ httpGetResult(RESULT_NOT_AVAILABLE);
+ return;
+ }
+ } else if(httpReq.readyState == 3) {}
+}
+
+function httpLoaded(e) {
+ responseXML = httpReq.responseXML;
+ var rootNodeName = responseXML.documentElement.localName.toLowerCase();
+
+ switch(rootNodeName) {
+ case "parsererror":
+ // XML Parse Error
+ httpGetResult(RESULT_PARSE_ERROR);
+ break;
+ case "rss":
+ case "rdf":
+ case "feed":
+ httpGetResult(RESULT_OK);
+ break;
+ default:
+ // Not RSS or Atom
+ httpGetResult(RESULT_NOT_RSS);
+ break;
+ }
+}
+
+function httpGetResult(aResultCode) {
+ httpReq.abort();
+ rssLoading = false;
+
+ if(aResultCode == RESULT_OK) {
+ currentFeed = new Feed(responseXML);
+
+ if(lastResource && lastResource.res) {
+ if(CommonFunc.getPrefValue(CommonFunc.AUTO_FEED_TITLE, "bool", true)) {
+ if(CommonFunc.getBMDSProperty(lastResource.res, CommonFunc.BM_NAME) != currentFeed.getTitle()) {
+ CommonFunc.setBMDSProperty(lastResource.res, CommonFunc.BM_NAME, currentFeed.getTitle());
+ }
+ }
+
+ BMSVC.updateLastVisitedDate(lastResource.url, "UTF-8");
+ CommonFunc.setBMDSProperty(lastResource.res, CommonFunc.BM_DESCRIPTION, CommonFunc.STATUS_NO_UPDATE + " " + currentFeed.getSignature());
+ }
+
+ setStatusDone();
+ setRssItemListBox();
+
+ if(CommonFunc.getPrefValue(CommonFunc.RENDER_FEEDS, "bool", true)) {
+ CreateHTML.openHTML(currentFeed);
+ }
+ } else {
+ setStatusError(resultStrArray[aResultCode]);
+ }
+}
+
+
+// link visit code based on LinkVisitor.mozdev.org
+
+
+const _uriFixup = Components.classes["@mozilla.org/docshell/urifixup;1"].getService(Components.interfaces.nsIURIFixup);
+const _globalHistory = Components.classes['@mozilla.org/browser/global-history;2'].getService(Components.interfaces.nsIGlobalHistory2);
+const _browserHistory = Components.classes["@mozilla.org/browser/global-history;2"].getService(Components.interfaces.nsIBrowserHistory);
+
+function markURIAsRead( sURI )
+{
+ markURIReadState( sURI, true );
+}
+
+function markURIAsUnread( sURI )
+{
+ markURIReadState( sURI, false );
+}
+
+function markURIReadState( sURI, bRead )
+{
+ if ( !sURI )
+ return;
+
+ // why do we need to fixup the URI?
+ var fixupURI = _getFixupURI( sURI );
+ var visited = _globalHistory.isVisited( fixupURI );
+ if ( visited == bRead )
+ return;
+
+ if ( bRead )
+ _globalHistory.addURI( fixupURI, false, true );
+ else
+ _browserHistory.removePage( fixupURI.spec );
+}
+
+function _getFixupURI( sURI )
+{
+ try
+ {
+ return _uriFixup.createFixupURI( sURI, 0 );
+ }
+ catch( e )
+ {
+ return null;
+ }
+}
+
+function isVisited( sURI )
+{
+ var fixupURI = _getFixupURI( sURI );
+ return _globalHistory.isVisited( fixupURI );
+}
+
+
+// RSS Item Context Menu
+
+/**
+ * This is called before the context menu for the listbox is shown. Here we enabled/disable
+ * menu items as well as change the text to correctly reflect the read state
+ * @param e : Event
+ * @returns void
+ */
+function updateItemContextMenu( e )
+{
+ var popupNode = document.popupNode;
+
+ var menuItemIds = ["rssOpenItem", "rssOpenNewTabItem", "rssOpenNewWindowItem",
+ "rssMarkAsReadItem", "rssMarkAllAsReadItem", "rssMarkAllAsUnreadItem"];
+ var menuItems = {};
+ for ( var i = 0; i < menuItemIds.length; i++ )
+ {
+ menuItems[ menuItemIds[i] ] = document.getElementById( menuItemIds[i] );
+ }
+
+ // cmd_bm_open
+ // cmd_bm_openinnewwindow
+ // cmd_bm_openinnewtab
+ menuItems.rssOpenItem.label = bmStrRes.getString("cmd_bm_open");
+ menuItems.rssOpenNewTabItem.label = bmStrRes.getString("cmd_bm_openinnewtab");
+ menuItems.rssOpenNewWindowItem.label = bmStrRes.getString("cmd_bm_openinnewwindow");
+
+ menuItems.rssMarkAsReadItem.label = strRes.getString("itemcontext_markasread");
+ menuItems.rssMarkAllAsReadItem.label = strRes.getString("itemcontext_markallasread");
+ menuItems.rssMarkAllAsUnreadItem.label = strRes.getString("itemcontext_markallasunread");
+
+ if ( popupNode.localName == "listbox" )
+ {
+ // only mark all should work
+ for ( var id in menuItems )
+ {
+ if ( (id == "rssMarkAllAsReadItem" || id == "rssMarkAllAsUnreadItem") &&
+ currentFeed && rssItemListBox.getRowCount() > 0 )
+ menuItems[id].removeAttribute( "disabled" );
+ else
+ menuItems[id].setAttribute( "disabled", "true" );;
+ }
+ }
+ else
+ {
+ for ( id in menuItems )
+ menuItems[id].removeAttribute( "disabled" );
+
+ // need to figure out if the current list item is visited
+ var listItem = popupNode;
+ var feedItem = getFeedItemFromListItem( listItem );
+ var visited = isVisited( feedItem.getLink() );
+ menuItems.rssMarkAsReadItem.label =
+ strRes.getString( visited ? "itemcontext_markasunread" : "itemcontext_markasread" );
+
+ // lets make sure the visited flag is correct in the ui
+ if ( visited )
+ listItem.setAttribute( "visited", "true" );
+ else
+ listItem.removeAttribute( "visited" );
+ }
+}
+
+
+/**
+ * This marks the selected items as read/unread. This works with multiple
+ * selection as well if we want to enable that in the future.
+ * @param e : Event
+ * @returns void
+ */
+function toggleMarkAsRead( e )
+{
+ var listItems = rssItemListBox.selectedItems;
+ for ( var i = 0; i < listItems.length; i++ )
+ {
+ var listItem = listItems[i];
+ var feedItem = getFeedItemFromListItem( listItem );
+ var uri = feedItem.getLink();
+ var visited = isVisited( uri );
+ markURIReadState( uri, !visited );
+ if ( !visited )
+ listItem.setAttribute( "visited", "true" );
+ else
+ listItem.removeAttribute( "visited" );
+ }
+}
+
+/**
+ * This called from the context menu.
+ * @param e : Event
+ * @returns void
+ */
+function markAllAsRead( e )
+{
+ markAllReadState( true );
+}
+
+/**
+ * This called from the context menu.
+ * @param e : Event
+ * @returns void
+ */
+function markAllAsUnread( e )
+{
+ markAllReadState( false );
+}
+
+/**
+ * Marks all read or unread
+ * @param bRead : Boolean Whether to mark as read or unread
+ * @returns void
+ */
+function markAllReadState( bRead )
+{
+ if ( currentFeed )
+ {
+ var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
+ var feedItems = currentFeed.getItems( feedItemOrder );
+
+ for ( var i = 0; i < feedItems.length; i++ )
+ markURIReadState( feedItems[i].getLink(), bRead );
+
+ var listItem;
+ for ( var y = 0; y < rssItemListBox.getRowCount(); y++ )
+ {
+ listItem = rssItemListBox.getItemAtIndex( y );
+ if ( bRead )
+ listItem.setAttribute( "visited", "true" );
+ else
+ listItem.removeAttribute( "visited" );
+ }
+ }
+}
+
+// This takes a list item from the rss list box and returns the uri it represents
+// this seems a bit inefficient. Shouldn't there be a direct mapping between these?
+
+/**
+ * This takes a listitem element and returns the FeedItem it represents
+ * @param oListItem : XULListItem
+ * @returns FeedItem
+ */
+function getFeedItemFromListItem( oListItem )
+{
+ var feedItemOrder = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
+ var items = currentFeed.getItems( feedItemOrder );
+ return items[ oListItem.value ];
+}
+
+
+
+/**
+ * Opens a link in the same window, a new tab or a new window
+ *
+ * @param sURI : String
+ * @param oType : Object If this is an Event object we check the modifiers.
+ * Otherwise we assume it is a string describing the
+ * window type.
+ * @returns void
+ */
+function openURI( sURI, oType )
+{
+ var windowType;
+ if ( oType instanceof Event )
+ {
+ // figure out what kind of open we want
+ if ( oType.button == 1 || oType.ctrlKey ) // click middle button or ctrl click
+ windowType = "tab";
+ else if ( oType.shiftKey )
+ windowType = "window";
+ }
+ else
+ {
+ windowType = oType;
+ }
+
+ switch ( windowType )
+ {
+ case "tab":
+ getContentBrowser().addTab( sURI );
+ break;
+ case "window":
+ document.commandDispatcher.focusedWindow.open( sURI );
+ break;
+
+ default:
+ getContentBrowser().loadURI( sURI );
+ }
+}
+
+/**
+ * This is called by the context menu
+ * @param oType : String
+ * @returns void
+ */
+function openListItem( oType )
+{
+ var listItem = document.popupNode;
+ var feedItem = getFeedItemFromListItem( listItem );
+ openURI( feedItem.getLink(), oType );
+ listItem.setAttribute( "visited", "true" );
+}
diff --git a/src/sage/content/search/feedsearch.js b/src/sage/content/search/feedsearch.js
index 0b1c458..2d55dd2 100755
--- a/src/sage/content/search/feedsearch.js
+++ b/src/sage/content/search/feedsearch.js
@@ -1,104 +1,104 @@
-var FeedSearch = {
- RRP_NS: "http://sage.mozdev.org/#",
- SEARCH_ENGINE_RDF: "chrome://sage/content/search/searchEngine.rdf",
-
- RDF:Components.classes['@mozilla.org/rdf/rdf-service;1']
- .getService(Components.interfaces.nsIRDFService),
-
- txtSearchValue: null,
- imgSearchEngine: null,
- popSearchEngine: null,
-
- rdfDS: null,
- searchEngine: "",
- searchEngineName: "",
- query: "",
- charset: "",
-
- init: function(){
- this.txtSearchValue = document.getElementById("txtSearchValue");
- this.imgSearchEngine = document.getElementById("imgSearchEngine");
- this.popSearchEngine = document.getElementById("popSearchEngine");
-
- // init Search Engine RDF DataSource
- this.rdfDS = this.RDF.GetDataSource(this.SEARCH_ENGINE_RDF);
- var remote = this.rdfDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
- if(remote.loaded){
- this.initRdfDataSource();
- }else{
- var sink = this.rdfDS.QueryInterface(Components.interfaces.nsIRDFXMLSink);
- sink.addXMLSinkObserver(this.sinkObserver);
- }
- },
-
- initRdfDataSource: function(){
- this.popSearchEngine.database.AddDataSource(this.rdfDS);
- this.popSearchEngine.builder.rebuild();
- var tmpSearchEngine = this.txtSearchValue.getAttribute("searchengine");
- if(!tmpSearchEngine)
- tmpSearchEngine = this.getRdfProperty("urn:rrp:searchengine:default", this.RRP_NS + "site");
- this.setSearchEngine(tmpSearchEngine);
- },
-
- search: function(){
- var searchValue = this.txtSearchValue.value;
- if(searchValue == "") return;
-
- var searchName = this.searchEngineName + " - " + searchValue;
-
- // ��������Ɍ����������lj�
- var formHistory = Components.classes["@mozilla.org/satchel/form-history;1"]
- .getService(Components.interfaces.nsIFormHistory);
- formHistory.addEntry("q", searchValue);
-
- // ��������������G���W���̕����R�[�h�ɍ��킹�ăG�X�P�[�v
- var textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
- .getService(Components.interfaces.nsITextToSubURI);
- searchValue = textToSubURI.ConvertAndEscape(this.charset, searchValue);
-
- lastResource = {
- res: null,
- db: null,
- name: searchName,
- url: this.query + searchValue
- };
- setStatusLoading();
- httpGet(lastResource.url);
- },
-
- setSearchEngine: function(aSearchEngine){
- this.searchEngine = aSearchEngine;
- this.searchEngineName = this.getRdfProperty(aSearchEngine, this.RRP_NS + "name");
- this.query = this.getRdfProperty(aSearchEngine, this.RRP_NS + "query");
- this.charset = this.getRdfProperty(aSearchEngine, this.RRP_NS + "charset");
-
- this.txtSearchValue.setAttribute("searchengine", this.searchEngine);
- this.imgSearchEngine.src = this.getRdfProperty(aSearchEngine, this.RRP_NS + "icon");
- },
-
- popSearchEngineClick: function(aEvent){
- var menuitemNode = aEvent.originalTarget;
- if(menuitemNode.nodeName != "menuitem") return;
-
- this.setSearchEngine(menuitemNode.value);
- },
-
- getRdfProperty: function(aRes, aProperty){
- if(typeof(aRes) == "string") aRes = this.RDF.GetResource(aRes);
- if(typeof(aProperty) == "string") aProperty = this.RDF.GetResource(aProperty);
- var target = this.rdfDS.GetTarget(aRes, aProperty, true);
- try{
- return target.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
- }catch(e){
- return target.QueryInterface(Components.interfaces.nsIRDFResource).Value;
- }
- },
-
- sinkObserver: {
- onBeginLoad: function(aSink){},
- onInterrupt: function(aSink){},
- onResume: function(aSink){},
- onEndLoad: function(aSink){ FeedSearch.initRdfDataSource() },
- onError: function(aSink, aStatus, aErrorMsg){}
- }
+var FeedSearch = {
+ RRP_NS: "http://sage.mozdev.org/#",
+ SEARCH_ENGINE_RDF: "chrome://sage/content/search/searchEngine.rdf",
+
+ RDF:Components.classes['@mozilla.org/rdf/rdf-service;1']
+ .getService(Components.interfaces.nsIRDFService),
+
+ txtSearchValue: null,
+ imgSearchEngine: null,
+ popSearchEngine: null,
+
+ rdfDS: null,
+ searchEngine: "",
+ searchEngineName: "",
+ query: "",
+ charset: "",
+
+ init: function(){
+ this.txtSearchValue = document.getElementById("txtSearchValue");
+ this.imgSearchEngine = document.getElementById("imgSearchEngine");
+ this.popSearchEngine = document.getElementById("popSearchEngine");
+
+ // init Search Engine RDF DataSource
+ this.rdfDS = this.RDF.GetDataSource(this.SEARCH_ENGINE_RDF);
+ var remote = this.rdfDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
+ if(remote.loaded){
+ this.initRdfDataSource();
+ }else{
+ var sink = this.rdfDS.QueryInterface(Components.interfaces.nsIRDFXMLSink);
+ sink.addXMLSinkObserver(this.sinkObserver);
+ }
+ },
+
+ initRdfDataSource: function(){
+ this.popSearchEngine.database.AddDataSource(this.rdfDS);
+ this.popSearchEngine.builder.rebuild();
+ var tmpSearchEngine = this.txtSearchValue.getAttribute("searchengine");
+ if(!tmpSearchEngine)
+ tmpSearchEngine = this.getRdfProperty("urn:rrp:searchengine:default", this.RRP_NS + "site");
+ this.setSearchEngine(tmpSearchEngine);
+ },
+
+ search: function(){
+ var searchValue = this.txtSearchValue.value;
+ if(searchValue == "") return;
+
+ var searchName = this.searchEngineName + " - " + searchValue;
+
+ // ��������Ɍ����������lj�
+ var formHistory = Components.classes["@mozilla.org/satchel/form-history;1"]
+ .getService(Components.interfaces.nsIFormHistory);
+ formHistory.addEntry("q", searchValue);
+
+ // ��������������G���W���̕����R�[�h�ɍ��킹�ăG�X�P�[�v
+ var textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
+ .getService(Components.interfaces.nsITextToSubURI);
+ searchValue = textToSubURI.ConvertAndEscape(this.charset, searchValue);
+
+ lastResource = {
+ res: null,
+ db: null,
+ name: searchName,
+ url: this.query + searchValue
+ };
+ setStatusLoading();
+ httpGet(lastResource.url);
+ },
+
+ setSearchEngine: function(aSearchEngine){
+ this.searchEngine = aSearchEngine;
+ this.searchEngineName = this.getRdfProperty(aSearchEngine, this.RRP_NS + "name");
+ this.query = this.getRdfProperty(aSearchEngine, this.RRP_NS + "query");
+ this.charset = this.getRdfProperty(aSearchEngine, this.RRP_NS + "charset");
+
+ this.txtSearchValue.setAttribute("searchengine", this.searchEngine);
+ this.imgSearchEngine.src = this.getRdfProperty(aSearchEngine, this.RRP_NS + "icon");
+ },
+
+ popSearchEngineClick: function(aEvent){
+ var menuitemNode = aEvent.originalTarget;
+ if(menuitemNode.nodeName != "menuitem") return;
+
+ this.setSearchEngine(menuitemNode.value);
+ },
+
+ getRdfProperty: function(aRes, aProperty){
+ if(typeof(aRes) == "string") aRes = this.RDF.GetResource(aRes);
+ if(typeof(aProperty) == "string") aProperty = this.RDF.GetResource(aProperty);
+ var target = this.rdfDS.GetTarget(aRes, aProperty, true);
+ try{
+ return target.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
+ }catch(e){
+ return target.QueryInterface(Components.interfaces.nsIRDFResource).Value;
+ }
+ },
+
+ sinkObserver: {
+ onBeginLoad: function(aSink){},
+ onInterrupt: function(aSink){},
+ onResume: function(aSink){},
+ onEndLoad: function(aSink){ FeedSearch.initRdfDataSource() },
+ onError: function(aSink, aStatus, aErrorMsg){}
+ }
}
\ No newline at end of file
diff --git a/src/sage/content/search/searchEngine.rdf b/src/sage/content/search/searchEngine.rdf
index 6b93e50..191e7f9 100755
--- a/src/sage/content/search/searchEngine.rdf
+++ b/src/sage/content/search/searchEngine.rdf
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="Shift_JIS"?>
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:rrp="http://sage.mozdev.org/#">
-
- <!-- Search Engine List-->
- <rdf:Seq rdf:about="urn:rrp:searchengine:root">
- <rdf:li rdf:resource="http://feedster.com/"/>
- <rdf:li rdf:resource="http://www.blogdigger.com/"/>
- <rdf:li rdf:resource="http://www.daypop.com/"/>
- <rdf:li rdf:resource="http://bulkfeeds.net/"/>
- <rdf:li rdf:resource="http://naoya.dyndns.org/feedback/"/>
- </rdf:Seq>
-
- <!-- Default Search Engine -->
- <rdf:Description rdf:about="urn:rrp:searchengine:default">
- <rrp:site rdf:resource="http://feedster.com/"/>
- </rdf:Description>
-
-
- <!-- Search Engine Data -->
- <rdf:Description rdf:about="http://feedster.com/">
- <rrp:name>Feedster</rrp:name>
- <rrp:query rdf:resource="http://feedster.com/search.php?sort=date&ie=UTF-8&limit=15&type=rss&q="/>
- <rrp:icon rdf:resource="chrome://sage/content/search/feedster.png"/>
- <rrp:charset>UTF-8</rrp:charset>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://www.blogdigger.com/">
- <rrp:name>Blogdigger</rrp:name>
- <rrp:query rdf:resource="http://www.blogdigger.com/rss.jsp?sortby=date&days=20&queryString="/>
- <rrp:icon rdf:resource="chrome://sage/content/search/blogdigger.png"/>
- <rrp:charset>UTF-8</rrp:charset>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://www.daypop.com/">
- <rrp:name>DAYPOP</rrp:name>
- <rrp:query rdf:resource="http://www.daypop.com/search?s=1&c=15&ext=true&t=a&o=rss&q="/>
- <rrp:icon rdf:resource="chrome://sage/content/search/daypop.png"/>
- <rrp:charset>UTF-8</rrp:charset>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://bulkfeeds.net/">
- <rrp:name>Bulkfeeds:ja</rrp:name>
- <rrp:query rdf:resource="http://bulkfeeds.net/app/search2.rdf?q="/>
- <rrp:icon rdf:resource="chrome://sage/content/search/bulkfeeds.png"/>
- <rrp:charset>UTF-8</rrp:charset>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://naoya.dyndns.org/feedback/">
- <rrp:name>FeedBack:ja</rrp:name>
- <rrp:query rdf:resource="http://naoya.dyndns.org/feedback/app/rss?keyword="/>
- <rrp:icon rdf:resource="chrome://sage/content/search/feedback.png"/>
- <rrp:charset>UTF-8</rrp:charset>
- </rdf:Description>
+<?xml version="1.0" encoding="Shift_JIS"?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rrp="http://sage.mozdev.org/#">
+
+ <!-- Search Engine List-->
+ <rdf:Seq rdf:about="urn:rrp:searchengine:root">
+ <rdf:li rdf:resource="http://feedster.com/"/>
+ <rdf:li rdf:resource="http://www.blogdigger.com/"/>
+ <rdf:li rdf:resource="http://www.daypop.com/"/>
+ <rdf:li rdf:resource="http://bulkfeeds.net/"/>
+ <rdf:li rdf:resource="http://naoya.dyndns.org/feedback/"/>
+ </rdf:Seq>
+
+ <!-- Default Search Engine -->
+ <rdf:Description rdf:about="urn:rrp:searchengine:default">
+ <rrp:site rdf:resource="http://feedster.com/"/>
+ </rdf:Description>
+
+
+ <!-- Search Engine Data -->
+ <rdf:Description rdf:about="http://feedster.com/">
+ <rrp:name>Feedster</rrp:name>
+ <rrp:query rdf:resource="http://feedster.com/search.php?sort=date&ie=UTF-8&limit=15&type=rss&q="/>
+ <rrp:icon rdf:resource="chrome://sage/content/search/feedster.png"/>
+ <rrp:charset>UTF-8</rrp:charset>
+ </rdf:Description>
+
+ <rdf:Description rdf:about="http://www.blogdigger.com/">
+ <rrp:name>Blogdigger</rrp:name>
+ <rrp:query rdf:resource="http://www.blogdigger.com/rss.jsp?sortby=date&days=20&queryString="/>
+ <rrp:icon rdf:resource="chrome://sage/content/search/blogdigger.png"/>
+ <rrp:charset>UTF-8</rrp:charset>
+ </rdf:Description>
+
+ <rdf:Description rdf:about="http://www.daypop.com/">
+ <rrp:name>DAYPOP</rrp:name>
+ <rrp:query rdf:resource="http://www.daypop.com/search?s=1&c=15&ext=true&t=a&o=rss&q="/>
+ <rrp:icon rdf:resource="chrome://sage/content/search/daypop.png"/>
+ <rrp:charset>UTF-8</rrp:charset>
+ </rdf:Description>
+
+ <rdf:Description rdf:about="http://bulkfeeds.net/">
+ <rrp:name>Bulkfeeds:ja</rrp:name>
+ <rrp:query rdf:resource="http://bulkfeeds.net/app/search2.rdf?q="/>
+ <rrp:icon rdf:resource="chrome://sage/content/search/bulkfeeds.png"/>
+ <rrp:charset>UTF-8</rrp:charset>
+ </rdf:Description>
+
+ <rdf:Description rdf:about="http://naoya.dyndns.org/feedback/">
+ <rrp:name>FeedBack:ja</rrp:name>
+ <rrp:query rdf:resource="http://naoya.dyndns.org/feedback/app/rss?keyword="/>
+ <rrp:icon rdf:resource="chrome://sage/content/search/feedback.png"/>
+ <rrp:charset>UTF-8</rrp:charset>
+ </rdf:Description>
</rdf:RDF>
\ No newline at end of file
diff --git a/src/sage/content/settings/bookmarkfoldermenulist.js b/src/sage/content/settings/bookmarkfoldermenulist.js
index ca43cad..bb84c07 100755
--- a/src/sage/content/settings/bookmarkfoldermenulist.js
+++ b/src/sage/content/settings/bookmarkfoldermenulist.js
@@ -1,72 +1,72 @@
-function BookmarkFolderMenuList(aMenulistID, aRootFolderID){
- this.menuList = document.getElementById(aMenulistID);
- this.menupopup = this.menuList.menupopup;
- this.rootFolder = aRootFolderID ? aRootFolderID : "NC:BookmarksRoot";
- this.init();
-}
-BookmarkFolderMenuList.prototype = {
- RDF: Components.classes["@mozilla.org/rdf/rdf-service;1"]
- .getService(Components.interfaces.nsIRDFService),
- RDFC: Components.classes["@mozilla.org/rdf/container;1"]
- .getService(Components.interfaces.nsIRDFContainer),
- RDFCU: Components.classes["@mozilla.org/rdf/container-utils;1"]
- .getService(Components.interfaces.nsIRDFContainerUtils),
- BMDS: null,
-
-
- set rootFolderID(aValue){
- this.rootFolder = aValue;
- this.init();
- return this.rootFolder;
- },
- get rootFolderID(){
- return this.rootFolder;
- },
-
- set currentFolderID(aValue){
- return this.menuList.value = aValue;
- },
- get currentFolderID(){
- return this.menuList.value;
- },
-
- init: function(){
- this.BMDS = this.RDF.GetDataSource("rdf:bookmarks");
-
- while (this.menupopup.hasChildNodes()){
- this.menupopup.removeChild(this.menupopup.firstChild);
- }
-
- var menuitemNode = document.createElement("menuitem");
- menuitemNode.setAttribute("label", "Root");
- menuitemNode.setAttribute("value", this.rootFolder);
- this.menupopup.appendChild(menuitemNode);
- this.createMenuItem(this.RDF.GetResource(this.rootFolder), 1);
-
- this.menuList.selectedIndex = 0;
- },
-
- createMenuItem: function(aFolder, aDepth){
- this.RDFC.Init(this.BMDS, aFolder);
- var children = this.RDFC.GetElements();
- while (children.hasMoreElements()){
- var item = children.getNext();
- if(!this.RDFCU.IsContainer(this.BMDS, item)) continue;
-
- item = item.QueryInterface(Components.interfaces.nsIRDFResource);
- var property = this.RDF.GetResource("http://home.netscape.com/NC-rdf#Name");
- var name = this.BMDS.GetTarget(item, property, true);
- name = name.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
-
- var Indentation = new Array(aDepth + 1).join(" ");
-
- var menuitemNode = document.createElement("menuitem");
- menuitemNode.setAttribute("label", Indentation + name);
- menuitemNode.setAttribute("value", item.Value);
- this.menupopup.appendChild(menuitemNode);
-
- this.createMenuItem(item, ++aDepth);
- --aDepth;
- }
- }
-}
+function BookmarkFolderMenuList(aMenulistID, aRootFolderID){
+ this.menuList = document.getElementById(aMenulistID);
+ this.menupopup = this.menuList.menupopup;
+ this.rootFolder = aRootFolderID ? aRootFolderID : "NC:BookmarksRoot";
+ this.init();
+}
+BookmarkFolderMenuList.prototype = {
+ RDF: Components.classes["@mozilla.org/rdf/rdf-service;1"]
+ .getService(Components.interfaces.nsIRDFService),
+ RDFC: Components.classes["@mozilla.org/rdf/container;1"]
+ .getService(Components.interfaces.nsIRDFContainer),
+ RDFCU: Components.classes["@mozilla.org/rdf/container-utils;1"]
+ .getService(Components.interfaces.nsIRDFContainerUtils),
+ BMDS: null,
+
+
+ set rootFolderID(aValue){
+ this.rootFolder = aValue;
+ this.init();
+ return this.rootFolder;
+ },
+ get rootFolderID(){
+ return this.rootFolder;
+ },
+
+ set currentFolderID(aValue){
+ return this.menuList.value = aValue;
+ },
+ get currentFolderID(){
+ return this.menuList.value;
+ },
+
+ init: function(){
+ this.BMDS = this.RDF.GetDataSource("rdf:bookmarks");
+
+ while (this.menupopup.hasChildNodes()){
+ this.menupopup.removeChild(this.menupopup.firstChild);
+ }
+
+ var menuitemNode = document.createElement("menuitem");
+ menuitemNode.setAttribute("label", "Root");
+ menuitemNode.setAttribute("value", this.rootFolder);
+ this.menupopup.appendChild(menuitemNode);
+ this.createMenuItem(this.RDF.GetResource(this.rootFolder), 1);
+
+ this.menuList.selectedIndex = 0;
+ },
+
+ createMenuItem: function(aFolder, aDepth){
+ this.RDFC.Init(this.BMDS, aFolder);
+ var children = this.RDFC.GetElements();
+ while (children.hasMoreElements()){
+ var item = children.getNext();
+ if(!this.RDFCU.IsContainer(this.BMDS, item)) continue;
+
+ item = item.QueryInterface(Components.interfaces.nsIRDFResource);
+ var property = this.RDF.GetResource("http://home.netscape.com/NC-rdf#Name");
+ var name = this.BMDS.GetTarget(item, property, true);
+ name = name.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
+
+ var Indentation = new Array(aDepth + 1).join(" ");
+
+ var menuitemNode = document.createElement("menuitem");
+ menuitemNode.setAttribute("label", Indentation + name);
+ menuitemNode.setAttribute("value", item.Value);
+ this.menupopup.appendChild(menuitemNode);
+
+ this.createMenuItem(item, ++aDepth);
+ --aDepth;
+ }
+ }
+}
diff --git a/src/sage/content/settings/exUnregisterer.js b/src/sage/content/settings/exUnregisterer.js
index b6a68e4..fe3cb3e 100755
--- a/src/sage/content/settings/exUnregisterer.js
+++ b/src/sage/content/settings/exUnregisterer.js
@@ -1,540 +1,540 @@
-/*
-"exUnregisterer", the automatic unregisterer (Ver.0.4.2003041301)
-
-exapmle:
-
->var unreg = new exUnregisterer(
-> 'chrome://my_app/content/contents.rdf',
-> 'jar:%chromeFolder%my_app.jar!/locale/en-US/contents.rdf'
-> );
->
->unreg.unregister(); // unregister all files
->unreg.removePrefs('my_app'); // remove all prefs ('my_app.XXXX.XXXXX', 'my_app.YYYY.ZZZZ', and so on)
-
-
-This class has following properties and methods:
-
-Chrome : the URI of the chrome directory in Mozilla
- installed.
-UChrome and UChrm : the URI of the chrome directory in the current
- profile.
-unregister() : executes unregisteration.
-removePrefs(aBranch) : removes all preferences which include the handled
- name.
-readFrom(aFile) : reads a text file and returns the content as
- a string.
-writeTo(aFile, aContent) : writes a text file with a string.
-
-
-When you create an instance of this class, you can use "%chromeFolder%"
-to point two "chrome" folders, in the directory Mozilla was installed in
-and in the profile directory.
-
-
-
-*/
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the exUnregisterer.
- *
- * The Initial Developer of the Original Code is SHIMODA Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2002-2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): SHIMODA Hiroshi <piro at p.club.ne.jp>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-
-function exUnregisterer()
-{
- this.init(arguments);
- delete this.mTarget.overlaysTemp;
-}
-
-exUnregisterer.prototype =
-{
-
- // properties
-
- mTarget :
- {
- packages : [],
- locales : [],
- skins : [],
- overlays : [],
- overlaysTemp : []
- },
-
- mEntriesURL : [],
-
- get Chrome()
- {
- if (!this._Chrome) {
- this._Chrome = this.getURISpecFromKey('AChrom');
- if (!this._Chrome.match(/\/$/)) this._Chrome += '/';
- }
- return this._Chrome;
- },
- _Chrome : null,
-
- get UChrome()
- {
- if (!this._UChrome) {
- this._UChrome = this.getURISpecFromKey('UChrm');
- if (!this._UChrome.match(/\/$/)) this._UChrome += '/';
- }
- return this._UChrome;
- },
- _UChrome : null,
-
- get UChrm()
- {
- return this.UChrome;
- },
-
- get IOService()
- {
- if (!this._IOService) {
- this._IOService = Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService);
- }
- return this._IOService;
- },
- _IOService : null,
-
- get RDF()
- {
- if (!this._RDF) {
- this._RDF = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService(Components.interfaces.nsIRDFService);
- }
- return this._RDF;
- },
- _RDF : null,
-
- get RDFC()
- {
- if (!this._RDFC) {
- this._RDFC = Components.classes['@mozilla.org/rdf/container;1'].createInstance(Components.interfaces.nsIRDFContainer);
- }
- return this._RDFC;
- },
- _RDFC : null,
-
- // Initialize
- init : function(aDsourcePaths)
- {
- var rootnode =
- {
- packages : 'urn:mozilla:package:root',
- locales : 'urn:mozilla:locale:root',
- skins : 'urn:mozilla:skin:root',
- overlays : 'urn:mozilla:overlays'
- },
- dsource,
- dsourcePaths = [],
- i,
- nodes,
- node,
- target;
-
- for (i = 0; i < aDsourcePaths.length; i++)
- {
- if (aDsourcePaths[i].match(/%chromeFolder%/i)) {
- dsourcePaths.push(aDsourcePaths[i].replace(/%chromeFolder%/gi, this.Chrome));
- dsourcePaths.push(aDsourcePaths[i].replace(/%chromeFolder%/gi, this.UChrome));
- }
- else
- dsourcePaths.push(aDsourcePaths[i]);
- }
-
- for (var j = 0; j < dsourcePaths.length; j++)
- {
- try {
- if (this.RDF.GetDataSourceBlocking)
- dsource = this.RDF.GetDataSourceBlocking(dsourcePaths[j]).QueryInterface(Components.interfaces.nsIRDFDataSource);
- else
- dsource = this.RDF.GetDataSource(dsourcePaths[j]);
- }
- catch(e) {
- continue;
- }
-
- for (i in rootnode)
- {
- try {
- this.RDFC.Init(dsource, this.RDF.GetResource(rootnode[i]));
- }
- catch(e) {
- continue;
- }
-
- nodes = this.RDFC.GetElements();
- while (nodes.hasMoreElements())
- {
- node = nodes.getNext();
- node = node.QueryInterface(Components.interfaces.nsIRDFResource);
- target = node.Value;
- switch(i)
- {
- case 'locales':
- case 'skins':
- target += ':packages';
- if (!this.mTarget[i][target])
- this.mTarget[i][target] = [];
- break;
-
- case 'overlays':
- if (!this.mTarget[i+'Temp'][target])
- this.mTarget[i+'Temp'][target] = [];
- break;
-
- default:
- this.mTarget[i][target] = true;
- break;
- }
- }
- }
-
-
- var targets =
- [
- this.mTarget.locales,
- this.mTarget.skins
- ];
- for (var k in targets)
- {
- for (i in targets[k])
- {
- try {
- this.RDFC.Init(dsource, this.RDF.GetResource(i));
- }
- catch(e) {
- continue;
- }
- nodes = this.RDFC.GetElements();
- while (nodes.hasMoreElements())
- {
- node = nodes.getNext();
- node = node.QueryInterface(Components.interfaces.nsIRDFResource);
- targets[k][i][node.Value] = true;
- }
- }
- }
-
- // overlays
- for (i in this.mTarget.overlaysTemp)
- {
- try {
- this.RDFC.Init(dsource, this.RDF.GetResource(i));
- }
- catch(e) {
- continue;
- }
- nodes = this.RDFC.GetElements();
- while (nodes.hasMoreElements())
- {
- node = nodes.getNext();
- node = node.QueryInterface(Components.interfaces.nsIRDFLiteral);
- target = i.replace(/[^:]+:\/\/([^\/]+).+/, 'overlayinfo/$1/content/overlays.rdf');
- if (!this.mTarget.overlays[target])
- this.mTarget.overlays[target] = [];
- if (!this.mTarget.overlays[target][i])
- this.mTarget.overlays[target][i] = [];
- this.mTarget.overlays[target][i][node.Value] = true;
- }
- }
-
- }
-
- return;
- },
-
- // Get an URI from an internal keyword
- getURISpecFromKey : function(aKeyword)
- {
- const DIR = Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsIProperties);
- var dir = DIR.get(aKeyword, Components.interfaces.nsIFile),
- path;
-
- try {
- path = this.IOService.newFileURI(dir).spec;
- }
- catch(e) { // [[interchangeability for Mozilla 1.1]]
- path = this.IOService.getURLSpecFromFile(dir);
- }
-
- return path;
- },
-
- getURI : function(aKeyword) // old implementation
- {
- return this.getURISpecFromKey(aKeyword);
- },
-
- // Convert an URI to a file path
- getFilePathFromURLSpec : function(aURL)
- {
- var url = Components.classes['@mozilla.org/network/standard-url;1'].createInstance(Components.interfaces.nsIURI);
- url.spec = aURL;
-
- if (!url.schemeIs('file')) return '';
-
- var tempLocalFile;
- try {
- var fileHandler = this.IOService.getProtocolHandler('file').QueryInterface(Components.interfaces.nsIFileProtocolHandler);
- tempLocalFile = fileHandler.getFileFromURLSpec(aURL);
- }
- catch(e) { // [[interchangeability for Mozilla 1.1]]
- try {
- tempLocalFile = this.IOService.getFileFromURLSpec(aURL);
- }
- catch(ex) { // [[interchangeability for Mozilla 1.0.x]]
- tempLocalFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
- this.IOService.initFileFromURLSpec(tempLocalFile, aURL);
- }
- }
- return tempLocalFile.path;
- },
-
- getFilePathFromURI : function(aURI) // old implementation
- {
- return this.getFilePathFromURLSpec(aURI);
- },
-
- // Convert a file path to an URI
- getURLSpecFromFilePath : function(aPath)
- {
- var tempLocalFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
- tempLocalFile.initWithPath(aPath);
-
- try {
- return this.IOService.newFileURI(tempLocalFile).spec;
- }
- catch(e) { // [[interchangeability for Mozilla 1.1]]
- return this.IOService.getURLSpecFromFile(tempLocalFile);
- }
- },
-
- // does exist the file?
- exists : function(aFilePathOrURL)
- {
- if (aFilePathOrURL.match(/^file:/))
- aFilePathOrURL = this.getFilePathFromURLSpec(aFilePathOrURL);
-
- var tempLocalFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
- tempLocalFile.initWithPath(aFilePathOrURL);
- return tempLocalFile.exists();
- },
-
- // Unregister information
- unregister : function()
- {
-
- // packages unregisteration
- for (i in this.mTarget.packages)
- {
- this.removeResources(this.Chrome+'chrome.rdf', 'urn:mozilla:package:root', this.mTarget.packages);
- this.removeResources(this.UChrome+'chrome.rdf', 'urn:mozilla:package:root', this.mTarget.packages);
- this.removeResources(this.Chrome+'all-packages.rdf', 'urn:mozilla:package:root', this.mTarget.packages);
- }
-
- // locales unregistration
- for (i in this.mTarget.locales)
- {
- this.removeResources(this.Chrome+'chrome.rdf', i, this.mTarget.locales[i]);
- this.removeResources(this.UChrome+'chrome.rdf', i, this.mTarget.locales[i]);
- this.removeResources(this.Chrome+'all-locales.rdf', i, this.mTarget.locales[i]);
- }
-
- // skins unregistration
- for (i in this.mTarget.skins)
- {
- this.removeResources(this.Chrome+'chrome.rdf', i, this.mTarget.skins[i]);
- this.removeResources(this.UChrome+'chrome.rdf', i, this.mTarget.skins[i]);
- this.removeResources(this.Chrome+'all-skins.rdf', i, this.mTarget.skins[i]);
- }
-
- // overlays unregistration
- for (i in this.mTarget.overlays)
- for (j in this.mTarget.overlays[i])
- {
- this.removeResources(this.Chrome+i, j, this.mTarget.overlays[i][j]);
- this.removeResources(this.UChrome+i, j, this.mTarget.overlays[i][j]);
- }
-
-
-
- // remove entries from installed-chrome.txt
- var installedChrome = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
- installedChrome.initWithPath(this.getFilePathFromURLSpec(this.Chrome+'installed-chrome.txt'));
-
- var entries = this.readFrom(installedChrome);
- var regexp = new RegExp();
- for (i in this.mEntriesURL)
- entries = entries.replace(regexp.compile('[^\\n\\r]+'+this.mEntriesURL[i]+'[\\n\\r]+', 'g'), '');
- this.writeTo(installedChrome, entries);
-
-
- return;
- },
-
- // Remove info from RDF files
- removeResources : function(aDsourcePath, aRootURI, aTargets)
- {
- var dsource;
- try {
- dsource = this.RDF.GetDataSource(aDsourcePath);
- dsource = dsource.QueryInterface(Components.interfaces.nsIRDFDataSource);
- }
- catch(e) {
- return;
- }
-
- try {
- this.RDFC.Init(dsource, this.RDF.GetResource(aRootURI));
- }
- catch(e) {
-// dump('ERROR: cannot remove resources in '+rootnode);
- return;
- }
-
- var nodes = this.RDFC.GetElements(),
- node,
- removenode,
- removenodes = [],
- removename,
- removenames,
- removevalue;
-
- while (nodes.hasMoreElements())
- {
- node = nodes.getNext();
- try {
- node = node.QueryInterface(Components.interfaces.nsIRDFResource);
- }
- catch(e) {
- node = node.QueryInterface(Components.interfaces.nsIRDFLiteral);
- }
-
- if (!node || (aTargets && !aTargets[node.Value])) continue;
-
- try {
- removenode = (aDsourcePath.match(/overlays\.rdf$/)) ? this.RDF.GetLiteral(node.Value) : this.RDF.GetResource(node.Value) ;
-
- removenodes.push(removenode);
-
- // If the file is "overlays.rdf", then this block is skipped.
- try {
- removenames = dsource.ArcLabelsOut(removenode);
- while (removenames.hasMoreElements())
- {
- removename = removenames.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
- removevalue = dsource.GetTarget(removenode, removename, true);
- if (removename.Value.match(/#baseURL$/))
- this.mEntriesURL.push(removevalue.QueryInterface(Components.interfaces.nsIRDFLiteral).Value);
-
- dsource.Unassert(removenode, removename, removevalue);
- }
- }
- catch(e) {
- }
- }
- catch(e) {
-// dump('cannot remove '+node.Value+' from '+rooturi);
- }
- }
-
- for (var i in removenodes)
- this.RDFC.RemoveElement(removenodes[i], true);
-
- // remove empty container from "overlays.rdf"
- if (!this.RDFC.GetCount()) {
- removenames = dsource.ArcLabelsOut(this.RDFC.Resource);
- while (removenames.hasMoreElements())
- {
- removename = removenames.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
- removevalue = dsource.GetTarget(this.RDFC.Resource, removename, true);
- dsource.Unassert(this.RDFC.Resource, removename, removevalue);
- }
- }
-
- dsource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush();
- return;
- },
-
- // Remove all user preferences containing the argument "branch" in the top of the name.
- removePrefs : function(aBranch)
- {
- //const Prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefService).getBranch(branch+'.');
- const Prefs = Components.classes['@mozilla.org/preferences;1'].getService(Components.interfaces.nsIPrefBranch);
-
- try {
- var prefs = Prefs.getChildList(aBranch+'.', { value: 0 });
- for (var i in prefs) Prefs.clearUserPref(prefs[i]);
- }
- catch(e) {
-// dump('ERROR: cannot clear user preferences.');
- }
-
- return;
- },
-
- // File I/O
-
- readFrom : function(aFile)
- {
- var stream = Components.classes['@mozilla.org/network/file-input-stream;1'].createInstance(Components.interfaces.nsIFileInputStream);
- stream.init(aFile, 1, 0, false); // open as "read only"
-
- var scriptableStream = Components.classes['@mozilla.org/scriptableinputstream;1'].createInstance(Components.interfaces.nsIScriptableInputStream);
- scriptableStream.init(stream);
-
- var fileSize = scriptableStream.available();
- var fileContents = scriptableStream.read(fileSize);
-
- scriptableStream.close();
- stream.close();
-
- return fileContents;
- },
-
- writeTo : function(aFile, aContent)
- {
- if (aFile.exists()) aFile.remove(true);
- aFile.create(aFile.NORMAL_FILE_TYPE, 0666);
-
- var stream = Components.classes['@mozilla.org/network/file-output-stream;1'].createInstance(Components.interfaces.nsIFileOutputStream);
- stream.init(aFile, 2, 0x200, false); // open as "write only"
-
- stream.write(aContent, aContent.length);
-
- stream.close();
- }
-
-}
-
+/*
+"exUnregisterer", the automatic unregisterer (Ver.0.4.2003041301)
+
+exapmle:
+
+>var unreg = new exUnregisterer(
+> 'chrome://my_app/content/contents.rdf',
+> 'jar:%chromeFolder%my_app.jar!/locale/en-US/contents.rdf'
+> );
+>
+>unreg.unregister(); // unregister all files
+>unreg.removePrefs('my_app'); // remove all prefs ('my_app.XXXX.XXXXX', 'my_app.YYYY.ZZZZ', and so on)
+
+
+This class has following properties and methods:
+
+Chrome : the URI of the chrome directory in Mozilla
+ installed.
+UChrome and UChrm : the URI of the chrome directory in the current
+ profile.
+unregister() : executes unregisteration.
+removePrefs(aBranch) : removes all preferences which include the handled
+ name.
+readFrom(aFile) : reads a text file and returns the content as
+ a string.
+writeTo(aFile, aContent) : writes a text file with a string.
+
+
+When you create an instance of this class, you can use "%chromeFolder%"
+to point two "chrome" folders, in the directory Mozilla was installed in
+and in the profile directory.
+
+
+
+*/
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the exUnregisterer.
+ *
+ * The Initial Developer of the Original Code is SHIMODA Hiroshi.
+ * Portions created by the Initial Developer are Copyright (C) 2002-2003
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): SHIMODA Hiroshi <piro at p.club.ne.jp>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+
+
+function exUnregisterer()
+{
+ this.init(arguments);
+ delete this.mTarget.overlaysTemp;
+}
+
+exUnregisterer.prototype =
+{
+
+ // properties
+
+ mTarget :
+ {
+ packages : [],
+ locales : [],
+ skins : [],
+ overlays : [],
+ overlaysTemp : []
+ },
+
+ mEntriesURL : [],
+
+ get Chrome()
+ {
+ if (!this._Chrome) {
+ this._Chrome = this.getURISpecFromKey('AChrom');
+ if (!this._Chrome.match(/\/$/)) this._Chrome += '/';
+ }
+ return this._Chrome;
+ },
+ _Chrome : null,
+
+ get UChrome()
+ {
+ if (!this._UChrome) {
+ this._UChrome = this.getURISpecFromKey('UChrm');
+ if (!this._UChrome.match(/\/$/)) this._UChrome += '/';
+ }
+ return this._UChrome;
+ },
+ _UChrome : null,
+
+ get UChrm()
+ {
+ return this.UChrome;
+ },
+
+ get IOService()
+ {
+ if (!this._IOService) {
+ this._IOService = Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService);
+ }
+ return this._IOService;
+ },
+ _IOService : null,
+
+ get RDF()
+ {
+ if (!this._RDF) {
+ this._RDF = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService(Components.interfaces.nsIRDFService);
+ }
+ return this._RDF;
+ },
+ _RDF : null,
+
+ get RDFC()
+ {
+ if (!this._RDFC) {
+ this._RDFC = Components.classes['@mozilla.org/rdf/container;1'].createInstance(Components.interfaces.nsIRDFContainer);
+ }
+ return this._RDFC;
+ },
+ _RDFC : null,
+
+ // Initialize
+ init : function(aDsourcePaths)
+ {
+ var rootnode =
+ {
+ packages : 'urn:mozilla:package:root',
+ locales : 'urn:mozilla:locale:root',
+ skins : 'urn:mozilla:skin:root',
+ overlays : 'urn:mozilla:overlays'
+ },
+ dsource,
+ dsourcePaths = [],
+ i,
+ nodes,
+ node,
+ target;
+
+ for (i = 0; i < aDsourcePaths.length; i++)
+ {
+ if (aDsourcePaths[i].match(/%chromeFolder%/i)) {
+ dsourcePaths.push(aDsourcePaths[i].replace(/%chromeFolder%/gi, this.Chrome));
+ dsourcePaths.push(aDsourcePaths[i].replace(/%chromeFolder%/gi, this.UChrome));
+ }
+ else
+ dsourcePaths.push(aDsourcePaths[i]);
+ }
+
+ for (var j = 0; j < dsourcePaths.length; j++)
+ {
+ try {
+ if (this.RDF.GetDataSourceBlocking)
+ dsource = this.RDF.GetDataSourceBlocking(dsourcePaths[j]).QueryInterface(Components.interfaces.nsIRDFDataSource);
+ else
+ dsource = this.RDF.GetDataSource(dsourcePaths[j]);
+ }
+ catch(e) {
+ continue;
+ }
+
+ for (i in rootnode)
+ {
+ try {
+ this.RDFC.Init(dsource, this.RDF.GetResource(rootnode[i]));
+ }
+ catch(e) {
+ continue;
+ }
+
+ nodes = this.RDFC.GetElements();
+ while (nodes.hasMoreElements())
+ {
+ node = nodes.getNext();
+ node = node.QueryInterface(Components.interfaces.nsIRDFResource);
+ target = node.Value;
+ switch(i)
+ {
+ case 'locales':
+ case 'skins':
+ target += ':packages';
+ if (!this.mTarget[i][target])
+ this.mTarget[i][target] = [];
+ break;
+
+ case 'overlays':
+ if (!this.mTarget[i+'Temp'][target])
+ this.mTarget[i+'Temp'][target] = [];
+ break;
+
+ default:
+ this.mTarget[i][target] = true;
+ break;
+ }
+ }
+ }
+
+
+ var targets =
+ [
+ this.mTarget.locales,
+ this.mTarget.skins
+ ];
+ for (var k in targets)
+ {
+ for (i in targets[k])
+ {
+ try {
+ this.RDFC.Init(dsource, this.RDF.GetResource(i));
+ }
+ catch(e) {
+ continue;
+ }
+ nodes = this.RDFC.GetElements();
+ while (nodes.hasMoreElements())
+ {
+ node = nodes.getNext();
+ node = node.QueryInterface(Components.interfaces.nsIRDFResource);
+ targets[k][i][node.Value] = true;
+ }
+ }
+ }
+
+ // overlays
+ for (i in this.mTarget.overlaysTemp)
+ {
+ try {
+ this.RDFC.Init(dsource, this.RDF.GetResource(i));
+ }
+ catch(e) {
+ continue;
+ }
+ nodes = this.RDFC.GetElements();
+ while (nodes.hasMoreElements())
+ {
+ node = nodes.getNext();
+ node = node.QueryInterface(Components.interfaces.nsIRDFLiteral);
+ target = i.replace(/[^:]+:\/\/([^\/]+).+/, 'overlayinfo/$1/content/overlays.rdf');
+ if (!this.mTarget.overlays[target])
+ this.mTarget.overlays[target] = [];
+ if (!this.mTarget.overlays[target][i])
+ this.mTarget.overlays[target][i] = [];
+ this.mTarget.overlays[target][i][node.Value] = true;
+ }
+ }
+
+ }
+
+ return;
+ },
+
+ // Get an URI from an internal keyword
+ getURISpecFromKey : function(aKeyword)
+ {
+ const DIR = Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsIProperties);
+ var dir = DIR.get(aKeyword, Components.interfaces.nsIFile),
+ path;
+
+ try {
+ path = this.IOService.newFileURI(dir).spec;
+ }
+ catch(e) { // [[interchangeability for Mozilla 1.1]]
+ path = this.IOService.getURLSpecFromFile(dir);
+ }
+
+ return path;
+ },
+
+ getURI : function(aKeyword) // old implementation
+ {
+ return this.getURISpecFromKey(aKeyword);
+ },
+
+ // Convert an URI to a file path
+ getFilePathFromURLSpec : function(aURL)
+ {
+ var url = Components.classes['@mozilla.org/network/standard-url;1'].createInstance(Components.interfaces.nsIURI);
+ url.spec = aURL;
+
+ if (!url.schemeIs('file')) return '';
+
+ var tempLocalFile;
+ try {
+ var fileHandler = this.IOService.getProtocolHandler('file').QueryInterface(Components.interfaces.nsIFileProtocolHandler);
+ tempLocalFile = fileHandler.getFileFromURLSpec(aURL);
+ }
+ catch(e) { // [[interchangeability for Mozilla 1.1]]
+ try {
+ tempLocalFile = this.IOService.getFileFromURLSpec(aURL);
+ }
+ catch(ex) { // [[interchangeability for Mozilla 1.0.x]]
+ tempLocalFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
+ this.IOService.initFileFromURLSpec(tempLocalFile, aURL);
+ }
+ }
+ return tempLocalFile.path;
+ },
+
+ getFilePathFromURI : function(aURI) // old implementation
+ {
+ return this.getFilePathFromURLSpec(aURI);
+ },
+
+ // Convert a file path to an URI
+ getURLSpecFromFilePath : function(aPath)
+ {
+ var tempLocalFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
+ tempLocalFile.initWithPath(aPath);
+
+ try {
+ return this.IOService.newFileURI(tempLocalFile).spec;
+ }
+ catch(e) { // [[interchangeability for Mozilla 1.1]]
+ return this.IOService.getURLSpecFromFile(tempLocalFile);
+ }
+ },
+
+ // does exist the file?
+ exists : function(aFilePathOrURL)
+ {
+ if (aFilePathOrURL.match(/^file:/))
+ aFilePathOrURL = this.getFilePathFromURLSpec(aFilePathOrURL);
+
+ var tempLocalFile = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
+ tempLocalFile.initWithPath(aFilePathOrURL);
+ return tempLocalFile.exists();
+ },
+
+ // Unregister information
+ unregister : function()
+ {
+
+ // packages unregisteration
+ for (i in this.mTarget.packages)
+ {
+ this.removeResources(this.Chrome+'chrome.rdf', 'urn:mozilla:package:root', this.mTarget.packages);
+ this.removeResources(this.UChrome+'chrome.rdf', 'urn:mozilla:package:root', this.mTarget.packages);
+ this.removeResources(this.Chrome+'all-packages.rdf', 'urn:mozilla:package:root', this.mTarget.packages);
+ }
+
+ // locales unregistration
+ for (i in this.mTarget.locales)
+ {
+ this.removeResources(this.Chrome+'chrome.rdf', i, this.mTarget.locales[i]);
+ this.removeResources(this.UChrome+'chrome.rdf', i, this.mTarget.locales[i]);
+ this.removeResources(this.Chrome+'all-locales.rdf', i, this.mTarget.locales[i]);
+ }
+
+ // skins unregistration
+ for (i in this.mTarget.skins)
+ {
+ this.removeResources(this.Chrome+'chrome.rdf', i, this.mTarget.skins[i]);
+ this.removeResources(this.UChrome+'chrome.rdf', i, this.mTarget.skins[i]);
+ this.removeResources(this.Chrome+'all-skins.rdf', i, this.mTarget.skins[i]);
+ }
+
+ // overlays unregistration
+ for (i in this.mTarget.overlays)
+ for (j in this.mTarget.overlays[i])
+ {
+ this.removeResources(this.Chrome+i, j, this.mTarget.overlays[i][j]);
+ this.removeResources(this.UChrome+i, j, this.mTarget.overlays[i][j]);
+ }
+
+
+
+ // remove entries from installed-chrome.txt
+ var installedChrome = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
+ installedChrome.initWithPath(this.getFilePathFromURLSpec(this.Chrome+'installed-chrome.txt'));
+
+ var entries = this.readFrom(installedChrome);
+ var regexp = new RegExp();
+ for (i in this.mEntriesURL)
+ entries = entries.replace(regexp.compile('[^\\n\\r]+'+this.mEntriesURL[i]+'[\\n\\r]+', 'g'), '');
+ this.writeTo(installedChrome, entries);
+
+
+ return;
+ },
+
+ // Remove info from RDF files
+ removeResources : function(aDsourcePath, aRootURI, aTargets)
+ {
+ var dsource;
+ try {
+ dsource = this.RDF.GetDataSource(aDsourcePath);
+ dsource = dsource.QueryInterface(Components.interfaces.nsIRDFDataSource);
+ }
+ catch(e) {
+ return;
+ }
+
+ try {
+ this.RDFC.Init(dsource, this.RDF.GetResource(aRootURI));
+ }
+ catch(e) {
+// dump('ERROR: cannot remove resources in '+rootnode);
+ return;
+ }
+
+ var nodes = this.RDFC.GetElements(),
+ node,
+ removenode,
+ removenodes = [],
+ removename,
+ removenames,
+ removevalue;
+
+ while (nodes.hasMoreElements())
+ {
+ node = nodes.getNext();
+ try {
+ node = node.QueryInterface(Components.interfaces.nsIRDFResource);
+ }
+ catch(e) {
+ node = node.QueryInterface(Components.interfaces.nsIRDFLiteral);
+ }
+
+ if (!node || (aTargets && !aTargets[node.Value])) continue;
+
+ try {
+ removenode = (aDsourcePath.match(/overlays\.rdf$/)) ? this.RDF.GetLiteral(node.Value) : this.RDF.GetResource(node.Value) ;
+
+ removenodes.push(removenode);
+
+ // If the file is "overlays.rdf", then this block is skipped.
+ try {
+ removenames = dsource.ArcLabelsOut(removenode);
+ while (removenames.hasMoreElements())
+ {
+ removename = removenames.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
+ removevalue = dsource.GetTarget(removenode, removename, true);
+ if (removename.Value.match(/#baseURL$/))
+ this.mEntriesURL.push(removevalue.QueryInterface(Components.interfaces.nsIRDFLiteral).Value);
+
+ dsource.Unassert(removenode, removename, removevalue);
+ }
+ }
+ catch(e) {
+ }
+ }
+ catch(e) {
+// dump('cannot remove '+node.Value+' from '+rooturi);
+ }
+ }
+
+ for (var i in removenodes)
+ this.RDFC.RemoveElement(removenodes[i], true);
+
+ // remove empty container from "overlays.rdf"
+ if (!this.RDFC.GetCount()) {
+ removenames = dsource.ArcLabelsOut(this.RDFC.Resource);
+ while (removenames.hasMoreElements())
+ {
+ removename = removenames.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
+ removevalue = dsource.GetTarget(this.RDFC.Resource, removename, true);
+ dsource.Unassert(this.RDFC.Resource, removename, removevalue);
+ }
+ }
+
+ dsource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush();
+ return;
+ },
+
+ // Remove all user preferences containing the argument "branch" in the top of the name.
+ removePrefs : function(aBranch)
+ {
+ //const Prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefService).getBranch(branch+'.');
+ const Prefs = Components.classes['@mozilla.org/preferences;1'].getService(Components.interfaces.nsIPrefBranch);
+
+ try {
+ var prefs = Prefs.getChildList(aBranch+'.', { value: 0 });
+ for (var i in prefs) Prefs.clearUserPref(prefs[i]);
+ }
+ catch(e) {
+// dump('ERROR: cannot clear user preferences.');
+ }
+
+ return;
+ },
+
+ // File I/O
+
+ readFrom : function(aFile)
+ {
+ var stream = Components.classes['@mozilla.org/network/file-input-stream;1'].createInstance(Components.interfaces.nsIFileInputStream);
+ stream.init(aFile, 1, 0, false); // open as "read only"
+
+ var scriptableStream = Components.classes['@mozilla.org/scriptableinputstream;1'].createInstance(Components.interfaces.nsIScriptableInputStream);
+ scriptableStream.init(stream);
+
+ var fileSize = scriptableStream.available();
+ var fileContents = scriptableStream.read(fileSize);
+
+ scriptableStream.close();
+ stream.close();
+
+ return fileContents;
+ },
+
+ writeTo : function(aFile, aContent)
+ {
+ if (aFile.exists()) aFile.remove(true);
+ aFile.create(aFile.NORMAL_FILE_TYPE, 0666);
+
+ var stream = Components.classes['@mozilla.org/network/file-output-stream;1'].createInstance(Components.interfaces.nsIFileOutputStream);
+ stream.init(aFile, 2, 0x200, false); // open as "write only"
+
+ stream.write(aContent, aContent.length);
+
+ stream.close();
+ }
+
+}
+
diff --git a/src/sage/content/settings/settings.js b/src/sage/content/settings/settings.js
index db735c0..7bc27bb 100755
--- a/src/sage/content/settings/settings.js
+++ b/src/sage/content/settings/settings.js
@@ -1,132 +1,132 @@
-
-var sageFolderID;
-
-var chkUserCssEnable;
-var txtUserCssPath;
-var chkAllowEContent;
-var chkAutoFeedTitle;
-var chkRenderFeeds;
-var chkTwelveHourClock;
-var feedItemOrder;
-var feedDiscoveryMode;
-
-var gList;
-var gNameArc;
-var strRes // stringbundle �I�u�W�F�N�g
-
-function init() {
- initServices();
- initBMService();
-
- strRes = document.getElementById("strRes");
-
- sageFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", "NC:BookmarksRoot");
- gNameArc = RDF.GetResource(NC_NS + "Name");
- gList = document.getElementById("select-menu");
-
- chkUserCssEnable = document.getElementById("chkUserCssEnable");
- chkUserCssEnable.checked = CommonFunc.getPrefValue(CommonFunc.USER_CSS_ENABLE, "bool", false);
-
- txtUserCssPath = document.getElementById("txtUserCssPath");
- txtUserCssPath.value = CommonFunc.getPrefValue(CommonFunc.USER_CSS_PATH, "wstr", "");
-
- chkAllowEContent = document.getElementById("chkAllowEContent");
- chkAllowEContent.checked = CommonFunc.getPrefValue(CommonFunc.ALLOW_ENCODED_CONTENT, "bool", true);
-
- chkAutoFeedTitle = document.getElementById("chkAutoFeedTitle");
- chkAutoFeedTitle.checked = CommonFunc.getPrefValue(CommonFunc.AUTO_FEED_TITLE, "bool", true);
-
- chkRenderFeeds = document.getElementById("chkRenderFeeds");
- chkRenderFeeds.checked = CommonFunc.getPrefValue(CommonFunc.RENDER_FEEDS, "bool", true);
-
- chkTwelveHourClock = document.getElementById("chkTwelveHourClock");
- chkTwelveHourClock.checked = CommonFunc.getPrefValue(CommonFunc.TWELVE_HOUR_CLOCK, "bool", false);
-
- feedItemOrder = document.getElementById("feedItemOrder");
- feedItemOrder.value = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
-
- feedDiscoveryMode = document.getElementById("feedDiscoveryMode");
- feedDiscoveryMode.value = CommonFunc.getPrefValue(CommonFunc.FEED_DISCOVERY_MODE, "str", "exhaustive");
-
- setDisabled();
-
- setTimeout(fillSelectFolderMenupopup, 0);
-}
-
-function accept() {
- CommonFunc.setPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", sageFolderID);
- CommonFunc.setPrefValue(CommonFunc.USER_CSS_ENABLE, "bool", chkUserCssEnable.checked);
- CommonFunc.setPrefValue(CommonFunc.USER_CSS_PATH, "wstr", txtUserCssPath.value);
- CommonFunc.setPrefValue(CommonFunc.ALLOW_ENCODED_CONTENT, "bool", chkAllowEContent.checked);
- CommonFunc.setPrefValue(CommonFunc.AUTO_FEED_TITLE, "bool", chkAutoFeedTitle.checked);
- CommonFunc.setPrefValue(CommonFunc.RENDER_FEEDS, "bool", chkRenderFeeds.checked);
- CommonFunc.setPrefValue(CommonFunc.TWELVE_HOUR_CLOCK, "bool", chkTwelveHourClock.checked);
- CommonFunc.setPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", feedItemOrder.value);
- CommonFunc.setPrefValue(CommonFunc.FEED_DISCOVERY_MODE, "str", feedDiscoveryMode.value);
-}
-
-function selectFolder(aEvent){
- sageFolderID = aEvent.target.id;
-}
-
-function setDisabled() {
- txtUserCssPath.disabled = !chkUserCssEnable.checked;
- document.getElementById("btnBrowseCss").disabled = !chkUserCssEnable.checked;
-}
-
-function browseCss() {
- var fpicker = Components.classes["@mozilla.org/filepicker;1"]
- .createInstance(Components.interfaces.nsIFilePicker);
- fpicker.init(window, "Select CSS File", fpicker.modeOpen);
- fpicker.appendFilter("CSS File(*.css)", "*.css");
- fpicker.appendFilters(fpicker.filterAll);
-
- var showResult = fpicker.show();
- if(showResult == fpicker.returnOK) {
- txtUserCssPath.value = fpicker.file.path;
- }
-}
-
-function fillSelectFolderMenupopup () {
- var popup = document.getElementById("select-folder");
-
- // clearing the old menupopup
- while (popup.hasChildNodes()) {
- popup.removeChild(popup.firstChild);
- }
-
- // to be removed once I checkin the top folder
- var element = document.createElementNS(XUL_NS, "menuitem");
- element.setAttribute("label", "Bookmarks");
- element.setAttribute("id", "NC:BookmarksRoot");
- popup.appendChild(element);
-
- var folder = RDF.GetResource("NC:BookmarksRoot");
- fillFolder(popup, folder, 1);
- if(gList.selectedIndex == -1) {
- gList.selectedIndex = 0;
- sageFolderID = "NC:BookmarksRoot";
- }
-}
-
-function fillFolder(aPopup, aFolder, aDepth) {
- RDFC.Init(BMDS, aFolder);
- var children = RDFC.GetElements();
- while (children.hasMoreElements()) {
- var curr = children.getNext();
- if (RDFCU.IsContainer(BMDS, curr)) {
- curr = curr.QueryInterface(Components.interfaces.nsIRDFResource);
- var element = document.createElementNS(XUL_NS, "menuitem");
- var name = BMDS.GetTarget(curr, gNameArc, true).QueryInterface(kRDFLITIID).Value;
- var indentation = new Array(aDepth + 1).join(" ");
- element.setAttribute("label", indentation + name);
- element.setAttribute("id", curr.Value);
- aPopup.appendChild(element);
- if (curr.Value == sageFolderID) {
- gList.selectedItem = element;
- }
- fillFolder(aPopup, curr, ++aDepth);
- --aDepth;
- }
- }
-}
+
+var sageFolderID;
+
+var chkUserCssEnable;
+var txtUserCssPath;
+var chkAllowEContent;
+var chkAutoFeedTitle;
+var chkRenderFeeds;
+var chkTwelveHourClock;
+var feedItemOrder;
+var feedDiscoveryMode;
+
+var gList;
+var gNameArc;
+var strRes // stringbundle �I�u�W�F�N�g
+
+function init() {
+ initServices();
+ initBMService();
+
+ strRes = document.getElementById("strRes");
+
+ sageFolderID = CommonFunc.getPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", "NC:BookmarksRoot");
+ gNameArc = RDF.GetResource(NC_NS + "Name");
+ gList = document.getElementById("select-menu");
+
+ chkUserCssEnable = document.getElementById("chkUserCssEnable");
+ chkUserCssEnable.checked = CommonFunc.getPrefValue(CommonFunc.USER_CSS_ENABLE, "bool", false);
+
+ txtUserCssPath = document.getElementById("txtUserCssPath");
+ txtUserCssPath.value = CommonFunc.getPrefValue(CommonFunc.USER_CSS_PATH, "wstr", "");
+
+ chkAllowEContent = document.getElementById("chkAllowEContent");
+ chkAllowEContent.checked = CommonFunc.getPrefValue(CommonFunc.ALLOW_ENCODED_CONTENT, "bool", true);
+
+ chkAutoFeedTitle = document.getElementById("chkAutoFeedTitle");
+ chkAutoFeedTitle.checked = CommonFunc.getPrefValue(CommonFunc.AUTO_FEED_TITLE, "bool", true);
+
+ chkRenderFeeds = document.getElementById("chkRenderFeeds");
+ chkRenderFeeds.checked = CommonFunc.getPrefValue(CommonFunc.RENDER_FEEDS, "bool", true);
+
+ chkTwelveHourClock = document.getElementById("chkTwelveHourClock");
+ chkTwelveHourClock.checked = CommonFunc.getPrefValue(CommonFunc.TWELVE_HOUR_CLOCK, "bool", false);
+
+ feedItemOrder = document.getElementById("feedItemOrder");
+ feedItemOrder.value = CommonFunc.getPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", "chrono");
+
+ feedDiscoveryMode = document.getElementById("feedDiscoveryMode");
+ feedDiscoveryMode.value = CommonFunc.getPrefValue(CommonFunc.FEED_DISCOVERY_MODE, "str", "exhaustive");
+
+ setDisabled();
+
+ setTimeout(fillSelectFolderMenupopup, 0);
+}
+
+function accept() {
+ CommonFunc.setPrefValue(CommonFunc.RSS_READER_FOLDER_ID, "str", sageFolderID);
+ CommonFunc.setPrefValue(CommonFunc.USER_CSS_ENABLE, "bool", chkUserCssEnable.checked);
+ CommonFunc.setPrefValue(CommonFunc.USER_CSS_PATH, "wstr", txtUserCssPath.value);
+ CommonFunc.setPrefValue(CommonFunc.ALLOW_ENCODED_CONTENT, "bool", chkAllowEContent.checked);
+ CommonFunc.setPrefValue(CommonFunc.AUTO_FEED_TITLE, "bool", chkAutoFeedTitle.checked);
+ CommonFunc.setPrefValue(CommonFunc.RENDER_FEEDS, "bool", chkRenderFeeds.checked);
+ CommonFunc.setPrefValue(CommonFunc.TWELVE_HOUR_CLOCK, "bool", chkTwelveHourClock.checked);
+ CommonFunc.setPrefValue(CommonFunc.FEED_ITEM_ORDER, "str", feedItemOrder.value);
+ CommonFunc.setPrefValue(CommonFunc.FEED_DISCOVERY_MODE, "str", feedDiscoveryMode.value);
+}
+
+function selectFolder(aEvent){
+ sageFolderID = aEvent.target.id;
+}
+
+function setDisabled() {
+ txtUserCssPath.disabled = !chkUserCssEnable.checked;
+ document.getElementById("btnBrowseCss").disabled = !chkUserCssEnable.checked;
+}
+
+function browseCss() {
+ var fpicker = Components.classes["@mozilla.org/filepicker;1"]
+ .createInstance(Components.interfaces.nsIFilePicker);
+ fpicker.init(window, "Select CSS File", fpicker.modeOpen);
+ fpicker.appendFilter("CSS File(*.css)", "*.css");
+ fpicker.appendFilters(fpicker.filterAll);
+
+ var showResult = fpicker.show();
+ if(showResult == fpicker.returnOK) {
+ txtUserCssPath.value = fpicker.file.path;
+ }
+}
+
+function fillSelectFolderMenupopup () {
+ var popup = document.getElementById("select-folder");
+
+ // clearing the old menupopup
+ while (popup.hasChildNodes()) {
+ popup.removeChild(popup.firstChild);
+ }
+
+ // to be removed once I checkin the top folder
+ var element = document.createElementNS(XUL_NS, "menuitem");
+ element.setAttribute("label", "Bookmarks");
+ element.setAttribute("id", "NC:BookmarksRoot");
+ popup.appendChild(element);
+
+ var folder = RDF.GetResource("NC:BookmarksRoot");
+ fillFolder(popup, folder, 1);
+ if(gList.selectedIndex == -1) {
+ gList.selectedIndex = 0;
+ sageFolderID = "NC:BookmarksRoot";
+ }
+}
+
+function fillFolder(aPopup, aFolder, aDepth) {
+ RDFC.Init(BMDS, aFolder);
+ var children = RDFC.GetElements();
+ while (children.hasMoreElements()) {
+ var curr = children.getNext();
+ if (RDFCU.IsContainer(BMDS, curr)) {
+ curr = curr.QueryInterface(Components.interfaces.nsIRDFResource);
+ var element = document.createElementNS(XUL_NS, "menuitem");
+ var name = BMDS.GetTarget(curr, gNameArc, true).QueryInterface(kRDFLITIID).Value;
+ var indentation = new Array(aDepth + 1).join(" ");
+ element.setAttribute("label", indentation + name);
+ element.setAttribute("id", curr.Value);
+ aPopup.appendChild(element);
+ if (curr.Value == sageFolderID) {
+ gList.selectedItem = element;
+ }
+ fillFolder(aPopup, curr, ++aDepth);
+ --aDepth;
+ }
+ }
+}
diff --git a/src/sage/content/updatechecker.js b/src/sage/content/updatechecker.js
index 5273c6c..c36f07a 100755
--- a/src/sage/content/updatechecker.js
+++ b/src/sage/content/updatechecker.js
@@ -1,151 +1,151 @@
-var UpdateChecker = {
- checking: false,
- checkList: null,
- httpReq: null,
- lastResource: null,
-
- startCheck: function(aCheckFolderId) {
- if(this.checking) return;
-
- var resourceList = CommonFunc.getBMDSCChildren(aCheckFolderId);
- this.checkList = new Array();
-
- // Delete separator and updeed resource
- for(var i = 0; i < resourceList.length; i++) {
- var url = CommonFunc.getBMDSProperty(resourceList[i], CommonFunc.BM_URL);
- var desc = CommonFunc.getBMDSProperty(resourceList[i], CommonFunc.BM_DESCRIPTION);
- var status = desc.split(" ")[0];
- if(url && !(status == CommonFunc.STATUS_UPDATE || status == CommonFunc.STATUS_NO_CHECK)) {
- this.checkList.push(resourceList[i]);
- }
- }
-
- logMessage("checking " + this.checkList.length + " feed(s)");
-
- this.checking = true;
- this.check();
- },
-
- done: function() {
- if(this.checking) {
- this.httpReq.abort();
- }
- },
-
- check: function() {
- this.lastResource = this.checkList.shift();
- var name = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_NAME);
- var url = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_URL);
-
- if(!url) {
- this.checkResult(false, 0);
- }
-
- if(this.httpReq) {
- this.httpReq.abort();
- }
-
- this.httpReq = new XMLHttpRequest();
- this.httpReq.parent = this;
-
- this.httpReq.open("GET", url);
-
- this.httpReq.onload = this.httpLoaded;
- this.httpReq.onerror = this.httpError;
- this.httpReq.onreadystatechange = this.httpReadyStateChange;
-
- try {
- this.httpReq.setRequestHeader("User-Agent", USER_AGENT);
- this.httpReq.overrideMimeType("application/xml");
- this.httpReq.send(null);
- this.onCheck(name, url);
- } catch(e) {
- // FAILURE
- this.httpReq.abort();
- this.checkResult(false, 0);
- }
- },
-
- httpError: function(e) {
- logMessage("HTTP Error: " + e.target.status + " - " + e.target.statusText);
- UpdateChecker.httpReq.abort();
- UpdateChecker.checkResult(false, 0);
- },
-
- httpReadyStateChange: function() {
- if(UpdateChecker.httpReq.readyState == 2) {
- try {
- UpdateChecker.httpReq.status;
- } catch(e) {
- // URL NOT AVAILABLE
- UpdateChecker.httpReq.abort();
- UpdateChecker.checkResult(false, 0);
- }
- }
- },
-
- httpLoaded: function(e) {
- var lastModified = 0;
-
- try {
- var feed = new Feed(UpdateChecker.httpReq.responseXML);
- } catch(e) {
- UpdateChecker.checkResult(false, 0);
- return;
- }
-
- if(feed.hasLastPubDate()) {
- lastModified = feed.getLastPubDate().getTime();
- }
-
- UpdateChecker.checkResult(true, lastModified, feed);
- },
-
- checkResult: function(aSucceed, aLastModified, feed) {
- var name = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_NAME);
- var url = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_URL);
- var status = 0;
-
- var lastVisit = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_LAST_VISIT);
- if(!lastVisit) {
- lastVisit = 0;
- } else {
- lastVisit /= 1000;
- }
-
- if(aSucceed) {
- var sig = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_DESCRIPTION).match(/\[.*\]/);
- if(aLastModified) {
- if((aLastModified > lastVisit) && (sig != feed.getSignature())) {
- status = CommonFunc.STATUS_UPDATE;
- } else {
- status = CommonFunc.STATUS_NO_UPDATE;
- }
- } else {
- if(sig != feed.getSignature()) {
- //logMessage("signature mismatch: " + feed.getTitle() + "; old sig: " + sig + " new sig: " + feed.getSignature());
- status = CommonFunc.STATUS_UPDATE;
- } else {
- status = CommonFunc.STATUS_NO_UPDATE;
- }
- }
- } else {
- status = CommonFunc.STATUS_ERROR;
- }
-
- CommonFunc.setBMDSProperty(this.lastResource, CommonFunc.BM_DESCRIPTION, status + " " + CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_DESCRIPTION).match(/\[.*\]/));
-
- if(this.checkList.length == 0) {
- this.checking = false;
- this.onChecked(name, url);
- return;
- } else {
- this.check();
- }
- },
-
-
- onCheck: function(aName, aURL) {},
- onChecked: function(aName, aURL) {}
-
+var UpdateChecker = {
+ checking: false,
+ checkList: null,
+ httpReq: null,
+ lastResource: null,
+
+ startCheck: function(aCheckFolderId) {
+ if(this.checking) return;
+
+ var resourceList = CommonFunc.getBMDSCChildren(aCheckFolderId);
+ this.checkList = new Array();
+
+ // Delete separator and updeed resource
+ for(var i = 0; i < resourceList.length; i++) {
+ var url = CommonFunc.getBMDSProperty(resourceList[i], CommonFunc.BM_URL);
+ var desc = CommonFunc.getBMDSProperty(resourceList[i], CommonFunc.BM_DESCRIPTION);
+ var status = desc.split(" ")[0];
+ if(url && !(status == CommonFunc.STATUS_UPDATE || status == CommonFunc.STATUS_NO_CHECK)) {
+ this.checkList.push(resourceList[i]);
+ }
+ }
+
+ logMessage("checking " + this.checkList.length + " feed(s)");
+
+ this.checking = true;
+ this.check();
+ },
+
+ done: function() {
+ if(this.checking) {
+ this.httpReq.abort();
+ }
+ },
+
+ check: function() {
+ this.lastResource = this.checkList.shift();
+ var name = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_NAME);
+ var url = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_URL);
+
+ if(!url) {
+ this.checkResult(false, 0);
+ }
+
+ if(this.httpReq) {
+ this.httpReq.abort();
+ }
+
+ this.httpReq = new XMLHttpRequest();
+ this.httpReq.parent = this;
+
+ this.httpReq.open("GET", url);
+
+ this.httpReq.onload = this.httpLoaded;
+ this.httpReq.onerror = this.httpError;
+ this.httpReq.onreadystatechange = this.httpReadyStateChange;
+
+ try {
+ this.httpReq.setRequestHeader("User-Agent", USER_AGENT);
+ this.httpReq.overrideMimeType("application/xml");
+ this.httpReq.send(null);
+ this.onCheck(name, url);
+ } catch(e) {
+ // FAILURE
+ this.httpReq.abort();
+ this.checkResult(false, 0);
+ }
+ },
+
+ httpError: function(e) {
+ logMessage("HTTP Error: " + e.target.status + " - " + e.target.statusText);
+ UpdateChecker.httpReq.abort();
+ UpdateChecker.checkResult(false, 0);
+ },
+
+ httpReadyStateChange: function() {
+ if(UpdateChecker.httpReq.readyState == 2) {
+ try {
+ UpdateChecker.httpReq.status;
+ } catch(e) {
+ // URL NOT AVAILABLE
+ UpdateChecker.httpReq.abort();
+ UpdateChecker.checkResult(false, 0);
+ }
+ }
+ },
+
+ httpLoaded: function(e) {
+ var lastModified = 0;
+
+ try {
+ var feed = new Feed(UpdateChecker.httpReq.responseXML);
+ } catch(e) {
+ UpdateChecker.checkResult(false, 0);
+ return;
+ }
+
+ if(feed.hasLastPubDate()) {
+ lastModified = feed.getLastPubDate().getTime();
+ }
+
+ UpdateChecker.checkResult(true, lastModified, feed);
+ },
+
+ checkResult: function(aSucceed, aLastModified, feed) {
+ var name = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_NAME);
+ var url = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_URL);
+ var status = 0;
+
+ var lastVisit = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_LAST_VISIT);
+ if(!lastVisit) {
+ lastVisit = 0;
+ } else {
+ lastVisit /= 1000;
+ }
+
+ if(aSucceed) {
+ var sig = CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_DESCRIPTION).match(/\[.*\]/);
+ if(aLastModified) {
+ if((aLastModified > lastVisit) && (sig != feed.getSignature())) {
+ status = CommonFunc.STATUS_UPDATE;
+ } else {
+ status = CommonFunc.STATUS_NO_UPDATE;
+ }
+ } else {
+ if(sig != feed.getSignature()) {
+ //logMessage("signature mismatch: " + feed.getTitle() + "; old sig: " + sig + " new sig: " + feed.getSignature());
+ status = CommonFunc.STATUS_UPDATE;
+ } else {
+ status = CommonFunc.STATUS_NO_UPDATE;
+ }
+ }
+ } else {
+ status = CommonFunc.STATUS_ERROR;
+ }
+
+ CommonFunc.setBMDSProperty(this.lastResource, CommonFunc.BM_DESCRIPTION, status + " " + CommonFunc.getBMDSProperty(this.lastResource, CommonFunc.BM_DESCRIPTION).match(/\[.*\]/));
+
+ if(this.checkList.length == 0) {
+ this.checking = false;
+ this.onChecked(name, url);
+ return;
+ } else {
+ this.check();
+ }
+ },
+
+
+ onCheck: function(aName, aURL) {},
+ onChecked: function(aName, aURL) {}
+
}
\ No newline at end of file
diff --git a/src/sage/locale/de-DE/contents.rdf b/src/sage/locale/de-DE/contents.rdf
index 818dacc..009d15a 100644
--- a/src/sage/locale/de-DE/contents.rdf
+++ b/src/sage/locale/de-DE/contents.rdf
@@ -1,17 +1,17 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:de-DE"/>
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:locale:de-DE">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:locale:de-DE:packages">
- <RDF:li resource="urn:mozilla:locale:de-DE:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:de-DE"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:locale:de-DE">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:de-DE:packages">
+ <RDF:li resource="urn:mozilla:locale:de-DE:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
</RDF:RDF>
\ No newline at end of file
diff --git a/src/sage/locale/de-DE/opml.dtd b/src/sage/locale/de-DE/opml.dtd
index 577ec48..55e25c1 100644
--- a/src/sage/locale/de-DE/opml.dtd
+++ b/src/sage/locale/de-DE/opml.dtd
@@ -1,11 +1,11 @@
-<!ENTITY pageStart.label "OPML Import/Export Assistent">
-<!ENTITY pageStart.desc "Gew�nschte Aktion ausw�hlen">
-<!ENTITY pageImport.label "OPML importieren">
-<!ENTITY pageImport.desc "Zu importierende OPML-Datei ausw�hlen">
-<!ENTITY pageExport.label "OPML exportieren">
-<!ENTITY pageExport.desc "Zu exportierende OPML-Datei ausw�hlen">
-
-<!ENTITY rdoImport.label "OPML importieren">
-<!ENTITY rdoExport.label "OPML exportieren">
-
+<!ENTITY pageStart.label "OPML Import/Export Assistent">
+<!ENTITY pageStart.desc "Gew�nschte Aktion ausw�hlen">
+<!ENTITY pageImport.label "OPML importieren">
+<!ENTITY pageImport.desc "Zu importierende OPML-Datei ausw�hlen">
+<!ENTITY pageExport.label "OPML exportieren">
+<!ENTITY pageExport.desc "Zu exportierende OPML-Datei ausw�hlen">
+
+<!ENTITY rdoImport.label "OPML importieren">
+<!ENTITY rdoExport.label "OPML exportieren">
+
<!ENTITY browseButton.label "Durchsuchen...">
\ No newline at end of file
diff --git a/src/sage/locale/de-DE/sage.dtd b/src/sage/locale/de-DE/sage.dtd
index 17ab193..1d0ae46 100644
--- a/src/sage/locale/de-DE/sage.dtd
+++ b/src/sage/locale/de-DE/sage.dtd
@@ -1,52 +1,52 @@
-<!ENTITY sage.label "Sage">
-<!ENTITY sage.version "1.2.2">
-<!ENTITY sage.version.label "version">
-
-<!ENTITY sage.toolbarLabel "Sage">
-<!ENTITY sage.sidebarTitle "Sage">
-<!ENTITY sage.tooltip "Zeigt Sage an">
-
-<!ENTITY menu.view "Anzeigen">
-<!ENTITY menu.showSearchBar "Suchfenster f�r Feeds anzeigen">
-<!ENTITY menu.showFeedItemList "Inhalts�bersicht der Feeds anzeigen">
-<!ENTITY menu.showDescTooltip "Beschreibungen zu den Tooltips anzeigen">
-<!ENTITY menu.openHTML "Feeds im Hauptfenster anzeigen">
-<!ENTITY menu.tools "Optionen">
-<!ENTITY menu.checkUpdate "Feeds auf Aktualisierungen pr�fen">
-<!ENTITY menu.manageRSSList "Feed-Liste verwalten...">
-<!ENTITY menu.opmlImportExport "OPML Import/Export...">
-<!ENTITY menu.setting "Einstellungen...">
-<!ENTITY menu.sageProjectFeed "Sage Projekt Nachrichten">
-<!ENTITY menu.discoverFeeds "Neue Feeds suchen und finden">
-
-<!-- Feed Discovery -->
-<!ENTITY discovery.status.searching "Aktuelle Seite durchsuchen">
-<!ENTITY discovery.button.addFeed "Feed hinzuf�gen">
-<!ENTITY discovery.button.close "Schlie�en">
-<!ENTITY discovery.header.title "Titel">
-<!ENTITY discovery.header.format "Format">
-<!ENTITY discovery.header.lastPubDate "Letzte Aktualisierung">
-<!ENTITY discovery.header.itemCount "Elemente">
-<!ENTITY discovery.header.url "URL">
-
-<!-- Settings Dialog -->
-<!ENTITY settings.general.caption "Allgemein">
-<!ENTITY settings.autoFeedTitle.label "Feed-Titel automatisch updaten">
-<!ENTITY settings.renderFeeds.label "Feeds im Hauptfenster anzeigen">
-<!ENTITY settings.twelveHourClock.label "12h-Uhrzeiten verwenden">
-<!ENTITY settings.feedItemOrder.label "Anordnung der Feed-Elemente">
-<!ENTITY settings.feedItemOrder.chrono "chronologisch">
-<!ENTITY settings.feedItemOrder.source "wie Feed-Quelle">
-<!ENTITY settings.feedDiscoveryMode.label "Neue Feeds suchen und finden">
-<!ENTITY settings.feedDiscoveryMode.exhaustive "ausf�hrlich">
-<!ENTITY settings.feedDiscoveryMode.conservative "konservativ">
-<!ENTITY settingWindow.title "Sage Einstellungen">
-<!ENTITY selectFolder.label "Feed-Ordner ausw�hlen">
-<!ENTITY openInContentsArea.caption "Feed Anzeige">
-<!ENTITY enableUserCss.label "Eigenes CSS verwenden">
-<!ENTITY browseCss.label "Durchsuchen...">
-<!ENTITY allowEContent.label "HTML Tags zulassen">
-
-
-<!ENTITY openSageSidebar.commandkey "S">
+<!ENTITY sage.label "Sage">
+<!ENTITY sage.version "1.2.2">
+<!ENTITY sage.version.label "version">
+
+<!ENTITY sage.toolbarLabel "Sage">
+<!ENTITY sage.sidebarTitle "Sage">
+<!ENTITY sage.tooltip "Zeigt Sage an">
+
+<!ENTITY menu.view "Anzeigen">
+<!ENTITY menu.showSearchBar "Suchfenster f�r Feeds anzeigen">
+<!ENTITY menu.showFeedItemList "Inhalts�bersicht der Feeds anzeigen">
+<!ENTITY menu.showDescTooltip "Beschreibungen zu den Tooltips anzeigen">
+<!ENTITY menu.openHTML "Feeds im Hauptfenster anzeigen">
+<!ENTITY menu.tools "Optionen">
+<!ENTITY menu.checkUpdate "Feeds auf Aktualisierungen pr�fen">
+<!ENTITY menu.manageRSSList "Feed-Liste verwalten...">
+<!ENTITY menu.opmlImportExport "OPML Import/Export...">
+<!ENTITY menu.setting "Einstellungen...">
+<!ENTITY menu.sageProjectFeed "Sage Projekt Nachrichten">
+<!ENTITY menu.discoverFeeds "Neue Feeds suchen und finden">
+
+<!-- Feed Discovery -->
+<!ENTITY discovery.status.searching "Aktuelle Seite durchsuchen">
+<!ENTITY discovery.button.addFeed "Feed hinzuf�gen">
+<!ENTITY discovery.button.close "Schlie�en">
+<!ENTITY discovery.header.title "Titel">
+<!ENTITY discovery.header.format "Format">
+<!ENTITY discovery.header.lastPubDate "Letzte Aktualisierung">
+<!ENTITY discovery.header.itemCount "Elemente">
+<!ENTITY discovery.header.url "URL">
+
+<!-- Settings Dialog -->
+<!ENTITY settings.general.caption "Allgemein">
+<!ENTITY settings.autoFeedTitle.label "Feed-Titel automatisch updaten">
+<!ENTITY settings.renderFeeds.label "Feeds im Hauptfenster anzeigen">
+<!ENTITY settings.twelveHourClock.label "12h-Uhrzeiten verwenden">
+<!ENTITY settings.feedItemOrder.label "Anordnung der Feed-Elemente">
+<!ENTITY settings.feedItemOrder.chrono "chronologisch">
+<!ENTITY settings.feedItemOrder.source "wie Feed-Quelle">
+<!ENTITY settings.feedDiscoveryMode.label "Neue Feeds suchen und finden">
+<!ENTITY settings.feedDiscoveryMode.exhaustive "ausf�hrlich">
+<!ENTITY settings.feedDiscoveryMode.conservative "konservativ">
+<!ENTITY settingWindow.title "Sage Einstellungen">
+<!ENTITY selectFolder.label "Feed-Ordner ausw�hlen">
+<!ENTITY openInContentsArea.caption "Feed Anzeige">
+<!ENTITY enableUserCss.label "Eigenes CSS verwenden">
+<!ENTITY browseCss.label "Durchsuchen...">
+<!ENTITY allowEContent.label "HTML Tags zulassen">
+
+
+<!ENTITY openSageSidebar.commandkey "S">
<!ENTITY openSageSidebar.modifiersKey "Alt">
\ No newline at end of file
diff --git a/src/sage/locale/de-DE/sage.properties b/src/sage/locale/de-DE/sage.properties
index 9c5069f..e049bb2 100644
--- a/src/sage/locale/de-DE/sage.properties
+++ b/src/sage/locale/de-DE/sage.properties
@@ -1,84 +1,84 @@
-RESULT_OK_STR = OK
-RESULT_PARSE_ERROR_STR = XML Syntax-Fehler
-RESULT_NOT_RSS_STR = Feed Syntax-Fehler
-RESULT_NOT_FOUND_STR = Datei nicht gefunden
-RESULT_NOT_AVAILABLE_STR = URL nicht verf�gbar
-RESULT_ERROR_FAILURE_STR = Fehler beim Laden
-RESULT_LOADING = Lade
-RESULT_CHECKING = Pr�fe
-
-CHECK_UPDATE = Feeds aktualisieren
-GET_RSS_TITLE= Feed-Titel abrufen
-
-
-# feed discovery messages
-
-discovery_external_feeds_category = Externe Feeds
-discovery_status_discovered = Gefunden
-discovery_status_site_feed = Seite Feed
-discovery_status_site_feeds = Seite Feeds
-discovery_status_and = und
-discovery_status_external_feed = Externer Feed
-discovery_status_external_feeds = Externe Feeds
-discovery_status_none_found = Keine Feeds gefunden
-
-
-# get feed title dialog
-
-get_feed_title = Neuer Feed-Titel
-
-
-# OPML wizzard
-
-opml_import_done = Import vollst�ndig
-opml_export_done = Export vollst�ndig
-opml_path_blank = Bitte eine OPML-Datei ausw�hlen.
-opml_path_nofile = Die angegebene Datei existiert nicht.
-opml_path_invalid = Ung�ltiger Datei-Pfad.
-opml_import_fail = Fehler beim Laden
-opml_import_badfile = Diese Datei scheint keine g�ltige OPML-Datei zu sein.
-opml_export_nocreate = Fehler beim Erzeugen der Datei
-opml_select_file = OPML-Datei ausw�hlen
-opml_opml_file = OPML-Datei
-
-# Date rendering values
-
-date_sunday = Sonntag
-date_sunday_short = So
-date_monday = Montag
-date_monday_short = Mo
-date_tuesday = Dienstag
-date_tuesday_short = Di
-date_wednesday = Mittwoch
-date_wednesday_short = Mi
-date_thursday = Donnerstag
-date_thursday_short = Do
-date_friday = Freitag
-date_friday_short = Fr
-date_saturday = Samstag
-date_saturday_short = Sa
-
-date_january = Januar
-date_january_short = Jan.
-date_february = Februar
-date_february_short = Feb.
-date_march = M�rz
-date_march_short = Mrz.
-date_april = April
-date_april_short = Apr.
-date_may = Mai
-date_may_short = Mai
-date_june = Juni
-date_june_short = Jun.
-date_july = Juli
-date_july_short = Jul.
-date_august = August
-date_august_short = Aug.
-date_september = September
-date_september_short = Sep.
-date_october = Oktober
-date_october_short = Okt,
-date_november = November
-date_november_short = Nov.
-date_december = Dezember
+RESULT_OK_STR = OK
+RESULT_PARSE_ERROR_STR = XML Syntax-Fehler
+RESULT_NOT_RSS_STR = Feed Syntax-Fehler
+RESULT_NOT_FOUND_STR = Datei nicht gefunden
+RESULT_NOT_AVAILABLE_STR = URL nicht verf�gbar
+RESULT_ERROR_FAILURE_STR = Fehler beim Laden
+RESULT_LOADING = Lade
+RESULT_CHECKING = Pr�fe
+
+CHECK_UPDATE = Feeds aktualisieren
+GET_RSS_TITLE= Feed-Titel abrufen
+
+
+# feed discovery messages
+
+discovery_external_feeds_category = Externe Feeds
+discovery_status_discovered = Gefunden
+discovery_status_site_feed = Seite Feed
+discovery_status_site_feeds = Seite Feeds
+discovery_status_and = und
+discovery_status_external_feed = Externer Feed
+discovery_status_external_feeds = Externe Feeds
+discovery_status_none_found = Keine Feeds gefunden
+
+
+# get feed title dialog
+
+get_feed_title = Neuer Feed-Titel
+
+
+# OPML wizzard
+
+opml_import_done = Import vollst�ndig
+opml_export_done = Export vollst�ndig
+opml_path_blank = Bitte eine OPML-Datei ausw�hlen.
+opml_path_nofile = Die angegebene Datei existiert nicht.
+opml_path_invalid = Ung�ltiger Datei-Pfad.
+opml_import_fail = Fehler beim Laden
+opml_import_badfile = Diese Datei scheint keine g�ltige OPML-Datei zu sein.
+opml_export_nocreate = Fehler beim Erzeugen der Datei
+opml_select_file = OPML-Datei ausw�hlen
+opml_opml_file = OPML-Datei
+
+# Date rendering values
+
+date_sunday = Sonntag
+date_sunday_short = So
+date_monday = Montag
+date_monday_short = Mo
+date_tuesday = Dienstag
+date_tuesday_short = Di
+date_wednesday = Mittwoch
+date_wednesday_short = Mi
+date_thursday = Donnerstag
+date_thursday_short = Do
+date_friday = Freitag
+date_friday_short = Fr
+date_saturday = Samstag
+date_saturday_short = Sa
+
+date_january = Januar
+date_january_short = Jan.
+date_february = Februar
+date_february_short = Feb.
+date_march = M�rz
+date_march_short = Mrz.
+date_april = April
+date_april_short = Apr.
+date_may = Mai
+date_may_short = Mai
+date_june = Juni
+date_june_short = Jun.
+date_july = Juli
+date_july_short = Jul.
+date_august = August
+date_august_short = Aug.
+date_september = September
+date_september_short = Sep.
+date_october = Oktober
+date_october_short = Okt,
+date_november = November
+date_november_short = Nov.
+date_december = Dezember
date_december_short = Dez.
\ No newline at end of file
diff --git a/src/sage/locale/en-US/contents.rdf b/src/sage/locale/en-US/contents.rdf
index 8d382cc..fb31aaa 100755
--- a/src/sage/locale/en-US/contents.rdf
+++ b/src/sage/locale/en-US/contents.rdf
@@ -1,17 +1,17 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:en-US"/>
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:locale:en-US">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:locale:en-US:packages">
- <RDF:li resource="urn:mozilla:locale:en-US:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
-</RDF:RDF>
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:en-US"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:locale:en-US">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:en-US:packages">
+ <RDF:li resource="urn:mozilla:locale:en-US:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/sage/locale/en-US/opml.dtd b/src/sage/locale/en-US/opml.dtd
index 5743af3..eee4dcf 100755
--- a/src/sage/locale/en-US/opml.dtd
+++ b/src/sage/locale/en-US/opml.dtd
@@ -1,11 +1,11 @@
-<!ENTITY pageStart.label "OPML Import/Export Wizard">
-<!ENTITY pageStart.desc "Choose an action">
-<!ENTITY pageImport.label "Import OPML">
-<!ENTITY pageImport.desc "Select Import OPML File">
-<!ENTITY pageExport.label "Export OPML">
-<!ENTITY pageExport.desc "Select Export OPML File">
-
-<!ENTITY rdoImport.label "Import OPML">
-<!ENTITY rdoExport.label "Export OPML">
-
-<!ENTITY browseButton.label "Browse...">
+<!ENTITY pageStart.label "OPML Import/Export Wizard">
+<!ENTITY pageStart.desc "Choose an action">
+<!ENTITY pageImport.label "Import OPML">
+<!ENTITY pageImport.desc "Select Import OPML File">
+<!ENTITY pageExport.label "Export OPML">
+<!ENTITY pageExport.desc "Select Export OPML File">
+
+<!ENTITY rdoImport.label "Import OPML">
+<!ENTITY rdoExport.label "Export OPML">
+
+<!ENTITY browseButton.label "Browse...">
diff --git a/src/sage/locale/en-US/sage.dtd b/src/sage/locale/en-US/sage.dtd
index 879fa04..b558b79 100755
--- a/src/sage/locale/en-US/sage.dtd
+++ b/src/sage/locale/en-US/sage.dtd
@@ -1,52 +1,52 @@
-<!ENTITY sage.label "Sage">
-<!ENTITY sage.version "1.3">
-<!ENTITY sage.version.label "version">
-
-<!ENTITY sage.toolbarLabel "Sage">
-<!ENTITY sage.sidebarTitle "Sage">
-<!ENTITY sage.tooltip "Displays Sage">
-
-<!ENTITY menu.view "View">
-<!ENTITY menu.showSearchBar "Show Feed Search Bar">
-<!ENTITY menu.showFeedItemList "Show Feed Item List">
-<!ENTITY menu.showDescTooltip "Show Description Tooltips">
-<!ENTITY menu.openHTML "Open Feeds In Contents Area">
-<!ENTITY menu.tools "Options">
-<!ENTITY menu.checkUpdate "Check Feeds">
-<!ENTITY menu.manageRSSList "Manage Feed List...">
-<!ENTITY menu.opmlImportExport "OPML Import/Export...">
-<!ENTITY menu.setting "Settings...">
-<!ENTITY menu.sageProjectFeed "Sage Project News">
-<!ENTITY menu.discoverFeeds "Discover Feeds">
-
-<!-- Feed Discovery -->
-<!ENTITY discovery.status.searching "Searching current page">
-<!ENTITY discovery.button.addFeed "Add Feed">
-<!ENTITY discovery.button.close "Close">
-<!ENTITY discovery.header.title "Title">
-<!ENTITY discovery.header.format "Format">
-<!ENTITY discovery.header.lastPubDate "Last Update">
-<!ENTITY discovery.header.itemCount "Items">
-<!ENTITY discovery.header.url "URL">
-
-<!-- Settings Dialog -->
-<!ENTITY settings.general.caption "General">
-<!ENTITY settings.autoFeedTitle.label "Automatically update feed titles">
-<!ENTITY settings.renderFeeds.label "Render feeds in contents area">
-<!ENTITY settings.twelveHourClock.label "Use 12 hour clock">
-<!ENTITY settings.feedItemOrder.label "Feed item order">
-<!ENTITY settings.feedItemOrder.chrono "Chronological">
-<!ENTITY settings.feedItemOrder.source "Source">
-<!ENTITY settings.feedDiscoveryMode.label "Feed discovery mode">
-<!ENTITY settings.feedDiscoveryMode.exhaustive "Exhaustive">
-<!ENTITY settings.feedDiscoveryMode.conservative "Conservative">
-<!ENTITY settingWindow.title "Sage Settings">
-<!ENTITY selectFolder.label "Select Feed Folder">
-<!ENTITY openInContentsArea.caption "Feed Rendering">
-<!ENTITY enableUserCss.label "Use custom CSS">
-<!ENTITY browseCss.label "Browse...">
-<!ENTITY allowEContent.label "Allow HTML tags">
-
-
-<!ENTITY openSageSidebar.commandkey "S">
-<!ENTITY openSageSidebar.modifiersKey "alt">
+<!ENTITY sage.label "Sage">
+<!ENTITY sage.version "1.3">
+<!ENTITY sage.version.label "version">
+
+<!ENTITY sage.toolbarLabel "Sage">
+<!ENTITY sage.sidebarTitle "Sage">
+<!ENTITY sage.tooltip "Displays Sage">
+
+<!ENTITY menu.view "View">
+<!ENTITY menu.showSearchBar "Show Feed Search Bar">
+<!ENTITY menu.showFeedItemList "Show Feed Item List">
+<!ENTITY menu.showDescTooltip "Show Description Tooltips">
+<!ENTITY menu.openHTML "Open Feeds In Contents Area">
+<!ENTITY menu.tools "Options">
+<!ENTITY menu.checkUpdate "Check Feeds">
+<!ENTITY menu.manageRSSList "Manage Feed List...">
+<!ENTITY menu.opmlImportExport "OPML Import/Export...">
+<!ENTITY menu.setting "Settings...">
+<!ENTITY menu.sageProjectFeed "Sage Project News">
+<!ENTITY menu.discoverFeeds "Discover Feeds">
+
+<!-- Feed Discovery -->
+<!ENTITY discovery.status.searching "Searching current page">
+<!ENTITY discovery.button.addFeed "Add Feed">
+<!ENTITY discovery.button.close "Close">
+<!ENTITY discovery.header.title "Title">
+<!ENTITY discovery.header.format "Format">
+<!ENTITY discovery.header.lastPubDate "Last Update">
+<!ENTITY discovery.header.itemCount "Items">
+<!ENTITY discovery.header.url "URL">
+
+<!-- Settings Dialog -->
+<!ENTITY settings.general.caption "General">
+<!ENTITY settings.autoFeedTitle.label "Automatically update feed titles">
+<!ENTITY settings.renderFeeds.label "Render feeds in contents area">
+<!ENTITY settings.twelveHourClock.label "Use 12 hour clock">
+<!ENTITY settings.feedItemOrder.label "Feed item order">
+<!ENTITY settings.feedItemOrder.chrono "Chronological">
+<!ENTITY settings.feedItemOrder.source "Source">
+<!ENTITY settings.feedDiscoveryMode.label "Feed discovery mode">
+<!ENTITY settings.feedDiscoveryMode.exhaustive "Exhaustive">
+<!ENTITY settings.feedDiscoveryMode.conservative "Conservative">
+<!ENTITY settingWindow.title "Sage Settings">
+<!ENTITY selectFolder.label "Select Feed Folder">
+<!ENTITY openInContentsArea.caption "Feed Rendering">
+<!ENTITY enableUserCss.label "Use custom CSS">
+<!ENTITY browseCss.label "Browse...">
+<!ENTITY allowEContent.label "Allow HTML tags">
+
+
+<!ENTITY openSageSidebar.commandkey "S">
+<!ENTITY openSageSidebar.modifiersKey "alt">
diff --git a/src/sage/locale/en-US/sage.properties b/src/sage/locale/en-US/sage.properties
index 80e4a6f..607a971 100755
--- a/src/sage/locale/en-US/sage.properties
+++ b/src/sage/locale/en-US/sage.properties
@@ -1,90 +1,90 @@
-RESULT_OK_STR = OK
-RESULT_PARSE_ERROR_STR = XML Parse Error
-RESULT_NOT_RSS_STR = Feed Parse Error
-RESULT_NOT_FOUND_STR = File Not Found
-RESULT_NOT_AVAILABLE_STR = URL Not Available
-RESULT_ERROR_FAILURE_STR = Load Failure
-RESULT_LOADING = Loading
-RESULT_CHECKING = Checking
-
-CHECK_UPDATE = Check Feeds
-GET_RSS_TITLE= Get Feed Title
-
-
-# feed discovery messages
-
-discovery_external_feeds_category = External Feeds
-discovery_status_discovered = Discovered
-discovery_status_site_feed = site feed
-discovery_status_site_feeds = site feeds
-discovery_status_and = and
-discovery_status_external_feed = external feed
-discovery_status_external_feeds = external feeds
-discovery_status_none_found = No feeds were discovered
-
-
-# get feed title dialog
-
-get_feed_title = New Feed Title
-
-
-# OPML wizzard
-
-opml_import_done = Import Complete
-opml_export_done = Export Complete
-opml_path_blank = Please choose an OPML file.
-opml_path_nofile = The specified file does not exist.
-opml_path_invalid = Invalid file path.
-opml_import_fail = Load Failure
-opml_import_badfile = This does not appear to be an OPML file.
-opml_export_nocreate = File creation error
-opml_select_file = Select OPML File
-opml_opml_file = OPML File
-
-# Date rendering values
-
-date_sunday = Sunday
-date_sunday_short = Sun
-date_monday = Monday
-date_monday_short = Mon
-date_tuesday = Tuesday
-date_tuesday_short = Tue
-date_wednesday = Wednesday
-date_wednesday_short = Wed
-date_thursday = Thursday
-date_thursday_short = Thu
-date_friday = Friday
-date_friday_short = Fri
-date_saturday = Saturday
-date_saturday_short = Sat
-
-date_january = January
-date_january_short = Jan
-date_february = February
-date_february_short = Feb
-date_march = March
-date_march_short = Mar
-date_april = April
-date_april_short = Apr
-date_may = May
-date_may_short = May
-date_june = June
-date_june_short = Jun
-date_july = July
-date_july_short = Jul
-date_august = August
-date_august_short = Aug
-date_september = September
-date_september_short = Sep
-date_october = October
-date_october_short = Oct
-date_november = November
-date_november_short = Nov
-date_december = December
-date_december_short = Dec
-
-# Item context menu
-itemcontext_markasread = Mark as Read
-itemcontext_markasunread = Mark as Unread
-itemcontext_markallasread = Mark All as Read
-itemcontext_markallasunread = Mark All as Unread
+RESULT_OK_STR = OK
+RESULT_PARSE_ERROR_STR = XML Parse Error
+RESULT_NOT_RSS_STR = Feed Parse Error
+RESULT_NOT_FOUND_STR = File Not Found
+RESULT_NOT_AVAILABLE_STR = URL Not Available
+RESULT_ERROR_FAILURE_STR = Load Failure
+RESULT_LOADING = Loading
+RESULT_CHECKING = Checking
+
+CHECK_UPDATE = Check Feeds
+GET_RSS_TITLE= Get Feed Title
+
+
+# feed discovery messages
+
+discovery_external_feeds_category = External Feeds
+discovery_status_discovered = Discovered
+discovery_status_site_feed = site feed
+discovery_status_site_feeds = site feeds
+discovery_status_and = and
+discovery_status_external_feed = external feed
+discovery_status_external_feeds = external feeds
+discovery_status_none_found = No feeds were discovered
+
+
+# get feed title dialog
+
+get_feed_title = New Feed Title
+
+
+# OPML wizzard
+
+opml_import_done = Import Complete
+opml_export_done = Export Complete
+opml_path_blank = Please choose an OPML file.
+opml_path_nofile = The specified file does not exist.
+opml_path_invalid = Invalid file path.
+opml_import_fail = Load Failure
+opml_import_badfile = This does not appear to be an OPML file.
+opml_export_nocreate = File creation error
+opml_select_file = Select OPML File
+opml_opml_file = OPML File
+
+# Date rendering values
+
+date_sunday = Sunday
+date_sunday_short = Sun
+date_monday = Monday
+date_monday_short = Mon
+date_tuesday = Tuesday
+date_tuesday_short = Tue
+date_wednesday = Wednesday
+date_wednesday_short = Wed
+date_thursday = Thursday
+date_thursday_short = Thu
+date_friday = Friday
+date_friday_short = Fri
+date_saturday = Saturday
+date_saturday_short = Sat
+
+date_january = January
+date_january_short = Jan
+date_february = February
+date_february_short = Feb
+date_march = March
+date_march_short = Mar
+date_april = April
+date_april_short = Apr
+date_may = May
+date_may_short = May
+date_june = June
+date_june_short = Jun
+date_july = July
+date_july_short = Jul
+date_august = August
+date_august_short = Aug
+date_september = September
+date_september_short = Sep
+date_october = October
+date_october_short = Oct
+date_november = November
+date_november_short = Nov
+date_december = December
+date_december_short = Dec
+
+# Item context menu
+itemcontext_markasread = Mark as Read
+itemcontext_markasunread = Mark as Unread
+itemcontext_markallasread = Mark All as Read
+itemcontext_markallasunread = Mark All as Unread
diff --git a/src/sage/locale/es-ES/contents.rdf b/src/sage/locale/es-ES/contents.rdf
index 1a4b8e2..3a7dc2a 100644
--- a/src/sage/locale/es-ES/contents.rdf
+++ b/src/sage/locale/es-ES/contents.rdf
@@ -1,17 +1,17 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:es-ES"/>
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:locale:es-ES">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:locale:es-ES:packages">
- <RDF:li resource="urn:mozilla:locale:es-ES:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
-</RDF:RDF>
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:es-ES"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:locale:es-ES">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:es-ES:packages">
+ <RDF:li resource="urn:mozilla:locale:es-ES:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/sage/locale/es-ES/opml.dtd b/src/sage/locale/es-ES/opml.dtd
index 9fe2990..04c4340 100644
--- a/src/sage/locale/es-ES/opml.dtd
+++ b/src/sage/locale/es-ES/opml.dtd
@@ -1,11 +1,11 @@
-<!ENTITY pageStart.label "Asistente de Importaci�n/Exportaci�n OPML">
-<!ENTITY pageStart.desc "Elija una acci�n">
-<!ENTITY pageImport.label "Importar OPML">
-<!ENTITY pageImport.desc "Seleccione un archivo OPML de importaci�n">
-<!ENTITY pageExport.label "Exportar OPML">
-<!ENTITY pageExport.desc "Seleccione un archivo OPML de exportaci�n">
-
-<!ENTITY rdoImport.label "Importar OPML">
-<!ENTITY rdoExport.label "Exportar OPML">
-
-<!ENTITY browseButton.label "Examinar...">
+<!ENTITY pageStart.label "Asistente de Importaci�n/Exportaci�n OPML">
+<!ENTITY pageStart.desc "Elija una acci�n">
+<!ENTITY pageImport.label "Importar OPML">
+<!ENTITY pageImport.desc "Seleccione un archivo OPML de importaci�n">
+<!ENTITY pageExport.label "Exportar OPML">
+<!ENTITY pageExport.desc "Seleccione un archivo OPML de exportaci�n">
+
+<!ENTITY rdoImport.label "Importar OPML">
+<!ENTITY rdoExport.label "Exportar OPML">
+
+<!ENTITY browseButton.label "Examinar...">
diff --git a/src/sage/locale/fr-FR/sage.properties b/src/sage/locale/fr-FR/sage.properties
index dee591d..1b87af0 100644
--- a/src/sage/locale/fr-FR/sage.properties
+++ b/src/sage/locale/fr-FR/sage.properties
@@ -1,90 +1,90 @@
-RESULT_OK_STR = OK
-RESULT_PARSE_ERROR_STR = Erreur de syntaxe XML
-RESULT_NOT_RSS_STR = Ce fichier XML n'est pas un fil
-RESULT_NOT_FOUND_STR = Fichier introuvable
-RESULT_NOT_AVAILABLE_STR = URL non disponible
-RESULT_ERROR_FAILURE_STR = Erreur de chargement
-RESULT_LOADING = Cherche
-RESULT_CHECKING = Checking
-
-CHECK_UPDATE = V\u00e9rification des fils
-GET_RSS_TITLE= Trouver le nom du fil
-
-
-# feed discovery messages
-
-discovery_external_feeds_category = Fils externes
-discovery_status_discovered = D\u00e9couvert
-discovery_status_site_feed = fil du site
-discovery_status_site_feeds = fils du site
-discovery_status_and = et
-discovery_status_external_feed = fil externe
-discovery_status_external_feeds = fils externes
-discovery_status_none_found = Aucun fil d\u00e9couvert
-
-
-# get feed title dialog
-
-get_feed_title = Nouveau nom du fil
-
-
-# OPML wizzard
-
-opml_import_done = Import termin\u00e9
-opml_export_done = Export termin\u00e9
-opml_path_blank = Choisir un fichier OPML
-opml_path_nofile = Le fichier n'existe pas.
-opml_path_invalid = Chemin incorrect.
-opml_import_fail = \u00c9chec de chargement.
-opml_import_badfile = Ce fichier n'est pas une liste OPML.
-opml_export_nocreate = Erreur de cr\u00e9ation de fichier
-opml_select_file = S\u00e9lectionner un fichier OPML
-opml_opml_file = Liste OPML
-
-# Date rendering values
-
-date_sunday = Dimanche
-date_sunday_short = Dim
-date_monday = Lundi
-date_monday_short = Lun
-date_tuesday = Mardi
-date_tuesday_short = Mar
-date_wednesday = Mercredi
-date_wednesday_short = Mer
-date_thursday = Jeudi
-date_thursday_short = Jeu
-date_friday = Vendredi
-date_friday_short = Ven
-date_saturday = Samedi
-date_saturday_short = Sam
-
-date_january = Janvier
-date_january_short = Jan
-date_february = F\u00e9vrier
-date_february_short = F\u00e9v
-date_march = Mars
-date_march_short = Mar
-date_april = Avril
-date_april_short = Avr
-date_may = Mai
-date_may_short = Mai
-date_june = Juin
-date_june_short = Juin
-date_july = Juillet
-date_july_short = Juil
-date_august = Ao\u00fbt
-date_august_short = Ao\u00fbt
-date_september = Septembre
-date_september_short = Sep
-date_october = Octobre
-date_october_short = Oct
-date_november = Novembre
-date_november_short = Nov
-date_december = D\u00e9cembre
-date_december_short = D\u00e9c
-
-# Item context menu
-itemcontext_markasread = Mark as Read
-itemcontext_markasunread = Mark as Unread
-itemcontext_markallasread = Mark All as Read
-itemcontext_markallasunread = Mark All as Unread
+RESULT_OK_STR = OK
+RESULT_PARSE_ERROR_STR = Erreur de syntaxe XML
+RESULT_NOT_RSS_STR = Ce fichier XML n'est pas un fil
+RESULT_NOT_FOUND_STR = Fichier introuvable
+RESULT_NOT_AVAILABLE_STR = URL non disponible
+RESULT_ERROR_FAILURE_STR = Erreur de chargement
+RESULT_LOADING = Cherche
+RESULT_CHECKING = Checking
+
+CHECK_UPDATE = V\u00e9rification des fils
+GET_RSS_TITLE= Trouver le nom du fil
+
+
+# feed discovery messages
+
+discovery_external_feeds_category = Fils externes
+discovery_status_discovered = D\u00e9couvert
+discovery_status_site_feed = fil du site
+discovery_status_site_feeds = fils du site
+discovery_status_and = et
+discovery_status_external_feed = fil externe
+discovery_status_external_feeds = fils externes
+discovery_status_none_found = Aucun fil d\u00e9couvert
+
+
+# get feed title dialog
+
+get_feed_title = Nouveau nom du fil
+
+
+# OPML wizzard
+
+opml_import_done = Import termin\u00e9
+opml_export_done = Export termin\u00e9
+opml_path_blank = Choisir un fichier OPML
+opml_path_nofile = Le fichier n'existe pas.
+opml_path_invalid = Chemin incorrect.
+opml_import_fail = \u00c9chec de chargement.
+opml_import_badfile = Ce fichier n'est pas une liste OPML.
+opml_export_nocreate = Erreur de cr\u00e9ation de fichier
+opml_select_file = S\u00e9lectionner un fichier OPML
+opml_opml_file = Liste OPML
+
+# Date rendering values
+
+date_sunday = Dimanche
+date_sunday_short = Dim
+date_monday = Lundi
+date_monday_short = Lun
+date_tuesday = Mardi
+date_tuesday_short = Mar
+date_wednesday = Mercredi
+date_wednesday_short = Mer
+date_thursday = Jeudi
+date_thursday_short = Jeu
+date_friday = Vendredi
+date_friday_short = Ven
+date_saturday = Samedi
+date_saturday_short = Sam
+
+date_january = Janvier
+date_january_short = Jan
+date_february = F\u00e9vrier
+date_february_short = F\u00e9v
+date_march = Mars
+date_march_short = Mar
+date_april = Avril
+date_april_short = Avr
+date_may = Mai
+date_may_short = Mai
+date_june = Juin
+date_june_short = Juin
+date_july = Juillet
+date_july_short = Juil
+date_august = Ao\u00fbt
+date_august_short = Ao\u00fbt
+date_september = Septembre
+date_september_short = Sep
+date_october = Octobre
+date_october_short = Oct
+date_november = Novembre
+date_november_short = Nov
+date_december = D\u00e9cembre
+date_december_short = D\u00e9c
+
+# Item context menu
+itemcontext_markasread = Mark as Read
+itemcontext_markasunread = Mark as Unread
+itemcontext_markallasread = Mark All as Read
+itemcontext_markallasunread = Mark All as Unread
diff --git a/src/sage/locale/hu-HU/contents.rdf b/src/sage/locale/hu-HU/contents.rdf
index 72c826d..c8e1634 100755
--- a/src/sage/locale/hu-HU/contents.rdf
+++ b/src/sage/locale/hu-HU/contents.rdf
@@ -1,17 +1,17 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:hu-HU"/>
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:locale:hu-HU">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:locale:hu-HU:packages">
- <RDF:li resource="urn:mozilla:locale:hu-HU:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
-</RDF:RDF>
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:hu-HU"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:locale:hu-HU">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:hu-HU:packages">
+ <RDF:li resource="urn:mozilla:locale:hu-HU:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/sage/locale/hu-HU/opml.dtd b/src/sage/locale/hu-HU/opml.dtd
index 1367e71..46967e3 100755
--- a/src/sage/locale/hu-HU/opml.dtd
+++ b/src/sage/locale/hu-HU/opml.dtd
@@ -1,11 +1,11 @@
-<!ENTITY pageStart.label "OPML import/export var�zsl�">
-<!ENTITY pageStart.desc "Tev�kenys�g kiv�laszt�sa">
-<!ENTITY pageImport.label "OPML import�l�s">
-<!ENTITY pageImport.desc "V�lasszon ki egy f�jlt a beimport�l�shoz">
-<!ENTITY pageExport.label "OPML export�l�s">
-<!ENTITY pageExport.desc "V�lasszon ki egy f�jlt a kiexport�l�shoz">
-
-<!ENTITY rdoImport.label "OPML import">
-<!ENTITY rdoExport.label "OPML export">
-
-<!ENTITY browseButton.label "B�ng�sz�s...">
+<!ENTITY pageStart.label "OPML import/export var�zsl�">
+<!ENTITY pageStart.desc "Tev�kenys�g kiv�laszt�sa">
+<!ENTITY pageImport.label "OPML import�l�s">
+<!ENTITY pageImport.desc "V�lasszon ki egy f�jlt a beimport�l�shoz">
+<!ENTITY pageExport.label "OPML export�l�s">
+<!ENTITY pageExport.desc "V�lasszon ki egy f�jlt a kiexport�l�shoz">
+
+<!ENTITY rdoImport.label "OPML import">
+<!ENTITY rdoExport.label "OPML export">
+
+<!ENTITY browseButton.label "B�ng�sz�s...">
diff --git a/src/sage/locale/hu-HU/sage.dtd b/src/sage/locale/hu-HU/sage.dtd
index 0fbfcb4..dec4293 100755
--- a/src/sage/locale/hu-HU/sage.dtd
+++ b/src/sage/locale/hu-HU/sage.dtd
@@ -1,53 +1,53 @@
-<!ENTITY sage.label "Sage">
-<!ENTITY sage.version "1.2.2">
-<!ENTITY sage.version.label "">
-
-<!ENTITY sage.toolbarLabel "Sage">
-<!ENTITY sage.sidebarTitle "Sage">
-<!ENTITY sage.tooltip "Sage megjelen�t�se">
-
-<!ENTITY menu.view "Megn�z">
-<!ENTITY menu.showSearchBar "Keres�mez� mutat�sa">
-<!ENTITY menu.showFeedItemList "Mutassa a let�lt�tt elemek list�j�t">
-<!ENTITY menu.showDescTooltip "Le�r�s-tooltip megjelen�t�se">
-<!ENTITY menu.openHTML "Megnyit�s a tartalmi r�szben">
-<!ENTITY menu.tools "Eszk�z�k">
-<!ENTITY menu.checkUpdate "Friss�l�sek ellen�rz�se">
-<!ENTITY menu.manageRSSList "RSS lista menedzsel�se...">
-<!ENTITY menu.opmlImportExport "OPML import/export...">
-<!ENTITY menu.setting "Be�ll�t�sok...">
-<!ENTITY menu.sageProjectFeed "A Sage projekt h�rei">
-<!ENTITY menu.discoverFeeds "Adagol�k keres�se">
-
-<!-- Feed Discovery -->
-<!ENTITY discovery.status.searching "Keres�s a jelenlegi oldalon">
-<!ENTITY discovery.button.addFeed "Adagol� hozz�ad�sa">
-<!ENTITY discovery.button.close "Bez�r">
-<!ENTITY discovery.header.title "C�m">
-<!ENTITY discovery.header.format "Form�tum">
-<!ENTITY discovery.header.lastPubDate "Utols� friss��s">
-<!ENTITY discovery.header.itemCount "Elemek">
-<!ENTITY discovery.header.url "URL">
-
-<!-- Setting Dialog -->
-<!ENTITY settings.general.caption "�ltal�nos">
-<!ENTITY settings.autoFeedTitle.label "C�mek automatikus friss�t�se">
-<!ENTITY settings.renderFeeds.label "Megnyit�s a tartalmi r�szben">
-<!ENTITY settings.twelveHourClock.label "">
-<!ENTITY settingWindow.title "Az RSS olvas�panel be�ll�t�sai">
-<!ENTITY settings.feedItemOrder.label "Adagol� elemeinek sorrendje">
-<!ENTITY settings.feedItemOrder.chrono "Id�rendben">
-<!ENTITY settings.feedItemOrder.source "Forr�s szerint">
-<!ENTITY settings.feedDiscoveryMode.label "Adagol�k keres�si m�dja">
-<!ENTITY settings.feedDiscoveryMode.exhaustive "Alapos">
-<!ENTITY settings.feedDiscoveryMode.conservative "Hagyom�nyos">
-<!ENTITY selectFolder.label "V�lassza ki az RSS listamapp�t">
-<!ENTITY openInContentsArea.caption "Let�lt�ttek megjelen�t�se">
-<!ENTITY enableUserCss.label "Egy�ni st�luslap enged�lyez�se">
-<!ENTITY browseCss.label "B�ng�sz�s...">
-<!ENTITY allowEContent.label "HTML tagek enged�lyez�se">
-
-
-<!ENTITY openSageSidebar.commandkey "S">
-<!ENTITY openSageSidebar.modifiersKey "alt">
-
+<!ENTITY sage.label "Sage">
+<!ENTITY sage.version "1.2.2">
+<!ENTITY sage.version.label "">
+
+<!ENTITY sage.toolbarLabel "Sage">
+<!ENTITY sage.sidebarTitle "Sage">
+<!ENTITY sage.tooltip "Sage megjelen�t�se">
+
+<!ENTITY menu.view "Megn�z">
+<!ENTITY menu.showSearchBar "Keres�mez� mutat�sa">
+<!ENTITY menu.showFeedItemList "Mutassa a let�lt�tt elemek list�j�t">
+<!ENTITY menu.showDescTooltip "Le�r�s-tooltip megjelen�t�se">
+<!ENTITY menu.openHTML "Megnyit�s a tartalmi r�szben">
+<!ENTITY menu.tools "Eszk�z�k">
+<!ENTITY menu.checkUpdate "Friss�l�sek ellen�rz�se">
+<!ENTITY menu.manageRSSList "RSS lista menedzsel�se...">
+<!ENTITY menu.opmlImportExport "OPML import/export...">
+<!ENTITY menu.setting "Be�ll�t�sok...">
+<!ENTITY menu.sageProjectFeed "A Sage projekt h�rei">
+<!ENTITY menu.discoverFeeds "Adagol�k keres�se">
+
+<!-- Feed Discovery -->
+<!ENTITY discovery.status.searching "Keres�s a jelenlegi oldalon">
+<!ENTITY discovery.button.addFeed "Adagol� hozz�ad�sa">
+<!ENTITY discovery.button.close "Bez�r">
+<!ENTITY discovery.header.title "C�m">
+<!ENTITY discovery.header.format "Form�tum">
+<!ENTITY discovery.header.lastPubDate "Utols� friss��s">
+<!ENTITY discovery.header.itemCount "Elemek">
+<!ENTITY discovery.header.url "URL">
+
+<!-- Setting Dialog -->
+<!ENTITY settings.general.caption "�ltal�nos">
+<!ENTITY settings.autoFeedTitle.label "C�mek automatikus friss�t�se">
+<!ENTITY settings.renderFeeds.label "Megnyit�s a tartalmi r�szben">
+<!ENTITY settings.twelveHourClock.label "">
+<!ENTITY settingWindow.title "Az RSS olvas�panel be�ll�t�sai">
+<!ENTITY settings.feedItemOrder.label "Adagol� elemeinek sorrendje">
+<!ENTITY settings.feedItemOrder.chrono "Id�rendben">
+<!ENTITY settings.feedItemOrder.source "Forr�s szerint">
+<!ENTITY settings.feedDiscoveryMode.label "Adagol�k keres�si m�dja">
+<!ENTITY settings.feedDiscoveryMode.exhaustive "Alapos">
+<!ENTITY settings.feedDiscoveryMode.conservative "Hagyom�nyos">
+<!ENTITY selectFolder.label "V�lassza ki az RSS listamapp�t">
+<!ENTITY openInContentsArea.caption "Let�lt�ttek megjelen�t�se">
+<!ENTITY enableUserCss.label "Egy�ni st�luslap enged�lyez�se">
+<!ENTITY browseCss.label "B�ng�sz�s...">
+<!ENTITY allowEContent.label "HTML tagek enged�lyez�se">
+
+
+<!ENTITY openSageSidebar.commandkey "S">
+<!ENTITY openSageSidebar.modifiersKey "alt">
+
diff --git a/src/sage/locale/hu-HU/sage.properties b/src/sage/locale/hu-HU/sage.properties
index 2f52447..9a7664f 100755
--- a/src/sage/locale/hu-HU/sage.properties
+++ b/src/sage/locale/hu-HU/sage.properties
@@ -1,91 +1,91 @@
-RESULT_OK_STR = OK
-RESULT_PARSE_ERROR_STR = XML �rtelmez�si hiba
-RESULT_NOT_RSS_STR = Ez az XML f�jl nem RSS form�tum�
-RESULT_NOT_FOUND_STR = A f�jl nem tal�lhat�
-RESULT_NOT_AVAILABLE_STR = Nem el�rhet� URL
-RESULT_ERROR_FAILURE_STR = Bet�lt�si hiba
-RESULT_LOADING = Loading
-RESULT_CHECKING = Checking
-
-CHECK_UPDATE = Friss�l�sek ellen�rz�se
-GET_RSS_TITLE= RSS c�m let�lt�se
-
-
-# feed discovery messages
-
-discovery_external_feeds_category = K�ls� adagol�
-discovery_status_discovered = Megtal�lva
-discovery_status_site_feed = oldaladagol�
-discovery_status_site_feeds = oldaladagol�k
-discovery_status_and = �s
-discovery_status_external_feed = k�ls� adagol�
-discovery_status_external_feeds = k�ls� adagol�k
-discovery_status_none_found = Nem siker�lt adagol�t tal�lni
-
-
-# get feed title dialog
-
-get_feed_title = Az �j adagol� c�me
-
-
-# OPML wizzard
-
-opml_import_done = Import�l�s befejezve
-opml_export_done = Exportport�l�s befejezve
-opml_path_blank = V�lasszon ki egy OPML f�jlt.
-opml_path_nofile = A megadott f�jl nem l�tezik.
-opml_path_invalid = �rv�nytelen �tvonal.
-opml_import_fail = Bet�lt�si hiba
-opml_import_badfile = �gy t�nik, ez nem egy OPML f�jl.
-opml_export_nocreate = F�jl l�trehoz�si hiba
-opml_select_file = Select OPML File
-opml_opml_file = OPML File
-
-
-# Date rendering values
-
-date_sunday = Vas�rnap
-date_sunday_short = Vas
-date_monday = H�tf�
-date_monday_short = H�t
-date_tuesday = Kedd
-date_tuesday_short = Ked
-date_wednesday = Szerda
-date_wednesday_short = Sze
-date_thursday = Cs�t�rt�k
-date_thursday_short = Cs�
-date_friday = P�ntek
-date_friday_short = P�n
-date_saturday = Szombat
-date_saturday_short = Szo
-
-date_january = Janu�r
-date_january_short = Jan
-date_february = Febru�r
-date_february_short = Feb
-date_march = M�rcius
-date_march_short = M�r
-date_april = �prilis
-date_april_short = �pr
-date_may = M�jus
-date_may_short = M�j
-date_june = J�nius
-date_june_short = J�n
-date_july = J�lius
-date_july_short = J�l
-date_august = Augusztus
-date_august_short = Aug
-date_september = Szeptember
-date_september_short = Sze
-date_october = Okt�ber
-date_october_short = Okt
-date_november = November
-date_november_short = Nov
-date_december = December
-date_december_short = Dec
-
-# Item context menu
-itemcontext_markasread = Mark as Read
-itemcontext_markasunread = Mark as Unread
-itemcontext_markallasread = Mark All as Read
-itemcontext_markallasunread = Mark All as Unread
+RESULT_OK_STR = OK
+RESULT_PARSE_ERROR_STR = XML �rtelmez�si hiba
+RESULT_NOT_RSS_STR = Ez az XML f�jl nem RSS form�tum�
+RESULT_NOT_FOUND_STR = A f�jl nem tal�lhat�
+RESULT_NOT_AVAILABLE_STR = Nem el�rhet� URL
+RESULT_ERROR_FAILURE_STR = Bet�lt�si hiba
+RESULT_LOADING = Loading
+RESULT_CHECKING = Checking
+
+CHECK_UPDATE = Friss�l�sek ellen�rz�se
+GET_RSS_TITLE= RSS c�m let�lt�se
+
+
+# feed discovery messages
+
+discovery_external_feeds_category = K�ls� adagol�
+discovery_status_discovered = Megtal�lva
+discovery_status_site_feed = oldaladagol�
+discovery_status_site_feeds = oldaladagol�k
+discovery_status_and = �s
+discovery_status_external_feed = k�ls� adagol�
+discovery_status_external_feeds = k�ls� adagol�k
+discovery_status_none_found = Nem siker�lt adagol�t tal�lni
+
+
+# get feed title dialog
+
+get_feed_title = Az �j adagol� c�me
+
+
+# OPML wizzard
+
+opml_import_done = Import�l�s befejezve
+opml_export_done = Exportport�l�s befejezve
+opml_path_blank = V�lasszon ki egy OPML f�jlt.
+opml_path_nofile = A megadott f�jl nem l�tezik.
+opml_path_invalid = �rv�nytelen �tvonal.
+opml_import_fail = Bet�lt�si hiba
+opml_import_badfile = �gy t�nik, ez nem egy OPML f�jl.
+opml_export_nocreate = F�jl l�trehoz�si hiba
+opml_select_file = Select OPML File
+opml_opml_file = OPML File
+
+
+# Date rendering values
+
+date_sunday = Vas�rnap
+date_sunday_short = Vas
+date_monday = H�tf�
+date_monday_short = H�t
+date_tuesday = Kedd
+date_tuesday_short = Ked
+date_wednesday = Szerda
+date_wednesday_short = Sze
+date_thursday = Cs�t�rt�k
+date_thursday_short = Cs�
+date_friday = P�ntek
+date_friday_short = P�n
+date_saturday = Szombat
+date_saturday_short = Szo
+
+date_january = Janu�r
+date_january_short = Jan
+date_february = Febru�r
+date_february_short = Feb
+date_march = M�rcius
+date_march_short = M�r
+date_april = �prilis
+date_april_short = �pr
+date_may = M�jus
+date_may_short = M�j
+date_june = J�nius
+date_june_short = J�n
+date_july = J�lius
+date_july_short = J�l
+date_august = Augusztus
+date_august_short = Aug
+date_september = Szeptember
+date_september_short = Sze
+date_october = Okt�ber
+date_october_short = Okt
+date_november = November
+date_november_short = Nov
+date_december = December
+date_december_short = Dec
+
+# Item context menu
+itemcontext_markasread = Mark as Read
+itemcontext_markasunread = Mark as Unread
+itemcontext_markallasread = Mark All as Read
+itemcontext_markallasunread = Mark All as Unread
diff --git a/src/sage/locale/it-IT/sage.dtd b/src/sage/locale/it-IT/sage.dtd
index c16ebf7..086b1f1 100644
--- a/src/sage/locale/it-IT/sage.dtd
+++ b/src/sage/locale/it-IT/sage.dtd
@@ -1,53 +1,53 @@
-<!ENTITY sage.label "Sage">
-<!ENTITY sage.version "1.2.2">
-<!ENTITY sage.version.label "">
-
-<!ENTITY sage.toolbarLabel "Sage">
-<!ENTITY sage.sidebarTitle "Sage">
-<!ENTITY sage.tooltip "Mostra il pannello laterale di Sage">
-
-<!ENTITY menu.view "Visualizza">
-<!ENTITY menu.showSearchBar "Mostra Barra di Ricerca dei Feed">
-<!ENTITY menu.showFeedItemList "Mostra la Lista dei Feed">
-<!ENTITY menu.showDescTooltip "Mostra Descrizione Suggerimenti">
-<!ENTITY menu.openHTML "Mostra i Feed nel Browser">
-<!ENTITY menu.tools "Opzioni">
-<!ENTITY menu.checkUpdate "Controlla i Feed">
-<!ENTITY menu.manageRSSList "Gestione Lista dei Feed...">
-<!ENTITY menu.opmlImportExport "Importazione/Esportazione File OPML...">
-<!ENTITY menu.setting "Preferenze...">
-<!ENTITY menu.sageProjectFeed "Novita' sul Progetto Sage">
-<!ENTITY menu.discoverFeeds "Ricerca Feed Esterni">
-
-<!-- Feed Discovery -->
-<!ENTITY discovery.status.searching "Ricerca nella Pagina Corrente">
-<!ENTITY discovery.button.addFeed "Aggiungi un Feed">
-<!ENTITY discovery.button.close "Chiudi">
-<!ENTITY discovery.header.title "Titolo">
-<!ENTITY discovery.header.format "Formato">
-<!ENTITY discovery.header.lastPubDate "Ultimo Aggiornamento">
-<!ENTITY discovery.header.itemCount "Elementi">
-<!ENTITY discovery.header.url "URL">
-
-<!-- Settings Dialog -->
-<!ENTITY settings.general.caption "Generale">
-<!ENTITY settings.autoFeedTitle.label "Aggiorna Automaticamente il Titolo dei feed">
-<!ENTITY settings.renderFeeds.label "Mostra i Feed nel Browser">
-<!ENTITY settings.twelveHourClock.label "Usa Modalita' 12 ore">
-<!ENTITY settings.feedItemOrder.label "Ordinamento dei Feed">
-<!ENTITY settings.feedItemOrder.chrono "Cronologico">
-<!ENTITY settings.feedItemOrder.source "Sorgente">
-<!ENTITY settings.feedDiscoveryMode.label "Modalita' di Ricerca Feed">
-<!ENTITY settings.feedDiscoveryMode.exhaustive "Esaustiva">
-<!ENTITY settings.feedDiscoveryMode.conservative "Conservativa">
-<!ENTITY settingWindow.title "Configurazione di Sage">
-<!ENTITY selectFolder.label "Selezionare la Cartella dei Feed">
-<!ENTITY openInContentsArea.caption "Interpretazione dei Feed">
-<!ENTITY enableUserCss.label "Usa CSS Personalizzato">
-<!ENTITY browseCss.label "Sfoglia...">
-<!ENTITY allowEContent.label "Permetti i Tag HTML">
-
-
-<!ENTITY openSageSidebar.commandkey "S">
-<!ENTITY openSageSidebar.modifiersKey "alt">
-
+<!ENTITY sage.label "Sage">
+<!ENTITY sage.version "1.2.2">
+<!ENTITY sage.version.label "">
+
+<!ENTITY sage.toolbarLabel "Sage">
+<!ENTITY sage.sidebarTitle "Sage">
+<!ENTITY sage.tooltip "Mostra il pannello laterale di Sage">
+
+<!ENTITY menu.view "Visualizza">
+<!ENTITY menu.showSearchBar "Mostra Barra di Ricerca dei Feed">
+<!ENTITY menu.showFeedItemList "Mostra la Lista dei Feed">
+<!ENTITY menu.showDescTooltip "Mostra Descrizione Suggerimenti">
+<!ENTITY menu.openHTML "Mostra i Feed nel Browser">
+<!ENTITY menu.tools "Opzioni">
+<!ENTITY menu.checkUpdate "Controlla i Feed">
+<!ENTITY menu.manageRSSList "Gestione Lista dei Feed...">
+<!ENTITY menu.opmlImportExport "Importazione/Esportazione File OPML...">
+<!ENTITY menu.setting "Preferenze...">
+<!ENTITY menu.sageProjectFeed "Novita' sul Progetto Sage">
+<!ENTITY menu.discoverFeeds "Ricerca Feed Esterni">
+
+<!-- Feed Discovery -->
+<!ENTITY discovery.status.searching "Ricerca nella Pagina Corrente">
+<!ENTITY discovery.button.addFeed "Aggiungi un Feed">
+<!ENTITY discovery.button.close "Chiudi">
+<!ENTITY discovery.header.title "Titolo">
+<!ENTITY discovery.header.format "Formato">
+<!ENTITY discovery.header.lastPubDate "Ultimo Aggiornamento">
+<!ENTITY discovery.header.itemCount "Elementi">
+<!ENTITY discovery.header.url "URL">
+
+<!-- Settings Dialog -->
+<!ENTITY settings.general.caption "Generale">
+<!ENTITY settings.autoFeedTitle.label "Aggiorna Automaticamente il Titolo dei feed">
+<!ENTITY settings.renderFeeds.label "Mostra i Feed nel Browser">
+<!ENTITY settings.twelveHourClock.label "Usa Modalita' 12 ore">
+<!ENTITY settings.feedItemOrder.label "Ordinamento dei Feed">
+<!ENTITY settings.feedItemOrder.chrono "Cronologico">
+<!ENTITY settings.feedItemOrder.source "Sorgente">
+<!ENTITY settings.feedDiscoveryMode.label "Modalita' di Ricerca Feed">
+<!ENTITY settings.feedDiscoveryMode.exhaustive "Esaustiva">
+<!ENTITY settings.feedDiscoveryMode.conservative "Conservativa">
+<!ENTITY settingWindow.title "Configurazione di Sage">
+<!ENTITY selectFolder.label "Selezionare la Cartella dei Feed">
+<!ENTITY openInContentsArea.caption "Interpretazione dei Feed">
+<!ENTITY enableUserCss.label "Usa CSS Personalizzato">
+<!ENTITY browseCss.label "Sfoglia...">
+<!ENTITY allowEContent.label "Permetti i Tag HTML">
+
+
+<!ENTITY openSageSidebar.commandkey "S">
+<!ENTITY openSageSidebar.modifiersKey "alt">
+
diff --git a/src/sage/locale/it-IT/sage.properties b/src/sage/locale/it-IT/sage.properties
index 9734396..ea81047 100644
--- a/src/sage/locale/it-IT/sage.properties
+++ b/src/sage/locale/it-IT/sage.properties
@@ -1,90 +1,90 @@
-RESULT_OK_STR = OK
-RESULT_PARSE_ERROR_STR = Errore analisi XML
-RESULT_NOT_RSS_STR = Errore analisi Feed
-RESULT_NOT_FOUND_STR = File non trovato
-RESULT_NOT_AVAILABLE_STR = URL non disponibile
-RESULT_ERROR_FAILURE_STR = Errore di caricamento
-RESULT_LOADING = Caricamento
-RESULT_CHECKING = Controllo di
-
-CHECK_UPDATE = Controlla i Feed
-GET_RSS_TITLE= Ottieni il titolo dei Feed
-
-
-# feed discovery messages
-
-discovery_external_feeds_category = Feed Esterni
-discovery_status_discovered = Trovati
-discovery_status_site_feed = sito con feed
-discovery_status_site_feeds = siti con feed
-discovery_status_and = and
-discovery_status_external_feed = feed esterno
-discovery_status_external_feeds = feed esterni
-discovery_status_none_found = Nessun feed trovato
-
-
-# get feed title dialog
-
-get_feed_title = Nuovo Titolo Feed
-
-
-# OPML wizzard
-
-opml_import_done = Importazione Completa
-opml_export_done = Esportazione Completa
-opml_path_blank = Per favore scegliere un file OPML.
-opml_path_nofile = Il file specificato non esiste.
-opml_path_invalid = Percorso del file non valido.
-opml_import_fail = Errore di caricamento
-opml_import_badfile = Questo non sembra essere un file OPML.
-opml_export_nocreate = Errore creazione file
-opml_select_file = Selezionare un file OPML
-opml_opml_file = File OPML
-
-# Date rendering values
-
-date_sunday = Domenica
-date_sunday_short = Dom
-date_monday = Lunedi
-date_monday_short = Lun
-date_tuesday = Martedi
-date_tuesday_short = Mar
-date_wednesday = Mercoledi
-date_wednesday_short = Mer
-date_thursday = Giovedi
-date_thursday_short = Gio
-date_friday = Venerdi
-date_friday_short = Ven
-date_saturday = Sabato
-date_saturday_short = Sab
-
-date_january = Gennaio
-date_january_short = Gen
-date_february = Febbraio
-date_february_short = Feb
-date_march = Marzo
-date_march_short = Mar
-date_april = Aprile
-date_april_short = Apr
-date_may = Maggio
-date_may_short = Mag
-date_june = Giugno
-date_june_short = Giu
-date_july = Luglio
-date_july_short = Lug
-date_august = Agosto
-date_august_short = Ago
-date_september = Settembre
-date_september_short = Set
-date_october = Ottobre
-date_october_short = Ott
-date_november = Novembre
-date_november_short = Nov
-date_december = Dicembre
-date_december_short = Dic
-
-# Item context menu
-itemcontext_markasread = Mark as Read
-itemcontext_markasunread = Mark as Unread
-itemcontext_markallasread = Mark All as Read
-itemcontext_markallasunread = Mark All as Unread
+RESULT_OK_STR = OK
+RESULT_PARSE_ERROR_STR = Errore analisi XML
+RESULT_NOT_RSS_STR = Errore analisi Feed
+RESULT_NOT_FOUND_STR = File non trovato
+RESULT_NOT_AVAILABLE_STR = URL non disponibile
+RESULT_ERROR_FAILURE_STR = Errore di caricamento
+RESULT_LOADING = Caricamento
+RESULT_CHECKING = Controllo di
+
+CHECK_UPDATE = Controlla i Feed
+GET_RSS_TITLE= Ottieni il titolo dei Feed
+
+
+# feed discovery messages
+
+discovery_external_feeds_category = Feed Esterni
+discovery_status_discovered = Trovati
+discovery_status_site_feed = sito con feed
+discovery_status_site_feeds = siti con feed
+discovery_status_and = and
+discovery_status_external_feed = feed esterno
+discovery_status_external_feeds = feed esterni
+discovery_status_none_found = Nessun feed trovato
+
+
+# get feed title dialog
+
+get_feed_title = Nuovo Titolo Feed
+
+
+# OPML wizzard
+
+opml_import_done = Importazione Completa
+opml_export_done = Esportazione Completa
+opml_path_blank = Per favore scegliere un file OPML.
+opml_path_nofile = Il file specificato non esiste.
+opml_path_invalid = Percorso del file non valido.
+opml_import_fail = Errore di caricamento
+opml_import_badfile = Questo non sembra essere un file OPML.
+opml_export_nocreate = Errore creazione file
+opml_select_file = Selezionare un file OPML
+opml_opml_file = File OPML
+
+# Date rendering values
+
+date_sunday = Domenica
+date_sunday_short = Dom
+date_monday = Lunedi
+date_monday_short = Lun
+date_tuesday = Martedi
+date_tuesday_short = Mar
+date_wednesday = Mercoledi
+date_wednesday_short = Mer
+date_thursday = Giovedi
+date_thursday_short = Gio
+date_friday = Venerdi
+date_friday_short = Ven
+date_saturday = Sabato
+date_saturday_short = Sab
+
+date_january = Gennaio
+date_january_short = Gen
+date_february = Febbraio
+date_february_short = Feb
+date_march = Marzo
+date_march_short = Mar
+date_april = Aprile
+date_april_short = Apr
+date_may = Maggio
+date_may_short = Mag
+date_june = Giugno
+date_june_short = Giu
+date_july = Luglio
+date_july_short = Lug
+date_august = Agosto
+date_august_short = Ago
+date_september = Settembre
+date_september_short = Set
+date_october = Ottobre
+date_october_short = Ott
+date_november = Novembre
+date_november_short = Nov
+date_december = Dicembre
+date_december_short = Dic
+
+# Item context menu
+itemcontext_markasread = Mark as Read
+itemcontext_markasunread = Mark as Unread
+itemcontext_markallasread = Mark All as Read
+itemcontext_markallasunread = Mark All as Unread
diff --git a/src/sage/locale/ja-JP/contents.rdf b/src/sage/locale/ja-JP/contents.rdf
index 919e538..7e914bd 100755
--- a/src/sage/locale/ja-JP/contents.rdf
+++ b/src/sage/locale/ja-JP/contents.rdf
@@ -1,17 +1,17 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:ja-JP"/>
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:locale:ja-JP">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:locale:ja-JP:packages">
- <RDF:li resource="urn:mozilla:locale:ja-JP:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
-</RDF:RDF>
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:ja-JP"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:locale:ja-JP">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:ja-JP:packages">
+ <RDF:li resource="urn:mozilla:locale:ja-JP:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/sage/locale/ja-JP/opml.dtd b/src/sage/locale/ja-JP/opml.dtd
index 4d646a8..a2812ff 100755
--- a/src/sage/locale/ja-JP/opml.dtd
+++ b/src/sage/locale/ja-JP/opml.dtd
@@ -1,11 +1,11 @@
-<!ENTITY pageStart.label "OPML インポート/エクスポート ウィザード">
-<!ENTITY pageStart.desc "動作を選択してください">
-<!ENTITY pageImport.label "OPML のインポート">
-<!ENTITY pageImport.desc "読み込む OPML ファイルを選択してください">
-<!ENTITY pageExport.label "OPML のエクスポート">
-<!ENTITY pageExport.desc "書き込む OPML ファイルを選択してください">
-
-<!ENTITY rdoImport.label "OPML のインポート">
-<!ENTITY rdoExport.label "OPML のエクスポート">
-
-<!ENTITY browseButton.label "参照...">
+<!ENTITY pageStart.label "OPML インポート/エクスポート ウィザード">
+<!ENTITY pageStart.desc "動作を選択してください">
+<!ENTITY pageImport.label "OPML のインポート">
+<!ENTITY pageImport.desc "読み込む OPML ファイルを選択してください">
+<!ENTITY pageExport.label "OPML のエクスポート">
+<!ENTITY pageExport.desc "書き込む OPML ファイルを選択してください">
+
+<!ENTITY rdoImport.label "OPML のインポート">
+<!ENTITY rdoExport.label "OPML のエクスポート">
+
+<!ENTITY browseButton.label "参照...">
diff --git a/src/sage/locale/ja-JP/sage.dtd b/src/sage/locale/ja-JP/sage.dtd
index d4d4967..9b2be49 100755
--- a/src/sage/locale/ja-JP/sage.dtd
+++ b/src/sage/locale/ja-JP/sage.dtd
@@ -1,54 +1,54 @@
-<!ENTITY sage.label "RSS リーダパネル">
-<!ENTITY sage.version "1.2.2">
-<!ENTITY sage.version.label "">
-
-<!ENTITY sage.toolbarLabel "RSS リーダ">
-<!ENTITY sage.sidebarTitle "RSS リーダ">
-<!ENTITY sage.tooltip "RSS リーダパネルを表示">
-
-
-<!ENTITY menu.view "表示">
-<!ENTITY menu.showSearchBar "Feed 検索バーの表示">
-<!ENTITY menu.showFeedItemList "">
-<!ENTITY menu.showDescTooltip "Description ツールチップの表示">
-<!ENTITY menu.openHTML "コンテンツエリアで開く">
-<!ENTITY menu.tools "ツール">
-<!ENTITY menu.checkUpdate "更新チェック">
-<!ENTITY menu.manageRSSList "RSS リストの管理">
-<!ENTITY menu.opmlImportExport "OPML インポート/エクスポート...">
-<!ENTITY menu.setting "設定...">
-<!ENTITY menu.sageProjectFeed "Sage Project News">
-<!ENTITY menu.discoverFeeds "Discover Feeds">
-
-<!-- Feed Discovery -->
-<!ENTITY discovery.status.searching "Searching current page">
-<!ENTITY discovery.button.addFeed "Add Feed">
-<!ENTITY discovery.button.close "Close">
-<!ENTITY discovery.header.title "Title">
-<!ENTITY discovery.header.format "Format">
-<!ENTITY discovery.header.lastPubDate "Last Update">
-<!ENTITY discovery.header.itemCount "Items">
-<!ENTITY discovery.header.url "URL">
-
-<!-- Setting Dialog -->
-<!ENTITY settings.general.caption "General">
-<!ENTITY settings.autoFeedTitle.label "Automatically update feed titles">
-<!ENTITY settings.renderFeeds.label "Render feeds in contents area">
-<!ENTITY settings.twelveHourClock.label "Use 12 hour clock">
-<!ENTITY settingWindow.title "設定: RSS リーダパネル">
-<!ENTITY selectFolder.label "RSS リストフォルダの選択">
-<!ENTITY settings.feedItemOrder.label "Feed Item Order">
-<!ENTITY settings.feedItemOrder.chrono "Chronological">
-<!ENTITY settings.feedItemOrder.source "Source">
-<!ENTITY settings.feedDiscoveryMode.label "Feed discovery mode">
-<!ENTITY settings.feedDiscoveryMode.exhaustive "Exhaustive">
-<!ENTITY settings.feedDiscoveryMode.conservative "Conservative">
-<!ENTITY openInContentsArea.caption "コンテンツエリアで開く">
-<!ENTITY enableUserCss.label "ユーザー CSS を使う">
-<!ENTITY browseCss.label "参照...">
-<!ENTITY allowEContent.label "HTML タグを許可する">
-
-
-<!ENTITY openSageSidebar.commandkey "S">
-<!ENTITY openSageSidebar.modifiersKey "alt">
-
+<!ENTITY sage.label "RSS リーダパネル">
+<!ENTITY sage.version "1.2.2">
+<!ENTITY sage.version.label "">
+
+<!ENTITY sage.toolbarLabel "RSS リーダ">
+<!ENTITY sage.sidebarTitle "RSS リーダ">
+<!ENTITY sage.tooltip "RSS リーダパネルを表示">
+
+
+<!ENTITY menu.view "表示">
+<!ENTITY menu.showSearchBar "Feed 検索バーの表示">
+<!ENTITY menu.showFeedItemList "">
+<!ENTITY menu.showDescTooltip "Description ツールチップの表示">
+<!ENTITY menu.openHTML "コンテンツエリアで開く">
+<!ENTITY menu.tools "ツール">
+<!ENTITY menu.checkUpdate "更新チェック">
+<!ENTITY menu.manageRSSList "RSS リストの管理">
+<!ENTITY menu.opmlImportExport "OPML インポート/エクスポート...">
+<!ENTITY menu.setting "設定...">
+<!ENTITY menu.sageProjectFeed "Sage Project News">
+<!ENTITY menu.discoverFeeds "Discover Feeds">
+
+<!-- Feed Discovery -->
+<!ENTITY discovery.status.searching "Searching current page">
+<!ENTITY discovery.button.addFeed "Add Feed">
+<!ENTITY discovery.button.close "Close">
+<!ENTITY discovery.header.title "Title">
+<!ENTITY discovery.header.format "Format">
+<!ENTITY discovery.header.lastPubDate "Last Update">
+<!ENTITY discovery.header.itemCount "Items">
+<!ENTITY discovery.header.url "URL">
+
+<!-- Setting Dialog -->
+<!ENTITY settings.general.caption "General">
+<!ENTITY settings.autoFeedTitle.label "Automatically update feed titles">
+<!ENTITY settings.renderFeeds.label "Render feeds in contents area">
+<!ENTITY settings.twelveHourClock.label "Use 12 hour clock">
+<!ENTITY settingWindow.title "設定: RSS リーダパネル">
+<!ENTITY selectFolder.label "RSS リストフォルダの選択">
+<!ENTITY settings.feedItemOrder.label "Feed Item Order">
+<!ENTITY settings.feedItemOrder.chrono "Chronological">
+<!ENTITY settings.feedItemOrder.source "Source">
+<!ENTITY settings.feedDiscoveryMode.label "Feed discovery mode">
+<!ENTITY settings.feedDiscoveryMode.exhaustive "Exhaustive">
+<!ENTITY settings.feedDiscoveryMode.conservative "Conservative">
+<!ENTITY openInContentsArea.caption "コンテンツエリアで開く">
+<!ENTITY enableUserCss.label "ユーザー CSS を使う">
+<!ENTITY browseCss.label "参照...">
+<!ENTITY allowEContent.label "HTML タグを許可する">
+
+
+<!ENTITY openSageSidebar.commandkey "S">
+<!ENTITY openSageSidebar.modifiersKey "alt">
+
diff --git a/src/sage/locale/ja-JP/sage.properties b/src/sage/locale/ja-JP/sage.properties
index 43c934f..32de364 100755
--- a/src/sage/locale/ja-JP/sage.properties
+++ b/src/sage/locale/ja-JP/sage.properties
@@ -1,91 +1,91 @@
-RESULT_OK_STR = OK
-RESULT_PARSE_ERROR_STR = XML \u30d1\u30fc\u30b9\u30a8\u30e9\u30fc
-RESULT_NOT_RSS_STR = \u3053\u306e XML \u30d5\u30a1\u30a4\u30eb\u306f RSS \u3067\u306f\u3042\u308a\u307e\u305b\u3093
-RESULT_NOT_FOUND_STR = \u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
-RESULT_NOT_AVAILABLE_STR = \u5b58\u5728\u3057\u306a\u3044 URL \u3067\u3059
-RESULT_ERROR_FAILURE_STR = \u8aad\u307f\u8fbc\u307f\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-RESULT_LOADING = Loading
-RESULT_CHECKING = Checking
-
-CHECK_UPDATE = \u66f4\u65b0\u30c1\u30a7\u30c3\u30af
-GET_RSS_TITLE= RSS \u30bf\u30a4\u30c8\u30eb\u306e\u53d6\u5f97
-
-
-# feed discovery messages
-
-discovery_external_feeds_category = External Feeds
-discovery_status_discovered = Discovered
-discovery_status_site_feed = site feed
-discovery_status_site_feeds = site feeds
-discovery_status_and = and
-discovery_status_external_feed = external feed
-discovery_status_external_feeds = external feeds
-discovery_status_none_found = No feeds were discovered
-
-
-# get feed title dialog
-
-get_feed_title = New Feed Title
-
-
-# OPML wizzard
-
-opml_import_done = Import Complete
-opml_export_done = Export Complete
-opml_path_blank = Please choose an OPML file.
-opml_path_nofile = The specified file does not exist.
-opml_path_invalid = Invalid file path.
-opml_import_fail = Load Failure
-opml_import_badfile = This does not appear to be an OPML file.
-opml_export_nocreate = File creation error
-opml_select_file = Select OPML File
-opml_opml_file = OPML File
-
-
-# Date rendering values
-
-date_sunday = Sunday
-date_sunday_short = Sun
-date_monday = Monday
-date_monday_short = Mon
-date_tuesday = Tuesday
-date_tuesday_short = Tue
-date_wednesday = Wednesday
-date_wednesday_short = Wed
-date_thursday = Thursday
-date_thursday_short = Thu
-date_friday = Friday
-date_friday_short = Fri
-date_saturday = Saturday
-date_saturday_short = Sat
-
-date_january = January
-date_january_short = Jan
-date_february = February
-date_february_short = Feb
-date_march = March
-date_march_short = Mar
-date_april = April
-date_april_short = Apr
-date_may = May
-date_may_short = May
-date_june = June
-date_june_short = Jun
-date_july = July
-date_july_short = Jul
-date_august = August
-date_august_short = Aug
-date_september = September
-date_september_short = Sep
-date_october = October
-date_october_short = Oct
-date_november = November
-date_november_short = Nov
-date_december = December
-date_december_short = Dec
-
-# Item context menu
-itemcontext_markasread = Mark as Read
-itemcontext_markasunread = Mark as Unread
-itemcontext_markallasread = Mark All as Read
-itemcontext_markallasunread = Mark All as Unread
+RESULT_OK_STR = OK
+RESULT_PARSE_ERROR_STR = XML \u30d1\u30fc\u30b9\u30a8\u30e9\u30fc
+RESULT_NOT_RSS_STR = \u3053\u306e XML \u30d5\u30a1\u30a4\u30eb\u306f RSS \u3067\u306f\u3042\u308a\u307e\u305b\u3093
+RESULT_NOT_FOUND_STR = \u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
+RESULT_NOT_AVAILABLE_STR = \u5b58\u5728\u3057\u306a\u3044 URL \u3067\u3059
+RESULT_ERROR_FAILURE_STR = \u8aad\u307f\u8fbc\u307f\u306b\u5931\u6557\u3057\u307e\u3057\u305f
+RESULT_LOADING = Loading
+RESULT_CHECKING = Checking
+
+CHECK_UPDATE = \u66f4\u65b0\u30c1\u30a7\u30c3\u30af
+GET_RSS_TITLE= RSS \u30bf\u30a4\u30c8\u30eb\u306e\u53d6\u5f97
+
+
+# feed discovery messages
+
+discovery_external_feeds_category = External Feeds
+discovery_status_discovered = Discovered
+discovery_status_site_feed = site feed
+discovery_status_site_feeds = site feeds
+discovery_status_and = and
+discovery_status_external_feed = external feed
+discovery_status_external_feeds = external feeds
+discovery_status_none_found = No feeds were discovered
+
+
+# get feed title dialog
+
+get_feed_title = New Feed Title
+
+
+# OPML wizzard
+
+opml_import_done = Import Complete
+opml_export_done = Export Complete
+opml_path_blank = Please choose an OPML file.
+opml_path_nofile = The specified file does not exist.
+opml_path_invalid = Invalid file path.
+opml_import_fail = Load Failure
+opml_import_badfile = This does not appear to be an OPML file.
+opml_export_nocreate = File creation error
+opml_select_file = Select OPML File
+opml_opml_file = OPML File
+
+
+# Date rendering values
+
+date_sunday = Sunday
+date_sunday_short = Sun
+date_monday = Monday
+date_monday_short = Mon
+date_tuesday = Tuesday
+date_tuesday_short = Tue
+date_wednesday = Wednesday
+date_wednesday_short = Wed
+date_thursday = Thursday
+date_thursday_short = Thu
+date_friday = Friday
+date_friday_short = Fri
+date_saturday = Saturday
+date_saturday_short = Sat
+
+date_january = January
+date_january_short = Jan
+date_february = February
+date_february_short = Feb
+date_march = March
+date_march_short = Mar
+date_april = April
+date_april_short = Apr
+date_may = May
+date_may_short = May
+date_june = June
+date_june_short = Jun
+date_july = July
+date_july_short = Jul
+date_august = August
+date_august_short = Aug
+date_september = September
+date_september_short = Sep
+date_october = October
+date_october_short = Oct
+date_november = November
+date_november_short = Nov
+date_december = December
+date_december_short = Dec
+
+# Item context menu
+itemcontext_markasread = Mark as Read
+itemcontext_markasunread = Mark as Unread
+itemcontext_markallasread = Mark All as Read
+itemcontext_markallasunread = Mark All as Unread
diff --git a/src/sage/locale/nl-NL/contents.rdf b/src/sage/locale/nl-NL/contents.rdf
index b4dd240..4d331e4 100644
--- a/src/sage/locale/nl-NL/contents.rdf
+++ b/src/sage/locale/nl-NL/contents.rdf
@@ -1,17 +1,17 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:nl-NL"/>
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:locale:nl-NL">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:locale:nl-NL:packages">
- <RDF:li resource="urn:mozilla:locale:nl-NL:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
-</RDF:RDF>
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:nl-NL"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:locale:nl-NL">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:nl-NL:packages">
+ <RDF:li resource="urn:mozilla:locale:nl-NL:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/sage/locale/nl-NL/opml.dtd b/src/sage/locale/nl-NL/opml.dtd
index 4bfbcd6..e82623f 100644
--- a/src/sage/locale/nl-NL/opml.dtd
+++ b/src/sage/locale/nl-NL/opml.dtd
@@ -1,11 +1,11 @@
-<!ENTITY pageStart.label "OPML Importeer/Exporteer Wizard">
-<!ENTITY pageStart.desc "Kies een actie">
-<!ENTITY pageImport.label "Importeer OPML">
-<!ENTITY pageImport.desc "Selecteer OPML bestand om te importeren">
-<!ENTITY pageExport.label "Exporteer OPML">
-<!ENTITY pageExport.desc "Selecteer OPML bestand om te exporteren">
-
-<!ENTITY rdoImport.label "Importeer OPML">
-<!ENTITY rdoExport.label "Exporteer OPML">
-
-<!ENTITY browseButton.label "Verkennen...">
+<!ENTITY pageStart.label "OPML Importeer/Exporteer Wizard">
+<!ENTITY pageStart.desc "Kies een actie">
+<!ENTITY pageImport.label "Importeer OPML">
+<!ENTITY pageImport.desc "Selecteer OPML bestand om te importeren">
+<!ENTITY pageExport.label "Exporteer OPML">
+<!ENTITY pageExport.desc "Selecteer OPML bestand om te exporteren">
+
+<!ENTITY rdoImport.label "Importeer OPML">
+<!ENTITY rdoExport.label "Exporteer OPML">
+
+<!ENTITY browseButton.label "Verkennen...">
diff --git a/src/sage/locale/nl-NL/sage.dtd b/src/sage/locale/nl-NL/sage.dtd
index ce81070..6db13f5 100644
--- a/src/sage/locale/nl-NL/sage.dtd
+++ b/src/sage/locale/nl-NL/sage.dtd
@@ -1,52 +1,52 @@
-<!ENTITY sage.label "Sage">
-<!ENTITY sage.version "1.2.2">
-<!ENTITY sage.version.label "versie">
-
-<!ENTITY sage.toolbarLabel "Sage">
-<!ENTITY sage.sidebarTitle "Sage">
-<!ENTITY sage.tooltip "Toon Sage">
-
-<!ENTITY menu.view "Beeld">
-<!ENTITY menu.showSearchBar "Toon feed zoekbalk">
-<!ENTITY menu.showFeedItemList "Toon feed itemlijst">
-<!ENTITY menu.showDescTooltip "Toon beschrijvende tooltips">
-<!ENTITY menu.openHTML "Open feeds in Contents Area">
-<!ENTITY menu.tools "Opties">
-<!ENTITY menu.checkUpdate "Controleer feeds">
-<!ENTITY menu.manageRSSList "Beheer feedlijst...">
-<!ENTITY menu.opmlImportExport "OPML Importeren/Exporteren...">
-<!ENTITY menu.setting "Instellingen...">
-<!ENTITY menu.sageProjectFeed "Sage Projectnieuws">
-<!ENTITY menu.discoverFeeds "Ontdek feeds">
-
-<!-- Feed Discovery -->
-<!ENTITY discovery.status.searching "Zoeken op huidige pagina">
-<!ENTITY discovery.button.addFeed "Feed toevoegen">
-<!ENTITY discovery.button.close "Sluiten">
-<!ENTITY discovery.header.title "Titel">
-<!ENTITY discovery.header.format "Formaat">
-<!ENTITY discovery.header.lastPubDate "Laatste update">
-<!ENTITY discovery.header.itemCount "Items">
-<!ENTITY discovery.header.url "URL">
-
-<!-- Settings Dialog -->
-<!ENTITY settings.general.caption "Algemeen">
-<!ENTITY settings.autoFeedTitle.label "Automatisch feedtitels bijwerken">
-<!ENTITY settings.renderFeeds.label "Feeds weergeven in Contents Area">
-<!ENTITY settings.twelveHourClock.label "Gebruik 12-uurs klok">
-<!ENTITY settings.feedItemOrder.label "Volgorde van feeditems">
-<!ENTITY settings.feedItemOrder.chrono "Chronologisch">
-<!ENTITY settings.feedItemOrder.source "Bron">
-<!ENTITY settings.feedDiscoveryMode.label "Feed ontdekkingsmodus">
-<!ENTITY settings.feedDiscoveryMode.exhaustive "Grondig">
-<!ENTITY settings.feedDiscoveryMode.conservative "Conservatief">
-<!ENTITY settingWindow.title "Sage instellingen">
-<!ENTITY selectFolder.label "Selecteer map met feeds">
-<!ENTITY openInContentsArea.caption "Feedweergave">
-<!ENTITY enableUserCss.label "Gebruik aangepaste CSS">
-<!ENTITY browseCss.label "Verkennen...">
-<!ENTITY allowEContent.label "HTML tags toestaan">
-
-
-<!ENTITY openSageSidebar.commandkey "S">
-<!ENTITY openSageSidebar.modifiersKey "alt">
+<!ENTITY sage.label "Sage">
+<!ENTITY sage.version "1.2.2">
+<!ENTITY sage.version.label "versie">
+
+<!ENTITY sage.toolbarLabel "Sage">
+<!ENTITY sage.sidebarTitle "Sage">
+<!ENTITY sage.tooltip "Toon Sage">
+
+<!ENTITY menu.view "Beeld">
+<!ENTITY menu.showSearchBar "Toon feed zoekbalk">
+<!ENTITY menu.showFeedItemList "Toon feed itemlijst">
+<!ENTITY menu.showDescTooltip "Toon beschrijvende tooltips">
+<!ENTITY menu.openHTML "Open feeds in Contents Area">
+<!ENTITY menu.tools "Opties">
+<!ENTITY menu.checkUpdate "Controleer feeds">
+<!ENTITY menu.manageRSSList "Beheer feedlijst...">
+<!ENTITY menu.opmlImportExport "OPML Importeren/Exporteren...">
+<!ENTITY menu.setting "Instellingen...">
+<!ENTITY menu.sageProjectFeed "Sage Projectnieuws">
+<!ENTITY menu.discoverFeeds "Ontdek feeds">
+
+<!-- Feed Discovery -->
+<!ENTITY discovery.status.searching "Zoeken op huidige pagina">
+<!ENTITY discovery.button.addFeed "Feed toevoegen">
+<!ENTITY discovery.button.close "Sluiten">
+<!ENTITY discovery.header.title "Titel">
+<!ENTITY discovery.header.format "Formaat">
+<!ENTITY discovery.header.lastPubDate "Laatste update">
+<!ENTITY discovery.header.itemCount "Items">
+<!ENTITY discovery.header.url "URL">
+
+<!-- Settings Dialog -->
+<!ENTITY settings.general.caption "Algemeen">
+<!ENTITY settings.autoFeedTitle.label "Automatisch feedtitels bijwerken">
+<!ENTITY settings.renderFeeds.label "Feeds weergeven in Contents Area">
+<!ENTITY settings.twelveHourClock.label "Gebruik 12-uurs klok">
+<!ENTITY settings.feedItemOrder.label "Volgorde van feeditems">
+<!ENTITY settings.feedItemOrder.chrono "Chronologisch">
+<!ENTITY settings.feedItemOrder.source "Bron">
+<!ENTITY settings.feedDiscoveryMode.label "Feed ontdekkingsmodus">
+<!ENTITY settings.feedDiscoveryMode.exhaustive "Grondig">
+<!ENTITY settings.feedDiscoveryMode.conservative "Conservatief">
+<!ENTITY settingWindow.title "Sage instellingen">
+<!ENTITY selectFolder.label "Selecteer map met feeds">
+<!ENTITY openInContentsArea.caption "Feedweergave">
+<!ENTITY enableUserCss.label "Gebruik aangepaste CSS">
+<!ENTITY browseCss.label "Verkennen...">
+<!ENTITY allowEContent.label "HTML tags toestaan">
+
+
+<!ENTITY openSageSidebar.commandkey "S">
+<!ENTITY openSageSidebar.modifiersKey "alt">
diff --git a/src/sage/locale/nl-NL/sage.properties b/src/sage/locale/nl-NL/sage.properties
index 8b865f7..a8bbb41 100644
--- a/src/sage/locale/nl-NL/sage.properties
+++ b/src/sage/locale/nl-NL/sage.properties
@@ -1,90 +1,90 @@
-RESULT_OK_STR = OK
-RESULT_PARSE_ERROR_STR = XML parse fout
-RESULT_NOT_RSS_STR = Feed parse fout
-RESULT_NOT_FOUND_STR = Bestand niet gevonden
-RESULT_NOT_AVAILABLE_STR = URL niet beschikbaar
-RESULT_ERROR_FAILURE_STR = Laadfout
-RESULT_LOADING = Bezig met laden
-RESULT_CHECKING = Bezig met controleren
-
-CHECK_UPDATE = Controleer feeds
-GET_RSS_TITLE= Feedtitel ophalen
-
-
-# feed discovery messages
-
-discovery_external_feeds_category = Externe feeds
-discovery_status_discovered = Ontdekt
-discovery_status_site_feed = site feed
-discovery_status_site_feeds = site feeds
-discovery_status_and = en
-discovery_status_external_feed = externe feed
-discovery_status_external_feeds = externe feeds
-discovery_status_none_found = Geen feeds ontdekt
-
-
-# get feed title dialog
-
-get_feed_title = Nieuwe feedtitel
-
-
-# OPML wizzard
-
-opml_import_done = Import volledig
-opml_export_done = Export volledig
-opml_path_blank = Kies alstublieft een OPML bestand.
-opml_path_nofile = Het opgegeven bestand bestaat niet.
-opml_path_invalid = Ongeldig bestandspad.
-opml_import_fail = Laadfout
-opml_import_badfile = Dit blijkt geen OPML bestand te zijn.
-opml_export_nocreate = Fout bij aanmaken bestand
-opml_select_file = Selecteer OPML bestand
-opml_opml_file = OPML bestand
-
-# Date rendering values
-
-date_sunday = Zondag
-date_sunday_short = Zo
-date_monday = Maandag
-date_monday_short = Ma
-date_tuesday = Dinsdag
-date_tuesday_short = Di
-date_wednesday = Woensdag
-date_wednesday_short = Woe
-date_thursday = Donderdag
-date_thursday_short = Do
-date_friday = Vrijdag
-date_friday_short = Vrij
-date_saturday = Zaterdag
-date_saturday_short = Za
-
-date_january = Januari
-date_january_short = Jan
-date_february = Februari
-date_february_short = Feb
-date_march = Maart
-date_march_short = Maa
-date_april = April
-date_april_short = Apr
-date_may = Mei
-date_may_short = Mei
-date_june = Juni
-date_june_short = Jun
-date_july = Juli
-date_july_short = Jul
-date_august = Augustus
-date_august_short = Aug
-date_september = September
-date_september_short = Sep
-date_october = Oktober
-date_october_short = Okt
-date_november = November
-date_november_short = Nov
-date_december = December
-date_december_short = Dec
-
-# Item context menu
-itemcontext_markasread = Mark as Read
-itemcontext_markasunread = Mark as Unread
-itemcontext_markallasread = Mark All as Read
-itemcontext_markallasunread = Mark All as Unread
+RESULT_OK_STR = OK
+RESULT_PARSE_ERROR_STR = XML parse fout
+RESULT_NOT_RSS_STR = Feed parse fout
+RESULT_NOT_FOUND_STR = Bestand niet gevonden
+RESULT_NOT_AVAILABLE_STR = URL niet beschikbaar
+RESULT_ERROR_FAILURE_STR = Laadfout
+RESULT_LOADING = Bezig met laden
+RESULT_CHECKING = Bezig met controleren
+
+CHECK_UPDATE = Controleer feeds
+GET_RSS_TITLE= Feedtitel ophalen
+
+
+# feed discovery messages
+
+discovery_external_feeds_category = Externe feeds
+discovery_status_discovered = Ontdekt
+discovery_status_site_feed = site feed
+discovery_status_site_feeds = site feeds
+discovery_status_and = en
+discovery_status_external_feed = externe feed
+discovery_status_external_feeds = externe feeds
+discovery_status_none_found = Geen feeds ontdekt
+
+
+# get feed title dialog
+
+get_feed_title = Nieuwe feedtitel
+
+
+# OPML wizzard
+
+opml_import_done = Import volledig
+opml_export_done = Export volledig
+opml_path_blank = Kies alstublieft een OPML bestand.
+opml_path_nofile = Het opgegeven bestand bestaat niet.
+opml_path_invalid = Ongeldig bestandspad.
+opml_import_fail = Laadfout
+opml_import_badfile = Dit blijkt geen OPML bestand te zijn.
+opml_export_nocreate = Fout bij aanmaken bestand
+opml_select_file = Selecteer OPML bestand
+opml_opml_file = OPML bestand
+
+# Date rendering values
+
+date_sunday = Zondag
+date_sunday_short = Zo
+date_monday = Maandag
+date_monday_short = Ma
+date_tuesday = Dinsdag
+date_tuesday_short = Di
+date_wednesday = Woensdag
+date_wednesday_short = Woe
+date_thursday = Donderdag
+date_thursday_short = Do
+date_friday = Vrijdag
+date_friday_short = Vrij
+date_saturday = Zaterdag
+date_saturday_short = Za
+
+date_january = Januari
+date_january_short = Jan
+date_february = Februari
+date_february_short = Feb
+date_march = Maart
+date_march_short = Maa
+date_april = April
+date_april_short = Apr
+date_may = Mei
+date_may_short = Mei
+date_june = Juni
+date_june_short = Jun
+date_july = Juli
+date_july_short = Jul
+date_august = Augustus
+date_august_short = Aug
+date_september = September
+date_september_short = Sep
+date_october = Oktober
+date_october_short = Okt
+date_november = November
+date_november_short = Nov
+date_december = December
+date_december_short = Dec
+
+# Item context menu
+itemcontext_markasread = Mark as Read
+itemcontext_markasunread = Mark as Unread
+itemcontext_markallasread = Mark All as Read
+itemcontext_markallasunread = Mark All as Unread
diff --git a/src/sage/locale/ru-RU/contents.rdf b/src/sage/locale/ru-RU/contents.rdf
index 16841b0..8111545 100644
--- a/src/sage/locale/ru-RU/contents.rdf
+++ b/src/sage/locale/ru-RU/contents.rdf
@@ -1,17 +1,17 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:ru-RU"/>
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:locale:ru-RU">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:locale:ru-RU:packages">
- <RDF:li resource="urn:mozilla:locale:ru-RU:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
-</RDF:RDF>
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:ru-RU"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:locale:ru-RU">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:ru-RU:packages">
+ <RDF:li resource="urn:mozilla:locale:ru-RU:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/sage/locale/ru-RU/opml.dtd b/src/sage/locale/ru-RU/opml.dtd
index 7e84b7b..4fc4327 100644
--- a/src/sage/locale/ru-RU/opml.dtd
+++ b/src/sage/locale/ru-RU/opml.dtd
@@ -1,11 +1,11 @@
-<!ENTITY pageStart.label "Мастер импорта/экспорта OPML">
-<!ENTITY pageStart.desc "Выберите действие">
-<!ENTITY pageImport.label "Импорт OPML">
-<!ENTITY pageImport.desc "Выберите файл OPML для импорта">
-<!ENTITY pageExport.label "Экспорт OPML">
-<!ENTITY pageExport.desc "Выберите файл OPML для экспорта">
-
-<!ENTITY rdoImport.label "Импорт OPML">
-<!ENTITY rdoExport.label "Экспорт OPML">
-
+<!ENTITY pageStart.label "Мастер импорта/экспорта OPML">
+<!ENTITY pageStart.desc "Выберите действие">
+<!ENTITY pageImport.label "Импорт OPML">
+<!ENTITY pageImport.desc "Выберите файл OPML для импорта">
+<!ENTITY pageExport.label "Экспорт OPML">
+<!ENTITY pageExport.desc "Выберите файл OPML для экспорта">
+
+<!ENTITY rdoImport.label "Импорт OPML">
+<!ENTITY rdoExport.label "Экспорт OPML">
+
<!ENTITY browseButton.label "Пролистать...">
\ No newline at end of file
diff --git a/src/sage/locale/ru-RU/sage.dtd b/src/sage/locale/ru-RU/sage.dtd
index 5fa1b6e..4d46346 100644
--- a/src/sage/locale/ru-RU/sage.dtd
+++ b/src/sage/locale/ru-RU/sage.dtd
@@ -1,51 +1,51 @@
-<!ENTITY sage.label "Sage">
-<!ENTITY sage.version "1.2.2">
-<!ENTITY sage.version.label "версия">
-
-<!ENTITY sage.toolbarLabel "Sage">
-<!ENTITY sage.sidebarTitle "Sage">
-<!ENTITY sage.tooltip "Показывает Sage">
-
-<!ENTITY menu.view "Вид">
-<!ENTITY menu.showSearchBar "Показывать строку поиска лент">
-<!ENTITY menu.showFeedItemList "Показывать элементы ленты">
-<!ENTITY menu.showDescTooltip "Показывать всплывающие описания">
-<!ENTITY menu.openHTML "Открывать ленты в основном окне">
-<!ENTITY menu.tools "Настройки">
-<!ENTITY menu.checkUpdate "Проверить обновления">
-<!ENTITY menu.manageRSSList "Управлять лентами...">
-<!ENTITY menu.opmlImportExport "Импорт/Экспорт OPML...">
-<!ENTITY menu.setting "Настройки...">
-<!ENTITY menu.sageProjectFeed "Новости проекта Sage">
-<!ENTITY menu.discoverFeeds "Найти ленты">
-
-<!-- Feed Discovery -->
-<!ENTITY discovery.status.searching "Поиск в текущей странице">
-<!ENTITY discovery.button.addFeed "Добавить ленту">
-<!ENTITY discovery.button.close "Закрыть">
-<!ENTITY discovery.header.title "Заголовок">
-<!ENTITY discovery.header.format "Формат">
-<!ENTITY discovery.header.lastPubDate "Последнее обновление">
-<!ENTITY discovery.header.itemCount "Элементов">
-<!ENTITY discovery.header.url "URL">
-
-<!-- Settings Dialog -->
-<!ENTITY settings.general.caption "Общие">
-<!ENTITY settings.autoFeedTitle.label "Автоматически обновлять заголовки лент">
-<!ENTITY settings.renderFeeds.label "Отображать ленты в основном окне">
-<!ENTITY settings.twelveHourClock.label "Время в AM/PM">
-<!ENTITY settings.feedItemOrder.label "Порядок элементов в ленте">
-<!ENTITY settings.feedItemOrder.chrono "Хронологический">
-<!ENTITY settings.feedItemOrder.source "Как в источнике">
-<!ENTITY settings.feedDiscoveryMode.label "Режим поиска лент">
-<!ENTITY settings.feedDiscoveryMode.exhaustive "Исчерпывающий">
-<!ENTITY settings.feedDiscoveryMode.conservative "Консервативный">
-<!ENTITY settingWindow.title "Настройки Sage">
-<!ENTITY selectFolder.label "Выберите папку для лент">
-<!ENTITY openInContentsArea.caption "Отображение лент">
-<!ENTITY enableUserCss.label "Использовать личную CSS">
-<!ENTITY browseCss.label "Пролистать...">
-<!ENTITY allowEContent.label "Разрешить HTML-тэги">
-
-<!ENTITY openSageSidebar.commandkey "S">
+<!ENTITY sage.label "Sage">
+<!ENTITY sage.version "1.2.2">
+<!ENTITY sage.version.label "версия">
+
+<!ENTITY sage.toolbarLabel "Sage">
+<!ENTITY sage.sidebarTitle "Sage">
+<!ENTITY sage.tooltip "Показывает Sage">
+
+<!ENTITY menu.view "Вид">
+<!ENTITY menu.showSearchBar "Показывать строку поиска лент">
+<!ENTITY menu.showFeedItemList "Показывать элементы ленты">
+<!ENTITY menu.showDescTooltip "Показывать всплывающие описания">
+<!ENTITY menu.openHTML "Открывать ленты в основном окне">
+<!ENTITY menu.tools "Настройки">
+<!ENTITY menu.checkUpdate "Проверить обновления">
+<!ENTITY menu.manageRSSList "Управлять лентами...">
+<!ENTITY menu.opmlImportExport "Импорт/Экспорт OPML...">
+<!ENTITY menu.setting "Настройки...">
+<!ENTITY menu.sageProjectFeed "Новости проекта Sage">
+<!ENTITY menu.discoverFeeds "Найти ленты">
+
+<!-- Feed Discovery -->
+<!ENTITY discovery.status.searching "Поиск в текущей странице">
+<!ENTITY discovery.button.addFeed "Добавить ленту">
+<!ENTITY discovery.button.close "Закрыть">
+<!ENTITY discovery.header.title "Заголовок">
+<!ENTITY discovery.header.format "Формат">
+<!ENTITY discovery.header.lastPubDate "Последнее обновление">
+<!ENTITY discovery.header.itemCount "Элементов">
+<!ENTITY discovery.header.url "URL">
+
+<!-- Settings Dialog -->
+<!ENTITY settings.general.caption "Общие">
+<!ENTITY settings.autoFeedTitle.label "Автоматически обновлять заголовки лент">
+<!ENTITY settings.renderFeeds.label "Отображать ленты в основном окне">
+<!ENTITY settings.twelveHourClock.label "Время в AM/PM">
+<!ENTITY settings.feedItemOrder.label "Порядок элементов в ленте">
+<!ENTITY settings.feedItemOrder.chrono "Хронологический">
+<!ENTITY settings.feedItemOrder.source "Как в источнике">
+<!ENTITY settings.feedDiscoveryMode.label "Режим поиска лент">
+<!ENTITY settings.feedDiscoveryMode.exhaustive "Исчерпывающий">
+<!ENTITY settings.feedDiscoveryMode.conservative "Консервативный">
+<!ENTITY settingWindow.title "Настройки Sage">
+<!ENTITY selectFolder.label "Выберите папку для лент">
+<!ENTITY openInContentsArea.caption "Отображение лент">
+<!ENTITY enableUserCss.label "Использовать личную CSS">
+<!ENTITY browseCss.label "Пролистать...">
+<!ENTITY allowEContent.label "Разрешить HTML-тэги">
+
+<!ENTITY openSageSidebar.commandkey "S">
<!ENTITY openSageSidebar.modifiersKey "alt">
\ No newline at end of file
diff --git a/src/sage/locale/ru-RU/sage.properties b/src/sage/locale/ru-RU/sage.properties
index bae88e3..2204577 100644
--- a/src/sage/locale/ru-RU/sage.properties
+++ b/src/sage/locale/ru-RU/sage.properties
@@ -1,84 +1,84 @@
-RESULT_OK_STR = OK
-RESULT_PARSE_ERROR_STR = Ошибка обработки XML
-RESULT_NOT_RSS_STR = Ошибка обработки ленты
-RESULT_NOT_FOUND_STR = Файл не найден
-RESULT_NOT_AVAILABLE_STR = URL не доступен
-RESULT_ERROR_FAILURE_STR = Ошибка загрузки
-RESULT_LOADING = Загрузка
-RESULT_CHECKING = Проверка
-
-CHECK_UPDATE = Проверить обновления
-GET_RSS_TITLE= Получить заголовок ленты
-
-
-# feed discovery messages
-
-discovery_external_feeds_category = Внешние ленты
-discovery_status_discovered = Найденные ленты
-discovery_status_site_feed = лента сайта
-discovery_status_site_feeds = ленты сайта
-discovery_status_and = и
-discovery_status_external_feed = внешняя лента
-discovery_status_external_feeds = внешние ленты
-discovery_status_none_found = Ленты не найдены
-
-
-# get feed title dialog
-
-get_feed_title = Новое название ленты
-
-
-# OPML wizzard
-
-opml_import_done = Импорт завершен
-opml_export_done = Экспорт завершен
-opml_path_blank = Выберите файл OPML.
-opml_path_nofile = Выбранный файл не существует.
-opml_path_invalid = Неправильный путь файла.
-opml_import_fail = Ошибка загрузки
-opml_import_badfile = Этот файл не является правильным файлом OPML.
-opml_export_nocreate = Ошибка создания файла
-opml_select_file = Выберите файл OPML
-opml_opml_file = Файл OPML
-
-# Date rendering values
-
-date_sunday = Воскресенье
-date_sunday_short = Вс
-date_monday = Понедельник
-date_monday_short = Пн
-date_tuesday = Вторник
-date_tuesday_short = Вт
-date_wednesday = Среда
-date_wednesday_short = Ср
-date_thursday = Четверг
-date_thursday_short = Чт
-date_friday = Пятница
-date_friday_short = Пт
-date_saturday = Суббота
-date_saturday_short = Сб
-
-date_january = Январь
-date_january_short = Янв
-date_february = Февраль
-date_february_short = Фвр
-date_march = Март
-date_march_short = Мрт
-date_april = Апрель
-date_april_short = Апр
-date_may = Май
-date_may_short = Май
-date_june = Июнь
-date_june_short = Июн
-date_july = Июль
-date_july_short = Июл
-date_august = Август
-date_august_short = Авг
-date_september = Сентябрь
-date_september_short = Снт
-date_october = Октябрь
-date_october_short = Окт
-date_november = Ноябрь
-date_november_short = Нбр
-date_december = Декабрь
+RESULT_OK_STR = OK
+RESULT_PARSE_ERROR_STR = Ошибка обработки XML
+RESULT_NOT_RSS_STR = Ошибка обработки ленты
+RESULT_NOT_FOUND_STR = Файл не найден
+RESULT_NOT_AVAILABLE_STR = URL не доступен
+RESULT_ERROR_FAILURE_STR = Ошибка загрузки
+RESULT_LOADING = Загрузка
+RESULT_CHECKING = Проверка
+
+CHECK_UPDATE = Проверить обновления
+GET_RSS_TITLE= Получить заголовок ленты
+
+
+# feed discovery messages
+
+discovery_external_feeds_category = Внешние ленты
+discovery_status_discovered = Найденные ленты
+discovery_status_site_feed = лента сайта
+discovery_status_site_feeds = ленты сайта
+discovery_status_and = и
+discovery_status_external_feed = внешняя лента
+discovery_status_external_feeds = внешние ленты
+discovery_status_none_found = Ленты не найдены
+
+
+# get feed title dialog
+
+get_feed_title = Новое название ленты
+
+
+# OPML wizzard
+
+opml_import_done = Импорт завершен
+opml_export_done = Экспорт завершен
+opml_path_blank = Выберите файл OPML.
+opml_path_nofile = Выбранный файл не существует.
+opml_path_invalid = Неправильный путь файла.
+opml_import_fail = Ошибка загрузки
+opml_import_badfile = Этот файл не является правильным файлом OPML.
+opml_export_nocreate = Ошибка создания файла
+opml_select_file = Выберите файл OPML
+opml_opml_file = Файл OPML
+
+# Date rendering values
+
+date_sunday = Воскресенье
+date_sunday_short = Вс
+date_monday = Понедельник
+date_monday_short = Пн
+date_tuesday = Вторник
+date_tuesday_short = Вт
+date_wednesday = Среда
+date_wednesday_short = Ср
+date_thursday = Четверг
+date_thursday_short = Чт
+date_friday = Пятница
+date_friday_short = Пт
+date_saturday = Суббота
+date_saturday_short = Сб
+
+date_january = Январь
+date_january_short = Янв
+date_february = Февраль
+date_february_short = Фвр
+date_march = Март
+date_march_short = Мрт
+date_april = Апрель
+date_april_short = Апр
+date_may = Май
+date_may_short = Май
+date_june = Июнь
+date_june_short = Июн
+date_july = Июль
+date_july_short = Июл
+date_august = Август
+date_august_short = Авг
+date_september = Сентябрь
+date_september_short = Снт
+date_october = Октябрь
+date_october_short = Окт
+date_november = Ноябрь
+date_november_short = Нбр
+date_december = Декабрь
date_december_short = Дкб
\ No newline at end of file
diff --git a/src/sage/locale/zh-TW/contents.rdf b/src/sage/locale/zh-TW/contents.rdf
index 9647df6..77df98e 100644
--- a/src/sage/locale/zh-TW/contents.rdf
+++ b/src/sage/locale/zh-TW/contents.rdf
@@ -1,17 +1,17 @@
-<?xml version="1.0" charset="utf-8"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:locale:root">
- <RDF:li resource="urn:mozilla:locale:zh-TW"/>
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:locale:zh-TW">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:locale:zh-TW:packages">
- <RDF:li resource="urn:mozilla:locale:zh-TW:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
-</RDF:RDF>
+<?xml version="1.0" charset="utf-8"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:zh-TW"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:locale:zh-TW">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:zh-TW:packages">
+ <RDF:li resource="urn:mozilla:locale:zh-TW:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/sage/locale/zh-TW/opml.dtd b/src/sage/locale/zh-TW/opml.dtd
index e1aaeb6..4b87729 100644
--- a/src/sage/locale/zh-TW/opml.dtd
+++ b/src/sage/locale/zh-TW/opml.dtd
@@ -1,11 +1,11 @@
-<!ENTITY pageStart.label "OPML 匯入/匯出 精靈">
-<!ENTITY pageStart.desc "挑選你要的動作">
-<!ENTITY pageImport.label "匯入 OPML">
-<!ENTITY pageImport.desc "選擇一個要匯入的 OPML 檔案">
-<!ENTITY pageExport.label "匯出 OPML">
-<!ENTITY pageExport.desc "選擇一個要匯出的 OPML 檔案">
-
-<!ENTITY rdoImport.label "匯入 OPML">
-<!ENTITY rdoExport.label "匯出 OPML">
-
-<!ENTITY browseButton.label "瀏覽...">
+<!ENTITY pageStart.label "OPML 匯入/匯出 精靈">
+<!ENTITY pageStart.desc "挑選你要的動作">
+<!ENTITY pageImport.label "匯入 OPML">
+<!ENTITY pageImport.desc "選擇一個要匯入的 OPML 檔案">
+<!ENTITY pageExport.label "匯出 OPML">
+<!ENTITY pageExport.desc "選擇一個要匯出的 OPML 檔案">
+
+<!ENTITY rdoImport.label "匯入 OPML">
+<!ENTITY rdoExport.label "匯出 OPML">
+
+<!ENTITY browseButton.label "瀏覽...">
diff --git a/src/sage/skin/classic/contents.rdf b/src/sage/skin/classic/contents.rdf
index c768778..2a3c4fc 100755
--- a/src/sage/skin/classic/contents.rdf
+++ b/src/sage/skin/classic/contents.rdf
@@ -1,29 +1,29 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
-
- <RDF:Seq about="urn:mozilla:skin:root">
- <RDF:li resource="urn:mozilla:skin:classic/1.0" />
- </RDF:Seq>
-
- <RDF:Description about="urn:mozilla:skin:classic/1.0">
- <chrome:packages>
- <RDF:Seq about="urn:mozilla:skin:classic/1.0:packages">
- <RDF:li resource="urn:mozilla:skin:classic/1.0:sage"/>
- </RDF:Seq>
- </chrome:packages>
- </RDF:Description>
-
-
- <RDF:Seq about="urn:mozilla:stylesheets">
- <RDF:li resource="chrome://browser/content/browser.xul"/>
- <RDF:li resource="chrome://global/content/customizeToolbar.xul"/>
- </RDF:Seq>
- <RDF:Seq about="chrome://browser/content/browser.xul">
- <RDF:li>chrome://sage/skin/sage-button.css</RDF:li>
- </RDF:Seq>
- <RDF:Seq about="chrome://global/content/customizeToolbar.xul">
- <RDF:li>chrome://sage/skin/sage-button.css</RDF:li>
- </RDF:Seq>
-</RDF:RDF>
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <RDF:Seq about="urn:mozilla:skin:root">
+ <RDF:li resource="urn:mozilla:skin:classic/1.0" />
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:skin:classic/1.0">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:skin:classic/1.0:packages">
+ <RDF:li resource="urn:mozilla:skin:classic/1.0:sage"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+
+
+ <RDF:Seq about="urn:mozilla:stylesheets">
+ <RDF:li resource="chrome://browser/content/browser.xul"/>
+ <RDF:li resource="chrome://global/content/customizeToolbar.xul"/>
+ </RDF:Seq>
+ <RDF:Seq about="chrome://browser/content/browser.xul">
+ <RDF:li>chrome://sage/skin/sage-button.css</RDF:li>
+ </RDF:Seq>
+ <RDF:Seq about="chrome://global/content/customizeToolbar.xul">
+ <RDF:li>chrome://sage/skin/sage-button.css</RDF:li>
+ </RDF:Seq>
+</RDF:RDF>
diff --git a/src/sage/skin/classic/sage-button.css b/src/sage/skin/classic/sage-button.css
index b412160..b8bfcc2 100755
--- a/src/sage/skin/classic/sage-button.css
+++ b/src/sage/skin/classic/sage-button.css
@@ -1,9 +1,9 @@
- at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-#sage-button {
- list-style-image: url("chrome://sage/skin/sage.png");
-}
-
-toolbar[iconsize="small"] #sage-button {
- list-style-image: url("chrome://sage/skin/sage-small.png");
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+#sage-button {
+ list-style-image: url("chrome://sage/skin/sage.png");
+}
+
+toolbar[iconsize="small"] #sage-button {
+ list-style-image: url("chrome://sage/skin/sage-small.png");
}
\ No newline at end of file
diff --git a/src/sage/skin/classic/sage.css b/src/sage/skin/classic/sage.css
index 4187d22..eb0f4b4 100755
--- a/src/sage/skin/classic/sage.css
+++ b/src/sage/skin/classic/sage.css
@@ -1,136 +1,136 @@
- at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-toolbarbutton.sage_button {
- list-style-image: url("chrome://sage/skin/toolbar.png") !important;
- -moz-binding: url("chrome://sage/skin/sage.xbl#toolbarbutton");
-}
-
-toolbarbutton.sage_button2 > .toolbarbutton-text {
- display: none !important;
-}
-
-#checkFeeds {
- -moz-image-region: rect(0px 26px 24px 0px) !important;
-}
-
-#checkFeeds[buttondown="true"] {
- -moz-image-region: rect(24px 26px 48px 0px) !important;
-}
-
-#checkFeeds[disabled="true"] {
- -moz-image-region: rect(48px 26px 72px 0px) !important;
-}
-
-#discoverFeeds {
- -moz-image-region: rect(0px 52px 24px 26px) !important;
-}
-
-#discoverFeeds[buttondown="true"] {
- -moz-image-region: rect(24px 52px 48px 26px) !important;
-}
-
-#discoverFeeds[disabled="true"] {
- -moz-image-region: rect(48px 52px 72px 26px) !important;
-}
-
-#bookmarksTree {
- -moz-binding: url("chrome://sage/content/bookmarksTree.xml#bookmarks-tree-name");
-}
-
-treechildren::-moz-tree-image(rss, updated) {
- -moz-image-region: auto !important;
- list-style-image: url("chrome://sage/skin/icon/updated.png") !important;
-}
-treechildren::-moz-tree-image(rss, no-updated),
-treechildren::-moz-tree-image(rss, no-check) {
- -moz-image-region: auto !important;
- list-style-image: url("chrome://sage/skin/icon/no-updated.png") !important;
-}
-treechildren::-moz-tree-image(rss, unknown) {
- -moz-image-region: auto !important;
- list-style-image: url("chrome://sage/skin/icon/unknown.png") !important;
-}
-treechildren::-moz-tree-image(rss, error) {
- -moz-image-region: auto !important;
- list-style-image: url("chrome://sage/skin/icon/error.gif") !important;
-}
-treechildren::-moz-tree-cell-text(rss, updated) {
- font-weight: bold !important;
-}
-
-#bookmarksTreeBox,
-#rssItemListBoxBox {
- min-height: 90px;
-}
-
-#rssItemListBox > listitem {
- font-weight: bold;
-}
-
-#rssItemListBox > listitem[visited="true"] {
- font-weight: normal;
-}
-
-#sage-splitter {
- border: none;
- border-bottom: 1px solid ThreeDLightShadow;
-}
-
-#rssStatusImage {
- margin-left: 4px;
- width: 16px;
- height: 16px;
-}
-#rssStatusImage[loading="true"] {
- list-style-image: url("chrome://sage/skin/icon/checking.gif");
-}
-#rssStatusImage[loading="error"] {
- list-style-image: url("chrome://sage/skin/icon/error.gif");
-}
-
-#rssTitleLabel[href]:hover{
- text-decoration: underline;
- cursor: pointer;
-}
-
-
-/* ++++++++++ Search ++++++++++ */
-#barSearch {
- padding-bottom: 2px;
-}
-
-#imgSearchEngine {
- width: 16px;
- height: 16px;
-}
-
-#btnSearchSubmit {
- -moz-appearance: none;
- margin: 2px 2px 2px 0px;
- min-width: 0px;
- min-height: 0px;
- list-style-image: url("chrome://sage/skin/icon/search-submit.gif");
-}
-
-/* ++++++++++ popupEX ++++++++++ */
-
-#rssItemToolTip {
- -moz-binding: url(chrome://sage/content/popupex.xml#popupex);
- padding: 0px !important;
-}
-
-.popupex-title {
- font-weight: bold;
- margin: 0px !important;
- padding: 3px !important;
-}
-
-.popupex-description {
- padding: 5px 5px 5px 20px !important;
- max-width: 26em;
-}
-
-.popupex-internal-box {
- margin: 2px;
- padding: 2px;
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+toolbarbutton.sage_button {
+ list-style-image: url("chrome://sage/skin/toolbar.png") !important;
+ -moz-binding: url("chrome://sage/skin/sage.xbl#toolbarbutton");
+}
+
+toolbarbutton.sage_button2 > .toolbarbutton-text {
+ display: none !important;
+}
+
+#checkFeeds {
+ -moz-image-region: rect(0px 26px 24px 0px) !important;
+}
+
+#checkFeeds[buttondown="true"] {
+ -moz-image-region: rect(24px 26px 48px 0px) !important;
+}
+
+#checkFeeds[disabled="true"] {
+ -moz-image-region: rect(48px 26px 72px 0px) !important;
+}
+
+#discoverFeeds {
+ -moz-image-region: rect(0px 52px 24px 26px) !important;
+}
+
+#discoverFeeds[buttondown="true"] {
+ -moz-image-region: rect(24px 52px 48px 26px) !important;
+}
+
+#discoverFeeds[disabled="true"] {
+ -moz-image-region: rect(48px 52px 72px 26px) !important;
+}
+
+#bookmarksTree {
+ -moz-binding: url("chrome://sage/content/bookmarksTree.xml#bookmarks-tree-name");
+}
+
+treechildren::-moz-tree-image(rss, updated) {
+ -moz-image-region: auto !important;
+ list-style-image: url("chrome://sage/skin/icon/updated.png") !important;
+}
+treechildren::-moz-tree-image(rss, no-updated),
+treechildren::-moz-tree-image(rss, no-check) {
+ -moz-image-region: auto !important;
+ list-style-image: url("chrome://sage/skin/icon/no-updated.png") !important;
+}
+treechildren::-moz-tree-image(rss, unknown) {
+ -moz-image-region: auto !important;
+ list-style-image: url("chrome://sage/skin/icon/unknown.png") !important;
+}
+treechildren::-moz-tree-image(rss, error) {
+ -moz-image-region: auto !important;
+ list-style-image: url("chrome://sage/skin/icon/error.gif") !important;
+}
+treechildren::-moz-tree-cell-text(rss, updated) {
+ font-weight: bold !important;
+}
+
+#bookmarksTreeBox,
+#rssItemListBoxBox {
+ min-height: 90px;
+}
+
+#rssItemListBox > listitem {
+ font-weight: bold;
+}
+
+#rssItemListBox > listitem[visited="true"] {
+ font-weight: normal;
+}
+
+#sage-splitter {
+ border: none;
+ border-bottom: 1px solid ThreeDLightShadow;
+}
+
+#rssStatusImage {
+ margin-left: 4px;
+ width: 16px;
+ height: 16px;
+}
+#rssStatusImage[loading="true"] {
+ list-style-image: url("chrome://sage/skin/icon/checking.gif");
+}
+#rssStatusImage[loading="error"] {
+ list-style-image: url("chrome://sage/skin/icon/error.gif");
+}
+
+#rssTitleLabel[href]:hover{
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+
+/* ++++++++++ Search ++++++++++ */
+#barSearch {
+ padding-bottom: 2px;
+}
+
+#imgSearchEngine {
+ width: 16px;
+ height: 16px;
+}
+
+#btnSearchSubmit {
+ -moz-appearance: none;
+ margin: 2px 2px 2px 0px;
+ min-width: 0px;
+ min-height: 0px;
+ list-style-image: url("chrome://sage/skin/icon/search-submit.gif");
+}
+
+/* ++++++++++ popupEX ++++++++++ */
+
+#rssItemToolTip {
+ -moz-binding: url(chrome://sage/content/popupex.xml#popupex);
+ padding: 0px !important;
+}
+
+.popupex-title {
+ font-weight: bold;
+ margin: 0px !important;
+ padding: 3px !important;
+}
+
+.popupex-description {
+ padding: 5px 5px 5px 20px !important;
+ max-width: 26em;
+}
+
+.popupex-internal-box {
+ margin: 2px;
+ padding: 2px;
}
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/sage-extension.git
More information about the Pkg-mozext-commits
mailing list