Use LLFilePickerReplyThread instead of LLFilePicker in access/ban lists exporting
parent
678c9f1b0c
commit
067bea25e0
|
|
@ -43,7 +43,6 @@
|
|||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfilepicker.h" // <FS:PP> Ban and access lists export
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfloaterauction.h"
|
||||
|
|
@ -69,6 +68,7 @@
|
|||
#include "lluiconstants.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewertexturelist.h" // LLUIImageList
|
||||
#include "llviewermenufile.h" // <FS:PP> Ban and access lists export
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewerregion.h"
|
||||
|
|
@ -3312,15 +3312,20 @@ void LLPanelLandAccess::onClickExportBanned()
|
|||
|
||||
void LLPanelLandAccess::exportList(LLNameListCtrl* list, const std::string& default_filename)
|
||||
{
|
||||
if (!list) return;
|
||||
if (list)
|
||||
{
|
||||
LLFilePickerReplyThread::startPicker(boost::bind(&LLPanelLandAccess::exportListCallback, this, list, _1), LLFilePicker::FFSAVE_CSV, default_filename);
|
||||
}
|
||||
}
|
||||
|
||||
LLFilePicker& picker = LLFilePicker::instance();
|
||||
if (!picker.getSaveFile(LLFilePicker::FFSAVE_CSV, default_filename))
|
||||
void LLPanelLandAccess::exportListCallback(LLNameListCtrl* list, const std::vector<std::string>& filenames)
|
||||
{
|
||||
if (filenames.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::string filename = picker.getFirstFile();
|
||||
std::string filename = filenames[0];
|
||||
std::ofstream file(filename.c_str());
|
||||
if (!file.is_open())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -410,6 +410,7 @@ public:
|
|||
void onClickExportBanned();
|
||||
void onClickExportList(LLNameListCtrl* list, const std::string& filename);
|
||||
void exportList(LLNameListCtrl* list, const std::string& default_filename);
|
||||
void exportListCallback(LLNameListCtrl* list, const std::vector<std::string>& filenames);
|
||||
// </FS:PP> Ban and access lists export
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -4656,15 +4656,20 @@ void LLPanelEstateAccess::onClickExportBannedList()
|
|||
|
||||
void LLPanelEstateAccess::exportList(LLNameListCtrl* list, const std::string& default_filename)
|
||||
{
|
||||
if (!list) return;
|
||||
if (list)
|
||||
{
|
||||
LLFilePickerReplyThread::startPicker(boost::bind(&LLPanelEstateAccess::exportListCallback, this, list, _1), LLFilePicker::FFSAVE_CSV, default_filename);
|
||||
}
|
||||
}
|
||||
|
||||
LLFilePicker& picker = LLFilePicker::instance();
|
||||
if (!picker.getSaveFile(LLFilePicker::FFSAVE_CSV, default_filename))
|
||||
void LLPanelEstateAccess::exportListCallback(LLNameListCtrl* list, const std::vector<std::string>& filenames)
|
||||
{
|
||||
if (filenames.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::string filename = picker.getFirstFile();
|
||||
std::string filename = filenames[0];
|
||||
std::ofstream file(filename.c_str());
|
||||
if (!file.is_open())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -515,6 +515,7 @@ public:
|
|||
void onClickExportBannedList();
|
||||
void onClickExportList(LLNameListCtrl* list, const std::string& filename);
|
||||
void exportList(LLNameListCtrl* list, const std::string& default_filename);
|
||||
void exportListCallback(LLNameListCtrl* list, const std::vector<std::string>& filenames);
|
||||
// </FS:PP> Ban and access lists export
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Reference in New Issue