Bug 512169 - Port Bug 368177 - Add support for mouse Back and Forward buttons, and the Stop, Search and Bookmarks keys on media keyboards
r=(mcsmurf + mnyromyr) sr=neil a-seamonkey2.0=kairo
This commit is contained in:
Родитель
b595e4fe27
Коммит
149522670a
|
@ -185,6 +185,7 @@ var DefaultController =
|
||||||
case "cmd_viewThreadsWithUnread":
|
case "cmd_viewThreadsWithUnread":
|
||||||
case "cmd_viewWatchedThreadsWithUnread":
|
case "cmd_viewWatchedThreadsWithUnread":
|
||||||
case "cmd_viewIgnoredThreads":
|
case "cmd_viewIgnoredThreads":
|
||||||
|
case "cmd_stop":
|
||||||
case "cmd_undo":
|
case "cmd_undo":
|
||||||
case "cmd_redo":
|
case "cmd_redo":
|
||||||
case "cmd_expandAllThreads":
|
case "cmd_expandAllThreads":
|
||||||
|
|
|
@ -301,6 +301,37 @@ function OnLoadMessageWindow()
|
||||||
setTimeout(OnLoadMessageWindowDelayed, 0, loadCustomMessage);
|
setTimeout(OnLoadMessageWindowDelayed, 0, loadCustomMessage);
|
||||||
|
|
||||||
SetupCommandUpdateHandlers();
|
SetupCommandUpdateHandlers();
|
||||||
|
|
||||||
|
window.addEventListener("AppCommand", HandleAppCommandEvent, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function HandleAppCommandEvent(evt)
|
||||||
|
{
|
||||||
|
evt.stopPropagation();
|
||||||
|
switch (evt.command)
|
||||||
|
{
|
||||||
|
case "Back":
|
||||||
|
goDoCommand('cmd_goBack');
|
||||||
|
break;
|
||||||
|
case "Forward":
|
||||||
|
goDoCommand('cmd_goForward');
|
||||||
|
break;
|
||||||
|
case "Stop":
|
||||||
|
goDoCommand('cmd_stop');
|
||||||
|
break;
|
||||||
|
case "Search":
|
||||||
|
goDoCommand('cmd_search');
|
||||||
|
break;
|
||||||
|
case "Bookmarks":
|
||||||
|
toAddressBook();
|
||||||
|
break;
|
||||||
|
case "Reload":
|
||||||
|
goDoCommand('cmd_reload');
|
||||||
|
break;
|
||||||
|
case "Home":
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function OnLoadMessageWindowDelayed(loadCustomMessage)
|
function OnLoadMessageWindowDelayed(loadCustomMessage)
|
||||||
|
@ -396,6 +427,8 @@ function extractMsgKeyFromURI()
|
||||||
|
|
||||||
function OnUnloadMessageWindow()
|
function OnUnloadMessageWindow()
|
||||||
{
|
{
|
||||||
|
window.removeEventListener("AppCommand", HandleAppCommandEvent, true);
|
||||||
|
|
||||||
UnloadCommandUpdateHandlers();
|
UnloadCommandUpdateHandlers();
|
||||||
|
|
||||||
// FIX ME - later we will be able to use onunload from the overlay
|
// FIX ME - later we will be able to use onunload from the overlay
|
||||||
|
@ -561,6 +594,7 @@ var MessageWindowController =
|
||||||
switch (command)
|
switch (command)
|
||||||
{
|
{
|
||||||
case "cmd_delete":
|
case "cmd_delete":
|
||||||
|
case "cmd_stop":
|
||||||
case "cmd_undo":
|
case "cmd_undo":
|
||||||
case "cmd_redo":
|
case "cmd_redo":
|
||||||
case "cmd_killThread":
|
case "cmd_killThread":
|
||||||
|
@ -744,6 +778,8 @@ var MessageWindowController =
|
||||||
case "cmd_search":
|
case "cmd_search":
|
||||||
loadedFolder = GetLoadedMsgFolder();
|
loadedFolder = GetLoadedMsgFolder();
|
||||||
return (loadedFolder && loadedFolder.server.canSearchMessages);
|
return (loadedFolder && loadedFolder.server.canSearchMessages);
|
||||||
|
case "cmd_stop":
|
||||||
|
return true;
|
||||||
case "cmd_undo":
|
case "cmd_undo":
|
||||||
case "cmd_redo":
|
case "cmd_redo":
|
||||||
return SetupUndoRedoCommand(command);
|
return SetupUndoRedoCommand(command);
|
||||||
|
@ -832,6 +868,9 @@ var MessageWindowController =
|
||||||
case "button_junk":
|
case "button_junk":
|
||||||
MsgJunk();
|
MsgJunk();
|
||||||
break;
|
break;
|
||||||
|
case "cmd_stop":
|
||||||
|
MsgStop();
|
||||||
|
break;
|
||||||
case "cmd_printSetup":
|
case "cmd_printSetup":
|
||||||
PrintUtils.showPageSetup();
|
PrintUtils.showPageSetup();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -769,11 +769,45 @@ function OnLoadMessenger()
|
||||||
mailToolbox.customizeInit = MailToolboxCustomizeInit;
|
mailToolbox.customizeInit = MailToolboxCustomizeInit;
|
||||||
mailToolbox.customizeDone = MailToolboxCustomizeDone;
|
mailToolbox.customizeDone = MailToolboxCustomizeDone;
|
||||||
mailToolbox.customizeChange = MailToolboxCustomizeChange;
|
mailToolbox.customizeChange = MailToolboxCustomizeChange;
|
||||||
|
|
||||||
|
window.addEventListener("AppCommand", HandleAppCommandEvent, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function HandleAppCommandEvent(evt)
|
||||||
|
{
|
||||||
|
evt.stopPropagation();
|
||||||
|
switch (evt.command)
|
||||||
|
{
|
||||||
|
case "Back":
|
||||||
|
goDoCommand('cmd_goBack');
|
||||||
|
break;
|
||||||
|
case "Forward":
|
||||||
|
goDoCommand('cmd_goForward');
|
||||||
|
break;
|
||||||
|
case "Stop":
|
||||||
|
goDoCommand('cmd_stop');
|
||||||
|
break;
|
||||||
|
case "Search":
|
||||||
|
goDoCommand('cmd_search');
|
||||||
|
break;
|
||||||
|
case "Bookmarks":
|
||||||
|
toAddressBook();
|
||||||
|
break;
|
||||||
|
case "Reload":
|
||||||
|
goDoCommand('cmd_reload');
|
||||||
|
break;
|
||||||
|
case "Home":
|
||||||
|
goDoCommand('cmd_goStartPage');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function OnUnloadMessenger()
|
function OnUnloadMessenger()
|
||||||
{
|
{
|
||||||
pref.removeObserver("mail.pane_config.dynamic", MailPaneConfigObserver, false);
|
pref.removeObserver("mail.pane_config.dynamic", MailPaneConfigObserver, false);
|
||||||
|
window.removeEventListener("AppCommand", HandleAppCommandEvent, true);
|
||||||
|
|
||||||
OnLeavingFolder(gMsgFolderSelected); // mark all read in current folder
|
OnLeavingFolder(gMsgFolderSelected); // mark all read in current folder
|
||||||
accountManager.removeIncomingServerListener(gThreePaneIncomingServerListener);
|
accountManager.removeIncomingServerListener(gThreePaneIncomingServerListener);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче