From f27cfc745a5a63f1ebe2c8f00110c19e8ec9d41f Mon Sep 17 00:00:00 2001 From: saneyuki_s Date: Thu, 27 Sep 2012 15:40:14 +0900 Subject: [PATCH 1/2] Rename to 'TreeStyleTabBase' from 'TreeStyleTabUtils'. --- modules/fullTooltip.js | 2 +- modules/groupTab.js | 2 +- modules/pseudoTreeBuilder.js | 6 +++--- modules/utils.js | 10 +++++----- modules/window.js | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/fullTooltip.js b/modules/fullTooltip.js index 530f1939..627a1ffe 100644 --- a/modules/fullTooltip.js +++ b/modules/fullTooltip.js @@ -46,7 +46,7 @@ function FullTooltipManager(aOwner) this.init(aOwner); } FullTooltipManager.prototype = { - __proto__ : TreeStyleTabUtils, + __proto__ : TreeStyleTabBase, kTOOLTIP_MODE_DEFAULT : 0, kTOOLTIP_MODE_COLLAPSED : 1, diff --git a/modules/groupTab.js b/modules/groupTab.js index 3d344c51..00dde7fb 100644 --- a/modules/groupTab.js +++ b/modules/groupTab.js @@ -48,7 +48,7 @@ function GroupTab(aWindow) } GroupTab.prototype = { - __proto__ : TreeStyleTabUtils, + __proto__ : TreeStyleTabBase, initialized : false, shouldUpdate : false, diff --git a/modules/pseudoTreeBuilder.js b/modules/pseudoTreeBuilder.js index 5d63866f..a2161327 100644 --- a/modules/pseudoTreeBuilder.js +++ b/modules/pseudoTreeBuilder.js @@ -40,7 +40,7 @@ const Ci = Components.interfaces; Components.utils.import('resource://gre/modules/XPCOMUtils.jsm'); -XPCOMUtils.defineLazyModuleGetter(this, 'TreeStyleTabUtils', 'resource://treestyletab-modules/utils.js'); +XPCOMUtils.defineLazyModuleGetter(this, 'TreeStyleTabBase', 'resource://treestyletab-modules/utils.js'); var PseudoTreeBuilder = { @@ -105,7 +105,7 @@ var PseudoTreeBuilder = { if (w.isBlankPageURL ? !w.isBlankPageURL(uri) : (uri != 'about:blank')) tooltip += '\n' + uri; label.setAttribute('tooltiptext', tooltip); label.setAttribute('class', 'text-link '+this.kTREEITEM); - label.setAttribute('tab-id', TreeStyleTabUtils.getTabValue(aTab, TreeStyleTabUtils.kID)); + label.setAttribute('tab-id', TreeStyleTabBase.getTabValue(aTab, TreeStyleTabBase.kID)); var children = this.createTabChildren(aTab); if (children) { @@ -123,7 +123,7 @@ var PseudoTreeBuilder = { { var doc = aTab.ownerDocument; - var children = TreeStyleTabUtils.getChildTabs(aTab); + var children = TreeStyleTabBase.getChildTabs(aTab); if (!children.length) return null; diff --git a/modules/utils.js b/modules/utils.js index 59819086..b6aa64f5 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -33,7 +33,7 @@ * * ***** END LICENSE BLOCK ******/ -const EXPORTED_SYMBOLS = ['TreeStyleTabUtils']; +const EXPORTED_SYMBOLS = ['TreeStyleTabBase']; const Cc = Components.classes; const Ci = Components.interfaces; @@ -81,7 +81,7 @@ XPCOMUtils.defineLazyGetter(this, 'confirmWithPopup', function() { return ns.confirmWithPopup; }); -var TreeStyleTabUtils = { +var TreeStyleTabBase = { __proto__ : window['piro.sakura.ne.jp'].prefs, tabsHash : null, inWindowDestoructionProcess : false, @@ -2732,16 +2732,16 @@ var TreeStyleTabUtils = { applyOnlyForActiveWindow : false, setPrefForActiveWindow : function(aTask) { - TreeStyleTabUtils.applyOnlyForActiveWindow = true; + TreeStyleTabBase.applyOnlyForActiveWindow = true; try { aTask.call(this); } finally { - TreeStyleTabUtils.applyOnlyForActiveWindow = false; + TreeStyleTabBase.applyOnlyForActiveWindow = false; } } }; -TreeStyleTabUtils.init(); +TreeStyleTabBase.init(); diff --git a/modules/window.js b/modules/window.js index 86305118..8ffb22fe 100644 --- a/modules/window.js +++ b/modules/window.js @@ -71,8 +71,8 @@ function TreeStyleTabWindow(aWindow) TreeStyleTabWindow.prototype = { - utils : TreeStyleTabUtils, - __proto__ : TreeStyleTabUtils, + utils : TreeStyleTabBase, + __proto__ : TreeStyleTabBase, window : null, document : null, From f4340866c06a90fd13cef5f96b396b6220ca7463 Mon Sep 17 00:00:00 2001 From: saneyuki_s Date: Thu, 27 Sep 2012 15:42:50 +0900 Subject: [PATCH 2/2] Rename the file name to modules/base.js from modules/utils.js . --- modules/{utils.js => base.js} | 0 modules/fullTooltip.js | 2 +- modules/groupTab.js | 2 +- modules/pseudoTreeBuilder.js | 2 +- modules/themeManager.js | 2 +- modules/window.js | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename modules/{utils.js => base.js} (100%) diff --git a/modules/utils.js b/modules/base.js similarity index 100% rename from modules/utils.js rename to modules/base.js diff --git a/modules/fullTooltip.js b/modules/fullTooltip.js index 627a1ffe..8b58c717 100644 --- a/modules/fullTooltip.js +++ b/modules/fullTooltip.js @@ -38,7 +38,7 @@ const EXPORTED_SYMBOLS = ['FullTooltipManager']; const Cc = Components.classes; const Ci = Components.interfaces; -Components.utils.import('resource://treestyletab-modules/utils.js'); +Components.utils.import('resource://treestyletab-modules/base.js'); Components.utils.import('resource://treestyletab-modules/pseudoTreeBuilder.js'); function FullTooltipManager(aOwner) diff --git a/modules/groupTab.js b/modules/groupTab.js index 00dde7fb..20a6d04a 100644 --- a/modules/groupTab.js +++ b/modules/groupTab.js @@ -38,7 +38,7 @@ const EXPORTED_SYMBOLS = ['GroupTab']; const Cc = Components.classes; const Ci = Components.interfaces; -Components.utils.import('resource://treestyletab-modules/utils.js'); +Components.utils.import('resource://treestyletab-modules/base.js'); Components.utils.import('resource://treestyletab-modules/pseudoTreeBuilder.js'); function GroupTab(aWindow) diff --git a/modules/pseudoTreeBuilder.js b/modules/pseudoTreeBuilder.js index a2161327..cbce37c6 100644 --- a/modules/pseudoTreeBuilder.js +++ b/modules/pseudoTreeBuilder.js @@ -40,7 +40,7 @@ const Ci = Components.interfaces; Components.utils.import('resource://gre/modules/XPCOMUtils.jsm'); -XPCOMUtils.defineLazyModuleGetter(this, 'TreeStyleTabBase', 'resource://treestyletab-modules/utils.js'); +XPCOMUtils.defineLazyModuleGetter(this, 'TreeStyleTabBase', 'resource://treestyletab-modules/base.js'); var PseudoTreeBuilder = { diff --git a/modules/themeManager.js b/modules/themeManager.js index 62c6bb16..09a28481 100644 --- a/modules/themeManager.js +++ b/modules/themeManager.js @@ -37,7 +37,7 @@ const EXPORTED_SYMBOLS = ['TreeStyleTabThemeManager']; const BASE = 'chrome://treestyletab/skin/'; -Components.utils.import('resource://treestyletab-modules/utils.js'); +Components.utils.import('resource://treestyletab-modules/base.js'); function TreeStyleTabThemeManager(aWindow) { diff --git a/modules/window.js b/modules/window.js index 8ffb22fe..30099b0d 100644 --- a/modules/window.js +++ b/modules/window.js @@ -42,7 +42,7 @@ Components.utils.import('resource://gre/modules/XPCOMUtils.jsm'); XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm"); -Components.utils.import('resource://treestyletab-modules/utils.js'); +Components.utils.import('resource://treestyletab-modules/base.js'); XPCOMUtils.defineLazyGetter(this, 'TreeStyleTabBrowser', function() { var ns = {}; Components.utils.import('resource://treestyletab-modules/browser.js', ns);