bool GUITeamUISettings::SetValue(const char* settingID, const BVariant& value) { fValues.RemoveName(settingID); return value.AddToMessage(fValues, settingID) == B_OK; }
bool Settings::SetValue(Setting* setting, const BVariant& value) { AutoLocker<BLocker> locker(fLock); // remove the message field and re-add it with the new value const char* fieldName = setting->ID(); fValues.RemoveName(fieldName); bool success = value.AddToMessage(fValues, fieldName) == B_OK; // notify the listeners int32 count = fListeners.CountItems(); for (int32 i = count - 1; i >= 0; i--) fListeners.ItemAt(i)->SettingValueChanged(setting); return success; }