156 | | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
157 | | alert->Go(); |
158 | | return false; |
| 156 | alert->SetShortcut(0, B_ESCAPE); |
| 157 | if (alert->Go() == 0) { |
| 158 | if (create_directory(fDestText->Text(), 0755) == B_OK) { |
| 159 | BEntry newEntry(fDestText->Text(), true); |
| 160 | newEntry.GetRef(&fDestRef); |
| 161 | return true; |
| 162 | } else { |
| 163 | BAlert* alert = new BAlert("stopAlert", |
| 164 | B_TRANSLATE("Failed to create the destination folder."), |
| 165 | B_TRANSLATE("Cancel"), NULL, NULL, |
| 166 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 167 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
| 168 | alert->Go(); |
| 169 | return false; |
| 170 | } |
| 171 | } else { |
| 172 | BAlert* alert = new BAlert("stopAlert", |
| 173 | B_TRANSLATE("The extraction operation aborted."), |
| 174 | B_TRANSLATE("Cancel"), NULL, NULL, |
| 175 | B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); |
| 176 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
| 177 | alert->Go(); |
| 178 | return false; |
| 179 | } |