зеркало из https://github.com/mozilla/gecko-dev.git
Bug 340677 - remove unused files which weren't removed because cvs/patch sucks. r=mconnor on the patch which removed them
This commit is contained in:
Родитель
f08f7e8b66
Коммит
d1d9980643
|
@ -1,185 +0,0 @@
|
|||
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Firefox Preferences System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Ben Goodger.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2005
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Ben Goodger <ben@mozilla.org>
|
||||
# Dan Mosedale <dmose@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
var gDownloadsPane = {
|
||||
chooseFolder: function ()
|
||||
{
|
||||
const nsIFilePicker = Components.interfaces.nsIFilePicker;
|
||||
var fp = Components.classes["@mozilla.org/filepicker;1"]
|
||||
.createInstance(nsIFilePicker);
|
||||
var bundlePreferences = document.getElementById("bundlePreferences");
|
||||
var title = bundlePreferences.getString("chooseDownloadFolderTitle");
|
||||
fp.init(window, title, nsIFilePicker.modeGetFolder);
|
||||
|
||||
const nsILocalFile = Components.interfaces.nsILocalFile;
|
||||
var customDirPref = document.getElementById("browser.download.dir");
|
||||
if (customDirPref.value)
|
||||
fp.displayDirectory = customDirPref.value;
|
||||
fp.appendFilters(nsIFilePicker.filterAll);
|
||||
if (fp.show() == nsIFilePicker.returnOK) {
|
||||
var file = fp.file.QueryInterface(nsILocalFile);
|
||||
var currentDirPref = document.getElementById("browser.download.downloadDir");
|
||||
customDirPref.value = currentDirPref.value = file;
|
||||
var folderListPref = document.getElementById("browser.download.folderList");
|
||||
folderListPref.value = this._fileToIndex(file);
|
||||
}
|
||||
},
|
||||
|
||||
onReadUseDownloadDir: function ()
|
||||
{
|
||||
var downloadFolder = document.getElementById("downloadFolder");
|
||||
var chooseFolder = document.getElementById("chooseFolder");
|
||||
var preference = document.getElementById("browser.download.useDownloadDir");
|
||||
downloadFolder.disabled = !preference.value;
|
||||
chooseFolder.disabled = !preference.value;
|
||||
return undefined;
|
||||
},
|
||||
|
||||
_fileToIndex: function (aFile)
|
||||
{
|
||||
if (!aFile || aFile.equals(this._getDownloadsFolder("Desktop")))
|
||||
return 0;
|
||||
else if (aFile.equals(this._getDownloadsFolder("Downloads")))
|
||||
return 1;
|
||||
return 2;
|
||||
},
|
||||
|
||||
_indexToFile: function (aIndex)
|
||||
{
|
||||
switch (aIndex) {
|
||||
case 0:
|
||||
return this._getDownloadsFolder("Desktop");
|
||||
case 1:
|
||||
return this._getDownloadsFolder("Downloads");
|
||||
}
|
||||
var customDirPref = document.getElementById("browser.download.dir");
|
||||
return customDirPref.value;
|
||||
},
|
||||
|
||||
_getSpecialFolderKey: function (aFolderType)
|
||||
{
|
||||
if (aFolderType == "Desktop")
|
||||
return "Desk";
|
||||
|
||||
if (aFolderType != "Downloads")
|
||||
throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
|
||||
|
||||
#ifdef XP_WIN
|
||||
return "Pers";
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
return "UsrDocs";
|
||||
#else
|
||||
return "Home";
|
||||
#endif
|
||||
#endif
|
||||
},
|
||||
|
||||
_getDownloadsFolder: function (aFolder)
|
||||
{
|
||||
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
|
||||
.getService(Components.interfaces.nsIProperties);
|
||||
var dir = fileLocator.get(this._getSpecialFolderKey(aFolder),
|
||||
Components.interfaces.nsILocalFile);
|
||||
if (aFolder != "Desktop")
|
||||
dir.append("My Downloads");
|
||||
|
||||
return dir;
|
||||
},
|
||||
|
||||
_getDisplayNameOfFile: function (aFolder)
|
||||
{
|
||||
// TODO: would like to add support for 'Downloads on Macintosh HD'
|
||||
// for OS X users.
|
||||
return aFolder ? aFolder.path : "";
|
||||
},
|
||||
|
||||
readDownloadDirPref: function ()
|
||||
{
|
||||
var folderListPref = document.getElementById("browser.download.folderList");
|
||||
var bundlePreferences = document.getElementById("bundlePreferences");
|
||||
var downloadFolder = document.getElementById("downloadFolder");
|
||||
|
||||
var customDirPref = document.getElementById("browser.download.dir");
|
||||
var customIndex = customDirPref.value ? this._fileToIndex(customDirPref.value) : 0;
|
||||
if (folderListPref.value == 0 || customIndex == 0)
|
||||
downloadFolder.label = bundlePreferences.getString("desktopFolderName");
|
||||
else if (folderListPref.value == 1 || customIndex == 1)
|
||||
downloadFolder.label = bundlePreferences.getString("myDownloadsFolderName");
|
||||
else
|
||||
downloadFolder.label = this._getDisplayNameOfFile(customDirPref.value);
|
||||
|
||||
var ios = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
var fph = ios.getProtocolHandler("file")
|
||||
.QueryInterface(Components.interfaces.nsIFileProtocolHandler);
|
||||
var currentDirPref = document.getElementById("browser.download.downloadDir");
|
||||
var downloadDir = currentDirPref.value || this._indexToFile(folderListPref.value);
|
||||
var urlspec = fph.getURLSpecFromFile(downloadDir);
|
||||
downloadFolder.image = "moz-icon://" + urlspec + "?size=16";
|
||||
|
||||
return undefined;
|
||||
},
|
||||
|
||||
writeFolderList: function ()
|
||||
{
|
||||
var currentDirPref = document.getElementById("browser.download.downloadDir");
|
||||
return this._fileToIndex(currentDirPref.value);
|
||||
},
|
||||
|
||||
showWhenStartingPrefChanged: function ()
|
||||
{
|
||||
var showWhenStartingPref = document.getElementById("browser.download.manager.showWhenStarting");
|
||||
var closeWhenDonePref = document.getElementById("browser.download.manager.closeWhenDone");
|
||||
closeWhenDonePref.disabled = !showWhenStartingPref.value;
|
||||
},
|
||||
|
||||
readShowWhenStartingPref: function ()
|
||||
{
|
||||
this.showWhenStartingPrefChanged();
|
||||
return undefined;
|
||||
},
|
||||
|
||||
showFileTypeActions: function ()
|
||||
{
|
||||
document.documentElement.openWindow("Preferences:DownloadActions",
|
||||
"chrome://browser/content/preferences/downloadactions.xul",
|
||||
"", null);
|
||||
}
|
||||
};
|
|
@ -1,136 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Firefox Preferences System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Ben Goodger.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2005
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Ben Goodger <ben@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
<!ENTITY % downloadsDTD SYSTEM "chrome://browser/locale/preferences/downloads.dtd">
|
||||
%brandDTD;
|
||||
%downloadsDTD;
|
||||
]>
|
||||
|
||||
<overlay id="DownloadsPaneOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<prefpane id="paneDownloads"
|
||||
helpTopic="prefs-downloads" helpURI="chrome://browser/locale/help/help.rdf">
|
||||
|
||||
<preferences>
|
||||
<preference id="browser.download.useDownloadDir" name="browser.download.useDownloadDir" type="bool"/>
|
||||
<preference id="browser.download.folderList" name="browser.download.folderList" type="int"/>
|
||||
<preference id="browser.download.downloadDir" name="browser.download.downloadDir" type="file"/>
|
||||
<preference id="browser.download.dir"
|
||||
name="browser.download.dir"
|
||||
type="file"
|
||||
onchange="gDownloadsPane.readDownloadDirPref();"/>
|
||||
<preference id="browser.download.manager.showWhenStarting"
|
||||
name="browser.download.manager.showWhenStarting"
|
||||
type="bool"
|
||||
onchange="gDownloadsPane.showWhenStartingPrefChanged();"/>
|
||||
<preference id="browser.download.manager.closeWhenDone"
|
||||
name="browser.download.manager.closeWhenDone"
|
||||
type="bool"/>
|
||||
<preference id="pref.downloads.disable_button.edit_actions"
|
||||
name="pref.downloads.disable_button.edit_actions"
|
||||
type="bool"/>
|
||||
</preferences>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://browser/content/preferences/downloads.js"/>
|
||||
|
||||
<stringbundle id="bundlePreferences" src="chrome://browser/locale/preferences/preferences.properties"/>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&askOnSave.label;"/>
|
||||
|
||||
<radiogroup id="askOnSave" flex="1"
|
||||
preference="browser.download.useDownloadDir"
|
||||
onsyncfrompreference="return gDownloadsPane.onReadUseDownloadDir();">
|
||||
<radio id="alwaysAsk" label="&alwaysAsk.label;"
|
||||
accesskey="&alwaysAsk.accesskey;" value="false"/>
|
||||
<vbox flex="1">
|
||||
<radio id="neverAsk" label="&neverAsk.label;"
|
||||
accesskey="&neverAsk.accesskey;" value="true"/>
|
||||
<hbox class="indent" align="center">
|
||||
<filefield id="downloadFolder" flex="1"
|
||||
preference="browser.download.folderList"
|
||||
preference-editable="true"
|
||||
onsyncfrompreference="return gDownloadsPane.readDownloadDirPref();"
|
||||
onsynctopreference="return gDownloadsPane.writeFolderList()"/>
|
||||
<button id="chooseFolder" oncommand="gDownloadsPane.chooseFolder();"
|
||||
preference="browser.download.folderList"
|
||||
onsynctopreference="return gDownloadsPane.writeFolderList()"
|
||||
#ifdef XP_MACOSX
|
||||
accesskey="&chooseFolderMac.accesskey;"
|
||||
label="&chooseFolderMac.label;"/>
|
||||
#else
|
||||
accesskey="&chooseFolderWin.accesskey;"
|
||||
label="&chooseFolderWin.label;"/>
|
||||
#endif
|
||||
</hbox>
|
||||
</vbox>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
|
||||
<groupbox align="start">
|
||||
<caption label="&downloadManagerWindow.label;"/>
|
||||
|
||||
<checkbox id="showWhenStarting" label="&showWhenStarting.label;"
|
||||
accesskey="&showWhenStarting.accesskey;"
|
||||
preference="browser.download.manager.showWhenStarting"
|
||||
onsyncfrompreference="return gDownloadsPane.readShowWhenStartingPref();"/>
|
||||
<checkbox id="closeWhenDone" label="&closeWhenDone.label;"
|
||||
accesskey="&closeWhenDone.accesskey;" class="indent"
|
||||
preference="browser.download.manager.closeWhenDone"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&fileTypes.label;"/>
|
||||
|
||||
<description control="configureActions">&fileTypesDescription.label;</description>
|
||||
<separator class="thin"/>
|
||||
<hbox>
|
||||
<button id="configureActions" label="&configureActions.label;"
|
||||
accesskey="&configureActions.accesskey;"
|
||||
oncommand="gDownloadsPane.showFileTypeActions();"
|
||||
preference="pref.downloads.disable_button.edit_actions"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</prefpane>
|
||||
|
||||
</overlay>
|
|
@ -1,209 +0,0 @@
|
|||
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Firefox Preferences System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Ben Goodger.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2005
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Ben Goodger <ben@mozilla.org>
|
||||
# Asaf Romano <mozilla.mano@sent.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
var gGeneralPane = {
|
||||
_pane: null,
|
||||
|
||||
setHomePageToCurrentPage: function ()
|
||||
{
|
||||
var win;
|
||||
if (document.documentElement.instantApply) {
|
||||
// If we're in instant-apply mode, use the most recent browser window
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
win = wm.getMostRecentWindow("navigator:browser");
|
||||
}
|
||||
else
|
||||
win = window.opener;
|
||||
|
||||
if (win) {
|
||||
var homePageField = document.getElementById("browserStartupHomepage");
|
||||
var newVal = "";
|
||||
|
||||
var tabbrowser = win.document.getElementById("content");
|
||||
var l = tabbrowser.browsers.length;
|
||||
for (var i = 0; i < l; i++) {
|
||||
if (i)
|
||||
newVal += "|";
|
||||
newVal += tabbrowser.getBrowserAtIndex(i).webNavigation.currentURI.spec;
|
||||
}
|
||||
|
||||
homePageField.value = newVal;
|
||||
this._pane.userChangedValue(homePageField);
|
||||
}
|
||||
},
|
||||
|
||||
setHomePageToBookmark: function ()
|
||||
{
|
||||
var rv = { url: null };
|
||||
#ifdef MOZ_PLACES
|
||||
document.documentElement.openSubDialog("chrome://browser/content/preferences/selectBookmark.xul",
|
||||
#else
|
||||
document.documentElement.openSubDialog("chrome://browser/content/bookmarks/selectBookmark.xul",
|
||||
#endif
|
||||
"resizable", rv);
|
||||
if (rv.url) {
|
||||
var homePageField = document.getElementById("browserStartupHomepage");
|
||||
homePageField.value = rv.url;
|
||||
this._pane.userChangedValue(homePageField);
|
||||
}
|
||||
},
|
||||
|
||||
setHomePageToDefaultPage: function ()
|
||||
{
|
||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService);
|
||||
var pref = prefService.getDefaultBranch(null);
|
||||
var url = pref.getComplexValue("browser.startup.homepage",
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
var homePageField = document.getElementById("browserStartupHomepage");
|
||||
homePageField.value = url;
|
||||
|
||||
this._pane.userChangedValue(homePageField);
|
||||
},
|
||||
|
||||
setHomePageToBlankPage: function ()
|
||||
{
|
||||
var homePageField = document.getElementById("browserStartupHomepage");
|
||||
homePageField.value = "about:blank";
|
||||
|
||||
this._pane.userChangedValue(homePageField);
|
||||
},
|
||||
|
||||
// Update the Home Button tooltip on all open browser windows.
|
||||
homepageChanged: function (aEvent)
|
||||
{
|
||||
var homepage = aEvent.target.value;
|
||||
// Replace pipes with commas to look nicer.
|
||||
homepage = homepage.replace(/\|/g,', ');
|
||||
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var e = wm.getEnumerator("navigator:browser");
|
||||
while (e.hasMoreElements()) {
|
||||
var win = e.getNext();
|
||||
if (!(win instanceof Components.interfaces.nsIDOMWindow))
|
||||
break;
|
||||
var homeButton = win.document.getElementById("home-button");
|
||||
if (homeButton)
|
||||
homeButton.setAttribute("tooltiptext", homepage);
|
||||
}
|
||||
},
|
||||
|
||||
init: function ()
|
||||
{
|
||||
this._pane = document.getElementById("paneGeneral");
|
||||
|
||||
this._updateUseCurrentButton();
|
||||
if (document.documentElement.instantApply)
|
||||
window.addEventListener("focus", this._updateUseCurrentButton, false);
|
||||
},
|
||||
|
||||
_updateUseCurrentButton: function () {
|
||||
var useButton = document.getElementById("browserUseCurrent");
|
||||
|
||||
var win;
|
||||
if (document.documentElement.instantApply) {
|
||||
// If we're in instant-apply mode, use the most recent browser window
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
win = wm.getMostRecentWindow("navigator:browser");
|
||||
}
|
||||
else
|
||||
win = window.opener;
|
||||
|
||||
if (win && win.document.documentElement
|
||||
.getAttribute("windowtype") == "navigator:browser") {
|
||||
useButton.disabled = false;
|
||||
|
||||
var tabbrowser = win.document.getElementById("content");
|
||||
if (tabbrowser.browsers.length > 1)
|
||||
useButton.label = useButton.getAttribute("label2");
|
||||
}
|
||||
else {
|
||||
useButton.disabled = true;
|
||||
}
|
||||
},
|
||||
|
||||
showConnections: function ()
|
||||
{
|
||||
document.documentElement.openSubDialog("chrome://browser/content/preferences/connection.xul",
|
||||
"", null);
|
||||
},
|
||||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
checkNow: function ()
|
||||
{
|
||||
var shellSvc = Components.classes["@mozilla.org/browser/shell-service;1"]
|
||||
.getService(Components.interfaces.nsIShellService);
|
||||
var brandBundle = document.getElementById("bundleBrand");
|
||||
var shellBundle = document.getElementById("bundleShell");
|
||||
var brandShortName = brandBundle.getString("brandShortName");
|
||||
var promptTitle = shellBundle.getString("setDefaultBrowserTitle");
|
||||
var promptMessage;
|
||||
const IPS = Components.interfaces.nsIPromptService;
|
||||
var psvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(IPS);
|
||||
if (!shellSvc.isDefaultBrowser(false)) {
|
||||
promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage",
|
||||
[brandShortName]);
|
||||
var rv = psvc.confirmEx(window, promptTitle, promptMessage,
|
||||
(IPS.BUTTON_TITLE_YES * IPS.BUTTON_POS_0) +
|
||||
(IPS.BUTTON_TITLE_NO * IPS.BUTTON_POS_1),
|
||||
null, null, null, null, { });
|
||||
if (rv == 0)
|
||||
shellSvc.setDefaultBrowser(true, false);
|
||||
}
|
||||
else {
|
||||
promptMessage = shellBundle.getFormattedString("alreadyDefaultBrowser",
|
||||
[brandShortName]);
|
||||
psvc.alert(window, promptTitle, promptMessage);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_FEEDS
|
||||
,
|
||||
|
||||
chooseFeedReader: function ()
|
||||
{
|
||||
openDialog("chrome://browser/content/feeds/options.xul", "", "modal,centerscreen");
|
||||
}
|
||||
#endif
|
||||
};
|
|
@ -1,105 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % generalDTD SYSTEM "chrome://browser/locale/preferences/general.dtd" >
|
||||
%generalDTD;
|
||||
]>
|
||||
|
||||
<overlay id="GeneralPaneOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<prefpane id="paneGeneral" onpaneload="gGeneralPane.init();"
|
||||
helpTopic="prefs-general" helpURI="chrome://browser/locale/help/help.rdf">
|
||||
<script type="application/x-javascript" src="chrome://browser/content/preferences/general.js"/>
|
||||
|
||||
<preferences>
|
||||
<preference id="browser.startup.homepage"
|
||||
name="browser.startup.homepage"
|
||||
type="wstring" onchange="gGeneralPane.homepageChanged(event);"/>
|
||||
<preference id="browser.shell.checkDefaultBrowser"
|
||||
name="browser.shell.checkDefaultBrowser"
|
||||
type="bool"/>
|
||||
<preference id="pref.browser.homepage.disable_button.current_page"
|
||||
name="pref.browser.homepage.disable_button.current_page"
|
||||
type="bool"/>
|
||||
<preference id="pref.browser.homepage.disable_button.bookmark_page"
|
||||
name="pref.browser.homepage.disable_button.bookmark_page"
|
||||
type="bool"/>
|
||||
<preference id="pref.browser.homepage.disable_button.blank_page"
|
||||
name="pref.browser.homepage.disable_button.blank_page"
|
||||
type="bool"/>
|
||||
<preference id="pref.general.disable_button.default_browser"
|
||||
name="pref.general.disable_button.default_browser"
|
||||
type="bool"/>
|
||||
</preferences>
|
||||
|
||||
<stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/>
|
||||
<stringbundle id="bundleShell" src="chrome://browser/locale/shellservice.properties"/>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&header2.label;"/>
|
||||
<hbox align="center" flex="1">
|
||||
<label value="&location.label;" accesskey="&location.accesskey;" control="browserStartupHomepage"/>
|
||||
<textbox id="browserStartupHomepage" class="padded" flex="1"
|
||||
type="autocomplete" autocompletesearch="history"
|
||||
preference="browser.startup.homepage"/>
|
||||
</hbox>
|
||||
<hbox align="center" pack="end">
|
||||
<button label="&useCurrent.label;" accesskey="&useCurrent.accesskey;"
|
||||
label2="&useCurrentMultiple.label;"
|
||||
oncommand="gGeneralPane.setHomePageToCurrentPage();"
|
||||
id="browserUseCurrent"
|
||||
prefstring="pref.browser.homepage.disable_button.current_page"/>
|
||||
<button label="&useBookmark.label;" accesskey="&useBookmark.accesskey;"
|
||||
oncommand="gGeneralPane.setHomePageToBookmark();"
|
||||
id="browserUseBookmark"
|
||||
prefstring="pref.browser.homepage.disable_button.bookmark_page"/>
|
||||
<button label="&useBlank.label;" accesskey="&useBlank.accesskey;"
|
||||
oncommand="gGeneralPane.setHomePageToBlankPage();"
|
||||
id="browserUseBlank"
|
||||
prefstring="pref.browser.homepage.disable_button.blank_page"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
<groupbox orient="horizontal">
|
||||
<caption label="&defaultBrowserGroup.label;"/>
|
||||
<hbox align="center" flex="1">
|
||||
<checkbox id="checkForDefault" preference="browser.shell.checkDefaultBrowser"
|
||||
label="&checkForDefault.label;" accesskey="&checkForDefault.accesskey;"
|
||||
flex="1"/>
|
||||
<button label="&checkNow.label;" accesskey="&checkNow.accesskey;"
|
||||
oncommand="gGeneralPane.checkNow()"
|
||||
preference="pref.general.disable_button.default_browser"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
#endif
|
||||
|
||||
<groupbox>
|
||||
<caption label="&connectionsInfo.caption;"/>
|
||||
<hbox align="center">
|
||||
<description flex="1" control="catProxiesButton">&proxiesInfo.label;</description>
|
||||
<button id="catProxiesButton" icon="network" label="&showConnections.label;"
|
||||
accesskey="&showConnections.accesskey;"
|
||||
oncommand="gGeneralPane.showConnections();"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
#ifdef MOZ_FEEDS
|
||||
# XXXben move this some place better after a2
|
||||
<groupbox align="start">
|
||||
<caption label="&feedReader.label;"/>
|
||||
|
||||
<description>&feedReader.info;</description>
|
||||
|
||||
<button id="feedReader"
|
||||
label="&chooseFeedReader.label;" accesskey="&chooseFeedReader.accesskey;"
|
||||
oncommand="gGeneralPane.chooseFeedReader();"/>
|
||||
</groupbox>
|
||||
#endif
|
||||
<separator/>
|
||||
</prefpane>
|
||||
|
||||
</overlay>
|
|
@ -1,23 +0,0 @@
|
|||
<!ENTITY askOnSave.label "Download Folder">
|
||||
<!ENTITY alwaysAsk.label "Ask me where to save every file">
|
||||
<!ENTITY alwaysAsk.accesskey "A">
|
||||
<!ENTITY neverAsk.label "Save all files to this folder:">
|
||||
<!ENTITY neverAsk.accesskey "S">
|
||||
<!ENTITY desktop.label "Desktop">
|
||||
<!ENTITY downloads.label "My Downloads">
|
||||
<!ENTITY chooseFolderWin.label "Browse...">
|
||||
<!ENTITY chooseFolderWin.accesskey "B">
|
||||
<!ENTITY chooseFolderMac.label "Choose...">
|
||||
<!ENTITY chooseFolderMac.accesskey "h">
|
||||
|
||||
<!ENTITY downloadManagerWindow.label "Download Manager">
|
||||
<!ENTITY showWhenStarting.label "Show Download Manager when a download begins">
|
||||
<!ENTITY showWhenStarting.accesskey "o">
|
||||
<!ENTITY closeWhenDone.label "Close the Download Manager when all downloads are complete">
|
||||
<!ENTITY closeWhenDone.accesskey "C">
|
||||
|
||||
<!ENTITY fileTypes.label "Download Actions">
|
||||
<!ENTITY configureActions.label "View & Edit Actions...">
|
||||
<!ENTITY configureActions.accesskey "V">
|
||||
<!ENTITY fileTypesDescription.label "&brandShortName; can automatically download or open files of certain types.">
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
|
||||
<!ENTITY header2.label "Home Page">
|
||||
<!ENTITY location.label "Location(s):">
|
||||
<!ENTITY location.accesskey "a">
|
||||
<!ENTITY useCurrent.label "Use Current Page">
|
||||
<!ENTITY useCurrent.accesskey "C">
|
||||
<!ENTITY useCurrentMultiple.label "Use Current Pages">
|
||||
<!ENTITY useBookmark.label "Use Bookmark...">
|
||||
<!ENTITY useBookmark.accesskey "U">
|
||||
<!ENTITY useBlank.label "Use Blank Page">
|
||||
<!ENTITY useBlank.accesskey "B">
|
||||
|
||||
<!ENTITY defaultBrowserGroup.label "Default Browser">
|
||||
<!ENTITY checkForDefault.label "&brandShortName; should check to see if it is the default browser when starting.">
|
||||
<!ENTITY checkForDefault.accesskey "d">
|
||||
<!ENTITY checkNow.label "Check Now">
|
||||
<!ENTITY checkNow.accesskey "N">
|
||||
|
||||
<!ENTITY showConnections.label "Connection Settings...">
|
||||
<!ENTITY showConnections.accesskey "o">
|
||||
<!ENTITY proxiesInfo.label "Determine how &brandShortName; connects to the Internet.">
|
||||
<!ENTITY connectionsInfo.caption "Connection">
|
||||
|
||||
<!-- XXXben improve this text -->
|
||||
<!ENTITY feedReader.label "Feed Reader">
|
||||
<!ENTITY feedReader.info "Choose a Feed Reader to subscribe to web feeds with">
|
||||
<!ENTITY chooseFeedReader.label "Choose Feed Reader...">
|
||||
<!ENTITY chooseFeedReader.accesskey "F">
|
Загрузка…
Ссылка в новой задаче