mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Cleanup.
This commit is contained in:
parent
612fa33f10
commit
8e6f617b18
@ -21,7 +21,14 @@
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://browser/locale/pref/pref-navigator.dtd" >
|
||||
<!DOCTYPE window [
|
||||
#ifdef XP_WIN
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
#endif
|
||||
<!ENTITY % prefNavigatorDTD SYSTEM "chrome://browser/locale/pref/pref-navigator.dtd" >
|
||||
%prefNavigatorDTD;
|
||||
]>
|
||||
|
||||
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="pref-navigator"
|
||||
@ -60,14 +67,6 @@
|
||||
parent.winHooks.prefs = parent.winHooks.winhooks.settings;
|
||||
}
|
||||
|
||||
// Ensure our additional state info is set.
|
||||
if (!("makeDefaultPending" in parent.winHooks)) {
|
||||
parent.winHooks.makeDefaultPending = false;
|
||||
}
|
||||
|
||||
// Figure out which <deck> child should be activated.
|
||||
// Default is child 0 (with button enabled).
|
||||
var deckState = 0;
|
||||
// Start by checking http/https/ftp and html/xhtml/xml.
|
||||
var prefs = parent.winHooks.prefs;
|
||||
if (prefs.isHandlingHTTP &&
|
||||
@ -76,9 +75,7 @@
|
||||
prefs.isHandlingHTML &&
|
||||
prefs.isHandlingXHTML &&
|
||||
prefs.isHandlingXML) {
|
||||
// The user *wants* us to be the default, apparently. This means
|
||||
// that the deck *might* be in one of the other two states (with
|
||||
// button disabled), depending on whether the registry matches.
|
||||
// The user *wants* us to be the default, apparently.
|
||||
// We test the registry settings using a scratch copy of the
|
||||
// settings because we don't care about some of them, but we
|
||||
// don't want to mess up the user's choices from the
|
||||
@ -101,23 +98,7 @@
|
||||
testSettings.isHandlingBMP = false;
|
||||
testSettings.isHandlingICO = false;
|
||||
testSettings.isHandlingXUL = false;
|
||||
// Now test whether the registry matches that.
|
||||
if ( testSettings.registryMatches ) {
|
||||
// Disable the button. The only remaining question
|
||||
// is what text appears alongside it. That will
|
||||
// vary depending on whether the user has pressed
|
||||
// the "Set As Default" button already.
|
||||
if ( parent.winHooks.makeDefaultPending ) {
|
||||
deckState = 2;
|
||||
} else {
|
||||
deckState = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now, switch the deck to the appropriate state.
|
||||
document.getElementById("defaultBrowserDeck").selectedIndex = deckState;
|
||||
|
||||
// Return true to tell caller to process the standard pref fields.
|
||||
return true;
|
||||
}
|
||||
@ -141,14 +122,7 @@
|
||||
// Apply the settings.
|
||||
parent.winHooks.winhooks.settings = parent.winHooks.prefs;
|
||||
} );
|
||||
|
||||
// Flip the deck to the "make-default pending" state.
|
||||
document.getElementById("defaultBrowserDeck").selectedIndex = 2;
|
||||
|
||||
// Remember this state when next displayed.
|
||||
parent.winHooks.makeDefaultPending = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
]]>
|
||||
</script>
|
||||
@ -180,45 +154,12 @@
|
||||
</hbox>
|
||||
</groupbox>
|
||||
#ifdef XP_WIN
|
||||
<groupbox flex="1">
|
||||
<groupbox orient="horizontal">
|
||||
<caption label="&defaultBrowserGroup.label;"/>
|
||||
<deck id="defaultBrowserDeck" flex="1">
|
||||
<!-- We use a deck for the three cases:
|
||||
o If not already the default, then use child 0 (with button enabled)
|
||||
o If already the default, then use child 1 (with disabled button).
|
||||
o If the user has already pushed the "Set As Default" button, then use child 2
|
||||
(with different text and a disabled button).
|
||||
-->
|
||||
<vbox flex="1">
|
||||
<description>&makeDefaultText;</description>
|
||||
<hbox>
|
||||
<spacer flex="1"/>
|
||||
<button label="&defaultBrowserButton.label;"
|
||||
oncommand="makeDefault()"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<description>&alreadyDefaultText;</description>
|
||||
<hbox>
|
||||
<spacer flex="1"/>
|
||||
<button label="&defaultBrowserButton.label;"
|
||||
autostretch="never"
|
||||
disabled="true"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<description pack="start">&defaultPendingText;</description>
|
||||
<hbox>
|
||||
<spacer flex="1"/>
|
||||
<button label="&defaultBrowserButton.label;"
|
||||
autostretch="never"
|
||||
disabled="true"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</deck>
|
||||
<description>&makeDefaultText;</description>
|
||||
<spacer flex="1"/>
|
||||
<button label="&defaultBrowserButton.label;"
|
||||
oncommand="makeDefault()"/>
|
||||
</groupbox>
|
||||
#endif
|
||||
</page>
|
||||
|
@ -21,7 +21,7 @@ browser.jar:
|
||||
* content/browser/pref/pref-privacy.xul (content/pref-privacy.xul)
|
||||
* content/browser/pref/pref-popups.xul (content/pref-popups.xul)
|
||||
content/browser/pref/pref.xul (content/pref.xul)
|
||||
content/browser/pref/nsPrefWindow.js (content/nsPrefWindow.js)
|
||||
* content/browser/pref/nsPrefWindow.js (content/nsPrefWindow.js)
|
||||
* content/browser/pref/preftree.xul (content/preftree.xul)
|
||||
* content/browser/pref/pref-winhooks.xul (content/pref-winhooks.xul)
|
||||
* content/browser/pref/pref-winhooks.js (content/pref-winhooks.js)
|
||||
|
@ -12,7 +12,5 @@
|
||||
#ifdef XP_WIN
|
||||
<!ENTITY defaultBrowserGroup.label "Default Browser">
|
||||
<!ENTITY defaultBrowserButton.label "Set Default Browser">
|
||||
<!ENTITY alreadyDefaultText "&brandShortName; is already your default browser.">
|
||||
<!ENTITY defaultPendingText "&brandShortName; will be set as your default browser when you click OK.">
|
||||
<!ENTITY makeDefaultText "Set &brandShortName; as your default browser.">
|
||||
#endif
|
@ -12,7 +12,6 @@
|
||||
<!ENTITY popups.label "Popup Windows">
|
||||
<!ENTITY scriptsAndWindows.label "JavaScript">
|
||||
<!ENTITY tabs.label "Tabbed Browsing">
|
||||
<!ENTITY urlbar.label "Control+Enter in the Location bar">
|
||||
#ifdef XP_WIN
|
||||
<!ENTITY winhooks.label "System">
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user