Bug 83056 Add support for windows sounds to Menus r=enndeakin, sr=roc, ui=jboriss
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user