From d3f620c5ea1f0a8e838df7d29796b7c034d20763 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Thu, 29 Jul 2010 12:37:25 -0700 Subject: [PATCH] Bug 583044 - Rename code references of TabCandy to TabView Move files and update references to tabview from tabcandy. Only remaining candy reference is the link to aza's webm video. --HG-- rename : browser/base/content/browser-tabcandy.js => browser/base/content/browser-tabview.js rename : browser/base/content/tabcandy/app/drag.js => browser/base/content/tabview/drag.js rename : browser/base/content/tabcandy/app/groups.js => browser/base/content/tabview/groups.js rename : browser/base/content/tabcandy/app/infoitems.js => browser/base/content/tabview/infoitems.js rename : browser/base/content/tabcandy/core/iq.js => browser/base/content/tabview/iq.js rename : browser/base/content/tabcandy/app/items.js => browser/base/content/tabview/items.js rename : browser/base/content/tabcandy/core/profile.js => browser/base/content/tabview/profile.js rename : browser/base/content/tabcandy/app/storage.js => browser/base/content/tabview/storage.js rename : browser/base/content/tabcandy/app/tabitems.js => browser/base/content/tabview/tabitems.js rename : browser/base/content/tabcandy/tabcandy.css => browser/base/content/tabview/tabview.css rename : browser/base/content/tabcandy/tabcandy.html => browser/base/content/tabview/tabview.html rename : browser/base/content/tabcandy/tabcandy.js => browser/base/content/tabview/tabview.js rename : browser/base/content/tabcandy/app/trench.js => browser/base/content/tabview/trench.js rename : browser/base/content/tabcandy/app/ui.js => browser/base/content/tabview/ui.js rename : browser/themes/gnomestripe/browser/tabcandy/edit-light.png => browser/themes/gnomestripe/browser/tabview/edit-light.png rename : browser/themes/gnomestripe/browser/tabcandy/edit.png => browser/themes/gnomestripe/browser/tabview/edit.png rename : browser/themes/gnomestripe/browser/tabcandy/new-tab.png => browser/themes/gnomestripe/browser/tabview/new-tab.png rename : browser/themes/gnomestripe/browser/tabcandy/platform.css => browser/themes/gnomestripe/browser/tabview/platform.css rename : browser/themes/gnomestripe/browser/tabcandy/stack-expander.png => browser/themes/gnomestripe/browser/tabview/stack-expander.png rename : browser/themes/gnomestripe/browser/tabcandy/tabcandy.png => browser/themes/gnomestripe/browser/tabview/tabview.png rename : browser/themes/pinstripe/browser/tabcandy/edit-light.png => browser/themes/pinstripe/browser/tabview/edit-light.png rename : browser/themes/pinstripe/browser/tabcandy/edit.png => browser/themes/pinstripe/browser/tabview/edit.png rename : browser/themes/pinstripe/browser/tabcandy/new-tab.png => browser/themes/pinstripe/browser/tabview/new-tab.png rename : browser/themes/pinstripe/browser/tabcandy/platform.css => browser/themes/pinstripe/browser/tabview/platform.css rename : browser/themes/pinstripe/browser/tabcandy/stack-expander.png => browser/themes/pinstripe/browser/tabview/stack-expander.png rename : browser/themes/pinstripe/browser/tabcandy/tabcandy.png => browser/themes/pinstripe/browser/tabview/tabview.png rename : browser/themes/winstripe/browser/tabcandy/edit-light.png => browser/themes/winstripe/browser/tabview/edit-light.png rename : browser/themes/winstripe/browser/tabcandy/edit.png => browser/themes/winstripe/browser/tabview/edit.png rename : browser/themes/winstripe/browser/tabcandy/new-tab.png => browser/themes/winstripe/browser/tabview/new-tab.png rename : browser/themes/winstripe/browser/tabcandy/platform.css => browser/themes/winstripe/browser/tabview/platform.css rename : browser/themes/winstripe/browser/tabcandy/stack-expander.png => browser/themes/winstripe/browser/tabview/stack-expander.png rename : browser/themes/winstripe/browser/tabcandy/tabcandy.png => browser/themes/winstripe/browser/tabview/tabview.png --- browser/base/content/browser-menubar.inc | 6 +- browser/base/content/browser-sets.inc | 2 +- ...browser-tabcandy.js => browser-tabview.js} | 16 +-- browser/base/content/browser.js | 2 +- browser/base/content/browser.xul | 14 +- browser/base/content/tabbrowser.xml | 6 +- .../content/{tabcandy/app => tabview}/drag.js | 0 .../{tabcandy/app => tabview}/groups.js | 22 ++-- .../{tabcandy/app => tabview}/infoitems.js | 4 +- .../content/{tabcandy/core => tabview}/iq.js | 4 +- .../{tabcandy/app => tabview}/items.js | 0 browser/base/content/tabview/modules/utils.js | 6 +- .../{tabcandy/core => tabview}/profile.js | 0 .../{tabcandy/app => tabview}/storage.js | 12 +- .../{tabcandy/app => tabview}/tabitems.js | 4 +- .../tabcandy.css => tabview/tabview.css} | 4 +- .../tabcandy.html => tabview/tabview.html} | 6 +- .../tabcandy.js => tabview/tabview.js} | 25 ++-- .../{tabcandy/app => tabview}/trench.js | 0 .../content/{tabcandy/app => tabview}/ui.js | 124 +++++++++--------- browser/base/jar.mn | 6 +- .../sessionstore/src/nsSessionStore.js | 2 +- .../locales/en-US/chrome/browser/browser.dtd | 6 +- .../en-US/chrome/browser/browser.properties | 4 +- .../themes/gnomestripe/browser/browser.css | 4 +- browser/themes/gnomestripe/browser/jar.mn | 12 +- .../gnomestripe/browser/tabcandy/platform.css | 7 - .../{tabcandy => tabview}/edit-light.png | Bin .../browser/{tabcandy => tabview}/edit.png | Bin .../browser/{tabcandy => tabview}/new-tab.png | Bin .../gnomestripe/browser/tabview/platform.css | 7 + .../{tabcandy => tabview}/stack-expander.png | Bin .../tabcandy.png => tabview/tabview.png} | Bin browser/themes/pinstripe/browser/browser.css | 6 +- browser/themes/pinstripe/browser/jar.mn | 12 +- .../pinstripe/browser/tabcandy/platform.css | 7 - .../{tabcandy => tabview}/edit-light.png | Bin .../browser/{tabcandy => tabview}/edit.png | Bin .../browser/{tabcandy => tabview}/new-tab.png | Bin .../pinstripe/browser/tabview/platform.css | 7 + .../{tabcandy => tabview}/stack-expander.png | Bin .../tabcandy.png => tabview/tabview.png} | Bin browser/themes/winstripe/browser/browser.css | 6 +- browser/themes/winstripe/browser/jar.mn | 24 ++-- .../{tabcandy => tabview}/edit-light.png | Bin .../browser/{tabcandy => tabview}/edit.png | Bin .../browser/{tabcandy => tabview}/new-tab.png | Bin .../{tabcandy => tabview}/platform.css | 4 +- .../{tabcandy => tabview}/stack-expander.png | Bin .../tabcandy.png => tabview/tabview.png} | Bin 50 files changed, 186 insertions(+), 185 deletions(-) rename browser/base/content/{browser-tabcandy.js => browser-tabview.js} (83%) rename browser/base/content/{tabcandy/app => tabview}/drag.js (100%) rename browser/base/content/{tabcandy/app => tabview}/groups.js (99%) rename browser/base/content/{tabcandy/app => tabview}/infoitems.js (98%) rename browser/base/content/{tabcandy/core => tabview}/iq.js (99%) rename browser/base/content/{tabcandy/app => tabview}/items.js (100%) rename browser/base/content/{tabcandy/core => tabview}/profile.js (100%) rename browser/base/content/{tabcandy/app => tabview}/storage.js (96%) rename browser/base/content/{tabcandy/app => tabview}/tabitems.js (99%) rename browser/base/content/{tabcandy/tabcandy.css => tabview/tabview.css} (98%) rename browser/base/content/{tabcandy/tabcandy.html => tabview/tabview.html} (71%) rename browser/base/content/{tabcandy/tabcandy.js => tabview/tabview.js} (69%) rename browser/base/content/{tabcandy/app => tabview}/trench.js (100%) rename browser/base/content/{tabcandy/app => tabview}/ui.js (91%) delete mode 100644 browser/themes/gnomestripe/browser/tabcandy/platform.css rename browser/themes/gnomestripe/browser/{tabcandy => tabview}/edit-light.png (100%) rename browser/themes/gnomestripe/browser/{tabcandy => tabview}/edit.png (100%) rename browser/themes/gnomestripe/browser/{tabcandy => tabview}/new-tab.png (100%) create mode 100644 browser/themes/gnomestripe/browser/tabview/platform.css rename browser/themes/gnomestripe/browser/{tabcandy => tabview}/stack-expander.png (100%) rename browser/themes/gnomestripe/browser/{tabcandy/tabcandy.png => tabview/tabview.png} (100%) delete mode 100644 browser/themes/pinstripe/browser/tabcandy/platform.css rename browser/themes/pinstripe/browser/{tabcandy => tabview}/edit-light.png (100%) rename browser/themes/pinstripe/browser/{tabcandy => tabview}/edit.png (100%) rename browser/themes/pinstripe/browser/{tabcandy => tabview}/new-tab.png (100%) create mode 100644 browser/themes/pinstripe/browser/tabview/platform.css rename browser/themes/pinstripe/browser/{tabcandy => tabview}/stack-expander.png (100%) rename browser/themes/pinstripe/browser/{tabcandy/tabcandy.png => tabview/tabview.png} (100%) rename browser/themes/winstripe/browser/{tabcandy => tabview}/edit-light.png (100%) rename browser/themes/winstripe/browser/{tabcandy => tabview}/edit.png (100%) rename browser/themes/winstripe/browser/{tabcandy => tabview}/new-tab.png (100%) rename browser/themes/winstripe/browser/{tabcandy => tabview}/platform.css (88%) rename browser/themes/winstripe/browser/{tabcandy => tabview}/stack-expander.png (100%) rename browser/themes/winstripe/browser/{tabcandy/tabcandy.png => tabview/tabview.png} (100%) diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index cf5549627215..1018eb880beb 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -208,9 +208,9 @@ - + diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index 390726052c05..1b5c4a21ddaf 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -117,7 +117,7 @@ - + diff --git a/browser/base/content/browser-tabcandy.js b/browser/base/content/browser-tabview.js similarity index 83% rename from browser/base/content/browser-tabcandy.js rename to browser/base/content/browser-tabview.js index fb7244cbfe63..930041bce542 100644 --- a/browser/base/content/browser-tabcandy.js +++ b/browser/base/content/browser-tabview.js @@ -11,10 +11,10 @@ # for the specific language governing rights and limitations under the # License. # -# The Original Code is the Tab Candy +# The Original Code is the Tab View # -# The Initial Developer of the Original Code is Google Inc. -# Portions created by the Initial Developer are Copyright (C) 2006 +# The Initial Developer of the Original Code is Mozilla Foundation. +# Portions created by the Initial Developer are Copyright (C) 2010 # the Initial Developer. All Rights Reserved. # # Contributor(s): @@ -35,25 +35,25 @@ # ***** END LICENSE BLOCK ***** // New API methods can be added to here. -var TabCandy = { +let TabView = { toggle: function() { let event = document.createEvent("Events"); if (this.isVisible()) { - event.initEvent("tabcandyhide", false, false); + event.initEvent("tabviewhide", false, false); } else { - event.initEvent("tabcandyshow", false, false); + event.initEvent("tabviewshow", false, false); } dispatchEvent(event); }, isVisible: function() { - return (window.document.getElementById("tab-candy-deck").selectedIndex == 1); + return (window.document.getElementById("tab-view-deck").selectedIndex == 1); }, getWindowTitle: function() { var brandBundle = document.getElementById("bundle_brand"); var brandShortName = brandBundle.getString("brandShortName"); - return gNavigatorBundle.getFormattedString("tabCandy.title", [brandShortName]); + return gNavigatorBundle.getFormattedString("tabView.title", [brandShortName]); } }; diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index ecc3cc1fafcd..c7ce0045ef4c 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -166,7 +166,7 @@ let gInitialPages = [ #include inspector.js #include browser-places.js #include browser-tabPreviews.js -#include browser-tabcandy.js +#include browser-tabview.js XPCOMUtils.defineLazyGetter(this, "Win7Features", function () { #ifdef XP_WIN diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 85ec1a87b9d3..d1f57bc0fe67 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -101,7 +101,7 @@ + diff --git a/browser/base/content/tabcandy/tabcandy.js b/browser/base/content/tabview/tabview.js similarity index 69% rename from browser/base/content/tabcandy/tabcandy.js rename to browser/base/content/tabview/tabview.js index 6cd01356164c..3eec30633ff9 100644 --- a/browser/base/content/tabcandy/tabcandy.js +++ b/browser/base/content/tabview/tabview.js @@ -12,23 +12,24 @@ XPCOMUtils.defineLazyGetter(this, "gWindow", function() { XPCOMUtils.defineLazyGetter(this, "gBrowser", function() gWindow.gBrowser); XPCOMUtils.defineLazyGetter(this, "gTabViewDeck", function() { - return gWindow.document.getElementById("tab-candy-deck"); + return gWindow.document.getElementById("tab-view-deck"); }); XPCOMUtils.defineLazyGetter(this, "gTabViewFrame", function() { - return gWindow.document.getElementById("tab-candy"); + return gWindow.document.getElementById("tab-view"); }); # NB: Certain files need to evaluate before others -#include core/profile.js -#include core/iq.js -#include app/storage.js -#include app/items.js -#include app/groups.js -#include app/tabitems.js +#include profile.js +#include iq.js -#include app/drag.js -#include app/trench.js -#include app/infoitems.js -#include app/ui.js +#include storage.js +#include items.js +#include groups.js +#include tabitems.js + +#include drag.js +#include trench.js +#include infoitems.js +#include ui.js diff --git a/browser/base/content/tabcandy/app/trench.js b/browser/base/content/tabview/trench.js similarity index 100% rename from browser/base/content/tabcandy/app/trench.js rename to browser/base/content/tabview/trench.js diff --git a/browser/base/content/tabcandy/app/ui.js b/browser/base/content/tabview/ui.js similarity index 91% rename from browser/base/content/tabcandy/app/ui.js rename to browser/base/content/tabview/ui.js index ba45be21a0be..f440fdc4b867 100644 --- a/browser/base/content/tabcandy/app/ui.js +++ b/browser/base/content/tabview/ui.js @@ -62,9 +62,9 @@ var UIManager = { // If true, the last visible tab has just been closed in the tab strip. _closedLastVisibleTab : false, - // Variable: _closedSelectedTabInTabCandy - // If true, a select tab has just been closed in tab candy. - _closedSelectedTabInTabCandy : false, + // Variable: _closedSelectedTabInTabView + // If true, a select tab has just been closed in TabView. + _closedSelectedTabInTabView : false, // Variable: _stopZoomPreparation // If true, prevent the next zoom preparation. @@ -72,12 +72,12 @@ var UIManager = { // Variable: _reorderTabItemsOnShow // Keeps track of the s which their tab items' tabs have been moved - // and re-orders the tab items when switching to Tab Candy. + // and re-orders the tab items when switching to TabView. _reorderTabItemsOnShow : [], // Variable: _reorderTabsOnHide - // Keeps track of the s which their tab items have been moved in Tab - // Candy UI and re-orders the tabs when switcing back to main browser. + // Keeps track of the s which their tab items have been moved in + // TabView UI and re-orders the tabs when switcing back to main browser. _reorderTabsOnHide : [], // Variable: _currentTab @@ -106,7 +106,7 @@ var UIManager = { self._reset(); }); - // When you click on the background/empty part of TabCandy, + // When you click on the background/empty part of TabView, // we create a new group. iQ(gTabViewFrame.contentDocument).mousedown(function(e){ if ( e.originalTarget.id == "content" ) @@ -119,11 +119,11 @@ var UIManager = { }); }); - gWindow.addEventListener("tabcandyshow", function() { - self.showTabCandy(true); + gWindow.addEventListener("tabviewshow", function() { + self.showTabView(true); }, false); - gWindow.addEventListener("tabcandyhide", function() { + gWindow.addEventListener("tabviewhide", function() { var activeTab = self.getActiveTab(); if (activeTab) activeTab.zoomIn(); @@ -214,8 +214,8 @@ var UIManager = { self._resize(); }); - // ___ show Tab Candy at startup based on last session. - if (data.tabCandyVisible) { + // ___ show TabView at startup based on last session. + if (data.tabViewVisible) { var currentTab = self._currentTab; if (currentTab && currentTab.tabItem) @@ -223,7 +223,7 @@ var UIManager = { else self._stopZoomPreparation = true; - self.showTabCandy(); + self.showTabView(); // ensure the tabs in the tab strip are in the same order as the tab // items in groups when switching back to main browser UI for the first // time. @@ -231,9 +231,9 @@ var UIManager = { self._reorderTabsOnHide.push(group); }); } else { - self.hideTabCandy(); + self.hideTabView(); // ensure the tab items in groups are in the same order as tabs in tab - // strip when going into Tab Candy for the first time. + // strip when going into TabView for the first time. Groups.groups.forEach(function(group) { self._reorderTabItemsOnShow.push(group); }); @@ -244,7 +244,7 @@ var UIManager = { var observer = { observe : function(subject, topic, data) { if (topic == "quit-application-requested") { - if (self._isTabCandyVisible()) + if (self._isTabViewVisible()) TabItems.saveAll(true); self._save(); } @@ -298,18 +298,18 @@ var UIManager = { }, // ---------- - // Function: _isTabCandyVisible - // Returns true if the TabCandy UI is currently shown. - _isTabCandyVisible: function() { + // Function: _isTabViewVisible + // Returns true if the TabView UI is currently shown. + _isTabViewVisible: function() { return gTabViewDeck.selectedIndex == 1; }, // ---------- - // Function: showTabCandy - // Shows TabCandy and hides the main browser UI. + // Function: showTabView + // Shows TabView and hides the main browser UI. // Parameters: // zoomOut - true for zoom out animation, false for nothing. - showTabCandy: function(zoomOut) { + showTabView: function(zoomOut) { var self = this; var currentTab = this._currentTab; var item = null; @@ -351,9 +351,9 @@ var UIManager = { }, // ---------- - // Function: hideTabCandy - // Hides Tab candy and shows the main browser UI . - hideTabCandy: function() { + // Function: hideTabView + // Hides TabView and shows the main browser UI. + hideTabView: function() { this._reorderTabsOnHide.forEach(function(group) { group.reorderTabsBasedOnTabItemOrder(); }); @@ -377,10 +377,10 @@ var UIManager = { // ---------- // Function: _setActiveTitleColor // Used on the Mac to make the title bar match the gradient in the rest of the - // TabCandy UI. + // TabView UI. // // Parameters: - // set - true for the special TabCandy color, false for the normal color. + // set - true for the special TabView color, false for the normal color. _setActiveTitleColor: function(set) { // Mac Only var mainWindow = gWindow.document.getElementById("main-window"); @@ -401,22 +401,22 @@ var UIManager = { if (this.ownerDocument.defaultView != gWindow) return; - if (self._isTabCandyVisible()) { - // just closed the selected tab in the tab candy interface. + if (self._isTabViewVisible()) { + // just closed the selected tab in the TabView interface. if (self._currentTab == this) - self._closedSelectedTabInTabCandy = true; + self._closedSelectedTabInTabView = true; } else { // if not closing the last tab if (gBrowser.tabs.length > 1) { var group = Groups.getActiveGroup(); - // 1) Only go back to the TabCandy tab when there you close the last + // 1) Only go back to the TabView tab when there you close the last // tab of a group. // 2) Take care of the case where you've closed the last tab in // an un-named group, which means that the group is gone (null) and // there are no visible tabs. // Can't use timeout here because user would see a flicker of - // switching to another tab before the tab candy interface shows up. + // switching to another tab before the TabView interface shows up. if ((group && group._children.length == 1) || (group == null && gBrowser.visibleTabs.length == 1)) { // for the tab focus event to pick up. @@ -424,7 +424,7 @@ var UIManager = { // remove the zoom prep. if (this && this.tabItem) this.tabItem.setZoomPrep(false); - self.showTabCandy(); + self.showTabView(); } // ToDo: When running unit tests, everything happens so quick so // new tabs might be added after a tab is closing. Therefore, this @@ -432,7 +432,7 @@ var UIManager = { Utils.timeout(function() { // Marshal event from chrome thread to DOM thread if ((group && group._children.length > 0) || (group == null && gBrowser.visibleTabs.length > 0)) - self.hideTabCandy(); + self.hideTabView(); }, 1); } } @@ -444,7 +444,7 @@ var UIManager = { return; Utils.timeout(function() { // Marshal event from chrome thread to DOM thread - if (!self._isTabCandyVisible()) { + if (!self._isTabViewVisible()) { var activeGroup = Groups.getActiveGroup(); if (activeGroup) { var index = self._reorderTabItemsOnShow.indexOf(activeGroup); @@ -465,7 +465,7 @@ var UIManager = { // ---------- // Function: tabOnFocus - // Called when the user switches from one tab to another outside of the TabCandy UI. + // Called when the user switches from one tab to another outside of the TabView UI. tabOnFocus: function(tab) { var self = this; var focusTab = tab; @@ -473,24 +473,24 @@ var UIManager = { this._currentTab = focusTab; // if the last visible tab has just been closed, don't show the chrome UI. - if (this._isTabCandyVisible() && - (this._closedLastVisibleTab || this._closedSelectedTabInTabCandy)) { + if (this._isTabViewVisible() && + (this._closedLastVisibleTab || this._closedSelectedTabInTabView)) { this._closedLastVisibleTab = false; - this._closedSelectedTabInTabCandy = false; + this._closedSelectedTabInTabView = false; return; } - // if TabCandy is visible but we didn't just close the last tab or + // if TabView is visible but we didn't just close the last tab or // selected tab, show chrome. - if (this._isTabCandyVisible()) - this.hideTabCandy(); + if (this._isTabViewVisible()) + this.hideTabView(); // reset these vars, just in case. this._closedLastVisibleTab = false; - this._closedSelectedTabInTabCandy = false; + this._closedSelectedTabInTabView = false; Utils.timeout(function() { // Marshal event from chrome thread to DOM thread - // this value is true when tabcandy is open at browser startup. + // this value is true when TabView is open at browser startup. if (self._stopZoomPreparation) { self._stopZoomPreparation = false; if (focusTab && focusTab.tabItem) @@ -511,7 +511,7 @@ var UIManager = { Groups.setActiveGroup(newItem.parent); } - // ___ prepare for when we return to TabCandy + // ___ prepare for when we return to TabView var oldItem = null; if (currentTab && currentTab.tabItem) oldItem = currentTab.tabItem; @@ -521,14 +521,14 @@ var UIManager = { oldItem.setZoomPrep(false); // if the last visible tab is removed, don't set zoom prep because - // we shoud be in the Tab Candy interface. - if (visibleTabCount > 0 && newItem && !self._isTabCandyVisible()) + // we shoud be in the TabView interface. + if (visibleTabCount > 0 && newItem && !self._isTabViewVisible()) newItem.setZoomPrep(true); } else { // the tab is already focused so the new and old items are the // same. if (oldItem) - oldItem.setZoomPrep(!self._isTabCandyVisible()); + oldItem.setZoomPrep(!self._isTabViewVisible()); } }, 1); }, @@ -540,7 +540,7 @@ var UIManager = { // Parameters: // group - the group which would be used for re-ordering tabs. setReorderTabsOnHide: function(group) { - if (this._isTabCandyVisible()) { + if (this._isTabViewVisible()) { var index = this._reorderTabsOnHide.indexOf(group); if (index == -1) this._reorderTabsOnHide.push(group); @@ -550,12 +550,12 @@ var UIManager = { // ---------- // Function: _setBrowserKeyHandlers // Overrides the browser's keys for navigating between tab (outside of the - // TabCandy UI) so they do the right thing in respect to groups. + // TabView UI) so they do the right thing in respect to groups. _setBrowserKeyHandlers : function() { var self = this; gWindow.addEventListener("keypress", function(event) { - if (self._isTabCandyVisible()) + if (self._isTabViewVisible()) return; var charCode = event.charCode; @@ -570,7 +570,7 @@ var UIManager = { #endif event.stopPropagation(); event.preventDefault(); - self.showTabCandy(true); + self.showTabView(true); return; } @@ -588,7 +588,7 @@ var UIManager = { // ---------- // Function: _setTabViewFrameKeyHandlers - // Sets up the key handlers for navigating between tabs within the TabCandy UI. + // Sets up the key handlers for navigating between tabs within the TabView UI. _setTabViewFrameKeyHandlers: function(){ var self = this; @@ -702,7 +702,7 @@ var UIManager = { // ---------- // Function: _createGroupOnDrag - // Called in response to a mousedown in empty space in the TabCandy UI; + // Called in response to a mousedown in empty space in the TabView UI; // creates a new group based on the user's drag. _createGroupOnDrag: function(e){ const minSize = 60; @@ -821,7 +821,7 @@ var UIManager = { // ---------- // Function: _resize - // Update the TabCandy UI contents in response to a window size change. + // Update the TabView UI contents in response to a window size change. // Won't do anything if it doesn't deem the resize necessary. // Parameters: // force - true to update even when "unnecessary"; default false @@ -829,9 +829,9 @@ var UIManager = { if (typeof(force) == "undefined") force = false; - // If TabCandy isn't focused and is not showing, don't perform a resize. + // If TabView isn't focused and is not showing, don't perform a resize. // This resize really slows things down. - if (!force && !this._isTabCandyVisible()) + if (!force && !this._isTabViewVisible()) return; var oldPageBounds = new Rect(this._pageBounds); @@ -911,7 +911,7 @@ var UIManager = { // ---------- // Function: _addDevMenu - // Fills out the "dev menu" in the TabCandy UI. + // Fills out the "dev menu" in the TabView UI. _addDevMenu: function() { try { var self = this; @@ -947,7 +947,7 @@ var UIManager = { }, { name: "refresh", code: function() { - location.href = "tabcandy.html"; + location.href = "tabview.html"; } }, { name: "reset", @@ -981,7 +981,7 @@ var UIManager = { // ----------- // Function: _reset - // Wipes all TabCandy storage and refreshes, giving you the "first-run" state. + // Wipes all TabView storage and refreshes, giving you the "first-run" state. _reset: function() { Storage.wipe(); location.href = ""; @@ -1011,7 +1011,7 @@ var UIManager = { return; var data = { - tabCandyVisible: this._isTabCandyVisible(), + tabViewVisible: this._isTabViewVisible(), pageBounds: this._pageBounds }; @@ -1021,7 +1021,7 @@ var UIManager = { // ---------- // Function: _saveAll - // Saves all data associated with TabCandy. + // Saves all data associated with TabView. // TODO: Save info items _saveAll: function() { this._save(); diff --git a/browser/base/jar.mn b/browser/base/jar.mn index 8b3a6ad89ac7..e43e4af66ddb 100644 --- a/browser/base/jar.mn +++ b/browser/base/jar.mn @@ -46,9 +46,9 @@ browser.jar: content/browser/sanitizeDialog.css (content/sanitizeDialog.css) * content/browser/tabbrowser.css (content/tabbrowser.css) * content/browser/tabbrowser.xml (content/tabbrowser.xml) - content/browser/tabcandy.css (content/tabcandy/tabcandy.css) -* content/browser/tabcandy.js (content/tabcandy/tabcandy.js) - content/browser/tabcandy.html (content/tabcandy/tabcandy.html) + content/browser/tabview.css (content/tabview/tabview.css) +* content/browser/tabview.js (content/tabview/tabview.js) + content/browser/tabview.html (content/tabview/tabview.html) * content/browser/urlbarBindings.xml (content/urlbarBindings.xml) * content/browser/utilityOverlay.js (content/utilityOverlay.js) * content/browser/web-panels.js (content/web-panels.js) diff --git a/browser/components/sessionstore/src/nsSessionStore.js b/browser/components/sessionstore/src/nsSessionStore.js index 697dd7b08f35..8b867d670cae 100644 --- a/browser/components/sessionstore/src/nsSessionStore.js +++ b/browser/components/sessionstore/src/nsSessionStore.js @@ -1939,7 +1939,7 @@ SessionStoreService.prototype = { tabbrowser.tabs[t] : tabbrowser.addTab("about:blank", {skipAnimation: true})); // collapse all unselected tabs to prevent flickering when showing the - // tabs in the active group by tabcandy + // tabs in the active group by TabView if (!tabs[t].selected) { tabs[t].hidden = true; } diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index 5252b9f5fd3a..f9b26db2d1e8 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -126,8 +126,8 @@ - - + + @@ -233,7 +233,7 @@ - + diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index e72ab5647cc6..297448022d79 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -268,8 +268,8 @@ ctrlTab.showAll.label=;Show all #1 tabs # Used as the bookmark name when saving a keyword for a search field. addKeywordTitleAutoFill=Search %S -# Tab Candy -tabCandy.title=%S Tab Sets +# TabView +tabView.title=%S Tab Sets extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name=Default extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description=The default theme. diff --git a/browser/themes/gnomestripe/browser/browser.css b/browser/themes/gnomestripe/browser/browser.css index 55d79e54eddb..3503cac37d53 100644 --- a/browser/themes/gnomestripe/browser/browser.css +++ b/browser/themes/gnomestripe/browser/browser.css @@ -563,8 +563,8 @@ toolbar[mode="full"] .toolbarbutton-menubutton-button { list-style-image: url("moz-icon://stock/gtk-home?size=toolbar&state=disabled"); } -#tabcandy-button { - list-style-image: url(chrome://browser/skin/tabcandy/tabcandy.png); +#tabview-button { + list-style-image: url(chrome://browser/skin/tabview/tabview.png); } #downloads-button { diff --git a/browser/themes/gnomestripe/browser/jar.mn b/browser/themes/gnomestripe/browser/jar.mn index 5e97bc9685c2..cbfc82242f2a 100644 --- a/browser/themes/gnomestripe/browser/jar.mn +++ b/browser/themes/gnomestripe/browser/jar.mn @@ -65,9 +65,9 @@ browser.jar: skin/classic/browser/tabbrowser/progress.png (tabbrowser/progress.png) skin/classic/browser/tabbrowser/progress-pulsing.png (tabbrowser/progress-pulsing.png) skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png) - skin/classic/browser/tabcandy/edit-light.png (tabcandy/edit-light.png) - skin/classic/browser/tabcandy/edit.png (tabcandy/edit.png) - skin/classic/browser/tabcandy/new-tab.png (tabcandy/new-tab.png) - skin/classic/browser/tabcandy/platform.css (tabcandy/platform.css) - skin/classic/browser/tabcandy/stack-expander.png (tabcandy/stack-expander.png) - skin/classic/browser/tabcandy/tabcandy.png (tabcandy/tabcandy.png) + skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png) + skin/classic/browser/tabview/edit.png (tabview/edit.png) + skin/classic/browser/tabview/new-tab.png (tabview/new-tab.png) + skin/classic/browser/tabview/platform.css (tabview/platform.css) + skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png) + skin/classic/browser/tabview/tabview.png (tabview/tabview.png) diff --git a/browser/themes/gnomestripe/browser/tabcandy/platform.css b/browser/themes/gnomestripe/browser/tabcandy/platform.css deleted file mode 100644 index 00f224823644..000000000000 --- a/browser/themes/gnomestripe/browser/tabcandy/platform.css +++ /dev/null @@ -1,7 +0,0 @@ -/* This file is for platform-specific CSS for TabCandy, and is loaded after the - platform-independent tabcandy.css, to allow overwriting. -*/ - -.close { - background: url("moz-icon://stock/gtk-close?size=menu") no-repeat; -} diff --git a/browser/themes/gnomestripe/browser/tabcandy/edit-light.png b/browser/themes/gnomestripe/browser/tabview/edit-light.png similarity index 100% rename from browser/themes/gnomestripe/browser/tabcandy/edit-light.png rename to browser/themes/gnomestripe/browser/tabview/edit-light.png diff --git a/browser/themes/gnomestripe/browser/tabcandy/edit.png b/browser/themes/gnomestripe/browser/tabview/edit.png similarity index 100% rename from browser/themes/gnomestripe/browser/tabcandy/edit.png rename to browser/themes/gnomestripe/browser/tabview/edit.png diff --git a/browser/themes/gnomestripe/browser/tabcandy/new-tab.png b/browser/themes/gnomestripe/browser/tabview/new-tab.png similarity index 100% rename from browser/themes/gnomestripe/browser/tabcandy/new-tab.png rename to browser/themes/gnomestripe/browser/tabview/new-tab.png diff --git a/browser/themes/gnomestripe/browser/tabview/platform.css b/browser/themes/gnomestripe/browser/tabview/platform.css new file mode 100644 index 000000000000..a79d52c76a99 --- /dev/null +++ b/browser/themes/gnomestripe/browser/tabview/platform.css @@ -0,0 +1,7 @@ +/* This file is for platform-specific CSS for TabView, and is loaded after the + platform-independent tabview.css, to allow overwriting. +*/ + +.close { + background: url("moz-icon://stock/gtk-close?size=menu") no-repeat; +} diff --git a/browser/themes/gnomestripe/browser/tabcandy/stack-expander.png b/browser/themes/gnomestripe/browser/tabview/stack-expander.png similarity index 100% rename from browser/themes/gnomestripe/browser/tabcandy/stack-expander.png rename to browser/themes/gnomestripe/browser/tabview/stack-expander.png diff --git a/browser/themes/gnomestripe/browser/tabcandy/tabcandy.png b/browser/themes/gnomestripe/browser/tabview/tabview.png similarity index 100% rename from browser/themes/gnomestripe/browser/tabcandy/tabcandy.png rename to browser/themes/gnomestripe/browser/tabview/tabview.png diff --git a/browser/themes/pinstripe/browser/browser.css b/browser/themes/pinstripe/browser/browser.css index e44fc22b0569..2202aded8365 100644 --- a/browser/themes/pinstripe/browser/browser.css +++ b/browser/themes/pinstripe/browser/browser.css @@ -531,10 +531,10 @@ toolbar[iconsize="small"][mode="icons"] #forward-button:-moz-locale-dir(rtl) { -moz-margin-end: 3px; } -/* tabcandy button */ +/* tabview button */ -#tabcandy-button { - list-style-image: url(chrome://browser/skin/tabcandy/tabcandy.png); +#tabview-button { + list-style-image: url(chrome://browser/skin/tabview/tabview.png); } /* download manager button */ diff --git a/browser/themes/pinstripe/browser/jar.mn b/browser/themes/pinstripe/browser/jar.mn index 2d87e9d01aca..f83d440f1b25 100644 --- a/browser/themes/pinstripe/browser/jar.mn +++ b/browser/themes/pinstripe/browser/jar.mn @@ -107,9 +107,9 @@ browser.jar: skin/classic/browser/tabbrowser/tabbrowser-tabs-bkgnd.png (tabbrowser/tabbrowser-tabs-bkgnd.png) skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png) skin/classic/browser/tabbrowser/tab-bkgnd.png (tabbrowser/tab-bkgnd.png) - skin/classic/browser/tabcandy/edit-light.png (tabcandy/edit-light.png) - skin/classic/browser/tabcandy/edit.png (tabcandy/edit.png) - skin/classic/browser/tabcandy/new-tab.png (tabcandy/new-tab.png) - skin/classic/browser/tabcandy/platform.css (tabcandy/platform.css) - skin/classic/browser/tabcandy/stack-expander.png (tabcandy/stack-expander.png) - skin/classic/browser/tabcandy/tabcandy.png (tabcandy/tabcandy.png) + skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png) + skin/classic/browser/tabview/edit.png (tabview/edit.png) + skin/classic/browser/tabview/new-tab.png (tabview/new-tab.png) + skin/classic/browser/tabview/platform.css (tabview/platform.css) + skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png) + skin/classic/browser/tabview/tabview.png (tabview/tabview.png) diff --git a/browser/themes/pinstripe/browser/tabcandy/platform.css b/browser/themes/pinstripe/browser/tabcandy/platform.css deleted file mode 100644 index c563a0a8bde2..000000000000 --- a/browser/themes/pinstripe/browser/tabcandy/platform.css +++ /dev/null @@ -1,7 +0,0 @@ -/* This file is for platform-specific CSS for TabCandy, and is loaded after the - platform-independent tabcandy.css, to allow overwriting. -*/ - -.close { - background: url(chrome://global/skin/icons/closetab.png) no-repeat; -} diff --git a/browser/themes/pinstripe/browser/tabcandy/edit-light.png b/browser/themes/pinstripe/browser/tabview/edit-light.png similarity index 100% rename from browser/themes/pinstripe/browser/tabcandy/edit-light.png rename to browser/themes/pinstripe/browser/tabview/edit-light.png diff --git a/browser/themes/pinstripe/browser/tabcandy/edit.png b/browser/themes/pinstripe/browser/tabview/edit.png similarity index 100% rename from browser/themes/pinstripe/browser/tabcandy/edit.png rename to browser/themes/pinstripe/browser/tabview/edit.png diff --git a/browser/themes/pinstripe/browser/tabcandy/new-tab.png b/browser/themes/pinstripe/browser/tabview/new-tab.png similarity index 100% rename from browser/themes/pinstripe/browser/tabcandy/new-tab.png rename to browser/themes/pinstripe/browser/tabview/new-tab.png diff --git a/browser/themes/pinstripe/browser/tabview/platform.css b/browser/themes/pinstripe/browser/tabview/platform.css new file mode 100644 index 000000000000..48746837d71a --- /dev/null +++ b/browser/themes/pinstripe/browser/tabview/platform.css @@ -0,0 +1,7 @@ +/* This file is for platform-specific CSS for TabView, and is loaded after the + platform-independent tabview.css, to allow overwriting. +*/ + +.close { + background: url(chrome://global/skin/icons/closetab.png) no-repeat; +} diff --git a/browser/themes/pinstripe/browser/tabcandy/stack-expander.png b/browser/themes/pinstripe/browser/tabview/stack-expander.png similarity index 100% rename from browser/themes/pinstripe/browser/tabcandy/stack-expander.png rename to browser/themes/pinstripe/browser/tabview/stack-expander.png diff --git a/browser/themes/pinstripe/browser/tabcandy/tabcandy.png b/browser/themes/pinstripe/browser/tabview/tabview.png similarity index 100% rename from browser/themes/pinstripe/browser/tabcandy/tabcandy.png rename to browser/themes/pinstripe/browser/tabview/tabview.png diff --git a/browser/themes/winstripe/browser/browser.css b/browser/themes/winstripe/browser/browser.css index f171e771539b..0f33dd7e9958 100644 --- a/browser/themes/winstripe/browser/browser.css +++ b/browser/themes/winstripe/browser/browser.css @@ -590,10 +590,10 @@ toolbar:not([iconsize="small"])[mode="icons"] #forward-button:not([disabled="tru -moz-image-region: rect(0, 90px, 18px, 72px); } -/* tabcandy button */ +/* tabview button */ -#tabcandy-button { - list-style-image: url(chrome://browser/skin/tabcandy/tabcandy.png); +#tabview-button { + list-style-image: url(chrome://browser/skin/tabview/tabview.png); } /* download manager button */ diff --git a/browser/themes/winstripe/browser/jar.mn b/browser/themes/winstripe/browser/jar.mn index 258c005248ff..c6d8880f203b 100644 --- a/browser/themes/winstripe/browser/jar.mn +++ b/browser/themes/winstripe/browser/jar.mn @@ -84,12 +84,12 @@ browser.jar: skin/classic/browser/tabbrowser/tab.png (tabbrowser/tab.png) skin/classic/browser/tabbrowser/tab-arrow-left.png (tabbrowser/tab-arrow-left.png) skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png) - skin/classic/browser/tabcandy/edit-light.png (tabcandy/edit-light.png) - skin/classic/browser/tabcandy/edit.png (tabcandy/edit.png) - skin/classic/browser/tabcandy/new-tab.png (tabcandy/new-tab.png) - skin/classic/browser/tabcandy/platform.css (tabcandy/platform.css) - skin/classic/browser/tabcandy/stack-expander.png (tabcandy/stack-expander.png) - skin/classic/browser/tabcandy/tabcandy.png (tabcandy/tabcandy.png) + skin/classic/browser/tabview/edit-light.png (tabview/edit-light.png) + skin/classic/browser/tabview/edit.png (tabview/edit.png) + skin/classic/browser/tabview/new-tab.png (tabview/new-tab.png) + skin/classic/browser/tabview/platform.css (tabview/platform.css) + skin/classic/browser/tabview/stack-expander.png (tabview/stack-expander.png) + skin/classic/browser/tabview/tabview.png (tabview/tabview.png) #ifdef XP_WIN browser.jar: @@ -177,10 +177,10 @@ browser.jar: skin/classic/aero/browser/tabbrowser/tab.png (tabbrowser/tab.png) skin/classic/aero/browser/tabbrowser/tab-arrow-left.png (tabbrowser/tab-arrow-left.png) skin/classic/aero/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png) - skin/classic/aero/browser/tabcandy/edit-light.png (tabcandy/edit-light.png) - skin/classic/aero/browser/tabcandy/edit.png (tabcandy/edit.png) - skin/classic/aero/browser/tabcandy/new-tab.png (tabcandy/new-tab.png) - skin/classic/aero/browser/tabcandy/platform.css (tabcandy/platform.css) - skin/classic/aero/browser/tabcandy/stack-expander.png (tabcandy/stack-expander.png) - skin/classic/aero/browser/tabcandy/tabcandy.png (tabcandy/tabcandy.png) + skin/classic/aero/browser/tabview/edit-light.png (tabview/edit-light.png) + skin/classic/aero/browser/tabview/edit.png (tabview/edit.png) + skin/classic/aero/browser/tabview/new-tab.png (tabview/new-tab.png) + skin/classic/aero/browser/tabview/platform.css (tabview/platform.css) + skin/classic/aero/browser/tabview/stack-expander.png (tabview/stack-expander.png) + skin/classic/aero/browser/tabview/tabview.png (tabview/tabview.png) #endif diff --git a/browser/themes/winstripe/browser/tabcandy/edit-light.png b/browser/themes/winstripe/browser/tabview/edit-light.png similarity index 100% rename from browser/themes/winstripe/browser/tabcandy/edit-light.png rename to browser/themes/winstripe/browser/tabview/edit-light.png diff --git a/browser/themes/winstripe/browser/tabcandy/edit.png b/browser/themes/winstripe/browser/tabview/edit.png similarity index 100% rename from browser/themes/winstripe/browser/tabcandy/edit.png rename to browser/themes/winstripe/browser/tabview/edit.png diff --git a/browser/themes/winstripe/browser/tabcandy/new-tab.png b/browser/themes/winstripe/browser/tabview/new-tab.png similarity index 100% rename from browser/themes/winstripe/browser/tabcandy/new-tab.png rename to browser/themes/winstripe/browser/tabview/new-tab.png diff --git a/browser/themes/winstripe/browser/tabcandy/platform.css b/browser/themes/winstripe/browser/tabview/platform.css similarity index 88% rename from browser/themes/winstripe/browser/tabcandy/platform.css rename to browser/themes/winstripe/browser/tabview/platform.css index 6267f2ed684c..31e063875fb2 100644 --- a/browser/themes/winstripe/browser/tabcandy/platform.css +++ b/browser/themes/winstripe/browser/tabview/platform.css @@ -1,5 +1,5 @@ -/* This file is for platform-specific CSS for TabCandy, and is loaded after the - platform-independent tabcandy.css, to allow overwriting. +/* This file is for platform-specific CSS for TabView, and is loaded after the + platform-independent tabview.css, to allow overwriting. */ .close { diff --git a/browser/themes/winstripe/browser/tabcandy/stack-expander.png b/browser/themes/winstripe/browser/tabview/stack-expander.png similarity index 100% rename from browser/themes/winstripe/browser/tabcandy/stack-expander.png rename to browser/themes/winstripe/browser/tabview/stack-expander.png diff --git a/browser/themes/winstripe/browser/tabcandy/tabcandy.png b/browser/themes/winstripe/browser/tabview/tabview.png similarity index 100% rename from browser/themes/winstripe/browser/tabcandy/tabcandy.png rename to browser/themes/winstripe/browser/tabview/tabview.png