Rename add and remove to add button and remove button

This commit is contained in:
John Scipione
2013-04-27 19:40:22 -04:00
parent c00d064252
commit c65c2a54bd
+8 -8
View File
@@ -876,11 +876,11 @@ FindPanel::AttachedToWindow()
textControl->MakeFocus(); textControl->MakeFocus();
} }
BButton* button = dynamic_cast<BButton*>(FindView("remove")); BButton* button = dynamic_cast<BButton*>(FindView("remove button"));
if (button) if (button)
button->SetTarget(this); button->SetTarget(this);
button = dynamic_cast<BButton*>(FindView("add")); button = dynamic_cast<BButton*>(FindView("add button"));
if (button) if (button)
button->SetTarget(this); button->SetTarget(this);
@@ -1955,18 +1955,18 @@ FindPanel::AddRecentQueries(BMenu* menu, bool addSaveAsItem,
void void
FindPanel::SetUpAddRemoveButtons(BBox* box) FindPanel::SetUpAddRemoveButtons(BBox* box)
{ {
BButton* removeButton = dynamic_cast<BButton*>(box->FindView("remove")); BButton* removeButton = dynamic_cast<BButton*>(box->FindView("remove button"));
if (removeButton != NULL) { if (removeButton != NULL) {
removeButton->SetEnabled(fAttrGrid->CountRows() > 1); removeButton->SetEnabled(fAttrGrid->CountRows() > 1);
return; return;
} }
removeButton = new BButton("remove", B_TRANSLATE("Remove"), removeButton = new BButton("remove button", B_TRANSLATE("Remove"),
new BMessage(kRemoveItem)); new BMessage(kRemoveItem));
removeButton->SetEnabled(false); removeButton->SetEnabled(false);
removeButton->SetTarget(this); removeButton->SetTarget(this);
BButton* addButton = new BButton("add", B_TRANSLATE("Add"), BButton* addButton = new BButton("add button", B_TRANSLATE("Add"),
new BMessage(kAddItem)); new BMessage(kAddItem));
addButton->SetTarget(this); addButton->SetTarget(this);
@@ -2046,7 +2046,7 @@ FindPanel::RemoveAttrRow()
if (fAttrGrid->CountRows() != 1) if (fAttrGrid->CountRows() != 1)
return; return;
BButton* button = dynamic_cast<BButton*>(FindView("remove")); BButton* button = dynamic_cast<BButton*>(FindView("remove button"));
if (button) if (button)
button->SetEnabled(false); button->SetEnabled(false);
} }
@@ -2386,13 +2386,13 @@ void
FindPanel::RemoveByAttributeItems() FindPanel::RemoveByAttributeItems()
{ {
RemoveAttrViewItems(); RemoveAttrViewItems();
BView* view = FindView("add"); BView* view = FindView("add button");
if (view) { if (view) {
view->RemoveSelf(); view->RemoveSelf();
delete view; delete view;
} }
view = FindView("remove"); view = FindView("remove button");
if (view) { if (view) {
view->RemoveSelf(); view->RemoveSelf();
delete view; delete view;