本文整理汇总了C++中LLFloaterReporter::childDisable方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterReporter::childDisable方法的具体用法?C++ LLFloaterReporter::childDisable怎么用?C++ LLFloaterReporter::childDisable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloaterReporter
的用法示例。
在下文中一共展示了LLFloaterReporter::childDisable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickSend
// static
void LLFloaterReporter::onClickSend(void *userdata)
{
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
if (self->mPicking)
{
closePickTool(self);
}
if(self->validateReport())
{
// only show copyright alert for abuse reports
if ( self->mReportType != BUG_REPORT )
{
if ( ! self->mCopyrightWarningSeen )
{
std::string details_lc = self->childGetText("details_edit");
LLStringUtil::toLower( details_lc );
std::string summary_lc = self->childGetText("summary_edit");
LLStringUtil::toLower( summary_lc );
if ( details_lc.find( "copyright" ) != std::string::npos ||
summary_lc.find( "copyright" ) != std::string::npos )
{
gViewerWindow->alertXml("HelpReportAbuseContainsCopyright");
self->mCopyrightWarningSeen = TRUE;
return;
};
};
};
LLUploadDialog::modalUploadDialog("Uploading...\n\nReport");
// *TODO don't upload image if checkbox isn't checked
std::string url = gAgent.getRegion()->getCapability("SendUserReport");
std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot");
if(!url.empty() || !sshot_url.empty())
{
self->sendReportViaCaps(url, sshot_url, self->gatherReport());
self->close();
}
else
{
if(self->childGetValue("screen_check"))
{
self->childDisable("send_btn");
self->childDisable("cancel_btn");
// the callback from uploading the image calls sendReportViaLegacy()
self->uploadImage();
}
else
{
self->sendReportViaLegacy(self->gatherReport());
LLUploadDialog::modalUploadFinished();
self->close();
}
}
}
}
示例2: onClickSend
// static
void LLFloaterReporter::onClickSend(void *userdata)
{
LLFloaterReporter *self = (LLFloaterReporter *)userdata;
if (self->mPicking)
{
closePickTool(self);
}
if(self->validateReport())
{
// only show copyright alert for abuse reports
if ( self->mReportType != BUG_REPORT )
{
const int IP_CONTENT_REMOVAL = 66;
const int IP_PERMISSONS_EXPLOIT = 37;
LLComboBox* combo = self->getChild<LLComboBox>( "category_combo");
int category_value = combo->getSelectedValue().asInteger();
if ( ! self->mCopyrightWarningSeen )
{
std::string details_lc = self->childGetText("details_edit");
LLStringUtil::toLower( details_lc );
std::string summary_lc = self->childGetText("summary_edit");
LLStringUtil::toLower( summary_lc );
if ( details_lc.find( "copyright" ) != std::string::npos ||
summary_lc.find( "copyright" ) != std::string::npos ||
category_value == IP_CONTENT_REMOVAL ||
category_value == IP_PERMISSONS_EXPLOIT)
{
LLNotifications::instance().add("HelpReportAbuseContainsCopyright");
self->mCopyrightWarningSeen = TRUE;
return;
}
}
else if (category_value == IP_CONTENT_REMOVAL)
{
// IP_CONTENT_REMOVAL *always* shows the dialog -
// ergo you can never send that abuse report type.
LLNotifications::instance().add("HelpReportAbuseContainsCopyright");
return;
}
}
LLUploadDialog::modalUploadDialog("Uploading...\n\nReport");
// *TODO don't upload image if checkbox isn't checked
std::string url = gAgent.getRegion()->getCapability("SendUserReport");
std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot");
if(!url.empty() || !sshot_url.empty())
{
self->sendReportViaCaps(url, sshot_url, self->gatherReport());
self->close();
}
else
{
if(self->childGetValue("screen_check"))
{
self->childDisable("send_btn");
self->childDisable("cancel_btn");
// the callback from uploading the image calls sendReportViaLegacy()
self->uploadImage();
}
else
{
self->sendReportViaLegacy(self->gatherReport());
LLUploadDialog::modalUploadFinished();
self->close();
}
}
}
}