зеркало из https://github.com/mozilla/pjs.git
Make the options dialog resizeable.
This commit is contained in:
Родитель
efcc9d6699
Коммит
fa058ffda8
|
@ -84,20 +84,7 @@ function toOpenWindowByType( inType, uri )
|
||||||
|
|
||||||
function toMessengerWindow()
|
function toMessengerWindow()
|
||||||
{
|
{
|
||||||
var pref = Components.classes["@mozilla.org/preferences-service;1"]
|
toOpenWindowByType("mail:3pane", "chrome://messenger/content/messenger.xul");
|
||||||
.getService(Components.interfaces.nsIPrefBranch);
|
|
||||||
var windowDoc = "chrome://messenger/content/messenger.xul";
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var layoutType = pref.getIntPref("mail.pane_config");
|
|
||||||
windowDoc = !layoutType ? "chrome://messenger/content/messenger.xul" :
|
|
||||||
"chrome://messenger/content/mail3PaneWindowVertLayout.xul";
|
|
||||||
}
|
|
||||||
catch(ex)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
toOpenWindowByType("mail:3pane", windowDoc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function toAddressBook()
|
function toAddressBook()
|
||||||
|
@ -115,3 +102,18 @@ function CheckOnline()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openOptionsDialog(containerID, paneURL, itemID)
|
||||||
|
{
|
||||||
|
//check for an existing pref window and focus it; it's not application modal
|
||||||
|
const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
|
||||||
|
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
|
||||||
|
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
|
||||||
|
var lastPrefWindow = kWindowMediator.getMostRecentWindow("mozilla:preferences");
|
||||||
|
|
||||||
|
if (lastPrefWindow)
|
||||||
|
lastPrefWindow.focus();
|
||||||
|
else
|
||||||
|
openDialog("chrome://communicator/content/pref/pref.xul","PrefWindow",
|
||||||
|
"chrome,titlebar,resizable=yes", paneURL, containerID, itemID);
|
||||||
|
}
|
|
@ -1491,7 +1491,7 @@
|
||||||
<menuitem label="&javaScriptConsoleCmd.label;" accesskey="&javaScriptConsoleCmd.accesskey;" oncommand="toJavaScriptConsole();"/>
|
<menuitem label="&javaScriptConsoleCmd.label;" accesskey="&javaScriptConsoleCmd.accesskey;" oncommand="toJavaScriptConsole();"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" oncommand="MsgAccountManager(null);"/>
|
<menuitem label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" oncommand="MsgAccountManager(null);"/>
|
||||||
<menuitem id="menu_preferences" oncommand="goPreferences('mailnews', 'chrome://messenger/content/pref-mailnews.xul','mailnews')"/>
|
<menuitem id="menu_preferences" oncommand="openOptionsDialog('mailnews', 'chrome://messenger/content/pref-mailnews.xul','mailnews')"/>
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@
|
||||||
<menuitem label="&exportCmd.label;" accesskey="&exportCmd.accesskey;" oncommand="AbExport()"/>
|
<menuitem label="&exportCmd.label;" accesskey="&exportCmd.accesskey;" oncommand="AbExport()"/>
|
||||||
<menuseparator />
|
<menuseparator />
|
||||||
<menuitem id="menu_preferences" label="&preferencesCmd.label;" accesskey="&preferencesCmd.accesskey;"
|
<menuitem id="menu_preferences" label="&preferencesCmd.label;" accesskey="&preferencesCmd.accesskey;"
|
||||||
oncommand="goPreferences('mailnews', 'chrome://messenger/content/addressbook/pref-addressing.xul', 'mailaddressbookpref')"/>
|
oncommand="openOptionsDialog('mailnews', 'chrome://messenger/content/addressbook/pref-addressing.xul', 'mailaddressbookpref')"/>
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
|
|
|
@ -422,7 +422,7 @@
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" command="cmd_account"/>
|
<menuitem label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" command="cmd_account"/>
|
||||||
<menuitem id="menu_preferences" label="&preferencesCmd.label;" accesskey="&preferencesCmd.accesskey;"
|
<menuitem id="menu_preferences" label="&preferencesCmd.label;" accesskey="&preferencesCmd.accesskey;"
|
||||||
oncommand="goPreferences('mailnews', 'chrome://messenger/content/messengercompose/pref-composing_messages.xul', 'mailcomposepref');"/>
|
oncommand="openOptionsDialog('mailcomposepref', 'chrome://messenger/content/messengercompose/pref-composing_messages.xul', 'mailcomposepref');"/>
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче