void LLPanelEmerald::onBeamColorDelete(void* data) { LLPanelEmerald* self = (LLPanelEmerald*)data; LLComboBox* comboBox = self->getChild<LLComboBox>("BeamColor_combo"); if(comboBox != NULL) { std::string filename = comboBox->getValue().asString()+".xml"; std::string path_name1(gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS , "beamsColors", filename)); std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beamsColors", filename)); if(gDirUtilp->fileExists(path_name1)) { LLFile::remove(path_name1); gSavedSettings.setString("EmeraldBeamColorFile","===OFF==="); } if(gDirUtilp->fileExists(path_name2)) { LLFile::remove(path_name2); gSavedSettings.setString("EmeraldBeamColorFile","===OFF==="); } } self->refresh(); }
void FSPanelPrefs::onBeamDelete() { LLComboBox* comboBox = findChild<LLComboBox>("FSBeamShape_combo"); if (comboBox) { std::string filename = comboBox->getValue().asString() + ".xml"; std::string path_name1(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "beams", filename)); std::string path_name2(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "beams", filename)); if (gDirUtilp->fileExists(path_name1)) { LLFile::remove(path_name1); gSavedSettings.setString("FSBeamShape", ""); } if (gDirUtilp->fileExists(path_name2)) { LLFile::remove(path_name2); gSavedSettings.setString("FSBeamShape", ""); } } refreshBeamLists(); }
void PanelPreferenceFirestorm::onBeamColorDelete() { LLComboBox* comboBox = getChild<LLComboBox>("BeamColor_combo"); if(comboBox != NULL) { std::string filename = comboBox->getValue().asString()+".xml"; std::string path_name1(gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS , "beamsColors", filename)); std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beamsColors", filename)); if(gDirUtilp->fileExists(path_name1)) { LLFile::remove(path_name1); gSavedSettings.setString("FSBeamColorFile","===OFF==="); } if(gDirUtilp->fileExists(path_name2)) { LLFile::remove(path_name2); gSavedSettings.setString("FSBeamColorFile","===OFF==="); } } refreshBeamLists(); }