Renamed Save button to Apply. Fixes #7533.

This commit is contained in:
Matt Madia 2013-02-02 14:12:12 -05:00
parent 0288eb7742
commit 401bf7a0b5
2 changed files with 9 additions and 9 deletions

View File

@ -22,7 +22,7 @@
const int32 kRevert = '_RVT'; const int32 kRevert = '_RVT';
const int32 kSave = '_SAV'; const int32 kApply = '_APY';
PrefletWin::PrefletWin() PrefletWin::PrefletWin()
@ -34,12 +34,12 @@ PrefletWin::PrefletWin()
// Preflet container view // Preflet container view
fMainView = new PrefletView(this); fMainView = new PrefletView(this);
// Save and revert buttons // Apply and revert buttons
fRevert = new BButton("revert", B_TRANSLATE("Revert"), fRevert = new BButton("revert", B_TRANSLATE("Revert"),
new BMessage(kRevert)); new BMessage(kRevert));
fRevert->SetEnabled(false); fRevert->SetEnabled(false);
fSave = new BButton("save", B_TRANSLATE("Save"), new BMessage(kSave)); fApply = new BButton("apply", B_TRANSLATE("Apply"), new BMessage(kApply));
fSave->SetEnabled(false); fApply->SetEnabled(false);
// Calculate inset // Calculate inset
float inset = ceilf(be_plain_font->Size() * 0.7f); float inset = ceilf(be_plain_font->Size() * 0.7f);
@ -54,7 +54,7 @@ PrefletWin::PrefletWin()
.AddGroup(B_HORIZONTAL, inset) .AddGroup(B_HORIZONTAL, inset)
.AddGlue() .AddGlue()
.Add(fRevert) .Add(fRevert)
.Add(fSave) .Add(fApply)
.End() .End()
.SetInsets(inset, inset, inset, inset) .SetInsets(inset, inset, inset, inset)
@ -70,13 +70,13 @@ void
PrefletWin::MessageReceived(BMessage* msg) PrefletWin::MessageReceived(BMessage* msg)
{ {
switch (msg->what) { switch (msg->what) {
case kSave: case kApply:
for (int32 i = 0; i < fMainView->CountPages(); i++) { for (int32 i = 0; i < fMainView->CountPages(); i++) {
SettingsPane* pane = SettingsPane* pane =
dynamic_cast<SettingsPane*>(fMainView->PageAt(i)); dynamic_cast<SettingsPane*>(fMainView->PageAt(i));
if (pane) { if (pane) {
if (pane->Save() == B_OK) { if (pane->Save() == B_OK) {
fSave->SetEnabled(false); fApply->SetEnabled(false);
fRevert->SetEnabled(true); fRevert->SetEnabled(true);
} else } else
break; break;
@ -110,5 +110,5 @@ PrefletWin::QuitRequested()
void void
PrefletWin::SettingChanged() PrefletWin::SettingChanged()
{ {
fSave->SetEnabled(true); fApply->SetEnabled(true);
} }

View File

@ -25,7 +25,7 @@ public:
private: private:
PrefletView* fMainView; PrefletView* fMainView;
BButton* fSave; BButton* fApply;
BButton* fRevert; BButton* fRevert;
}; };