Bug 83056 Add support for windows sounds to Menus r=enndeakin, sr=roc, ui=jboriss

This commit is contained in:
Masayuki Nakano
2008-12-11 02:23:20 +09:00
parent 21328e2abb
commit 751df4bc30
4 changed files with 16 additions and 2 deletions

View File

@@ -82,6 +82,7 @@
#include "nsContentUtils.h"
#include "nsDisplayList.h"
#include "nsIReflowCallback.h"
#include "nsISound.h"
#define NS_MENU_POPUP_LIST_INDEX 0
@@ -1172,6 +1173,10 @@ nsMenuFrame::Execute(nsGUIEvent *aEvent)
}
}
nsCOMPtr<nsISound> sound(do_CreateInstance("@mozilla.org/sound;1"));
if (sound)
sound->PlaySystemSound(NS_SYSSOUND_MENU_EXECUTE);
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
if (pm && mMenuParent)
pm->ExecuteMenu(mContent, aEvent);