mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-20 16:15:46 +01:00
Make stuff mostly work on Australis.
--HG-- extra : rebase_source : 2c4664446a8261f57b3db420ea2d5600480694a2
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
|
||||||
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
|
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
|
||||||
// Copyright (c) 2008-2013 Kris Maglione <maglione.k@gmail.com>
|
// Copyright (c) 2008-2014 Kris Maglione <maglione.k@gmail.com>
|
||||||
//
|
//
|
||||||
// This work is licensed for reuse under an MIT license. Details are
|
// This work is licensed for reuse under an MIT license. Details are
|
||||||
// given in the LICENSE.txt file included with this file.
|
// given in the LICENSE.txt file included with this file.
|
||||||
@@ -12,32 +12,50 @@ var StatusLine = Module("statusline", {
|
|||||||
init: function init() {
|
init: function init() {
|
||||||
this._statusLine = document.getElementById("status-bar");
|
this._statusLine = document.getElementById("status-bar");
|
||||||
this.statusBar = document.getElementById("addon-bar") || this._statusLine;
|
this.statusBar = document.getElementById("addon-bar") || this._statusLine;
|
||||||
|
|
||||||
this.baseGroup = this.statusBar == this._statusLine ? "StatusLine " : "";
|
this.baseGroup = this.statusBar == this._statusLine ? "StatusLine " : "";
|
||||||
|
|
||||||
|
if (this.statusBar.localName == "toolbar" &&
|
||||||
|
this.statusBar.parentNode.id != "browser-bottombox")
|
||||||
|
overlay.overlayWindow(window, {
|
||||||
|
objects: this,
|
||||||
|
append: [
|
||||||
|
["vbox", { id: "browser-bottombox", xmlns: "xul" },
|
||||||
|
["toolbar", { id: "dactyl-addon-bar",
|
||||||
|
toolbarname: /*L*/ "Add-on Bar",
|
||||||
|
class: "toolbar-primary chromeclass-toolbar",
|
||||||
|
mode: "icons",
|
||||||
|
iconsize: "small", defaulticonsize: "small",
|
||||||
|
key: "statusBar" },
|
||||||
|
["statusbar", { id: "dactyl-status-bar", key: "_statusLine" }]]]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
if (config.haveGecko("25"))
|
if (config.haveGecko("25"))
|
||||||
config.tabbrowser.getStatusPanel().hidden = true;
|
config.tabbrowser.getStatusPanel().hidden = true;
|
||||||
|
|
||||||
if (this.statusBar.localName == "toolbar") {
|
if (this.statusBar.localName == "toolbar") {
|
||||||
styles.system.add("addon-bar", config.styleableChrome, literal(/*
|
styles.system.add("addon-bar", config.styleableChrome, literal(/*
|
||||||
#status-bar { margin-top: 0 !important; }
|
#status-bar, #dactyl-status-bar { margin-top: 0 !important; }
|
||||||
#addon-bar > statusbar { -moz-box-flex: 1 }
|
#dactyl-status-bar { min-height: 0 !important; }
|
||||||
|
:-moz-any(#addon-bar, #dactyl-addon-bar) > statusbar { -moz-box-flex: 1 }
|
||||||
#addon-bar > #addonbar-closebutton { visibility: collapse; }
|
#addon-bar > #addonbar-closebutton { visibility: collapse; }
|
||||||
#addon-bar > xul|toolbarspring { visibility: collapse; }
|
:-moz-any(#addon-bar, #dactyl-addon-bar) > xul|toolbarspring { visibility: collapse; }
|
||||||
*/));
|
*/));
|
||||||
|
|
||||||
overlay.overlayWindow(window, {
|
overlay.overlayWindow(window, {
|
||||||
append: [
|
append: [
|
||||||
["statusbar", { id: "status-bar", ordinal: "0" }]]
|
["statusbar", { id: this._statusLine.id, ordinal: "0" }]]
|
||||||
});
|
});
|
||||||
|
|
||||||
highlight.loadCSS(util.compileMacro(literal(/*
|
highlight.loadCSS(util.compileMacro(literal(/*
|
||||||
!AddonBar;#addon-bar {
|
!AddonBar;#addon-bar,#dactyl-addon-bar {
|
||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
min-height: 18px !important;
|
min-height: 18px !important;
|
||||||
-moz-appearance: none !important;
|
-moz-appearance: none !important;
|
||||||
<padding>
|
<padding>
|
||||||
}
|
}
|
||||||
!AddonButton;#addon-bar xul|toolbarbutton {
|
!AddonButton;:-moz-any(#addon-bar, #dactyl-addon-bar) xul|toolbarbutton {
|
||||||
-moz-appearance: none !important;
|
-moz-appearance: none !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
border-width: 0px !important;
|
border-width: 0px !important;
|
||||||
@@ -57,7 +75,7 @@ var StatusLine = Module("statusline", {
|
|||||||
let prepend = [
|
let prepend = [
|
||||||
["button", { id: "appmenu-button", label: "", image: "chrome://branding/content/icon16.png", highlight: "AppmenuButton", xmlns: "xul" }],
|
["button", { id: "appmenu-button", label: "", image: "chrome://branding/content/icon16.png", highlight: "AppmenuButton", xmlns: "xul" }],
|
||||||
["toolbarbutton", { id: "appmenu-toolbar-button", label: "", image: "chrome://branding/content/icon16.png" }],
|
["toolbarbutton", { id: "appmenu-toolbar-button", label: "", image: "chrome://branding/content/icon16.png" }],
|
||||||
["statusbar", { id: "status-bar", highlight: "StatusLine", xmlns: "xul" },
|
["statusbar", { id: this._statusLine.id, highlight: "StatusLine", xmlns: "xul" },
|
||||||
// <!-- insertbefore="dactyl.statusBefore;" insertafter="dactyl.statusAfter;" -->
|
// <!-- insertbefore="dactyl.statusBefore;" insertafter="dactyl.statusAfter;" -->
|
||||||
["hbox", { key: "container", hidden: "false", align: "center", flex: "1" },
|
["hbox", { key: "container", hidden: "false", align: "center", flex: "1" },
|
||||||
["stack", { orient: "horizontal", align: "stretch", flex: "1", highlight: "CmdLine StatusCmdLine", class: "dactyl-container" },
|
["stack", { orient: "horizontal", align: "stretch", flex: "1", highlight: "CmdLine StatusCmdLine", class: "dactyl-container" },
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ var Modules = function Modules(window) {
|
|||||||
|
|
||||||
get content() this.config.browser.contentWindow || window.content,
|
get content() this.config.browser.contentWindow || window.content,
|
||||||
|
|
||||||
|
get document() window.document,
|
||||||
|
|
||||||
window: window,
|
window: window,
|
||||||
|
|
||||||
Module: Module,
|
Module: Module,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ var Services = Module("Services", {
|
|||||||
this.add("clipboardHelper", "@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper");
|
this.add("clipboardHelper", "@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper");
|
||||||
this.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=dactyl");
|
this.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=dactyl");
|
||||||
this.add("console", "@mozilla.org/consoleservice;1", "nsIConsoleService");
|
this.add("console", "@mozilla.org/consoleservice;1", "nsIConsoleService");
|
||||||
this.add("contentPrefs", "@mozilla.org/content-pref/service;1", ["nsIContentPrefService", "nsIContentPrefService2"]);
|
this.add("contentPrefs", "@mozilla.org/content-pref/service;1", "nsIContentPrefService2");
|
||||||
this.add("dactyl", "@dactyl.googlecode.com/extra/utils", "dactylIUtils");
|
this.add("dactyl", "@dactyl.googlecode.com/extra/utils", "dactylIUtils");
|
||||||
this.add("dactyl:", this.PROTOCOL + "dactyl");
|
this.add("dactyl:", this.PROTOCOL + "dactyl");
|
||||||
this.add("debugger", "@mozilla.org/js/jsd/debugger-service;1", "jsdIDebuggerService");
|
this.add("debugger", "@mozilla.org/js/jsd/debugger-service;1", "jsdIDebuggerService");
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<Description
|
<Description
|
||||||
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||||
em:minVersion="24.0"
|
em:minVersion="24.0"
|
||||||
em:maxVersion="27.*"/>
|
em:maxVersion="30.*"/>
|
||||||
</em:targetApplication>
|
</em:targetApplication>
|
||||||
</Description>
|
</Description>
|
||||||
</RDF>
|
</RDF>
|
||||||
|
|||||||
Reference in New Issue
Block a user