Make sure the image format settings is saved.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23304 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2008-01-09 12:24:37 +00:00
parent 479c2cafbc
commit d51474999c
2 changed files with 9 additions and 1 deletions

View File

@ -694,8 +694,12 @@ VideoWindow::_BuildCaptureControls(BView* theView)
AddTranslationItems(fImageFormatMenu, B_TRANSLATOR_BITMAP);
fImageFormatMenu->SetTargetForItems(this);
if (fImageFormatMenu->FindItem("JPEG Image") != NULL)
if (fImageFormatSettings->Value() && fImageFormatMenu->FindItem(fImageFormatSettings->Value()) != NULL)
fImageFormatMenu->FindItem(fImageFormatSettings->Value())->SetMarked(true);
else if (fImageFormatMenu->FindItem("JPEG Image") != NULL)
fImageFormatMenu->FindItem("JPEG Image")->SetMarked(true);
else if (fImageFormatMenu->FindItem("JPEG image") != NULL)
fImageFormatMenu->FindItem("JPEG image")->SetMarked(true);
else
fImageFormatMenu->ItemAt(0)->SetMarked(true);
@ -833,6 +837,8 @@ VideoWindow::_SetUpSettings(const char* filename, const char* dirname)
fSettings->Add(fPassiveFtpSetting = new BooleanValueSetting("PassiveFtp", 1));
fSettings->Add(fFilenameSetting = new StringValueSetting("StillImageFilename",
"codycam.jpg", "still image filename expected", ""));
fSettings->Add(fImageFormatSettings = new StringValueSetting("ImageFileFormat",
"JPEG Image", "image file format expected", ""));
fSettings->Add(fCaptureRateSetting = new EnumeratedStringValueSetting("CaptureRate",
"Every 5 minutes", kCaptureRate, "capture rate expected",
"unrecognized capture rate specified"));
@ -850,6 +856,7 @@ VideoWindow::_QuitSettings()
fDirectorySetting->ValueChanged(fDirectory->Text());
fPassiveFtpSetting->ValueChanged(fPassiveFtp->Value());
fFilenameSetting->ValueChanged(fFileName->Text());
fImageFormatSettings->ValueChanged(fImageFormatMenu->FindMarked()->Label());
fCaptureRateSetting->ValueChanged(fCaptureRateMenu->FindMarked()->Label());
fSettings->SaveSettings();

View File

@ -153,6 +153,7 @@ class VideoWindow : public BWindow {
StringValueSetting* fDirectorySetting;
BooleanValueSetting* fPassiveFtpSetting;
StringValueSetting* fFilenameSetting;
StringValueSetting* fImageFormatSettings;
EnumeratedStringValueSetting* fCaptureRateSetting;
};