summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenufile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
-rw-r--r--indra/newview/llviewermenufile.cpp38
1 files changed, 28 insertions, 10 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 90355b7166..8160a3a139 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -46,6 +46,7 @@
#include "llimagetga.h"
#include "llinventorymodel.h" // gInventory
#include "llresourcedata.h"
+#include "lltoast.h"
#include "llfloaterperms.h"
#include "llstatusbar.h"
#include "llviewercontrol.h" // gSavedSettings
@@ -134,18 +135,35 @@ void LLFilePickerThread::getFile()
//virtual
void LLFilePickerThread::run()
{
- LLFilePicker picker;
#if LL_WINDOWS
- if (picker.getOpenFile(mFilter, false))
+ bool blocking = false;
+#else
+ bool blocking = true; // modal
+#endif
+
+ LLFilePicker picker;
+
+ if (mIsSaveDialog)
{
- mFile = picker.getFirstFile();
+ if (picker.getSaveFile(mSaveFilter, mProposedName, blocking))
+ {
+ mResponses.push_back(picker.getFirstFile());
+ }
}
-#else
- if (picker.getOpenFile(mFilter, true))
+ else
{
- mFile = picker.getFirstFile();
+ bool result = mIsGetMultiple ? picker.getMultipleOpenFiles(mLoadFilter, blocking) : picker.getOpenFile(mLoadFilter, blocking);
+ if (result)
+ {
+ std::string filename = picker.getFirstFile(); // consider copying mFiles directly
+ do
+ {
+ mResponses.push_back(filename);
+ filename = picker.getNextFile();
+ }
+ while (mIsGetMultiple && !filename.empty());
+ }
}
-#endif
{
LLMutexLock lock(sMutex);
@@ -178,7 +196,7 @@ void LLFilePickerThread::clearDead()
while (!sDeadQ.empty())
{
LLFilePickerThread* thread = sDeadQ.front();
- thread->notify(thread->mFile);
+ thread->notify(thread->mResponses);
delete thread;
sDeadQ.pop();
}
@@ -482,7 +500,7 @@ class LLFileEnableCloseWindow : public view_listener_t
bool frontmost_fl_exists = (NULL != gFloaterView->getFrontmostClosableFloater());
bool frontmost_snapshot_fl_exists = (NULL != gSnapshotFloaterView->getFrontmostClosableFloater());
- return frontmost_fl_exists || frontmost_snapshot_fl_exists;
+ return !LLNotificationsUI::LLToast::isAlertToastShown() && (frontmost_fl_exists || frontmost_snapshot_fl_exists);
}
};
@@ -519,7 +537,7 @@ class LLFileEnableCloseAllWindows : public view_listener_t
bool is_floaters_snapshot_opened = (floater_snapshot && floater_snapshot->isInVisibleChain())
|| (floater_outfit_snapshot && floater_outfit_snapshot->isInVisibleChain());
bool open_children = gFloaterView->allChildrenClosed() && !is_floaters_snapshot_opened;
- return !open_children;
+ return !open_children && !LLNotificationsUI::LLToast::isAlertToastShown();
}
};