本文整理汇总了C++中LLPanelNetwork::childSetText方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPanelNetwork::childSetText方法的具体用法?C++ LLPanelNetwork::childSetText怎么用?C++ LLPanelNetwork::childSetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPanelNetwork
的用法示例。
在下文中一共展示了LLPanelNetwork::childSetText方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickSetDiskCache
// static
void LLPanelNetwork::onClickSetDiskCache(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 ) )
{
return; //Canceled!
}
std::string dir_name = picker.getDirName();
if (!dir_name.empty() && dir_name != cur_name)
{
self->childSetText("disk_cache_location", dir_name);
LLNotifications::instance().add("CacheWillBeMoved");
gSavedSettings.setString("NewCacheLocation", dir_name);
}
else
{
std::string cache_location = gDirUtilp->getCacheDir();
self->childSetText("disk_cache_location", cache_location);
}
}
示例2: onClickResetDiskCache
// static
void LLPanelNetwork::onClickResetDiskCache(void* user_data)
{
LLPanelNetwork* self = (LLPanelNetwork*)user_data;
if (!gSavedSettings.getString("CacheLocation").empty())
{
gSavedSettings.setString("NewCacheLocation", "");
LLNotifications::instance().add("CacheWillBeMoved");
}
std::string cache_location = gDirUtilp->getCacheDir(true);
self->childSetText("disk_cache_location", cache_location);
}
示例3: onClickResetCache
// static
void LLPanelNetwork::onClickResetCache(void* user_data)
{
LLPanelNetwork* self = (LLPanelNetwork*)user_data;
if (!gSavedSettings.getString("CacheLocation").empty())
{
gSavedSettings.setString("NewCacheLocation", "");
gViewerWindow->alertXml("CacheWillBeMoved");
}
LLString cache_location = gDirUtilp->getCacheDir(true);
self->childSetText("cache_location", cache_location);
}
示例4: onClickSetSoundCache
// static
void LLPanelNetwork::onClickSetSoundCache(void* user_data)
{
LLPanelNetwork* self = (LLPanelNetwork*)user_data;
std::string cur_name(gSavedSettings.getString("Emeraldmm_sndcacheloc"));
std::string proposed_name(cur_name);
LLDirPicker& picker = LLDirPicker::instance();
if (! picker.getDir(&proposed_name ) )
{
return; //Canceled!
}
std::string dir_name = picker.getDirName();
if (!dir_name.empty() && dir_name != cur_name)
{
self->childSetText("sound_cache_location", dir_name);
gSavedSettings.setString("Emeraldmm_sndcacheloc", dir_name);
}
else
{
self->childSetText("sound_cache_location",cur_name);
}
}
示例5: onClickResetSoundCache
// static
void LLPanelNetwork::onClickResetSoundCache(void* user_data)
{
LLPanelNetwork* self = (LLPanelNetwork*)user_data;
gSavedSettings.setString("Emeraldmm_sndcacheloc","");
self->childSetText("sound_cache_location",std::string("None"));
}