Bug 97622 - Put in UI to expose dynamic profile switching. r=kaie/sr=alecf

git-svn-id: svn://10.0.0.236/trunk@205762 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ccarlen%netscape.com
2006-07-29 05:42:38 +00:00
parent c3034b402b
commit 2c165dbf74
3 changed files with 25 additions and 0 deletions

View File

@@ -204,4 +204,22 @@ function checkFocusedWindow()
}
}
function toProfileManager()
{
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
.createInstance(Components.interfaces.nsIDialogParamBlock);
params.SetNumberStrings(1);
params.SetString(0, "menu");
ww.openWindow(null, // no parent
"chrome://communicator/content/profile/profileSelection.xul",
null,
"centerscreen,chrome,modal,titlebar",
params);
// Here, we don't care about the result code
// that was returned in the param block.
}

View File

@@ -19,6 +19,7 @@
<key id="key_navigator" key="&navigatorCmd.commandkey;" command="Tasks:Navigator" modifiers="accel"/>
<!-- Tools Menu -->
<key id="key_switchprofile" key="&switchProfileCmd.commandkey;" oncommand="toProfileManager();" modifiers="accel,alt"/>
</keyset>
<commandset id="tasksCommands">
<command id="Tasks:Navigator" oncommand="toNavigator();"/>
@@ -36,6 +37,8 @@
<menuitem id="java" label="&javaConsoleCmd.label;" accesskey="&javaConsoleCmd.accesskey;" oncommand="toJavaConsole()"/>
</menupopup>
</menu>
<menuseparator/>
<menuitem id="cmd_switchprofile" label="&switchProfileCmd.label;" accesskey="&switchProfileCmd.accesskey;" key="key_switchprofile" oncommand="toProfileManager();"/>
</menupopup>
</menu>

View File

@@ -35,3 +35,7 @@
<!ENTITY downloadManagerCmd.label "Download Manager">
<!ENTITY downloadManagerCmd.accesskey "D">
<!ENTITY switchProfileCmd.label "Switch Profile...">
<!ENTITY switchProfileCmd.accesskey "P">
<!ENTITY switchProfileCmd.commandkey "Q">