1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-07-11 08:27:28 +00:00
parent c3ea4ebe9c
commit 5faf4c5d63
3 changed files with 18 additions and 7 deletions

View file

@ -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;
}
}

View file

@ -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.

View file

@ -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)