зеркало из https://github.com/mozilla/pjs.git
Make it possible for other XUL apps to hide profile switching UI. b=204908, r=/sr=/a=sspitzer
This commit is contained in:
Родитель
3eca35ed3d
Коммит
c41aebe6c6
|
@ -760,6 +760,8 @@ pref("profile.confirm_automigration",true);
|
|||
// if -1, we never think your profile is defunct
|
||||
// and users will never see the remigrate UI.
|
||||
pref("profile.seconds_until_defunct", -1);
|
||||
// We can show it anytime from menus
|
||||
pref("profile.manage_only_at_launch", false);
|
||||
|
||||
// Customizable toolbar stuff
|
||||
pref("custtoolbar.personal_toolbar_folder", "");
|
||||
|
|
|
@ -92,7 +92,12 @@ function StartUp()
|
|||
}
|
||||
|
||||
var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");
|
||||
autoSelectLastProfile.checked = profile.startWithLastUsedProfile;
|
||||
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
if (prefs.getBoolPref("profile.manage_only_at_launch"))
|
||||
autoSelectLastProfile.hidden = true;
|
||||
else
|
||||
autoSelectLastProfile.checked = profile.startWithLastUsedProfile;
|
||||
|
||||
var profileList = document.getElementById("profiles");
|
||||
profileList.focus();
|
||||
|
@ -219,9 +224,10 @@ function onStart()
|
|||
if (offlineState.checked != ioService.offline)
|
||||
ioService.offline = offlineState.checked;
|
||||
}
|
||||
|
||||
|
||||
var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");
|
||||
profile.startWithLastUsedProfile = autoSelectLastProfile.checked;
|
||||
if (!autoSelectLastProfile.hidden)
|
||||
profile.startWithLastUsedProfile = autoSelectLastProfile.checked;
|
||||
|
||||
try {
|
||||
profile.currentProfile = profilename;
|
||||
|
|
|
@ -468,7 +468,12 @@ nsProfile::LoadDefaultProfileDir(nsCString & profileURLStr, PRBool canInteract)
|
|||
// multiple profiles.
|
||||
|
||||
PRBool startWithLastUsedProfile = PR_FALSE;
|
||||
GetStartWithLastUsedProfile(&startWithLastUsedProfile);
|
||||
|
||||
// But first, make sure this app supports this.
|
||||
PRBool cantAutoSelect;
|
||||
rv = prefBranch->GetBoolPref("profile.manage_only_at_launch", &cantAutoSelect);
|
||||
if (NS_SUCCEEDED(rv) && !cantAutoSelect)
|
||||
GetStartWithLastUsedProfile(&startWithLastUsedProfile);
|
||||
|
||||
// This means that there was no command-line argument to force
|
||||
// profile UI to come up. But we need the UI anyway if there
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<menuitem id="java" label="&javaConsoleCmd.label;" accesskey="&javaConsoleCmd.accesskey;" oncommand="toJavaConsole()"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menuseparator id="sep_switchprofile"/>
|
||||
<menuitem id="cmd_switchprofile" label="&switchProfileCmd.label;" accesskey="&switchProfileCmd.accesskey;" oncommand="toProfileManager();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
|
Загрузка…
Ссылка в новой задаче