[Pkg-mozext-commits] [ctrl-tab] 02/02: Imported Upstream version 0.21.1

Dmitry Smirnov onlyjob at moszumanska.debian.org
Tue Nov 18 15:52:58 UTC 2014


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

onlyjob pushed a commit to branch upstream
in repository ctrl-tab.

commit 338d10b (upstream)
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Tue Nov 18 04:47:37 2014

    Imported Upstream version 0.21.1
---
 chrome.manifest                        |  11 +
 chrome/content/browser-tabPreviews.xml |  49 ++
 chrome/content/browser-win.xul         |   6 +
 chrome/content/browser.xul             |  58 +++
 chrome/content/ctrlTab.js              | 918 +++++++++++++++++++++++++++++++++
 chrome/content/icon.png                | Bin 0 -> 993 bytes
 chrome/skin/allTabs.png                | Bin 0 -> 171 bytes
 chrome/skin/browser-base.css           |  48 ++
 chrome/skin/browser-linux.css          |  96 ++++
 chrome/skin/browser-mac.css            | 150 ++++++
 chrome/skin/browser-win.css            | 170 ++++++
 chrome/skin/close.png                  | Bin 0 -> 393 bytes
 chrome/skin/texture.png                | Bin 0 -> 222 bytes
 defaults/preferences/defaults.js       |   6 +
 install.rdf                            |  20 +
 15 files changed, 1532 insertions(+)

diff --git a/chrome.manifest b/chrome.manifest
new file mode 100644
index 0000000..c75d8fc
--- /dev/null
+++ b/chrome.manifest
@@ -0,0 +1,11 @@
+content ctrl-tab chrome/content/
+skin    ctrl-tab classic/1.0 chrome/skin/
+
+overlay chrome://browser/content/browser.xul chrome://ctrl-tab/content/browser.xul    appversion<3.6
+
+overlay chrome://browser/content/browser.xul chrome://ctrl-tab/content/browser-win.xul    OS=WINNT
+
+style   chrome://browser/content/browser.xul chrome://ctrl-tab/skin/browser-base.css  appversion<3.6
+style   chrome://browser/content/browser.xul chrome://ctrl-tab/skin/browser-win.css   OS=WINNT  appversion<3.6
+style   chrome://browser/content/browser.xul chrome://ctrl-tab/skin/browser-mac.css   OS=Darwin appversion<3.6
+style   chrome://browser/content/browser.xul chrome://ctrl-tab/skin/browser-linux.css OS=Linux  appversion<3.6
diff --git a/chrome/content/browser-tabPreviews.xml b/chrome/content/browser-tabPreviews.xml
new file mode 100644
index 0000000..8e7dbca
--- /dev/null
+++ b/chrome/content/browser-tabPreviews.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<bindings id="tabPreviews"
+          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="ctrlTab-thumbnail" extends="chrome://global/content/bindings/button.xml#button-base">
+    <content pack="center">
+      <xul:stack>
+        <xul:vbox class="ctrlTab-thumbnail-inner" align="center" pack="center"
+                  xbl:inherits="width=canvaswidth">
+          <xul:hbox class="tabPreview-canvas">
+            <children/>
+          </xul:hbox>
+          <xul:label xbl:inherits="value=label,crop" class="plain"/>
+        </xul:vbox>
+        <xul:hbox class="ctrlTab-favicon-container" xbl:inherits="hidden=noicon">
+          <xul:image class="ctrlTab-favicon" xbl:inherits="src=icon"/>
+        </xul:hbox>
+      </xul:stack>
+    </content>
+    <handlers>
+      <handler event="mouseover" action="ctrlTab._mouseOverFocus(this);"/>
+      <handler event="command" action="ctrlTab.pick(this);"/>
+      <handler event="click" button="1" action="ctrlTab.remove(this);"/>
+      <handler event="click" button="2" action="if (navigator.platform.indexOf('Mac') != -1) ctrlTab.pick(this);"/>
+    </handlers>
+  </binding>
+
+  <binding id="allTabs-thumbnail" extends="chrome://global/content/bindings/button.xml#button-base">
+    <content pack="center" align="center">
+      <xul:stack>
+        <xul:vbox class="allTabs-thumbnail-inner" align="center" pack="center">
+          <xul:hbox class="tabPreview-canvas" xbl:inherits="style=canvasstyle">
+            <children/>
+          </xul:hbox>
+          <xul:label flex="1" xbl:inherits="value=label,crop" class="allTabs-thumbnail-label plain"/>
+        </xul:vbox>
+        <xul:hbox class="allTabs-favicon-container">
+          <xul:image class="allTabs-favicon" xbl:inherits="src=icon"/>
+        </xul:hbox>
+      </xul:stack>
+    </content>
+    <handlers>
+      <handler event="command" action="allTabs.pick(this);"/>
+      <handler event="click" button="1" action="gBrowser.removeTab(this._tab);"/>
+    </handlers>
+  </binding>
+</bindings>
diff --git a/chrome/content/browser-win.xul b/chrome/content/browser-win.xul
new file mode 100644
index 0000000..e9b0057
--- /dev/null
+++ b/chrome/content/browser-win.xul
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+  <keyset id="mainKeyset">
+    <key id="key_showAllTabs3" key="q" modifiers="accel" oncommand="allTabs.open(true);"/>
+  </keyset>
+</overlay>
diff --git a/chrome/content/browser.xul b/chrome/content/browser.xul
new file mode 100644
index 0000000..76c680a
--- /dev/null
+++ b/chrome/content/browser.xul
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!DOCTYPE bindings [
+<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
+%globalDTD;
+<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
+%browserDTD;
+]>
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+  <script type="application/javascript" src="ctrlTab.js"/>
+  <commandset id="mainCommandSet">
+    <command id="Browser:ShowAllTabs" oncommand="allTabs.open();"/>
+  </commandset>
+  <keyset id="mainKeyset">
+    <key id="key_showAllTabs" command="Browser:ShowAllTabs" keycode="VK_TAB" modifiers="control,shift"/>
+    <key id="key_showAllTabs2" command="Browser:ShowAllTabs" key="a" modifiers="accel,shift"/>
+  </keyset>
+  <popupset id="mainPopupSet">
+    <panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
+      <hbox>
+        <button class="ctrlTab-thumbnail" flex="1"/>
+        <button class="ctrlTab-thumbnail" flex="1"/>
+        <button class="ctrlTab-thumbnail" flex="1"/>
+        <button class="ctrlTab-thumbnail" flex="1"/>
+        <button class="ctrlTab-thumbnail" flex="1"/>
+        <button class="ctrlTab-thumbnail" flex="1"/>
+        <button class="ctrlTab-thumbnail" flex="1"/>
+      </hbox>
+      <hbox pack="center">
+        <button id="ctrlTab-showAll" class="ctrlTab-thumbnail" noicon="true"/>
+      </hbox>
+    </panel>
+
+    <panel id="allTabs-panel" hidden="true" ignorekeys="true"
+           onmouseover="allTabs._updateTabCloseButton(event);"
+           onkeypress="allTabs._onKeyPress(event);"
+           chromedir="&locale.dir;">
+      <hbox id="allTabs-meta" align="center">
+        <spacer flex="1"/>
+        <textbox id="allTabs-filter"
+                 tooltiptext="Search Tabs"
+                 type="search"
+                 oncommand="allTabs.filter();"/>
+        <spacer flex="1"/>
+        <toolbarbutton class="KUI-panel-closebutton"
+                       oncommand="allTabs.close()"
+                       tooltiptext="&closeCmd.label;"/>
+      </hbox>
+      <stack id="allTabs-stack">
+        <box id="allTabs-container"/>
+        <toolbarbutton id="allTabs-tab-close-button"
+                       class="tab-close-button"
+                       oncommand="allTabs.closeTab(event);"
+                       tooltiptext="&closeCmd.label;"
+                       style="visibility:hidden"/>
+      </stack>
+    </panel>
+  </popupset>
+</overlay>
diff --git a/chrome/content/ctrlTab.js b/chrome/content/ctrlTab.js
new file mode 100644
index 0000000..215a1c6
--- /dev/null
+++ b/chrome/content/ctrlTab.js
@@ -0,0 +1,918 @@
+var gAllTabsButton;
+window.addEventListener("load", function () {
+  setTimeout(function () {
+    tabPreviews.init();
+    if (gPrefService.getBoolPref("browser.ctrlTab.mostRecentlyUsed") &&
+        (!gPrefService.prefHasUserValue("browser.ctrlTab.disallowForScreenReaders") ||
+         !gPrefService.getBoolPref("browser.ctrlTab.disallowForScreenReaders")))
+      ctrlTab.init();
+
+    gAllTabsButton = document.getAnonymousElementByAttribute(
+                       gBrowser.tabContainer, "anonid", "alltabs-button");
+    gAllTabsButton.removeAttribute("type");
+    gAllTabsButton.setAttribute("command", "Browser:ShowAllTabs");
+  }, 100);
+}, false);
+window.addEventListener("unload", function () {
+  tabPreviews.uninit();
+  ctrlTab.uninit();
+  allTabs.uninit();
+}, false);
+
+/**
+ * Tab previews utility, produces thumbnails
+ */
+var tabPreviews = {
+  aspectRatio: 0.5625, // 16:9
+  init: function tabPreviews__init() {
+    this.width = Math.ceil(screen.availWidth / 8);
+    this.height = Math.round(this.width * this.aspectRatio);
+
+    gBrowser.tabContainer.addEventListener("TabSelect", this, false);
+    gBrowser.tabContainer.addEventListener("SSTabRestored", this, false);
+  },
+  uninit: function tabPreviews__uninit() {
+    gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
+    gBrowser.tabContainer.removeEventListener("SSTabRestored", this, false);
+    this._selectedTab = null;
+  },
+  get: function tabPreviews__get(aTab) {
+    if (aTab.__thumbnail_lastURI &&
+        aTab.__thumbnail_lastURI != aTab.linkedBrowser.currentURI.spec) {
+      aTab.__thumbnail = null;
+      aTab.__thumbnail_lastURI = null;
+    }
+    return aTab.__thumbnail || this.capture(aTab, !aTab.hasAttribute("busy"));
+  },
+  capture: function tabPreviews__capture(aTab, aStore) {
+    var thumbnail = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
+    thumbnail.mozOpaque = true;
+    thumbnail.height = this.height;
+    thumbnail.width = this.width;
+
+    var ctx = thumbnail.getContext("2d");
+    var win = aTab.linkedBrowser.contentWindow;
+    var snippetWidth = win.innerWidth * .6;
+    var scale = this.width / snippetWidth;
+    ctx.scale(scale, scale);
+    ctx.drawWindow(win, win.scrollX, win.scrollY,
+                   snippetWidth, snippetWidth * this.aspectRatio, "rgb(255,255,255)");
+
+    if (aStore) {
+      aTab.__thumbnail = thumbnail;
+      aTab.__thumbnail_lastURI = aTab.linkedBrowser.currentURI.spec;
+    }
+    return thumbnail;
+  },
+  handleEvent: function tabPreviews__handleEvent(event) {
+    switch (event.type) {
+      case "TabSelect":
+        if (this._selectedTab &&
+            this._selectedTab.parentNode &&
+            !this._pendingUpdate) {
+          // Generate a thumbnail for the tab that was selected.
+          // The timeout keeps the UI snappy and prevents us from generating thumbnails
+          // for tabs that will be closed. During that timeout, don't generate other
+          // thumbnails in case multiple TabSelect events occur fast in succession.
+          this._pendingUpdate = true;
+          setTimeout(function (self, aTab) {
+            self._pendingUpdate = false;
+            if (aTab.parentNode && !aTab.hasAttribute("busy"))
+              self.capture(aTab, true);
+          }, 2000, this, this._selectedTab);
+        }
+        this._selectedTab = event.target;
+        break;
+      case "SSTabRestored":
+        this.capture(event.target, true);
+        break;
+    }
+  }
+};
+
+/**
+ * Ctrl-Tab panel
+ */
+var ctrlTab = {
+  get panel () {
+    delete this.panel;
+    return this.panel = document.getElementById("ctrlTab-panel");
+  },
+  get showAllButton () {
+    delete this.showAllButton;
+    return this.showAllButton = document.getElementById("ctrlTab-showAll");
+  },
+  get thumbnails () {
+    delete this.thumbnails;
+    return this.thumbnails = this.panel.getElementsByClassName("ctrlTab-thumbnail");
+  },
+  get recentlyUsedLimit () {
+    delete this.recentlyUsedLimit;
+    return this.recentlyUsedLimit = gPrefService.getIntPref("browser.ctrlTab.recentlyUsedLimit");
+  },
+  get keys () {
+    var keys = {};
+    ["close", "find", "selectAll"].forEach(function (key) {
+      keys[key] = document.getElementById("key_" + key)
+                          .getAttribute("key")
+                          .toLocaleLowerCase().charCodeAt(0);
+    });
+    delete this.keys;
+    return this.keys = keys;
+  },
+  _selectedIndex: 0,
+  get selected () this._selectedIndex < 0 ?
+                    document.activeElement :
+                    this.thumbnails.item(this._selectedIndex),
+  get isOpen   () this.panel.state == "open" || this.panel.state == "showing" || this._timer,
+  get tabCount () this.tabList.length,
+
+  get tabList () {
+    if (this._tabList)
+      return this._tabList;
+
+    var list = Array.slice(gBrowser.mTabs);
+
+    if (this._closing)
+      this.detachTab(this._closing, list);
+
+    for (let i = 0; i < gBrowser.tabContainer.selectedIndex; i++)
+      list.push(list.shift());
+
+    if (this.recentlyUsedLimit != 0) {
+      let recentlyUsedTabs = this._recentlyUsedTabs;
+      if (this.recentlyUsedLimit > 0)
+        recentlyUsedTabs = this._recentlyUsedTabs.slice(0, this.recentlyUsedLimit);
+      for (let i = recentlyUsedTabs.length - 1; i >= 0; i--) {
+        list.splice(list.indexOf(recentlyUsedTabs[i]), 1);
+        list.unshift(recentlyUsedTabs[i]);
+      }
+    }
+
+    return this._tabList = list;
+  },
+
+  init: function ctrlTab__init() {
+    if (this._recentlyUsedTabs)
+      return;
+    this._recentlyUsedTabs = [gBrowser.selectedTab];
+
+    var tabContainer = gBrowser.tabContainer;
+    tabContainer.addEventListener("TabOpen", this, false);
+    tabContainer.addEventListener("TabSelect", this, false);
+    tabContainer.addEventListener("TabClose", this, false);
+
+    gBrowser.mTabBox.handleCtrlTab = false;
+    document.addEventListener("keypress", this, false);
+  },
+
+  uninit: function ctrlTab__uninit() {
+    this._recentlyUsedTabs = null;
+
+    var tabContainer = gBrowser.tabContainer;
+    tabContainer.removeEventListener("TabOpen", this, false);
+    tabContainer.removeEventListener("TabSelect", this, false);
+    tabContainer.removeEventListener("TabClose", this, false);
+
+    this.panel.removeEventListener("popupshown", this, false);
+    this.panel.removeEventListener("popuphiding", this, false);
+    this.panel.removeEventListener("popuphidden", this, false);
+    document.removeEventListener("keypress", this, false);
+    gBrowser.mTabBox.handleCtrlTab = true;
+  },
+
+  updatePreviews: function ctrlTab__updatePreviews() {
+    for (let i = 0; i < this.thumbnails.length; i++)
+      this.updatePreview(this.thumbnails[i], this.tabList[i]);
+
+    this.showAllButton.label =
+      gAllTabsButton.tooltipText + " (" + this.tabCount + ")";
+//      gNavigatorBundle.getFormattedString("ctrlTab.showAll.label", [this.tabCount]);
+  },
+
+  updatePreview: function ctrlTab__updatePreview(aThumbnail, aTab) {
+    if (aThumbnail == this.showAllButton)
+      return;
+
+    do {
+      if (aThumbnail._tab) {
+        if (aThumbnail._tab == aTab)
+          break;
+        aThumbnail._tab.removeEventListener("DOMAttrModified", this, false);
+      }
+      aThumbnail._tab = aTab;
+      if (aTab)
+        aTab.addEventListener("DOMAttrModified", this, false);
+    } while (false);
+
+    if (aThumbnail.firstChild)
+      aThumbnail.removeChild(aThumbnail.firstChild);
+    if (aTab) {
+      aThumbnail.appendChild(tabPreviews.get(aTab));
+      aThumbnail.setAttribute("label", aTab.label);
+      aThumbnail.setAttribute("tooltiptext", aTab.label);
+      aThumbnail.setAttribute("crop", aTab.crop);
+      aThumbnail.setAttribute("canvaswidth", tabPreviews.width);
+      if (aTab.image)
+        aThumbnail.setAttribute("icon", aTab.image);
+      else
+        aThumbnail.removeAttribute("icon");
+      aThumbnail.hidden = false;
+    } else {
+      aThumbnail.hidden = true;
+      aThumbnail.removeAttribute("label");
+      aThumbnail.removeAttribute("tooltiptext");
+      aThumbnail.removeAttribute("icon");
+    }
+  },
+
+  advanceFocus: function ctrlTab_advanceFocus(aForward) {
+    if (this.panel.state == "open") {
+      if (aForward)
+        document.commandDispatcher.advanceFocus();
+      else
+        document.commandDispatcher.rewindFocus();
+    } else {
+      do {
+        this._selectedIndex += aForward ? 1 : -1;
+        if (this._selectedIndex < 0)
+          this._selectedIndex = this.thumbnails.length - 1;
+        else if (this._selectedIndex >= this.thumbnails.length)
+          this._selectedIndex = 0;
+      } while (this.selected.hidden);
+    }
+
+    if (this._timer) {
+      clearTimeout(this._timer);
+      this._timer = null;
+      this._openPanel();
+    }
+  },
+
+  _mouseOverFocus: function ctrlTab_mouseOverFocus(aThumbnail) {
+    if (this._trackMouseOver)
+      aThumbnail.focus();
+  },
+
+  pick: function ctrlTab_pick(aThumbnail) {
+    if (!this.tabCount)
+      return;
+
+    var select = (aThumbnail || this.selected);
+
+    if (select == this.showAllButton) {
+      this.close();
+      document.getElementById("Browser:ShowAllTabs").doCommand();
+    } else {
+      this.close(select._tab);
+    }
+  },
+
+  remove: function ctrlTab_remove(aThumbnail) {
+    if (aThumbnail._tab)
+      gBrowser.removeTab(aThumbnail._tab);
+  },
+
+  attachTab: function ctrlTab__attachTab(aTab, aPos) {
+    if (aPos == 0)
+      this._recentlyUsedTabs.unshift(aTab);
+    else if (aPos)
+      this._recentlyUsedTabs.splice(aPos, 0, aTab);
+    else
+      this._recentlyUsedTabs.push(aTab);
+  },
+  detachTab: function ctrlTab__detachTab(aTab, aTabs) {
+    var tabs = aTabs || this._recentlyUsedTabs;
+    var i = tabs.indexOf(aTab);
+    if (i >= 0)
+      tabs.splice(i, 1);
+  },
+
+  open: function ctrlTab_open() {
+    if (this.isOpen)
+      return;
+
+    allTabs.close();
+
+    document.addEventListener("keyup", this, true);
+
+    this.updatePreviews();
+    this._selectedIndex = 1;
+
+    // Add a slight delay before showing the UI, so that a quick
+    // "ctrl-tab" keypress just flips back to the MRU tab.
+    this._timer = setTimeout(function (self) {
+      self._timer = null;
+      self._openPanel();
+    }, 100, this);
+  },
+
+  _openPanel: function ctrlTab_openPanel() {
+    this.panel.addEventListener("popupshown", this, false);
+    this.panel.addEventListener("popuphiding", this, false);
+    this.panel.addEventListener("popuphidden", this, false);
+
+    this._prevFocus = document.commandDispatcher.focusedElement ||
+                      document.commandDispatcher.focusedWindow;
+
+    this.panel.hidden = false;
+    var visibleTabThumbnails = Math.min(this.thumbnails.length - 1, this.tabCount);
+    this.panel.width = Math.min(screen.availWidth * .99,
+                                tabPreviews.width * 1.25 * visibleTabThumbnails);
+    var estimateHeight = tabPreviews.height * 1.2 + 50;
+    this.panel.openPopupAtScreen(screen.availLeft + (screen.availWidth - this.panel.width) / 2,
+                                 screen.availTop + (screen.availHeight - estimateHeight) / 2,
+                                 false);
+  },
+
+  close: function ctrlTab_close(aTabToSelect) {
+    if (!this.isOpen)
+      return;
+
+    if (this._timer) {
+      clearTimeout(this._timer);
+      this._timer = null;
+      this._cleanupUI();
+      if (aTabToSelect)
+        gBrowser.selectedTab = aTabToSelect;
+      return;
+    }
+
+    this._tabToSelect = aTabToSelect;
+    this.panel.hidePopup();
+  },
+
+  _cleanupUI: function ctrlTab_cleanupUI() {
+    document.removeEventListener("keyup", this, true);
+
+    Array.forEach(this.thumbnails, function (thumbnail) {
+      this.updatePreview(thumbnail, null);
+    }, this);
+
+    this._tabList = null;
+  },
+
+  onKeyPress: function ctrlTab__onKeyPress(event) {
+    var isOpen = this.isOpen;
+
+    if (isOpen) {
+      event.preventDefault();
+      event.stopPropagation();
+    }
+
+    switch (event.keyCode) {
+      case event.DOM_VK_TAB:
+        if (event.ctrlKey && !event.altKey && !event.metaKey) {
+          if (isOpen) {
+            this.advanceFocus(!event.shiftKey);
+          } else if (!event.shiftKey) {
+            event.preventDefault();
+            event.stopPropagation();
+            if (gBrowser.mTabs.length > 2) {
+              this.open();
+            } else if (gBrowser.mTabs.length == 2) {
+              gBrowser.selectedTab = gBrowser.selectedTab.nextSibling ||
+                                     gBrowser.selectedTab.previousSibling;
+            }
+          }
+        }
+        break;
+      default:
+        if (isOpen && event.ctrlKey) {
+          switch (event.charCode) {
+            case this.keys.close:
+              this.remove(this.selected);
+              break;
+            case this.keys.find:
+            case this.keys.selectAll:
+              this.close();
+              document.getElementById("Browser:ShowAllTabs").doCommand();
+              break;
+          }
+        }
+    }
+  },
+
+  onPopupHiding: function ctrlTab__onPopupHiding() {
+    this._cleanupUI();
+
+    this._prevFocus.focus();
+    this._prevFocus = null;
+
+    if (this._tabToSelect) {
+      gBrowser.selectedTab = this._tabToSelect;
+      this._tabToSelect = null;
+    }
+  },
+
+  removeClosingTabFromUI: function ctrlTab__removeClosingTabFromUI(aTab) {
+    if (this.tabCount == 2) {
+      this.close();
+      return;
+    }
+
+    this._closing = aTab;
+    this._tabList = null;
+    this.updatePreviews();
+    this._closing = null;
+
+    if (this.selected.hidden)
+      this.advanceFocus(false);
+    if (this.selected == this.showAllButton)
+      this.advanceFocus(false);
+
+    // If the current tab is removed, another tab can steal our focus.
+    if (aTab == gBrowser.selectedTab && this.panel.state == "open") {
+      setTimeout(function (selected) {
+        selected.focus();
+      }, 0, this.selected);
+    }
+  },
+
+  handleEvent: function ctrlTab__handleEvent(event) {
+    switch (event.type) {
+      case "DOMAttrModified":
+        // tab attribute modified (e.g. label, crop, busy, image)
+        for (let i = this.thumbnails.length - 1; i >= 0; i--) {
+          if (this.thumbnails[i]._tab == event.target) {
+            this.updatePreview(this.thumbnails[i], event.target);
+            break;
+          }
+        }
+        break;
+      case "TabSelect":
+        this.detachTab(event.target);
+        this.attachTab(event.target, 0);
+        break;
+      case "TabOpen":
+        this.attachTab(event.target, 1);
+        break;
+      case "TabClose":
+        this.detachTab(event.target);
+        if (this.isOpen)
+          this.removeClosingTabFromUI(event.target);
+        break;
+      case "keypress":
+        this.onKeyPress(event);
+        break;
+      case "keyup":
+        if (event.keyCode == event.DOM_VK_CONTROL)
+          this.pick();
+        break;
+      case "popupshown":
+        this.selected.focus();
+        this._selectedIndex = -1;
+
+        this._trackMouseOver = false;
+        setTimeout(function (self) {
+          if (self.isOpen)
+            self._trackMouseOver = true;
+        }, 0, this);
+        break;
+      case "popuphiding":
+        if (event.target == this.panel)
+          this.onPopupHiding();
+        break;
+      case "popuphidden":
+        if (event.target == this.panel) {
+          // Destroy the widget in order to prevent outdated content
+          // when re-opening the panel.
+          this.panel.hidden = true;
+        }
+        break;
+    }
+  }
+};
+
+
+/**
+ * All Tabs panel
+ */
+var allTabs = {
+  get panel () {
+    delete this.panel;
+    return this.panel = document.getElementById("allTabs-panel");
+  },
+  get filterField () {
+    delete this.filterField;
+    return this.filterField = document.getElementById("allTabs-filter");
+  },
+  get container () {
+    delete this.container;
+    return this.container = document.getElementById("allTabs-container");
+  },
+  get tabCloseButton () {
+    delete this.tabCloseButton;
+    return this.tabCloseButton = document.getElementById("allTabs-tab-close-button");
+  },
+  get _browserCommandSet () {
+    delete this._browserCommandSet;
+    return this._browserCommandSet = document.getElementById("mainCommandSet");
+  },
+  get isOpen () this.panel.state == "open" || this.panel.state == "showing",
+
+  init: function allTabs_init() {
+    if (this._initiated)
+      return;
+    this._initiated = true;
+	
+    Array.forEach(gBrowser.mTabs, function (tab) {
+      this._addBox(tab);
+    }, this);
+
+    gBrowser.tabContainer.addEventListener("TabOpen", this, false);
+    gBrowser.tabContainer.addEventListener("TabMove", this, false);
+    gBrowser.tabContainer.addEventListener("TabClose", this, false);
+  },
+
+  uninit: function allTabs_uninit() {
+    if (!this._initiated)
+      return;
+
+    gBrowser.tabContainer.removeEventListener("TabOpen", this, false);
+    gBrowser.tabContainer.removeEventListener("TabMove", this, false);
+    gBrowser.tabContainer.removeEventListener("TabClose", this, false);
+
+    this.panel.removeEventListener("popuphidden", this, false);
+    this.panel.removeEventListener("popupshown", this, false);
+    this.panel.removeEventListener("keypress", this, true);
+    this._browserCommandSet.removeEventListener("command", this, false);
+
+    while (this.container.hasChildNodes())
+      this.container.removeChild(this.container.firstChild);
+
+    this._initiated = false;
+  },
+
+  pick: function allTabs_pick(aBox) {
+    if (!aBox)
+      aBox = this._firstVisibleBox;
+
+    if (aBox)
+      gBrowser.selectedTab = aBox._tab;
+
+    this.close();
+  },
+
+  closeTab: function allTabs_closeTab(event) {
+    if (event.type != "click" || event.button == 1) {
+      this.filterField.focus();
+      gBrowser.removeTab(event.currentTarget._targetBox._tab);
+    }
+  },
+
+  filter: function allTabs_filter() {
+    var filter = this.filterField.value.split(/\s+/g);
+    this._visible = 0;
+    Array.forEach(this.container.childNodes, function (box) {
+      var tab = box._tab;
+      var matches = 0;
+      if (filter.length) {
+        let tabstring = tab.linkedBrowser.currentURI.spec;
+        try {
+          tabstring = decodeURI(tabstring);
+        } catch (e) {}
+        tabstring = tab.label + " " + tab.label.toLocaleLowerCase() + " " + tabstring;
+        for (let i = 0; i < filter.length; i++)
+          matches += tabstring.indexOf(filter[i]) > -1;
+      }
+      if (matches < filter.length) {
+        box.hidden = true;
+        tab.removeEventListener("DOMAttrModified", this, false);
+      }
+      else {
+        this._visible++;
+        this._updatePreview(box);
+        box.hidden = false;
+        tab.addEventListener("DOMAttrModified", this, false);
+      }
+    }, this);
+
+    this._reflow();
+  },
+
+  open: function allTabs_open(aToggle) {
+    this.init();
+
+    if (this.isOpen) {
+      if (aToggle)
+        this.close();
+      return;
+    }
+
+    this.filter();
+
+    this.panel.hidden = false;
+    this.panel.popupBoxObject.setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_CONSUME);
+    var estimateHeight = (this._maxHeight + parseInt(this.container.maxHeight) + 50) / 2;
+    this.panel.openPopupAtScreen(screen.availLeft + (screen.availWidth - this._maxWidth) / 2,
+                                 screen.availTop + (screen.availHeight - estimateHeight) / 2,
+                                 false);
+    this.panel.addEventListener("popuphidden", this, false);
+    this.panel.addEventListener("popupshown", this, false);
+    this.panel.addEventListener("keypress", this, true);
+    this._browserCommandSet.addEventListener("command", this, false);
+  },
+
+  close: function allTabs_close() {
+    this.panel.hidePopup();
+  },
+
+  handleEvent: function allTabs_handleEvent(event) {
+    switch (event.type) {
+      case "DOMAttrModified":
+        // tab attribute modified (e.g. label, crop, busy, image)
+        this._updatePreview(this._getBox(event.target));
+        break;
+      case "TabOpen":
+        if (this.isOpen)
+          this.close();
+        this._addBox(event.target);
+        break;
+      case "TabMove":
+        if (event.target.nextSibling)
+          this.container.insertBefore(this._getBox(event.target),
+                                      this._getBox(event.target.nextSibling));
+        else
+          this.container.appendChild(this._getBox(event.target));
+        break;
+      case "TabClose":
+        this._removeBox(this._getBox(event.target));
+        break;
+      case "keypress":
+        switch (event.keyCode) {
+          case event.DOM_VK_UP:
+          case event.DOM_VK_DOWN:
+            if (event.target != this.filterField)
+              this._advanceFocusVertically(event);
+            break;
+          case event.DOM_VK_RETURN:
+            if (event.target == this.filterField) {
+              // If there's a pending search, kick it off now.
+              if (this.filterField._timer)
+                this.filter();
+              this.pick();
+              event.preventDefault();
+              event.stopPropagation();
+            }
+            break;
+        }
+        break;
+      case "popupshown":
+        if (event.target == this.panel) {
+          this.filterField.focus();
+          this.filterField.setAttribute("emptytext", this.filterField.tooltipText);
+        }
+        break;
+      case "popuphidden":
+        if (event.target == this.panel)
+          this._onPopupHidden();
+        break;
+      case "command":
+        if (event.target.id != "Browser:ShowAllTabs") {
+          // Close the panel when there's a browser command executing in the background.
+          this.close();
+        }
+        break;
+    }
+  },
+
+  _visible: 0,
+  get _maxWidth () screen.availWidth * .9,
+  get _maxHeight () screen.availHeight * .75,
+  get _stack () {
+    delete this._stack;
+    return this._stack = document.getElementById("allTabs-stack");
+  },
+  get _boxLabelHeight () {
+    delete this._boxLabelHeight;
+    return this._boxLabelHeight = parseInt(getComputedStyle(this.container.firstChild, "").lineHeight);
+  },
+
+  get _firstVisibleBox () {
+    if (!this._visible)
+      return null;
+    var boxes = this.container.childNodes;
+    for (let i = 0; i < boxes.length; i++) {
+      if (!boxes[i].hidden)
+        return boxes[i];
+    }
+    return null;
+  },
+
+  get _lastVisibleBox () {
+    var boxes = this.container.childNodes;
+    for (let i = boxes.length - 1; i >= 0; i--) {
+      if (!boxes[i].hidden)
+        return boxes[i];
+    }
+    return null;
+  },
+
+  _reflow: function allTabs_reflow() {
+    this._updateTabCloseButton();
+
+    // the size of the box relative to the preview image
+    const REL_BOX_THUMBNAIL = 1.2;
+
+    var maxHeight = this._maxHeight;
+    var maxWidth = this._maxWidth;
+    var rel = tabPreviews.height / tabPreviews.width;
+    var rows, boxHeight, boxWidth, outerHeight;
+    var boxMaxWidth = tabPreviews.width * REL_BOX_THUMBNAIL;
+    this._columns = Math.floor(maxWidth / boxMaxWidth);
+    do {
+      rows = Math.ceil(this._visible / this._columns);
+      boxWidth = Math.min(boxMaxWidth, Math.round(maxWidth / this._columns));
+      boxHeight = Math.round(boxWidth * rel);
+      outerHeight = boxHeight + this._boxLabelHeight;
+    } while (rows * outerHeight > maxHeight && ++this._columns);
+
+    var outerWidth = boxWidth;
+    {
+      let innerWidth = Math.ceil(boxWidth / REL_BOX_THUMBNAIL);
+      let innerHeight = Math.ceil(boxHeight / REL_BOX_THUMBNAIL);
+      let verticalPadding = innerHeight * (REL_BOX_THUMBNAIL - 1);
+      var canvasStyle = "margin-bottom:" + (verticalPadding * .3) + "px;" +
+                        "max-width:" + innerWidth + "px;" +
+                        "min-width:" + innerWidth + "px;" +
+                        "max-height:" + innerHeight + "px;" +
+                        "min-height:" + innerHeight + "px;";
+    }
+
+    Array.forEach(this.container.childNodes, function (box) {
+      box.setAttribute("minwidth", outerWidth);
+      box.setAttribute("height", outerHeight);
+      box.setAttribute("canvasstyle", canvasStyle);
+      box.removeAttribute("closebuttonhover");
+    }, this);
+
+    this._stack.width = maxWidth;
+    this.container.width = Math.ceil(outerWidth * Math.min(this._columns, this._visible));
+    this.container.left = Math.round((maxWidth - this.container.width) / 2);
+    this.container.maxWidth = maxWidth - this.container.left;
+    this.container.maxHeight = rows * outerHeight;
+  },
+
+  _addBox: function allTabs_addBox(aTab) {
+    var box = document.createElement("button");
+    box.setAttribute("class", "allTabs-thumbnail");
+    box._tab = aTab;
+    return this.container.appendChild(box);
+  },
+
+  _removeBox: function allTabs_removeBox(aBox) {
+    var updateUI = (this.isOpen && !aBox.hidden);
+    aBox._tab.removeEventListener("DOMAttrModified", this, false);
+    aBox._tab = null;
+    this.container.removeChild(aBox);
+    if (updateUI) {
+      this._visible--;
+      this._reflow();
+      this.filterField.focus();
+    }
+  },
+
+  _getBox: function allTabs_getBox(aTab) {
+    var boxes = this.container.childNodes;
+    for (let i = 0; i < boxes.length; i++)
+      if (boxes[i]._tab == aTab)
+        return boxes[i];
+    return null;
+  },
+
+  _updateTabCloseButton: function allTabs_updateTabCloseButton(event) {
+    if (event && event.target == this.tabCloseButton)
+      return;
+
+    if (this.tabCloseButton._targetBox) {
+      if (event && event.target == this.tabCloseButton._targetBox)
+        return;
+
+      this.tabCloseButton._targetBox.removeAttribute("closebuttonhover");
+    }
+
+    if (event &&
+        event.target.parentNode == this.container &&
+        (event.target._tab.previousSibling || event.target._tab.nextSibling)) {
+      let thumbnail = event.target.getBoundingClientRect();
+      let container = this.container.getBoundingClientRect();
+      this.tabCloseButton.left = thumbnail.left -
+                                 container.left +
+                                 parseInt(this.container.left) +
+                                 (this.panel.getAttribute("chromedir") ==
+                                    (navigator.platform.indexOf("Mac") == -1 ? "ltr" : "rtl") ?
+                                  thumbnail.width -
+                                  this.tabCloseButton.boxObject.width : 0);
+      this.tabCloseButton.top = thumbnail.top -
+                                container.top;
+      this.tabCloseButton._targetBox = event.target;
+      this.tabCloseButton.style.visibility = "visible";
+      event.target.setAttribute("closebuttonhover", "true");
+    } else {
+      this.tabCloseButton.style.visibility = "hidden";
+      this.tabCloseButton.left = this.tabCloseButton.top = 0;
+      this.tabCloseButton._targetBox = null;
+    }
+  },
+
+  _updatePreview: function allTabs_updatePreview(aBox) {
+    aBox.setAttribute("label", aBox._tab.label);
+    aBox.setAttribute("tooltiptext", aBox._tab.label);
+    aBox.setAttribute("crop", aBox._tab.crop);
+    if (aBox._tab.image)
+      aBox.setAttribute("icon", aBox._tab.image);
+    else
+      aBox.removeAttribute("icon");
+
+    var preview = tabPreviews.get(aBox._tab);
+    if (aBox.firstChild) {
+      if (aBox.firstChild == preview)
+        return;
+      aBox.removeChild(aBox.firstChild);
+    }
+    aBox.appendChild(preview);
+  },
+
+  _onPopupHidden: function allTabs_onPopupHidden() {
+    Array.forEach(this.container.childNodes, function (box) {
+      box._tab.removeEventListener("DOMAttrModified", this, false);
+    }, this);
+
+    this.filterField.removeAttribute("emptytext");
+    this.filterField.value = "";
+    this._updateTabCloseButton();
+
+    // Destroy the widget in order to prevent outdated content
+    // when re-opening the panel.
+    this.panel.hidden = true;
+  },
+
+  _onKeyPress: function allTabs_onKeyPress(event) {
+    if (event.keyCode == event.DOM_VK_ESCAPE) {
+      this.close();
+      event.preventDefault();
+      event.stopPropagation();
+      return;
+    }
+
+    if (event.target == this.filterField) {
+      switch (event.keyCode) {
+        case event.DOM_VK_UP:
+          if (this._visible) {
+            this._lastVisibleBox.focus();
+            event.preventDefault();
+            event.stopPropagation();
+          }
+          break;
+        case event.DOM_VK_DOWN:
+          if (this._visible) {
+            this._firstVisibleBox.focus();
+            event.preventDefault();
+            event.stopPropagation();
+          }
+          break;
+      }
+    }
+  },
+
+  _advanceFocusVertically: function allTabs_advanceFocusVertically(event) {
+    var box = document.commandDispatcher.focusedElement;
+    if (!box || box.parentNode != this.container)
+      return;
+
+    var up = (event.keyCode == event.DOM_VK_UP);
+    var boxes = Array.filter(this.container.childNodes, function (box) !box.hidden);
+    if (up && box == boxes[0] ||
+        !up && box == boxes[boxes.length - 1])
+      return;
+
+    var rows = Math.ceil(boxes.length / this._columns);
+    if (rows == 1)
+      return;
+
+    var i = boxes.indexOf(box);
+    var row = Math.floor(i / this._columns);
+    row += (up ? -1 : 1);
+    if (row < 0) {
+      row = rows - 1;
+      i--;
+    } else if (row >= rows) {
+      row = 0;
+      i++;
+    }
+    i %= this._columns;
+    i += row * this._columns;
+    if (i >= boxes.length) {
+      if (up)
+        i -= this._columns;
+      else
+        i %= this._columns;
+    }
+
+    if (boxes[i] != box) {
+      boxes[i].focus();
+      event.stopPropagation();
+    }
+  }
+};
\ No newline at end of file
diff --git a/chrome/content/icon.png b/chrome/content/icon.png
new file mode 100644
index 0000000..ec15424
Binary files /dev/null and b/chrome/content/icon.png differ
diff --git a/chrome/skin/allTabs.png b/chrome/skin/allTabs.png
new file mode 100644
index 0000000..538bb6b
Binary files /dev/null and b/chrome/skin/allTabs.png differ
diff --git a/chrome/skin/browser-base.css b/chrome/skin/browser-base.css
new file mode 100644
index 0000000..5577e4a
--- /dev/null
+++ b/chrome/skin/browser-base.css
@@ -0,0 +1,48 @@
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+ at namespace html url("http://www.w3.org/1999/xhtml");
+
+/* ::::: Keyboard UI Panel ::::: */
+.KUI-panel-closebutton {
+  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image");
+}
+
+.ctrlTab-favicon-container ,
+.allTabs-favicon-container {
+  -moz-box-align: start;
+  -moz-box-pack: start;
+}
+
+.ctrlTab-favicon ,
+.allTabs-favicon {
+  width: 16px;
+  height: 16px;
+}
+
+/* ::::: Ctrl-Tab Panel ::::: */
+.ctrlTab-thumbnail {
+  -moz-binding: url("chrome://ctrl-tab/content/browser-tabPreviews.xml#ctrlTab-thumbnail");
+}
+
+/* ::::: All Tabs Panel ::::: */
+.allTabs-thumbnail {
+  -moz-binding: url("chrome://ctrl-tab/content/browser-tabPreviews.xml#allTabs-thumbnail");
+}
+
+#allTabs-tab-close-button {
+  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image");
+}
+
+#allTabs-container {
+  display: block;
+}
+
+#allTabs-tab-close-button {
+  margin: 0;
+}
+
+.allTabs-thumbnail > html|canvas {
+  min-width: inherit;
+  max-width: inherit;
+  min-height: inherit;
+  max-height: inherit;
+}
diff --git a/chrome/skin/browser-linux.css b/chrome/skin/browser-linux.css
new file mode 100644
index 0000000..1827082
--- /dev/null
+++ b/chrome/skin/browser-linux.css
@@ -0,0 +1,96 @@
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+.tabs-alltabs-button > .toolbarbutton-icon {
+  display: -moz-box;
+  margin: 2px 0 2px;
+  list-style-image: url(allTabs.png) !important;
+  -moz-image-region: auto !important;
+}
+
+/* ::::: Keyboard UI Panel ::::: */
+
+.KUI-panel-closebutton {
+  list-style-image: url(close.png);
+}
+
+.KUI-panel-closebutton > .toolbarbutton-icon {
+  margin: 0;
+}
+
+/* ::::: Ctrl-Tab and All Tabs Panels ::::: */
+
+.ctrlTab-thumbnail ,
+.allTabs-thumbnail {
+  -moz-appearance: toolbarbutton;
+}
+
+.tabPreview-canvas {
+  -moz-box-shadow: 0 0 5px ThreeDShadow;
+}
+
+.ctrlTab-thumbnail:focus .tabPreview-canvas ,
+.ctrlTab-thumbnail:hover .tabPreview-canvas ,
+.allTabs-thumbnail:focus .tabPreview-canvas ,
+.allTabs-thumbnail:hover .tabPreview-canvas {
+  -moz-box-shadow: none;
+}
+
+.ctrlTab-favicon[src] ,
+.allTabs-favicon[src] {
+  background-color: white;
+  padding: 2px;
+/* XXX: Upscaling images is ugly on Linux (bug 422179)
+  width: 24px;
+  height: 24px;
+  opacity: .7;
+*/
+  width: 20px;
+  height: 20px;
+  opacity: .8;
+}
+
+/* Ctrl-Tab */
+
+#ctrlTab-panel {
+  padding: 10px;
+}
+
+.ctrlTab-thumbnail:not(#ctrlTab-showAll) .tabPreview-canvas {
+  margin-bottom: 2px;
+}
+
+#ctrlTab-showAll {
+  -moz-appearance: button;
+  color: ButtonText;
+  padding: 0 3px;
+  margin-top: 10px;
+}
+
+/* All Tabs */
+
+#allTabs-panel {
+  /* compensate the widget border and padding to center the panel correctly */
+  margin-left: -13px;
+}
+
+#allTabs-tab-close-button {
+  /*XXX without this, the closebutton can cause the panel to expand horizontally */
+  margin-right: -16px;
+}
+
+#allTabs-meta {
+  padding: 5px;
+}
+
+#allTabs-filter {
+  -moz-margin-start: 36px;
+  -moz-margin-end: 0;
+}
+
+#allTabs-stack {
+  margin: 10px;
+}
+
+.allTabs-thumbnail-label {
+  -moz-transform: translate(0, -1px);
+}
diff --git a/chrome/skin/browser-mac.css b/chrome/skin/browser-mac.css
new file mode 100644
index 0000000..b044728
--- /dev/null
+++ b/chrome/skin/browser-mac.css
@@ -0,0 +1,150 @@
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+.tabs-alltabs-button > .toolbarbutton-icon {
+  display: -moz-box;
+  margin: 6px 0 4px;
+  list-style-image: url(allTabs.png) !important;
+  -moz-image-region: auto !important;
+}
+
+/* ::::: Keyboard UI Panel ::::: */
+
+.KUI-panel {
+  -moz-appearance: none;
+  background: rgba(27%,27%,27%,.9) url(texture.png) repeat-x;
+  color: white;
+  border: 1px solid rgba(100%,100%,100%,.15);
+  -moz-border-radius: 20px;
+}
+
+.KUI-panel[level="top"] {
+  background-color: rgba(27%,27%,27%,.65);
+  border-style: none;
+  -moz-window-shadow: none;
+}
+
+.KUI-panel-closebutton {
+  list-style-image: url(close.png);
+  -moz-appearance: none;
+  border: none;
+  padding: 0;
+  width: 24px;
+  height: 24px;
+}
+
+.KUI-panel-closebutton:not(:hover) {
+  opacity: .6;
+}
+
+.KUI-panel-closebutton > .toolbarbutton-icon {
+  margin: 0;
+}
+
+/* ::::: Ctrl-Tab and All Tabs Panels ::::: */
+
+.tabPreview-canvas {
+  -moz-box-shadow: 1px 1px 3px rgb(12%,12%,12%);
+}
+
+.ctrlTab-favicon-container ,
+.allTabs-favicon-container {
+  -moz-box-pack: end;
+}
+
+.ctrlTab-favicon[src] ,
+.allTabs-favicon[src] {
+  background-color: white;
+  width: 24px;
+  height: 24px;
+  padding: 2px;
+  opacity: .7;
+}
+
+/* Ctrl-Tab */
+
+#ctrlTab-panel {
+  padding: 20px 10px 15px;
+  text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 3px rgb(27%,27%,27%);
+}
+
+.ctrlTab-thumbnail:not(#ctrlTab-showAll) .ctrlTab-thumbnail-inner {
+  padding-bottom: 2px;
+}
+
+.ctrlTab-thumbnail:not(#ctrlTab-showAll) .tabPreview-canvas {
+  margin-bottom: 2px;
+}
+
+.ctrlTab-thumbnail:focus:not(#ctrlTab-showAll) .ctrlTab-thumbnail-inner {
+  background-color: #ccc;
+  color: black;
+  text-shadow: 0 0 1px white;
+  -moz-box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 0 5px 1px -moz-mac-focusring, 0 0 8px white;
+  padding: 2px;
+  margin: -2px -2px 0;
+}
+
+.ctrlTab-thumbnail:focus .tabPreview-canvas {
+  -moz-box-shadow: none;
+}
+
+#ctrlTab-showAll {
+  -moz-appearance: button;
+  color: ButtonText;
+  text-shadow: none;
+  padding: 0 3px;
+  margin-top: 15px;
+  font-size: 1.2em;
+}
+
+#ctrlTab-showAll:focus {
+  -moz-box-shadow: 0 0 8px white;
+  -moz-border-radius: 100%;
+}
+
+/* All Tabs */
+
+#allTabs-panel {
+  padding: 10px;
+  margin-left: -10px;
+}
+
+#allTabs-panel:not(.KUI-panel) {
+  -moz-appearance: none;
+  background: rgb(27%,27%,27%) url(KUI-background.png) repeat-x;
+  border: none;
+  color: white;
+}
+
+#allTabs-meta {
+  margin-bottom: 10px;
+}
+
+#allTabs-filter {
+  -moz-margin-start: 24px;
+  -moz-margin-end: 0;
+}
+
+#allTabs-tab-close-button {
+  /*XXX without this, the closebutton can cause the panel to expand horizontally */
+  margin-right: -16px;
+}
+
+#allTabs-tab-close-button > .toolbarbutton-icon {
+  margin: 0;
+}
+
+.allTabs-thumbnail:hover ,
+.allTabs-thumbnail[closebuttonhover] {
+  background-color: rgba(100%,100%,100%,.15);
+  -moz-border-radius: 6px;
+}
+
+.allTabs-thumbnail:focus {
+  background-color: rgba(100%,100%,100%,.3);
+  -moz-border-radius: 6px;
+}
+
+.allTabs-thumbnail-label {
+  -moz-transform: translate(0, -1px);
+}
diff --git a/chrome/skin/browser-win.css b/chrome/skin/browser-win.css
new file mode 100644
index 0000000..f31931c
--- /dev/null
+++ b/chrome/skin/browser-win.css
@@ -0,0 +1,170 @@
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+.tabs-alltabs-button > .toolbarbutton-icon {
+  display: -moz-box;
+  margin: 6px 0 4px;
+  list-style-image: url(allTabs.png) !important;
+  -moz-image-region: auto !important;
+}
+
+/* ::::: Keyboard UI Panel ::::: */
+
+.KUI-panel {
+  -moz-appearance: none;
+  background: rgba(27%,27%,27%,.9) url(texture.png) repeat-x;
+  color: white;
+  border: 1px solid rgba(100%,100%,100%,.15);
+  -moz-border-radius: 20px;
+}
+
+.KUI-panel[level="top"] {
+  background-color: rgba(27%,27%,27%,.65);
+  border-style: none;
+}
+
+.KUI-panel-closebutton {
+  list-style-image: url(close.png);
+  -moz-appearance: none;
+  border: none;
+  padding: 0;
+  width: 24px;
+  height: 24px;
+}
+
+.KUI-panel-closebutton:not(:hover) {
+  opacity: .6;
+}
+
+.KUI-panel-closebutton > .toolbarbutton-icon {
+  margin: 0;
+}
+
+/* ::::: Ctrl-Tab and All Tabs Panels ::::: */
+
+.tabPreview-canvas {
+  -moz-box-shadow: 1px 1px 3px rgb(12%,12%,12%);
+}
+
+.ctrlTab-favicon[src] ,
+.allTabs-favicon[src] {
+  background-color: white;
+  width: 24px;
+  height: 24px;
+  padding: 2px;
+  opacity: .7;
+}
+
+/* Ctrl-Tab */
+
+#ctrlTab-panel {
+  padding: 20px 10px 15px;
+  font-weight: bold;
+  text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 3px rgb(27%,27%,27%);
+}
+
+.ctrlTab-thumbnail:not(#ctrlTab-showAll) .ctrlTab-thumbnail-inner {
+  padding-bottom: 2px;
+}
+
+.ctrlTab-thumbnail:not(#ctrlTab-showAll) .tabPreview-canvas {
+  margin-bottom: 2px;
+}
+
+.ctrlTab-thumbnail:focus:not(#ctrlTab-showAll) .ctrlTab-thumbnail-inner {
+  background-color: #ccc;
+  color: black;
+  text-shadow: 0 0 1px white;
+  -moz-box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 0 5px 1px Highlight, 0 0 8px white;
+  padding: 2px;
+  margin: -2px -2px 0;
+}
+
+.ctrlTab-thumbnail:focus .tabPreview-canvas {
+  -moz-box-shadow: none;
+}
+
+#ctrlTab-showAll {
+  -moz-appearance: button;
+  color: ButtonText;
+  font-weight: normal;
+  text-shadow: none;
+  padding: 3px 5px;
+  margin-top: 15px;
+}
+
+#ctrlTab-showAll:focus {
+  -moz-box-shadow: 0 0 8px white;
+  -moz-border-radius: 3px;
+}
+
+/* All Tabs */
+
+#allTabs-panel {
+  padding: 10px;
+  margin-left: -10px;
+}
+
+#allTabs-panel:not(.KUI-panel) {
+  -moz-appearance: none;
+  background: rgb(27%,27%,27%) url(KUI-background.png) repeat-x;
+  border: none;
+  color: white;
+}
+
+#allTabs-meta {
+  margin-bottom: 10px;
+}
+
+#allTabs-filter {
+  -moz-margin-start: 24px;
+  -moz-margin-end: 0;
+}
+
+#allTabs-tab-close-button {
+  /*XXX without this, the closebutton can cause the panel to expand horizontally */
+  margin-right: -16px;
+}
+
+#allTabs-tab-close-button > .toolbarbutton-icon {
+  margin: 0;
+}
+
+.allTabs-thumbnail:hover ,
+.allTabs-thumbnail[closebuttonhover] {
+  background-color: rgba(100%,100%,100%,.15);
+  -moz-border-radius: 4px;
+}
+
+.allTabs-thumbnail:focus {
+  background-color: rgba(100%,100%,100%,.3);
+  -moz-border-radius: 4px;
+}
+
+.allTabs-thumbnail-label {
+  -moz-transform: translate(0, -1px);
+}
+
+/* Vista */
+
+/*XXX Bug 473152 - Aero Glass clips panel content
+#allTabs-panel:-moz-system-metric(windows-compositor) ,*/
+#ctrlTab-panel:-moz-system-metric(windows-compositor) {
+  background: transparent;
+  -moz-appearance: -moz-win-glass;
+  -moz-border-radius: 0;
+  border: none;
+  font: normal 1.2em "Segoe UI";
+  color: black;
+  text-shadow: white -1px -1px .5em, white -1px 1px .5em, white 1px 1px .5em, white 1px -1px .5em;
+}
+
+/*XXX Bug 473152 - Aero Glass clips panel content
+.allTabs-thumbnail:hover:-moz-system-metric(windows-compositor) ,
+.allTabs-thumbnail[closebuttonhover]:-moz-system-metric(windows-compositor) {
+  background: rgba(0,0,0,.15) url(KUI-background.png) repeat-x;
+}
+
+.allTabs-thumbnail:focus:-moz-system-metric(windows-compositor) {
+  background: rgba(0,0,0,.3) url(KUI-background.png) repeat-x;
+}
+*/
\ No newline at end of file
diff --git a/chrome/skin/close.png b/chrome/skin/close.png
new file mode 100644
index 0000000..08eeb81
Binary files /dev/null and b/chrome/skin/close.png differ
diff --git a/chrome/skin/texture.png b/chrome/skin/texture.png
new file mode 100644
index 0000000..104a49f
Binary files /dev/null and b/chrome/skin/texture.png differ
diff --git a/defaults/preferences/defaults.js b/defaults/preferences/defaults.js
new file mode 100644
index 0000000..fbcbe20
--- /dev/null
+++ b/defaults/preferences/defaults.js
@@ -0,0 +1,6 @@
+pref("browser.ctrlTab.previews", true);
+pref("browser.allTabs.previews", true);
+
+pref("browser.ctrlTab.mostRecentlyUsed", true);
+pref("browser.ctrlTab.recentlyUsedLimit", 7);
+pref("browser.allTabs.allWindows", true);
\ No newline at end of file
diff --git a/install.rdf b/install.rdf
new file mode 100644
index 0000000..955e489
--- /dev/null
+++ b/install.rdf
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>ctrl-tab at design-noir.de</em:id>
+    <em:name>Ctrl-Tab</em:name>
+    <em:version>0.21.1</em:version>
+    <em:creator>Dão Gottwald</em:creator>
+    <em:description>Ctrl+Tab navigation for tabs similar to Alt+Tab on various operating systems. Shift+Ctrl+A / Shift+Cmd+A shows all tabs in a grid.</em:description>
+    <em:homepageURL>http://en.design-noir.de/mozilla/ctrl-tab/</em:homepageURL>
+    <em:iconURL>chrome://ctrl-tab/content/icon.png</em:iconURL>
+    <em:targetApplication>
+      <Description>
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>3.5</em:minVersion>
+        <em:maxVersion>3.7a4pre</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+  </Description>
+</RDF>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/ctrl-tab.git



More information about the Pkg-mozext-commits mailing list