mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
Tweaked OS file drag-and-drop to ignore unwanted file types. Minor structural fixes. Changes to avoid cancellation of ThreadWithAlertWindow and for Linux openGL rendering.
This commit is contained in:
parent
a06e8336e5
commit
3871c8d6d1
25 changed files with 460 additions and 508 deletions
|
|
@ -81,7 +81,8 @@ AlertWindow::AlertWindow (const String& title,
|
|||
Component* associatedComponent_)
|
||||
: TopLevelWindow (title, true),
|
||||
alertIconType (iconType),
|
||||
associatedComponent (associatedComponent_)
|
||||
associatedComponent (associatedComponent_),
|
||||
escapeKeyCancels (true)
|
||||
{
|
||||
if (message.isEmpty())
|
||||
text = " "; // to force an update if the message is empty
|
||||
|
|
@ -114,7 +115,8 @@ AlertWindow::~AlertWindow()
|
|||
|
||||
void AlertWindow::userTriedToCloseWindow()
|
||||
{
|
||||
exitModalState (0);
|
||||
if (escapeKeyCancels || buttons.size() > 0)
|
||||
exitModalState (0);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -186,6 +188,11 @@ void AlertWindow::triggerButtonClick (const String& buttonName)
|
|||
}
|
||||
}
|
||||
|
||||
void AlertWindow::setEscapeKeyCancels (bool shouldEscapeKeyCancel)
|
||||
{
|
||||
escapeKeyCancels = shouldEscapeKeyCancel;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void AlertWindow::addTextEditor (const String& name,
|
||||
const String& initialContents,
|
||||
|
|
@ -274,10 +281,6 @@ public:
|
|||
setColour (TextEditor::shadowColourId, Colours::transparentBlack);
|
||||
}
|
||||
|
||||
~AlertTextComp()
|
||||
{
|
||||
}
|
||||
|
||||
int getPreferredWidth() const noexcept { return bestWidth; }
|
||||
|
||||
void updateLayout (const int width)
|
||||
|
|
@ -576,7 +579,7 @@ bool AlertWindow::keyPressed (const KeyPress& key)
|
|||
}
|
||||
}
|
||||
|
||||
if (key.isKeyCode (KeyPress::escapeKey) && buttons.size() == 0)
|
||||
if (key.isKeyCode (KeyPress::escapeKey) && escapeKeyCancels && buttons.size() == 0)
|
||||
{
|
||||
exitModalState (0);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue