Add convenience methods for generic threaded filepickers
parent
a60b151884
commit
e8a008684e
|
|
@ -907,7 +907,7 @@ void LLLocalBitmapMgr::cleanupClass()
|
|||
|
||||
void LLLocalBitmapMgr::addUnit()
|
||||
{
|
||||
(new LLGenericLoadMultipleFilePicker(LLFilePicker::FFLOAD_IMAGE, boost::bind(&LLLocalBitmapMgr::filePickerCallback, _1)))->getFiles();
|
||||
LLGenericLoadMultipleFilePicker::open(LLFilePicker::FFLOAD_IMAGE, boost::bind(&LLLocalBitmapMgr::filePickerCallback, _1));
|
||||
}
|
||||
|
||||
void LLLocalBitmapMgr::filePickerCallback(std::list<std::string> filenames)
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ class LLFileUploadImage : public view_listener_t
|
|||
//{
|
||||
// LLFloaterReg::showInstance("upload_image", LLSD(filename));
|
||||
//}
|
||||
(new LLGenericLoadFilePicker(LLFilePicker::FFLOAD_IMAGE, boost::bind(&show_floater_callback, "upload_image", _1, LLFilePicker::FFLOAD_IMAGE)))->getFile();
|
||||
LLGenericLoadFilePicker::open(LLFilePicker::FFLOAD_IMAGE, boost::bind(&show_floater_callback, "upload_image", _1, LLFilePicker::FFLOAD_IMAGE));
|
||||
// </FS:CR Threaded Filepickers>
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -588,7 +588,7 @@ class LLFileUploadSound : public view_listener_t
|
|||
//{
|
||||
// LLFloaterReg::showInstance("upload_sound", LLSD(filename));
|
||||
//}
|
||||
(new LLGenericLoadFilePicker(LLFilePicker::FFLOAD_WAV, boost::bind(&show_floater_callback, "upload_sound", _1, LLFilePicker::FFLOAD_WAV)))->getFile();
|
||||
LLGenericLoadFilePicker::open(LLFilePicker::FFLOAD_WAV, boost::bind(&show_floater_callback, "upload_sound", _1, LLFilePicker::FFLOAD_WAV));
|
||||
// </FS:CR Threaded Filepickers>
|
||||
return true;
|
||||
}
|
||||
|
|
@ -614,7 +614,7 @@ class LLFileUploadAnim : public view_listener_t
|
|||
// LLFloaterReg::showInstance("upload_anim_bvh", LLSD(filename));
|
||||
// }
|
||||
//}
|
||||
(new LLGenericLoadFilePicker(LLFilePicker::FFLOAD_ANIM, boost::bind(&show_floater_anim_callback,_1)))->getFile();
|
||||
LLGenericLoadFilePicker::open(LLFilePicker::FFLOAD_ANIM, boost::bind(&show_floater_anim_callback, _1));
|
||||
// </FS:CR Threaded Filepickers>
|
||||
return true;
|
||||
}
|
||||
|
|
@ -707,7 +707,7 @@ class LLFileUploadBulk : public view_listener_t
|
|||
// LL_INFOS() << "Couldn't import objects from file" << LL_ENDL;
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
(new LLGenericLoadMultipleFilePicker(LLFilePicker::FFLOAD_ALL, boost::bind(&upload_bulk_callback, _1)))->getFiles();
|
||||
LLGenericLoadMultipleFilePicker::open(LLFilePicker::FFLOAD_ALL, boost::bind(&upload_bulk_callback, _1));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
@ -717,7 +717,7 @@ class FSFileImportLinkset : public view_listener_t
|
|||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
(new LLGenericLoadFilePicker(LLFilePicker::FFLOAD_IMPORT, boost::bind(&show_floater_callback, "fs_import", _1, LLFilePicker::FFLOAD_IMPORT)))->getFile();
|
||||
LLGenericLoadFilePicker::open(LLFilePicker::FFLOAD_IMPORT, boost::bind(&show_floater_callback, "fs_import", _1, LLFilePicker::FFLOAD_IMPORT));
|
||||
return TRUE;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -162,6 +162,12 @@ public:
|
|||
mSignal.connect(notify_slot);
|
||||
}
|
||||
virtual void notify(const std::string& filename);
|
||||
|
||||
static void open(LLFilePicker::ELoadFilter filter, boost::function<void (const std::string&)> notify_slot)
|
||||
{
|
||||
(new LLGenericLoadFilePicker(filter, notify_slot))->getFile();
|
||||
}
|
||||
|
||||
protected:
|
||||
boost::signals2::signal<void (const std::string&)> mSignal;
|
||||
};
|
||||
|
|
@ -175,6 +181,12 @@ public:
|
|||
mSignal.connect(notify_slot);
|
||||
}
|
||||
virtual void notify(const std::string& filename);
|
||||
|
||||
static void open(LLFilePicker::ESaveFilter filter, const std::string& default_name, boost::function<void (const std::string&)> notify_slot)
|
||||
{
|
||||
(new LLGenericSaveFilePicker(filter, default_name, notify_slot))->getFile();
|
||||
}
|
||||
|
||||
protected:
|
||||
boost::signals2::signal<void (const std::string&)> mSignal;
|
||||
};
|
||||
|
|
@ -208,6 +220,12 @@ public:
|
|||
mSignal.connect(notify_slot);
|
||||
}
|
||||
virtual void notify(std::list<std::string> filenames);
|
||||
|
||||
static void open(LLFilePicker::ELoadFilter filter, boost::function<void (std::list<std::string> filenames)> notify_slot)
|
||||
{
|
||||
(new LLGenericLoadMultipleFilePicker(filter, notify_slot))->getFiles();
|
||||
}
|
||||
|
||||
protected:
|
||||
boost::signals2::signal<void (std::list<std::string> filenames)> mSignal;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4978,7 +4978,7 @@ void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke
|
|||
{
|
||||
std::string proposed_name( sSnapshotBaseName );
|
||||
|
||||
(new LLGenericSaveFilePicker(pick_type, proposed_name, boost::bind(&LLViewerWindow::saveImageCallback, this, _1, image, extension, callback)))->getFile();
|
||||
LLGenericSaveFilePicker::open(pick_type, proposed_name, boost::bind(&LLViewerWindow::saveImageCallback, this, _1, image, extension, callback));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue