Make the options dialog resizeable.

This commit is contained in:
scott%scott-macgregor.org 2003-08-09 04:49:51 +00:00
Родитель efcc9d6699
Коммит fa058ffda8
4 изменённых файлов: 19 добавлений и 17 удалений

Просмотреть файл

@ -84,20 +84,7 @@ function toOpenWindowByType( inType, uri )
function toMessengerWindow()
{
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.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);
toOpenWindowByType("mail:3pane", "chrome://messenger/content/messenger.xul");
}
function toAddressBook()
@ -114,4 +101,19 @@ function toImport()
function CheckOnline()
{
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();"/>
<menuseparator/>
<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>
</menu>

Просмотреть файл

@ -358,7 +358,7 @@
<menuitem label="&exportCmd.label;" accesskey="&exportCmd.accesskey;" oncommand="AbExport()"/>
<menuseparator />
<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>
</menu>

Просмотреть файл

@ -422,7 +422,7 @@
<menuseparator/>
<menuitem label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" command="cmd_account"/>
<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>
</menu>