Mercurial > snowl
changeset 16:8efec269810d
get rid of init.js and a bunch of unused code in snowl.js
author | Myk Melez <myk@mozilla.org> |
---|---|
date | Tue, 15 Apr 2008 16:32:54 -0700 |
parents | 737eac0e575b |
children | c276e12f89fd |
files | extension/content/init.js extension/content/sidebar.js extension/content/sidebar.xul extension/content/snowl.js extension/content/snowl.xul extension/content/subscribe.js extension/content/subscribe.xul |
diffstat | 7 files changed, 19 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/extension/content/init.js Tue Apr 15 16:22:35 2008 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -if (typeof Cc == "undefined") var Cc = Components.classes; -if (typeof Ci == "undefined") var Ci = Components.interfaces; -if (typeof Cr == "undefined") var Cr = Components.results; -if (typeof Cu == "undefined") var Cu = Components.utils; - -Cu.import("resource://snowl/service.js"); -Cu.import("resource://snowl/datastore.js"); -Cu.import("resource://snowl/log4moz.js");
--- a/extension/content/sidebar.js Tue Apr 15 16:22:35 2008 -0700 +++ b/extension/content/sidebar.js Tue Apr 15 16:32:54 2008 -0700 @@ -1,3 +1,12 @@ +const Cc = Components.classes; +const Ci = Components.interfaces; +const Cr = Components.results; +const Cu = Components.utils; + +Cu.import("resource://snowl/service.js"); +Cu.import("resource://snowl/datastore.js"); +Cu.import("resource://snowl/log4moz.js"); + var gBrowserWindow = window.QueryInterface(Ci.nsIInterfaceRequestor). getInterface(Ci.nsIWebNavigation). QueryInterface(Ci.nsIDocShellTreeItem).
--- a/extension/content/sidebar.xul Tue Apr 15 16:22:35 2008 -0700 +++ b/extension/content/sidebar.xul Tue Apr 15 16:32:54 2008 -0700 @@ -40,7 +40,6 @@ <page id="snowlSidebar" title="Subscriptions" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - <script type="application/x-javascript" src="chrome://snowl/content/init.js"/> <script type="application/x-javascript" src="chrome://snowl/content/sidebar.js"/> <tree id="sourcesView" flex="1" onselect="SourcesView.onSelect(event)"
--- a/extension/content/snowl.js Tue Apr 15 16:22:35 2008 -0700 +++ b/extension/content/snowl.js Tue Apr 15 16:32:54 2008 -0700 @@ -1,21 +1,8 @@ var Snowl = { - _log: null, - init: function() { - this._service = SnowlService; - - this._initModules(); - - this._log = Log4Moz.Service.getLogger("Snowl.Controller"); - - //SnowlFeedClient.refresh("http://www.melez.com/mykzilla/atom.xml"); - SnowlView.onLoad(); }, - _initModules: function() { - }, - toggleView: function() { let container = document.getElementById("snowlViewContainer"); let splitter = document.getElementById("snowlViewSplitter"); @@ -27,22 +14,8 @@ container.hidden = true; splitter.hidden = true; } - }, + } - /** - * Reset the last refreshed time for the given source to the current time. - * - * XXX should this be setLastRefreshed and take a time parameter - * to set the last refreshed time to? - * - * aSource {SnowlMessageSource} the source for which to set the time - */ - resetLastRefreshed: function(aSource) { - let stmt = SnowlDatastore.createStatement("UPDATE sources SET lastRefreshed = :lastRefreshed WHERE id = :id"); - stmt.params.lastRefreshed = new Date().getTime(); - stmt.params.id = aSource.id; - stmt.execute(); - } }; window.addEventListener("load", function() { Snowl.init() }, false);
--- a/extension/content/snowl.xul Tue Apr 15 16:22:35 2008 -0700 +++ b/extension/content/snowl.xul Tue Apr 15 16:32:54 2008 -0700 @@ -6,8 +6,6 @@ <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="snowlOverlay"> - <!-- <script type="application/x-javascript" src="datastore.js"/> --> - <script type="application/x-javascript" src="init.js"/> <script type="application/x-javascript" src="view.js"/> <script type="application/x-javascript" src="snowl.js"/>
--- a/extension/content/subscribe.js Tue Apr 15 16:22:35 2008 -0700 +++ b/extension/content/subscribe.js Tue Apr 15 16:32:54 2008 -0700 @@ -1,3 +1,12 @@ +const Cc = Components.classes; +const Ci = Components.interfaces; +const Cr = Components.results; +const Cu = Components.utils; + +Cu.import("resource://snowl/service.js"); +Cu.import("resource://snowl/datastore.js"); +Cu.import("resource://snowl/log4moz.js"); + let Subscriber = { // Observer Service get _obsSvc() {
--- a/extension/content/subscribe.xul Tue Apr 15 16:22:35 2008 -0700 +++ b/extension/content/subscribe.xul Tue Apr 15 16:32:54 2008 -0700 @@ -7,7 +7,6 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" pack="center" align="center"> - <script type="application/x-javascript" src="chrome://snowl/content/init.js"/> <script type="application/x-javascript" src="chrome://snowl/content/feedclient.js"/> <script type="application/x-javascript" src="chrome://snowl/content/subscribe.js"/>