status_t InspectorWindow::SaveSettings(BMessage& settings) { AutoLocker<BLooper> lock(this); if (!lock.IsLocked()) return B_ERROR; settings.MakeEmpty(); status_t error = settings.AddRect("frame", Frame()); if (error != B_OK) return error; error = _SaveMenuFieldMode(fHexMode, "Hex", settings); if (error != B_OK) return error; error = _SaveMenuFieldMode(fEndianMode, "Endian", settings); if (error != B_OK) return error; error = _SaveMenuFieldMode(fTextMode, "Text", settings); if (error != B_OK) return error; return B_OK; }
status_t InspectorWindow::SaveSettings(BMessage* settings) { status_t error = settings->AddRect("inspectorWindowFrame", Frame()); if (error != B_OK) return error; error = _SaveMenuFieldMode(fHexMode, "Hex", settings); if (error != B_OK) return error; error = _SaveMenuFieldMode(fEndianMode, "Endian", settings); if (error != B_OK) return error; error = _SaveMenuFieldMode(fTextMode, "Text", settings); if (error != B_OK) return error; return B_OK; }