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:
@@ -36,16 +36,13 @@
|
||||
#ifndef BASIC_PLUGIN_BASE_H
|
||||
#define BASIC_PLUGIN_BASE_H
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llplugininstance.h"
|
||||
#include "llpluginmessage.h"
|
||||
#include "llpluginmessageclasses.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
class BasicPluginBase
|
||||
{
|
||||
public:
|
||||
@@ -65,7 +62,10 @@ public:
|
||||
// Used for log messages. Use macros below.
|
||||
void sendLogMessage(std::string const& message, LLPluginMessage::LLPLUGIN_LOG_LEVEL level);
|
||||
|
||||
// Shoot down the whole process.
|
||||
// Flush all messages to the viewer.
|
||||
void flushMessages(void);
|
||||
|
||||
// Flush all messages and then shoot down the whole process.
|
||||
void sendShutdownMessage(void);
|
||||
|
||||
protected:
|
||||
@@ -127,6 +127,7 @@ int create_plugin(
|
||||
#define PLS_INFOS PLS_LOG_MESSAGE(LLPluginMessage::LOG_LEVEL_INFO, LL_DEBUG_PLUGIN_MESSAGES)
|
||||
#define PLS_WARNS PLS_LOG_MESSAGE(LLPluginMessage::LOG_LEVEL_WARN, 1)
|
||||
#define PLS_ERRS PLS_LOG_MESSAGE(LLPluginMessage::LOG_LEVEL_ERR, 1)
|
||||
#define PLS_FLUSH do { BasicPluginBase::sPluginBase->flushMessages(); } while(0)
|
||||
|
||||
#endif // BASIC_PLUGIN_BASE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user