Hi Jules,
could you make the following changes to ThreadWithProgressWindow to pass an associated compoent to its AlertWindow:
//juce_ThreadWithProgressWindow.h:
ThreadWithProgressWindow (const String& windowTitle,
bool hasProgressBar,
bool hasCancelButton,
int timeOutMsWhenCancelling = 10000,
const String& cancelButtonText = "Cancel",
Component* associatedComponent = 0);
//juce_ThreadWithProgressWindow.cpp:
ThreadWithProgressWindow::ThreadWithProgressWindow (const String& title,
const bool hasProgressBar,
const bool hasCancelButton,
const int timeOutMsWhenCancelling_,
const String& cancelButtonText,
Component* associatedComponent)
: Thread ("Juce Progress Window"),
progress (0.0),
timeOutMsWhenCancelling (timeOutMsWhenCancelling_)
{
alertWindow = LookAndFeel::getDefaultLookAndFeel()
.createAlertWindow (title, String::empty, cancelButtonText,
String::empty, String::empty,
AlertWindow::NoIcon, hasCancelButton ? 1 : 0, associatedComponent);
//[...]
At the moment the progress window always appears on the first screen’s center.
Chris