[Pkg-mozext-commits] [sage-extension] 32/39: project feed

David Prévot taffit at moszumanska.debian.org
Fri May 1 03:10:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag sage_1_1
in repository sage-extension.

commit 838215b9c21f044d75a8d15278f8f7369ca9831b
Author: Peter Andrews <petea at jhu.edu>
Date:   Tue Jun 1 00:12:11 2004 +0000

    project feed
---
 src/sage/content/sage.js       | 19 +++++++++++++------
 src/sage/content/sage.xul      |  2 ++
 src/sage/locale/en-US/sage.dtd |  1 +
 src/sage/locale/ja-JP/sage.dtd |  1 +
 4 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/sage/content/sage.js b/src/sage/content/sage.js
index bc45428..9e615d4 100755
--- a/src/sage/content/sage.js
+++ b/src/sage/content/sage.js
@@ -107,6 +107,13 @@ function openSettingDialog() {
 	window.openDialog(dialogURL, "", "chrome,dialog,modal");
 }
 
+function openSageProjectFeed() {
+	lastResource = null;
+	var feedURL = "http://sage.mozdev.org/rss.xml";
+	setStatusLoading();
+	httpGet(feedURL);
+}
+
 function manageRSSList() {
 	var dialogURL = "chrome://browser/content/bookmarks/bookmarksManager.xul";
 	window.openDialog(dialogURL, "", "chrome,all,dialog=no", sageFolderID);
@@ -412,7 +419,7 @@ function httpGet(aURL) {
 
 
 	try {
-		httpReq.open("GET" , aURL);
+		httpReq.open("GET", aURL);
 		httpReq.setRequestHeader("User-Agent", USER_AGENT);
 		httpReq.overrideMimeType("application/xml");
 	} catch(e) {
@@ -471,13 +478,13 @@ function httpGetResult(aResultCode) {
 	if(aResultCode == RESULT_OK) {
 		currentFeed = new Feed(responseXML);
 
-		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());
+		if(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());
+				}
 			}
-		}
 
-		if(lastResource.res) {
 			BMSVC.updateLastVisitedDate(lastResource.url, responseXML.characterSet);
 			CommonFunc.setBMDSProperty(lastResource.res, CommonFunc.BM_DESCRIPTION, CommonFunc.STATUS_NO_UPDATE);
 		}
diff --git a/src/sage/content/sage.xul b/src/sage/content/sage.xul
index 6170da0..e206625 100755
--- a/src/sage/content/sage.xul
+++ b/src/sage/content/sage.xul
@@ -63,6 +63,8 @@
 				<menuitem label="&menu.manageRSSList;" oncommand="manageRSSList()"/>
 				<menuitem label="&menu.opmlImportExport;" oncommand="openOPMLWizard()"/>
 				<menuseparator/>
+				<menuitem label="&menu.sageProjectFeed;" oncommand="openSageProjectFeed()"/>
+				<menuseparator/>
 				<menuitem label="&menu.setting;" oncommand="openSettingDialog()"/>
 			</menupopup>
 		</toolbarbutton>
diff --git a/src/sage/locale/en-US/sage.dtd b/src/sage/locale/en-US/sage.dtd
index 5c3ce81..ed6174f 100755
--- a/src/sage/locale/en-US/sage.dtd
+++ b/src/sage/locale/en-US/sage.dtd
@@ -15,6 +15,7 @@
 <!ENTITY menu.manageRSSList			"Manage Feed List...">
 <!ENTITY menu.opmlImportExport			"OPML Import/Export...">
 <!ENTITY menu.setting				"Settings...">
+<!ENTITY menu.sageProjectFeed				"Sage Project News">
 
 
 <!-- Setting Dialog -->
diff --git a/src/sage/locale/ja-JP/sage.dtd b/src/sage/locale/ja-JP/sage.dtd
index 4039a0c..031b326 100755
--- a/src/sage/locale/ja-JP/sage.dtd
+++ b/src/sage/locale/ja-JP/sage.dtd
@@ -16,6 +16,7 @@
 <!ENTITY menu.manageRSSList			"RSS リストの管理">
 <!ENTITY menu.opmlImportExport		"OPML インポート/エクスポート...">
 <!ENTITY menu.setting				"設定...">
+<!ENTITY menu.sageProjectFeed				"Sage Project News">
 
 
 <!-- Setting Dialog -->

-- 
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