Use MOZ_AUSTRALIS to define common shared Australis features

This commit is contained in:
NTD 2018-06-28 13:20:53 -04:00 committed by Roy Tam
commit 10487d6802
5 changed files with 12 additions and 8 deletions

View file

@ -8,6 +8,9 @@ dnl Things we need to carry from confvars.sh
AC_DEFINE(MOZ_PHOENIX)
AC_SUBST(MOZ_PHOENIX)
AC_DEFINE(MOZ_AUSTRALIS)
AC_SUBST(MOZ_AUSTRALIS)
AC_DEFINE(MC_BASILISK)
AC_SUBST(MC_BASILISK)

View file

@ -6,6 +6,7 @@
MOZ_APP_BASENAME=Basilisk
MOZ_APP_VENDOR=Moonchild
MOZ_PHOENIX=1
MOZ_AUSTRALIS=1
MC_BASILISK=1
MOZ_UPDATER=1

View file

@ -28,7 +28,7 @@ loader.lazyRequireGetter(this, "DebuggerClient", "devtools/shared/client/main",
loader.lazyRequireGetter(this, "BrowserMenus", "devtools/client/framework/browser-menus");
loader.lazyImporter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm");
#ifdef MC_BASILISK
#ifdef MOZ_AUSTRALIS
loader.lazyImporter(this, "CustomizableUI", "resource:///modules/CustomizableUI.jsm");
#endif
@ -335,7 +335,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
* Install Developer widget
*/
installDeveloperWidget: function () {
#ifdef MC_BASILISK
#ifdef MOZ_AUSTRALIS
let id = "developer-button";
let widget = CustomizableUI.getWidget(id);
if (widget && widget.provider == CustomizableUI.PROVIDER_API) {
@ -394,7 +394,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
*/
// Used by itself
installWebIDEWidget: function () {
#ifdef MC_BASILISK
#ifdef MOZ_AUSTRALIS
if (this.isWebIDEWidgetInstalled()) {
return;
}
@ -422,7 +422,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
},
isWebIDEWidgetInstalled: function () {
#ifdef MC_BASILISK
#ifdef MOZ_AUSTRALIS
let widgetWrapper = CustomizableUI.getWidget("webide-button");
return !!(widgetWrapper && widgetWrapper.provider == CustomizableUI.PROVIDER_API);
#else
@ -439,7 +439,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
* Uninstall WebIDE widget
*/
uninstallWebIDEWidget: function () {
#ifdef MC_BASILISK
#ifdef MOZ_AUSTRALIS
if (this.isWebIDEWidgetInstalled()) {
CustomizableUI.removeWidgetFromArea("webide-button");
}
@ -454,7 +454,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
*/
// Used by webide.js
moveWebIDEWidgetInNavbar: function () {
#ifdef MC_BASILISK
#ifdef MOZ_AUSTRALIS
CustomizableUI.addWidgetToArea("webide-button", CustomizableUI.AREA_NAVBAR);
#else
return;

View file

@ -316,7 +316,7 @@ popupnotificationcontent {
/* :::::: Close button icons ::::: */
%ifdef MC_BASILISK
%ifdef MOZ_AUSTRALIS
.close-icon {
-moz-appearance: none;
height: 16px;

View file

@ -331,7 +331,7 @@ popupnotificationcontent {
/* :::::: Close button icons ::::: */
%ifdef MC_BASILISK
%ifdef MOZ_AUSTRALIS
.close-icon {
list-style-image: url("chrome://global/skin/icons/close.png");
-moz-image-region: rect(0, 20px, 20px, 0);