diff --git a/build/macosx/platform_specific_code/juce_mac_Windowing.cpp b/build/macosx/platform_specific_code/juce_mac_Windowing.cpp index 8f03a79a78..8b6594b85a 100644 --- a/build/macosx/platform_specific_code/juce_mac_Windowing.cpp +++ b/build/macosx/platform_specific_code/juce_mac_Windowing.cpp @@ -2581,7 +2581,7 @@ public: { const PopupMenu menu (currentModel->getMenuForIndex (i, menuNames [i])); - MenuRef m = createMenu (menu, menuNames [i], id); + MenuRef m = createMenu (menu, menuNames [i], id, i); InsertMenu (m, 0); CFRelease (m); @@ -2599,7 +2599,7 @@ public: FlashMenuBar (GetMenuID (menu)); } - void invoke (const int id, ApplicationCommandManager* commandManager, const int topLevelIndex) const + void invoke (const int id, ApplicationCommandManager* const commandManager, const int topLevelIndex) const { if (currentModel != 0) { @@ -2620,7 +2620,8 @@ public: private: static MenuRef createMenu (const PopupMenu menu, const String& menuName, - int& id) + int& id, + const int topLevelIndex) { MenuRef m = 0; @@ -2631,7 +2632,6 @@ private: CFRelease (name); PopupMenu::MenuItemIterator iter (menu); - int topLevelIndex = 0; while (iter.next()) { @@ -2655,7 +2655,7 @@ private: { AppendMenuItemTextWithCFString (m, text, flags, id++, &index); - MenuRef sub = createMenu (*iter.subMenu, iter.itemName, id); + MenuRef sub = createMenu (*iter.subMenu, iter.itemName, id, topLevelIndex); SetMenuItemHierarchicalMenu (m, index, sub); CFRelease (sub); } @@ -2723,7 +2723,6 @@ private: } CFRelease (text); - ++topLevelIndex; } } diff --git a/src/juce_appframework/audio/devices/juce_MidiInput.h b/src/juce_appframework/audio/devices/juce_MidiInput.h index 274cde49cd..28eb8f1ce7 100644 --- a/src/juce_appframework/audio/devices/juce_MidiInput.h +++ b/src/juce_appframework/audio/devices/juce_MidiInput.h @@ -67,7 +67,8 @@ public: If a long sysex message is broken up into multiple packets, this callback is made for each packet that arrives until the message is finished, at which point - the normal handleIncomingMidiMessage() callback will be made. + the normal handleIncomingMidiMessage() callback will be made with the entire + message. The message passed in will contain the start of a sysex, but won't be finished with the terminating 0x7f byte. diff --git a/src/juce_appframework/gui/components/filebrowser/juce_FileBrowserComponent.cpp b/src/juce_appframework/gui/components/filebrowser/juce_FileBrowserComponent.cpp index 3fdf0e5efb..d55518b59a 100644 --- a/src/juce_appframework/gui/components/filebrowser/juce_FileBrowserComponent.cpp +++ b/src/juce_appframework/gui/components/filebrowser/juce_FileBrowserComponent.cpp @@ -338,6 +338,17 @@ void FileBrowserComponent::selectionChanged() void FileBrowserComponent::fileClicked (const File&, const MouseEvent&) { + ComponentDeletionWatcher deletionWatcher (this); + + for (int i = listeners.size(); --i >= 0;) + { + ((FileBrowserListener*) listeners.getUnchecked (i))->fileClicked (file, e); + + if (deletionWatcher.hasBeenDeleted()) + return; + + i = jmin (i, listeners.size() - 1); + } } void FileBrowserComponent::fileDoubleClicked (const File& f)