[haiku-commits] r37982 - haiku/trunk/src/apps/packageinstaller

  • From: darkwyrm@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 9 Aug 2010 15:33:50 +0200 (CEST)

Author: darkwyrm
Date: 2010-08-09 15:33:50 +0200 (Mon, 09 Aug 2010)
New Revision: 37982
Changeset: http://dev.haiku-os.org/changeset/37982

Modified:
   haiku/trunk/src/apps/packageinstaller/PackageView.cpp
Log:
Patch a confusing bug which showed "Replace all" as a choice after choosing to 
skip files which already exist


Modified: haiku/trunk/src/apps/packageinstaller/PackageView.cpp
===================================================================
--- haiku/trunk/src/apps/packageinstaller/PackageView.cpp       2010-08-09 
08:46:16 UTC (rev 37981)
+++ haiku/trunk/src/apps/packageinstaller/PackageView.cpp       2010-08-09 
13:33:50 UTC (rev 37982)
@@ -371,12 +371,17 @@
                                // 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)


Other related posts:

  • » [haiku-commits] r37982 - haiku/trunk/src/apps/packageinstaller - darkwyrm