1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-17 04:34:12 +01:00

Use a different tab binding on FF36. Closes issue #41.

This commit is contained in:
Kris Maglione
2010-10-05 02:18:16 -04:00
parent 57fe3fe9eb
commit e592637c08
2 changed files with 30 additions and 6 deletions

View File

@@ -18,7 +18,30 @@
<content><html:span class="td-strut"/><html:span class="td-span"><children/></html:span></content>
</binding>
<binding id="tab" display="xul:hbox"
<binding id="tab-3" display="xul:hbox"
extends="chrome://browser/content/tabbrowser.xml#tabbrowser-tab">
<content context="tabContextMenu" closetabtext="Close Tab">
<xul:stack class="tab-icon dactyl-tab-stack">
<xul:image xbl:inherits="validate,src=image" role="presentation"
class="tab-icon-image" dactyl:highlight="TabIcon"/>
<xul:vbox>
<xul:spring flex="1"/>
<xul:label xbl:inherits="value=ordinal" dactyl:highlight="TabIconNumber"/>
<xul:spring flex="1"/>
</xul:vbox>
</xul:stack>
<xul:label xbl:inherits="value=ordinal" dactyl:highlight="TabNumber"/>
<xul:label flex="1"
xbl:inherits="value=label,crop,accesskey"
class="tab-text" dactyl:highlight="TabText"
role="presentation"/>
<xul:toolbarbutton anonid="close-button"
tabindex="-1"
class="tab-close-button" dactyl:highlight="TabClose"/>
</content>
</binding>
<binding id="tab-4" display="xul:hbox"
extends="chrome://browser/content/tabbrowser.xml#tabbrowser-tab">
<content context="tabContextMenu" closetabtext="Close Tab">
<xul:stack class="tab-stack" flex="1">

View File

@@ -21,12 +21,13 @@ const Tabs = Module("tabs", {
this._lastBufferSwitchArgs = "";
this._lastBufferSwitchSpecial = true;
let fragment = dactyl.has("Darwin") ? "tab-mac" : "tab";
this.tabBinding = styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul",
".tabbrowser-tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#" + fragment + ") !important; }" +
this.tabBinding = styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul", String.replace(<![CDATA[
xul|tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#tab-3) !important; }
#TabsToolbar > xul|tabs > xul|tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#tab-4) !important; }
// FIXME: better solution for themes?
".tabbrowser-tab[busy] > .tab-icon > .tab-icon-image { list-style-image: url('chrome://global/skin/icons/loading_16.png') !important; }",
false, true);
.tabbrowser-tab[busy] > .tab-icon > .tab-icon-image { list-style-image: url('chrome://global/skin/icons/loading_16.png') !important; }
]]>, /tab-./g, function (m) dactyl.has("Darwin") ? "tab-mac" : m),
false, true);
// hide tabs initially to prevent flickering when 'stal' would hide them
// on startup