mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 19:47:32 +09:00
[Pale-Moon] Issue #1865 - Remove XP_MACOSX conditional blocks.
This commit is contained in:
parent
0006a4612d
commit
a984b1dd93
60 changed files with 9 additions and 1011 deletions
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#if defined(XP_WIN)
|
||||
#include "nsWindowsShellService.h"
|
||||
#elif defined(XP_MACOSX)
|
||||
#include "nsMacShellService.h"
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
#include "nsGNOMEShellService.h"
|
||||
#endif
|
||||
|
|
@ -28,8 +26,6 @@ using namespace mozilla::browser;
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
|
||||
#if defined(XP_WIN)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
|
||||
#elif defined(XP_MACOSX)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
|
||||
#endif
|
||||
|
|
@ -43,9 +39,6 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
|
|||
NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
|
||||
#endif
|
||||
NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID);
|
||||
#ifdef XP_MACOSX
|
||||
NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
|
||||
#endif
|
||||
|
||||
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
||||
{ &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
|
||||
|
|
@ -55,9 +48,6 @@ static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
|||
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
|
||||
#endif
|
||||
{ &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor },
|
||||
#ifdef XP_MACOSX
|
||||
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
|
||||
#endif
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
|
|
@ -69,9 +59,6 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
|||
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
|
||||
#endif
|
||||
{ NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID },
|
||||
#ifdef XP_MACOSX
|
||||
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
|
||||
#endif
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -92,13 +92,8 @@
|
|||
accesskey="&cmd.removeFromHistory.accesskey;"/>
|
||||
<menuitem command="downloadsCmd_show"
|
||||
class="downloadShowMenuItem"
|
||||
#ifdef XP_MACOSX
|
||||
label="&cmd.showMac.label;"
|
||||
accesskey="&cmd.showMac.accesskey;"
|
||||
#else
|
||||
label="&cmd.show.label;"
|
||||
accesskey="&cmd.show.accesskey;"
|
||||
#endif
|
||||
/>
|
||||
|
||||
<menuseparator class="downloadCommandsSeparator"/>
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@
|
|||
<commandset id="editMenuCommands"/>
|
||||
|
||||
<keyset id="editMenuKeys">
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
<stack flex="1">
|
||||
|
|
|
|||
|
|
@ -53,11 +53,7 @@
|
|||
tooltiptext="&cmd.retry.label;"
|
||||
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_retry');"/>
|
||||
<xul:button class="downloadButton downloadShow"
|
||||
#ifdef XP_MACOSX
|
||||
tooltiptext="&cmd.showMac.label;"
|
||||
#else
|
||||
tooltiptext="&cmd.show.label;"
|
||||
#endif
|
||||
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_show');"/>
|
||||
</xul:stack>
|
||||
</content>
|
||||
|
|
@ -136,11 +132,7 @@
|
|||
tooltiptext="&cmd.retry.label;"
|
||||
oncommand="goDoCommand('downloadsCmd_retry')"/>
|
||||
<xul:button class="downloadButton downloadShow"
|
||||
#ifdef XP_MACOSX
|
||||
tooltiptext="&cmd.showMac.label;"
|
||||
#else
|
||||
tooltiptext="&cmd.show.label;"
|
||||
#endif
|
||||
oncommand="goDoCommand('downloadsCmd_show')"/>
|
||||
|
||||
</content>
|
||||
|
|
|
|||
|
|
@ -475,11 +475,7 @@ const DownloadsPanel = {
|
|||
}
|
||||
|
||||
let pasting = aEvent.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_V &&
|
||||
#ifdef XP_MACOSX
|
||||
aEvent.metaKey;
|
||||
#else
|
||||
aEvent.ctrlKey;
|
||||
#endif
|
||||
|
||||
if (!pasting) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -71,13 +71,8 @@
|
|||
accesskey="&cmd.removeFromHistory.accesskey;"/>
|
||||
<menuitem command="downloadsCmd_show"
|
||||
class="downloadShowMenuItem"
|
||||
#ifdef XP_MACOSX
|
||||
label="&cmd.showMac.label;"
|
||||
accesskey="&cmd.showMac.accesskey;"
|
||||
#else
|
||||
label="&cmd.show.label;"
|
||||
accesskey="&cmd.show.accesskey;"
|
||||
#endif
|
||||
/>
|
||||
|
||||
<menuseparator class="downloadCommandsSeparator"/>
|
||||
|
|
|
|||
|
|
@ -675,13 +675,6 @@ FeedWriter.prototype = {
|
|||
return file.getVersionInfoField("FileDescription");
|
||||
} catch (e) {}
|
||||
}
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
if (file instanceof Ci.nsILocalFileMac) {
|
||||
try {
|
||||
return file.bundleDisplayName;
|
||||
} catch (e) {}
|
||||
}
|
||||
#endif
|
||||
return file.leafName;
|
||||
},
|
||||
|
|
@ -733,11 +726,7 @@ FeedWriter.prototype = {
|
|||
#ifdef XP_WIN
|
||||
#expand if (fp.file.leafName != "__MOZ_APP_NAME__.exe") {
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
#expand if (fp.file.leafName != "__MOZ_MACBUNDLE_NAME__") {
|
||||
#else
|
||||
#expand if (fp.file.leafName != "__MOZ_APP_NAME__-bin") {
|
||||
#endif
|
||||
#endif
|
||||
this._initMenuItemWithFile(this._contentSandbox.selectedAppMenuItem,
|
||||
this._selectedApp);
|
||||
|
|
|
|||
|
|
@ -124,12 +124,6 @@ var gPage = {
|
|||
|
||||
// Initialize the drop target shim.
|
||||
gDropTargetShim.init();
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Workaround to prevent a delay on MacOSX due to a slow drop animation.
|
||||
document.addEventListener("dragover", this, false);
|
||||
document.addEventListener("drop", this, false);
|
||||
#endif
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -97,11 +97,9 @@ function BrowserGlue() {
|
|||
this._init();
|
||||
}
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
# OS X has the concept of zero-window sessions and therefore ignores the
|
||||
# browser-lastwindow-close-* topics.
|
||||
# We don't have the concept of zero-window sessions on any supported OS-es
|
||||
# and therefore have to observe the browser-lastwindow-close-* topics.
|
||||
#define OBSERVE_LASTWINDOW_CLOSE_TOPICS 1
|
||||
#endif
|
||||
|
||||
BrowserGlue.prototype = {
|
||||
_saveSession: false,
|
||||
|
|
|
|||
|
|
@ -11,10 +11,6 @@
|
|||
%pageInfoDTD;
|
||||
]>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<window id="main-window"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
windowtype="Browser:page-info"
|
||||
|
|
@ -66,11 +62,7 @@
|
|||
<keyset id="pageInfoKeySet">
|
||||
<key key="&closeWindow.key;" modifiers="accel" command="cmd_close"/>
|
||||
<key keycode="VK_ESCAPE" command="cmd_close"/>
|
||||
#ifdef XP_MACOSX
|
||||
<key key="." modifiers="meta" command="cmd_close"/>
|
||||
#else
|
||||
<key keycode="VK_F1" command="cmd_help"/>
|
||||
#endif
|
||||
<key key="©.key;" modifiers="accel" command="cmd_copy"/>
|
||||
<key key="&selectall.key;" modifiers="accel" command="cmd_selectall"/>
|
||||
<key key="&selectall.key;" modifiers="alt" command="cmd_selectall"/>
|
||||
|
|
@ -500,8 +492,4 @@
|
|||
<!-- Others added by overlay -->
|
||||
</deck>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../base/content/browserMountPoints.inc
|
||||
#endif
|
||||
|
||||
</window>
|
||||
|
|
|
|||
|
|
@ -312,12 +312,6 @@ PlacesViewBase.prototype = {
|
|||
PlacesUtils.livemarks.getLivemark({ id: itemId })
|
||||
.then(aLivemark => {
|
||||
element.setAttribute("livemark", "true");
|
||||
#ifdef XP_MACOSX
|
||||
// OS X native menubar doesn't track list-style-images since
|
||||
// it doesn't have a frame (bug 733415). Thus enforce updating.
|
||||
element.setAttribute("image", "");
|
||||
element.removeAttribute("image");
|
||||
#endif
|
||||
this.controller.cacheLivemarkInfo(aPlacesNode, aLivemark);
|
||||
}, () => undefined);
|
||||
}
|
||||
|
|
@ -329,10 +323,6 @@ PlacesViewBase.prototype = {
|
|||
popup.setAttribute("placespopup", "true");
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// No context menu on mac.
|
||||
popup.setAttribute("context", "placesContext");
|
||||
#endif
|
||||
element.appendChild(popup);
|
||||
element.className = "menu-iconic bookmark-item";
|
||||
|
||||
|
|
@ -486,12 +476,6 @@ PlacesViewBase.prototype = {
|
|||
let menu = elt.parentNode;
|
||||
if (!menu.hasAttribute("livemark")) {
|
||||
menu.setAttribute("livemark", "true");
|
||||
#ifdef XP_MACOSX
|
||||
// OS X native menubar doesn't track list-style-images since
|
||||
// it doesn't have a frame (bug 733415). Thus enforce updating.
|
||||
menu.setAttribute("image", "");
|
||||
menu.removeAttribute("image");
|
||||
#endif
|
||||
}
|
||||
|
||||
PlacesUtils.livemarks.getLivemark({ id: aPlacesNode.itemId })
|
||||
|
|
@ -999,9 +983,7 @@ PlacesToolbar.prototype = {
|
|||
popup.setAttribute("placespopup", "true");
|
||||
button.appendChild(popup);
|
||||
popup._placesNode = PlacesUtils.asContainer(aChild);
|
||||
#ifndef XP_MACOSX
|
||||
popup.setAttribute("context", "placesContext");
|
||||
#endif
|
||||
|
||||
this._domNodes.set(aChild, popup);
|
||||
}
|
||||
|
|
@ -1679,16 +1661,6 @@ function PlacesMenu(aPopupShowingEvent, aPlace) {
|
|||
this._addEventListeners(this._rootElt, ["popupshowing", "popuphidden"], true);
|
||||
this._addEventListeners(window, ["unload"], false);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Must walk up to support views in sub-menus, like Bookmarks Toolbar menu.
|
||||
for (let elt = this._viewElt.parentNode; elt; elt = elt.parentNode) {
|
||||
if (elt.localName == "menubar") {
|
||||
this._nativeView = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
PlacesViewBase.call(this, aPlace);
|
||||
this._onPopupShowing(aPopupShowingEvent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@
|
|||
|
||||
<toolbar id="placesToolbar">
|
||||
<toolbarbutton id="clearDownloadsButton"
|
||||
#ifdef XP_MACOSX
|
||||
class="tabbable"
|
||||
#endif
|
||||
insertbefore="libraryToolbarSpacer"
|
||||
label="&clearDownloadsButton.label;"
|
||||
command="downloadsCmd_clearDownloads"
|
||||
|
|
|
|||
|
|
@ -33,9 +33,6 @@
|
|||
<commandset id="placesCommands"/>
|
||||
|
||||
<keyset id="editMenuKeys">
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
<!-- required to overlay the context menu -->
|
||||
|
|
|
|||
|
|
@ -304,19 +304,6 @@
|
|||
if (elt.parentNode != this)
|
||||
return;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// XXX: The following check is a temporary hack until bug 420033 is
|
||||
// resolved.
|
||||
let parentElt = elt.parent;
|
||||
while (parentElt) {
|
||||
if (parentElt.id == "bookmarksMenuPopup" ||
|
||||
parentElt.id == "goPopup")
|
||||
return;
|
||||
|
||||
parentElt = parentElt.parentNode;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (window.XULBrowserWindow) {
|
||||
let elt = event.target;
|
||||
let placesNode = elt._placesNode;
|
||||
|
|
|
|||
|
|
@ -62,27 +62,6 @@ var PlacesOrganizer = {
|
|||
PlacesSearchBox.init();
|
||||
|
||||
window.addEventListener("AppCommand", this, true);
|
||||
#ifdef XP_MACOSX
|
||||
// 1. Map Edit->Find command to OrganizerCommand_find:all. Need to map
|
||||
// both the menuitem and the Find key.
|
||||
var findMenuItem = document.getElementById("menu_find");
|
||||
findMenuItem.setAttribute("command", "OrganizerCommand_find:all");
|
||||
var findKey = document.getElementById("key_find");
|
||||
findKey.setAttribute("command", "OrganizerCommand_find:all");
|
||||
|
||||
// 2. Disable some keybindings from browser.xul
|
||||
var elements = ["cmd_handleBackspace", "cmd_handleShiftBackspace"];
|
||||
for (var i=0; i < elements.length; i++) {
|
||||
document.getElementById(elements[i]).setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
// 3. Disable the keyboard shortcut for the History menu back/forward
|
||||
// in order to support those in the Library
|
||||
var historyMenuBack = document.getElementById("historyMenuBack");
|
||||
historyMenuBack.removeAttribute("key");
|
||||
var historyMenuForward = document.getElementById("historyMenuForward");
|
||||
historyMenuForward.removeAttribute("key");
|
||||
#endif
|
||||
|
||||
// remove the "Properties" context-menu item, we've our own details pane
|
||||
document.getElementById("placesContext")
|
||||
|
|
|
|||
|
|
@ -13,13 +13,9 @@
|
|||
|
||||
<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#else
|
||||
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
|
||||
|
|
@ -53,12 +49,8 @@
|
|||
<stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../../base/content/browserMountPoints.inc
|
||||
#else
|
||||
<commandset id="editMenuCommands"/>
|
||||
<commandset id="placesCommands"/>
|
||||
#endif
|
||||
<keyset id="placesCommandKeys"/>
|
||||
|
||||
<commandset id="organizerCommandSet">
|
||||
|
|
@ -94,7 +86,6 @@
|
|||
modifiers="accel"/>
|
||||
|
||||
<!-- Back/Forward Keys Support -->
|
||||
#ifndef XP_MACOSX
|
||||
<key id="placesKey_goBackKb"
|
||||
keycode="VK_LEFT"
|
||||
command="OrganizerCommand:Back"
|
||||
|
|
@ -103,16 +94,6 @@
|
|||
keycode="VK_RIGHT"
|
||||
command="OrganizerCommand:Forward"
|
||||
modifiers="alt"/>
|
||||
#else
|
||||
<key id="placesKey_goBackKb"
|
||||
keycode="VK_LEFT"
|
||||
command="OrganizerCommand:Back"
|
||||
modifiers="accel"/>
|
||||
<key id="placesKey_goForwardKb"
|
||||
keycode="VK_RIGHT"
|
||||
command="OrganizerCommand:Forward"
|
||||
modifiers="accel"/>
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
<key id="placesKey_goBackKb2"
|
||||
key="&goBackCmd.commandKey;"
|
||||
|
|
@ -126,9 +107,6 @@
|
|||
</keyset>
|
||||
|
||||
<keyset id="editMenuKeys">
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
<popupset id="placesPopupset">
|
||||
|
|
@ -150,17 +128,12 @@
|
|||
tooltiptext="&forwardButton.tooltip;"
|
||||
disabled="true"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<toolbarbutton type="menu" class="tabbable"
|
||||
onpopupshowing="document.getElementById('placeContent').focus()"
|
||||
#else
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
<menubar id="placesMenu" _moz-menubarkeeplocal="true">
|
||||
#else
|
||||
<menubar id="placesMenu">
|
||||
#endif
|
||||
<menu accesskey="&organize.accesskey;" class="menu-iconic"
|
||||
#endif
|
||||
id="organizeButton" label="&organize.label;"
|
||||
tooltiptext="&organize.tooltip;">
|
||||
<menupopup id="organizeButtonPopup">
|
||||
|
|
@ -177,7 +150,6 @@
|
|||
label="&cmd.new_separator.label;"
|
||||
accesskey="&cmd.new_separator.accesskey;"/>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<menuseparator id="orgUndoSeparator"/>
|
||||
|
||||
<menuitem id="orgUndo"
|
||||
|
|
@ -225,20 +197,12 @@
|
|||
key="key_selectAll"
|
||||
accesskey="&selectAllCmd.accesskey;"/>
|
||||
|
||||
#endif
|
||||
<menuseparator id="orgMoveSeparator"/>
|
||||
|
||||
<menuitem id="orgMoveBookmarks"
|
||||
command="placesCmd_moveBookmarks"
|
||||
label="&cmd.moveBookmarks.label;"
|
||||
accesskey="&cmd.moveBookmarks.accesskey;"/>
|
||||
#ifdef XP_MACOSX
|
||||
<menuitem id="orgDelete"
|
||||
command="cmd_delete"
|
||||
label="&deleteCmd.label;"
|
||||
key="key_delete"
|
||||
accesskey="&deleteCmd.accesskey;"/>
|
||||
#else
|
||||
<menuseparator id="orgCloseSeparator"/>
|
||||
|
||||
<menuitem id="orgClose"
|
||||
|
|
@ -246,15 +210,9 @@
|
|||
label="&file.close.label;"
|
||||
accesskey="&file.close.accesskey;"
|
||||
oncommand="close();"/>
|
||||
#endif
|
||||
</menupopup>
|
||||
#ifdef XP_MACOSX
|
||||
</toolbarbutton>
|
||||
<toolbarbutton type="menu" class="tabbable"
|
||||
#else
|
||||
</menu>
|
||||
<menu accesskey="&views.accesskey;" class="menu-iconic"
|
||||
#endif
|
||||
id="viewMenu" label="&views.label;"
|
||||
tooltiptext="&views.tooltip;">
|
||||
<menupopup id="viewMenuPopup">
|
||||
|
|
@ -282,13 +240,8 @@
|
|||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
#ifdef XP_MACOSX
|
||||
</toolbarbutton>
|
||||
<toolbarbutton type="menu" class="tabbable"
|
||||
#else
|
||||
</menu>
|
||||
<menu accesskey="&maintenance.accesskey;" class="menu-iconic"
|
||||
#endif
|
||||
id="maintenanceButton" label="&maintenance.label;"
|
||||
tooltiptext="&maintenance.tooltip;">
|
||||
<menupopup id="maintenanceButtonPopup">
|
||||
|
|
@ -315,12 +268,8 @@
|
|||
label="&exportBookmarksToHTML.label;"
|
||||
accesskey="&exportBookmarksToHTML.accesskey;"/>
|
||||
</menupopup>
|
||||
#ifdef XP_MACOSX
|
||||
</toolbarbutton>
|
||||
#else
|
||||
</menu>
|
||||
</menubar>
|
||||
#endif
|
||||
|
||||
<spacer id="libraryToolbarSpacer" flex="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,7 @@ var SidebarUtils = {
|
|||
mouseInGutter = aEvent.clientX < rect.x;
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
var modifKey = aEvent.metaKey || aEvent.shiftKey;
|
||||
#else
|
||||
var modifKey = aEvent.ctrlKey || aEvent.shiftKey;
|
||||
#endif
|
||||
|
||||
var isContainer = tbo.view.isContainer(cell.row);
|
||||
var openInTabs = isContainer &&
|
||||
|
|
|
|||
|
|
@ -2,11 +2,6 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
#endif
|
||||
|
||||
var gAppManagerDialog = {
|
||||
_removed: [],
|
||||
|
||||
|
|
|
|||
|
|
@ -95,13 +95,6 @@ function getFileDisplayName(file) {
|
|||
return file.getVersionInfoField("FileDescription");
|
||||
} catch (e) {}
|
||||
}
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
if (file instanceof Ci.nsILocalFileMac) {
|
||||
try {
|
||||
return file.bundleDisplayName;
|
||||
} catch (e) {}
|
||||
}
|
||||
#endif
|
||||
return file.leafName;
|
||||
}
|
||||
|
|
@ -1332,11 +1325,7 @@ var gApplicationsPane = {
|
|||
#ifdef XP_WIN
|
||||
#expand aExecutable.leafName != "__MOZ_APP_NAME__.exe";
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
#expand aExecutable.leafName != "__MOZ_MACBUNDLE_NAME__";
|
||||
#else
|
||||
#expand aExecutable.leafName != "__MOZ_APP_NAME__-bin";
|
||||
#endif
|
||||
#endif
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
#ifdef XP_MACOSX
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
#endif
|
||||
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/colors.dtd" >
|
||||
|
||||
|
|
@ -17,11 +14,7 @@
|
|||
title="&colorsDialog.title;"
|
||||
dlgbuttons="accept,cancel,help"
|
||||
ondialoghelp="openPrefsHelp()"
|
||||
#ifdef XP_MACOSX
|
||||
style="width: &window.macWidth; !important;">
|
||||
#else
|
||||
style="width: &window.width; !important;">
|
||||
#endif
|
||||
|
||||
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
|
||||
<prefpane id="ColorsDialogPane"
|
||||
|
|
|
|||
|
|
@ -16,11 +16,7 @@
|
|||
onbeforeaccept="return gConnectionsDialog.beforeAccept();"
|
||||
onload="gConnectionsDialog.checkForSystemProxy();"
|
||||
ondialoghelp="openPrefsHelp()"
|
||||
#ifdef XP_MACOSX
|
||||
style="width: &window.macWidth; !important;">
|
||||
#else
|
||||
style="width: &window.width; !important;">
|
||||
#endif
|
||||
|
||||
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -734,11 +734,7 @@ var gCookiesWindow = {
|
|||
},
|
||||
|
||||
onCookieKeyPress: function(aEvent) {
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE
|
||||
#ifdef XP_MACOSX
|
||||
|| aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE
|
||||
#endif
|
||||
) {
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
|
||||
this.deleteCookie();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -96,10 +96,8 @@
|
|||
<button id="removeAllCookies" disabled="true" icon="clear"
|
||||
oncommand="gCookiesWindow.deleteAllCookies();"/>
|
||||
<spacer flex="1"/>
|
||||
#ifndef XP_MACOSX
|
||||
<button oncommand="close();" icon="close"
|
||||
label="&button.close.label;" accesskey="&button.close.accesskey;"/>
|
||||
#endif
|
||||
</hbox>
|
||||
<resizer type="window" dir="bottomend"/>
|
||||
</hbox>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
#ifdef XP_MACOSX
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
#endif
|
||||
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/fonts.dtd" >
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@
|
|||
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/languages.dtd">
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||
#ifdef XP_MACOSX
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
#endif
|
||||
|
||||
<prefwindow id="LanguagesDialog" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
|
|
|
|||
|
|
@ -147,13 +147,8 @@
|
|||
onsyncfrompreference="return gMainPane.displayDownloadDirPref();"
|
||||
onsynctopreference="return gMainPane.getFolderListPref()"/>
|
||||
<button id="chooseFolder" oncommand="gMainPane.chooseFolder();"
|
||||
#ifdef XP_MACOSX
|
||||
accesskey="&chooseFolderMac.accesskey;"
|
||||
label="&chooseFolderMac.label;"
|
||||
#else
|
||||
accesskey="&chooseFolderWin.accesskey;"
|
||||
label="&chooseFolderWin.label;"
|
||||
#endif
|
||||
preference="browser.download.folderList"
|
||||
onsynctopreference="return gMainPane.getFolderListPref();"/>
|
||||
</hbox>
|
||||
|
|
|
|||
|
|
@ -347,11 +347,7 @@ var gPermissionManager = {
|
|||
|
||||
onPermissionKeyPress: function (aEvent)
|
||||
{
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE
|
||||
#ifdef XP_MACOSX
|
||||
|| aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE
|
||||
#endif
|
||||
) {
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
|
||||
this.onPermissionDeleted();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@
|
|||
#define USE_WIN_TITLE_STYLE
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<prefwindow type="prefwindow"
|
||||
id="BrowserPreferences"
|
||||
windowtype="Browser:Preferences"
|
||||
|
|
@ -40,20 +36,14 @@
|
|||
title="&prefWindow.titleWin;"
|
||||
#else
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
title="&prefWindow.titleGNOME;"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
#ifdef USE_WIN_TITLE_STYLE
|
||||
style="&prefWinMinSize.styleWin2;"
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
style="&prefWinMinSize.styleMac;"
|
||||
#else
|
||||
style="&prefWinMinSize.styleGNOME;"
|
||||
#endif
|
||||
#endif
|
||||
onunload="if (typeof gSecurityPane != 'undefined') gSecurityPane.syncAddonSecurityLevel();"
|
||||
ondialogaccept="gNewtabUrl.writeNewtabUrl();">
|
||||
|
|
@ -84,9 +74,5 @@
|
|||
<prefpane id="paneAdvanced" label="&paneAdvanced.title;"
|
||||
src="chrome://browser/content/preferences/advanced.xul"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../base/content/browserMountPoints.inc
|
||||
#endif
|
||||
|
||||
</prefwindow>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,7 @@
|
|||
%globalDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
%browserDTD;
|
||||
#ifdef XP_MACOSX
|
||||
<!ENTITY basePBMenu.label "&fileMenu.label;">
|
||||
#else
|
||||
<!ENTITY basePBMenu.label "<span class='appMenuButton'>&brandShortName;</span><span class='fileMenu'>&fileMenu.label;</span>">
|
||||
#endif
|
||||
<!ENTITY % privatebrowsingpageDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
|
||||
%privatebrowsingpageDTD;
|
||||
]>
|
||||
|
|
@ -48,9 +44,7 @@
|
|||
document.title = "]]>&privatebrowsingpage.title.normal;<![CDATA[";
|
||||
setFavIcon("chrome://global/skin/icons/question-16.png");
|
||||
} else {
|
||||
#ifndef XP_MACOSX
|
||||
document.title = "]]>&privatebrowsingpage.title;<![CDATA[";
|
||||
#endif
|
||||
setFavIcon("chrome://browser/skin/Privacy-16.png");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -804,11 +804,9 @@
|
|||
phase="capturing"
|
||||
action="return this.openSearch();"/>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<handler event="keypress" keycode="VK_F4"
|
||||
phase="capturing"
|
||||
action="return this.openSearch();"/>
|
||||
#endif
|
||||
|
||||
<handler event="dragover">
|
||||
<![CDATA[
|
||||
|
|
|
|||
|
|
@ -775,9 +775,7 @@ var SessionStoreInternal = {
|
|||
|
||||
if (closedWindowState) {
|
||||
let newWindowState;
|
||||
#ifndef XP_MACOSX
|
||||
if (!this._doResumeSession()) {
|
||||
#endif
|
||||
// We want to split the window up into pinned tabs and unpinned tabs.
|
||||
// Pinned tabs should be restored. If there are any remaining tabs,
|
||||
// they should be added back to _closedWindows.
|
||||
|
|
@ -801,7 +799,6 @@ var SessionStoreInternal = {
|
|||
delete normalTabsState.windows[0].__lastSessionWindowID;
|
||||
this._closedWindows[closedWindowIndex] = normalTabsState.windows[0];
|
||||
}
|
||||
#ifndef XP_MACOSX
|
||||
}
|
||||
else {
|
||||
// If we're just restoring the window, make sure it gets removed from
|
||||
|
|
@ -810,7 +807,6 @@ var SessionStoreInternal = {
|
|||
newWindowState = closedWindowState;
|
||||
delete newWindowState.hidden;
|
||||
}
|
||||
#endif
|
||||
if (newWindowState) {
|
||||
// Ensure that the window state isn't hidden
|
||||
this._restoreCount = 1;
|
||||
|
|
@ -911,11 +907,9 @@ var SessionStoreInternal = {
|
|||
this._updateCookies(windows);
|
||||
}
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
// Until we decide otherwise elsewhere, this window is part of a series
|
||||
// of closing windows to quit.
|
||||
winData._shouldRestore = true;
|
||||
#endif
|
||||
|
||||
// Save the window if it has multiple tabs or a single saveable tab and
|
||||
// it's not private.
|
||||
|
|
@ -2529,7 +2523,6 @@ var SessionStoreInternal = {
|
|||
// shallow copy this._closedWindows to preserve current state
|
||||
let lastClosedWindowsCopy = this._closedWindows.slice();
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
// If no non-popup browser window remains open, return the state of the last
|
||||
// closed window(s). We only want to do this when we're actually "ending"
|
||||
// the session.
|
||||
|
|
@ -2543,7 +2536,6 @@ var SessionStoreInternal = {
|
|||
total.unshift(lastClosedWindowsCopy.shift())
|
||||
} while (total[0].isPopup && lastClosedWindowsCopy.length > 0)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aPinnedOnly) {
|
||||
// perform a deep copy so that existing session variables are not changed.
|
||||
|
|
@ -3776,7 +3768,6 @@ var SessionStoreInternal = {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
// We want to restore closed windows that are marked with _shouldRestore.
|
||||
// We're doing this here because we want to control this only when saving
|
||||
// the file.
|
||||
|
|
@ -3791,7 +3782,6 @@ var SessionStoreInternal = {
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pinnedOnly) {
|
||||
// Save original resume_session_once preference for when quiting browser,
|
||||
|
|
@ -4408,7 +4398,6 @@ var SessionStoreInternal = {
|
|||
if (this._closedWindows.length <= this._max_windows_undo)
|
||||
return;
|
||||
let spliceTo = this._max_windows_undo;
|
||||
#ifndef XP_MACOSX
|
||||
let normalWindowIndex = 0;
|
||||
// try to find a non-popup window in this._closedWindows
|
||||
while (normalWindowIndex < this._closedWindows.length &&
|
||||
|
|
@ -4416,7 +4405,6 @@ var SessionStoreInternal = {
|
|||
normalWindowIndex++;
|
||||
if (normalWindowIndex >= this._max_windows_undo)
|
||||
spliceTo = normalWindowIndex + 1;
|
||||
#endif
|
||||
this._closedWindows.splice(spliceTo, this._closedWindows.length);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -141,11 +141,7 @@ function onListClick(aEvent) {
|
|||
if (cell.col) {
|
||||
// Restore this specific tab in the same window for middle/double/accel clicking
|
||||
// on a tab's title.
|
||||
#ifdef XP_MACOSX
|
||||
let accelKey = aEvent.metaKey;
|
||||
#else
|
||||
let accelKey = aEvent.ctrlKey;
|
||||
#endif
|
||||
if ((aEvent.button == 1 || aEvent.button == 0 && aEvent.detail == 2 || accelKey) &&
|
||||
cell.col.id == "title" &&
|
||||
!treeView.isContainer(cell.row)) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ var ShellServiceInternal = {
|
|||
.QueryInterface(Ci.nsIGNOMEShellService);
|
||||
return linuxShellService.canSetDesktopBackground;
|
||||
}
|
||||
#elif defined(XP_WIN) || defined(XP_MACOSX)
|
||||
#elif defined(XP_WIN)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,8 @@
|
|||
var Ci = Components.interfaces;
|
||||
|
||||
var gSetBackground = {
|
||||
#ifdef XP_MACOSX
|
||||
_position : "STRETCH",
|
||||
_backgroundColor : undefined,
|
||||
#else
|
||||
_position : "",
|
||||
_backgroundColor : 0,
|
||||
#endif
|
||||
_screenWidth : 0,
|
||||
_screenHeight : 0,
|
||||
_image : null,
|
||||
|
|
@ -28,9 +23,6 @@ var gSetBackground = {
|
|||
this._canvas = document.getElementById("screen");
|
||||
this._screenWidth = screen.width;
|
||||
this._screenHeight = screen.height;
|
||||
#ifdef XP_MACOSX
|
||||
document.documentElement.getButton("accept").hidden = true;
|
||||
#endif
|
||||
if (this._screenWidth / this._screenHeight >= 1.6)
|
||||
document.getElementById("monitor").setAttribute("aspectratio", "16:10");
|
||||
|
||||
|
|
@ -63,37 +55,14 @@ var gSetBackground = {
|
|||
var ctx = this._canvas.getContext("2d");
|
||||
ctx.scale(this._canvas.clientWidth / this._screenWidth, this._canvas.clientHeight / this._screenHeight);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Make sure to reset the button state in case the user has already
|
||||
// set an image as their desktop background.
|
||||
var setDesktopBackground = document.getElementById("setDesktopBackground");
|
||||
setDesktopBackground.hidden = false;
|
||||
var bundle = document.getElementById("backgroundBundle");
|
||||
setDesktopBackground.label = bundle.getString("DesktopBackgroundSet");
|
||||
setDesktopBackground.disabled = false;
|
||||
|
||||
document.getElementById("showDesktopPreferences").hidden = true;
|
||||
#else
|
||||
this._initColor();
|
||||
#endif
|
||||
this.updatePosition();
|
||||
},
|
||||
|
||||
setDesktopBackground: function ()
|
||||
{
|
||||
#ifdef XP_MACOSX
|
||||
Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Ci.nsIObserverService)
|
||||
.addObserver(this, "shell:desktop-background-changed", false);
|
||||
|
||||
var bundle = document.getElementById("backgroundBundle");
|
||||
var setDesktopBackground = document.getElementById("setDesktopBackground");
|
||||
setDesktopBackground.disabled = true;
|
||||
setDesktopBackground.label = bundle.getString("DesktopBackgroundDownloading");
|
||||
#else
|
||||
document.persist("menuPosition", "value");
|
||||
this._shell.desktopBackgroundColor = this._hexStringToLong(this._backgroundColor);
|
||||
#endif
|
||||
this._shell.setDesktopBackground(this._image,
|
||||
Ci.nsIShellService["BACKGROUND_" + this._position]);
|
||||
},
|
||||
|
|
@ -103,9 +72,7 @@ var gSetBackground = {
|
|||
var ctx = this._canvas.getContext("2d");
|
||||
ctx.clearRect(0, 0, this._screenWidth, this._screenHeight);
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
this._position = document.getElementById("menuPosition").value;
|
||||
#endif
|
||||
|
||||
switch (this._position) {
|
||||
case "TILE":
|
||||
|
|
@ -161,24 +128,6 @@ var gSetBackground = {
|
|||
}
|
||||
};
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
gSetBackground["observe"] = function (aSubject, aTopic, aData)
|
||||
{
|
||||
if (aTopic == "shell:desktop-background-changed") {
|
||||
document.getElementById("setDesktopBackground").hidden = true;
|
||||
document.getElementById("showDesktopPreferences").hidden = false;
|
||||
|
||||
Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Ci.nsIObserverService)
|
||||
.removeObserver(this, "shell:desktop-background-changed");
|
||||
}
|
||||
};
|
||||
|
||||
gSetBackground["showDesktopPrefs"] = function()
|
||||
{
|
||||
this._shell.openApplication(Ci.nsIMacShellService.APPLICATION_DESKTOP);
|
||||
};
|
||||
#else
|
||||
gSetBackground["_initColor"] = function ()
|
||||
{
|
||||
var color = this._shell.desktopBackgroundColor;
|
||||
|
|
@ -214,4 +163,3 @@ gSetBackground["_rgbToHex"] = function (aR, aG, aB)
|
|||
return "#" + [aR, aG, aB].map(aInt => aInt.toString(16).replace(/^(.)$/, "0$1"))
|
||||
.join("").toUpperCase();
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,18 +9,10 @@
|
|||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/setDesktopBackground.dtd">
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
windowtype="Shell:SetDesktopBackground"
|
||||
#ifndef XP_MACOSX
|
||||
buttons="accept,cancel"
|
||||
#else
|
||||
buttons="accept"
|
||||
#endif
|
||||
buttonlabelaccept="&setDesktopBackground.title;"
|
||||
onload="gSetBackground.load();"
|
||||
ondialogaccept="gSetBackground.setDesktopBackground();"
|
||||
|
|
@ -33,7 +25,6 @@
|
|||
<script type="application/javascript" src="chrome://browser/content/setDesktopBackground.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<hbox align="center">
|
||||
<label value="&position.label;"/>
|
||||
<menulist id="menuPosition"
|
||||
|
|
@ -53,7 +44,6 @@
|
|||
type="button"
|
||||
onchange="gSetBackground.updateColor(this.color);"/>
|
||||
</hbox>
|
||||
#endif
|
||||
<groupbox align="center">
|
||||
<caption label="&preview.label;"/>
|
||||
<stack>
|
||||
|
|
@ -63,22 +53,4 @@
|
|||
</stack>
|
||||
</groupbox>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<separator/>
|
||||
|
||||
<hbox align="right">
|
||||
<button id="setDesktopBackground"
|
||||
label="&setDesktopBackground.title;"
|
||||
oncommand="gSetBackground.setDesktopBackground();"/>
|
||||
<button id="showDesktopPreferences"
|
||||
label="&openDesktopPrefs.label;"
|
||||
oncommand="gSetBackground.showDesktopPrefs();"
|
||||
hidden="true"/>
|
||||
</hbox>
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../../base/content/browserMountPoints.inc
|
||||
#endif
|
||||
|
||||
</dialog>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue