Add AIDirPicker and use it. Remove indra/newview/ll{dir,file}picker.{h,cpp}.

Also removed some code from the Mac/windows code in
indra/plugins/filepicker/llfilepicker.cpp that shouldn't
be in there anymore (send_agent_pause/resume and updating
the LLFrameTimer stuff).
This commit is contained in:
Aleric Inglewood
2011-05-11 03:01:34 +02:00
parent 133391be90
commit a6cb676d4a
26 changed files with 364 additions and 2041 deletions

View File

@@ -39,7 +39,7 @@
// project includes
#include "llcheckboxctrl.h"
#include "llradiogroup.h"
#include "lldirpicker.h"
#include "statemachine/aidirpicker.h"
#include "lluictrlfactory.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
@@ -151,18 +151,24 @@ void LLPanelNetwork::onClickClearCache(void*)
// static
void LLPanelNetwork::onClickSetCache(void* user_data)
{
LLPanelNetwork* self = (LLPanelNetwork*)user_data;
std::string cur_name(gSavedSettings.getString("CacheLocation"));
std::string proposed_name(cur_name);
LLDirPicker& picker = LLDirPicker::instance();
if (! picker.getDir(&proposed_name ) )
AIDirPicker* dirpicker = new AIDirPicker(proposed_name, "cachelocation");
dirpicker->run(boost::bind(&LLPanelNetwork::onClickSetCache_continued, user_data, dirpicker));
}
// static
void LLPanelNetwork::onClickSetCache_continued(void* user_data, AIDirPicker* dirpicker)
{
if (!dirpicker->hasDirname())
{
return; //Canceled!
}
std::string dir_name = picker.getDirName();
LLPanelNetwork* self = (LLPanelNetwork*)user_data;
std::string cur_name(gSavedSettings.getString("CacheLocation"));
std::string dir_name = dirpicker->getDirname();
if (!dir_name.empty() && dir_name != cur_name)
{
self->childSetText("cache_location", dir_name);