Patch a confusing bug which showed "Replace all" as a choice after choosing to skip files which already exist

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37982 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2010-08-09 13:33:50 +00:00
parent 3290008f1e
commit 4a31ed96f9
+10 -5
View File
@@ -371,12 +371,17 @@ PackageView::ItemExists(PackageItem &item, BPath &path, int32 &policy)
// TODO: Maybe add 'No, but ask again' type of choice as well?
alertString = B_TRANSLATE("Do you want to remember this "
"decision for the rest of this installation?\n");
alertString << ((choice == P_EXISTS_OVERWRITE)
? B_TRANSLATE("All existing files will be replaced?")
: B_TRANSLATE("All existing files will be skipped?"));
BString actionString;
if (choice == P_EXISTS_OVERWRITE) {
alertString << B_TRANSLATE("All existing files will be replaced?");
actionString = "Replace all";
} else {
alertString << B_TRANSLATE("All existing files will be skipped?");
actionString = "Skip all";
}
alert = new BAlert("policy_decision", alertString.String(),
B_TRANSLATE("Replace all"), B_TRANSLATE("Ask again"));
actionString.String(), B_TRANSLATE("Ask again"));
int32 decision = alert->Go();
if (decision == 0)