Add support for flushing messages from plugin to viewer.
Actually flush messages before terminating a plugin (upon the shutdown message) and flush messages in the file- and dirpicker before opening the blocking dialog. Flush debug messages too (deeper into the code, just prior to the actual blocking call). Also, fix the context folder map to be a thread-safe singleton and *attempt* to add support for default folders to windows and Mac. The latter might even not compile yet and definitely have to be tested (and fixed): Opening a DirPicker in preferences --> Network and Set the directory location of the cache. It should open a Dialog window where you are already in the folder that is the current cache directory setting (you can click Cancel after verifying that this worked). And, start to upload an image, select a file is some directory (other than what it starts in). You can omit the actual upload by clicking cancel in the preview. Then upload again and now it should start in the same folder as that you were just in. Possibly you need to first open a file picker elsewhere with a different context though, or windows might choose to open in the last folder anyway while the code doesn't really work. Uploading a sound before the second texture upload should do the trick.
This commit is contained in:
@@ -556,11 +556,22 @@ void LLPluginProcessChild::receivePluginMessage(const std::string &message)
|
||||
}
|
||||
else if (message_class == LLPLUGIN_MESSAGE_CLASS_INTERNAL)
|
||||
{
|
||||
bool flush = false;
|
||||
std::string message_name = parsed.getName();
|
||||
if(message_name == "shutdown")
|
||||
{
|
||||
// The plugin is finished.
|
||||
setState(STATE_UNLOADING);
|
||||
flush = true;
|
||||
}
|
||||
else if (message_name == "flush")
|
||||
{
|
||||
flush = true;
|
||||
passMessage = false;
|
||||
}
|
||||
if (flush)
|
||||
{
|
||||
flushMessages();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user