Bug 462423: allow changing and choosing mail start page even when it is not set to show at the start. r=mkmelin
This commit is contained in:
Родитель
e3812829f4
Коммит
525b5f7e41
|
@ -975,15 +975,13 @@ function FolderPaneSelectionChange()
|
||||||
ClearThreadPane();
|
ClearThreadPane();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gAccountCentralLoaded)
|
var startpageenabled = gPrefBranch.getBoolPref("mailnews.start_page.enabled");
|
||||||
UpdateMailToolbar("gAccountCentralLoaded");
|
if (gDisplayStartupPage && startpageenabled)
|
||||||
|
|
||||||
if (gDisplayStartupPage)
|
|
||||||
{
|
{
|
||||||
loadStartPage();
|
loadStartPage();
|
||||||
gDisplayStartupPage = false;
|
gDisplayStartupPage = false;
|
||||||
UpdateMailToolbar("gDisplayStartupPage");
|
}
|
||||||
}
|
UpdateMailToolbar("FolderPaneSelectionChange");
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClearThreadPane()
|
function ClearThreadPane()
|
||||||
|
|
|
@ -383,7 +383,7 @@ var DefaultController =
|
||||||
enabled.value = gDBView.navigateStatus((command == "cmd_goBack" || command == "button_goBack") ? nsMsgNavigationType.back : nsMsgNavigationType.forward);
|
enabled.value = gDBView.navigateStatus((command == "cmd_goBack" || command == "button_goBack") ? nsMsgNavigationType.back : nsMsgNavigationType.forward);
|
||||||
return enabled.value;
|
return enabled.value;
|
||||||
case "cmd_goStartPage":
|
case "cmd_goStartPage":
|
||||||
return pref.getBoolPref("mailnews.start_page.enabled") && !IsMessagePaneCollapsed();
|
return !IsMessagePaneCollapsed();
|
||||||
case "cmd_markAllRead":
|
case "cmd_markAllRead":
|
||||||
case "cmd_markReadByDate":
|
case "cmd_markReadByDate":
|
||||||
return IsFolderSelected();
|
return IsFolderSelected();
|
||||||
|
|
|
@ -548,13 +548,14 @@ function loadStartPage()
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
gMessageNotificationBar.clearMsgNotifications();
|
gMessageNotificationBar.clearMsgNotifications();
|
||||||
var startpageenabled = pref.getBoolPref("mailnews.start_page.enabled");
|
|
||||||
var startpage = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
var startpage = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||||
.getService(Components.interfaces.nsIURLFormatter)
|
.getService(Components.interfaces.nsIURLFormatter)
|
||||||
.formatURLPref(startPageUrlPref());
|
.formatURLPref(startPageUrlPref());
|
||||||
|
|
||||||
// load about:blank as the start page if we are offline or we don't have a start page url...
|
// Load about:blank as the start page if we are offline or we don't have
|
||||||
GetMessagePaneFrame().location.href = startpageenabled && startpage && MailOfflineMgr.isOnline() ? startpage : "about:blank";
|
// a start page url...
|
||||||
|
GetMessagePaneFrame().location.href = startpage && MailOfflineMgr.isOnline() ?
|
||||||
|
startpage : "about:blank";
|
||||||
ClearMessageSelection();
|
ClearMessageSelection();
|
||||||
}
|
}
|
||||||
catch (ex)
|
catch (ex)
|
||||||
|
|
|
@ -43,7 +43,6 @@ var gGeneralPane = {
|
||||||
init: function ()
|
init: function ()
|
||||||
{
|
{
|
||||||
this.mPane = document.getElementById("paneGeneral");
|
this.mPane = document.getElementById("paneGeneral");
|
||||||
this.startPageCheck();
|
|
||||||
|
|
||||||
this.updatePlaySound();
|
this.updatePlaySound();
|
||||||
},
|
},
|
||||||
|
@ -86,11 +85,6 @@ var gGeneralPane = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
startPageCheck: function()
|
|
||||||
{
|
|
||||||
document.getElementById("mailnewsStartPageUrl").disabled = !document.getElementById("mailnewsStartPageEnabled").checked;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restores the default start page as the user's start page
|
* Restores the default start page as the user's start page
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<caption label="&messengerStartPage.label;"/>
|
<caption label="&messengerStartPage.label;"/>
|
||||||
<hbox align="start">
|
<hbox align="start">
|
||||||
<checkbox id="mailnewsStartPageEnabled" label="&enableStartPage.label;"
|
<checkbox id="mailnewsStartPageEnabled" label="&enableStartPage.label;"
|
||||||
preference="mailnews.start_page.enabled" oncommand="gGeneralPane.startPageCheck();"
|
preference="mailnews.start_page.enabled"
|
||||||
accesskey="&enableStartPage.accesskey;"/>
|
accesskey="&enableStartPage.accesskey;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox align="center">
|
<hbox align="center">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче