Use a stop alert when you can't open the file.

This is a fatal error that the user has no way to recover from
so using the info alert is not appropriate here.

Also rename the ret variable to result and omit extraneous braces.
This commit is contained in:
John Scipione
2013-08-31 15:57:25 -04:00
parent 72d0921ae8
commit ae96ed6dbe
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -1092,7 +1092,7 @@ MainWin::OpenPlaylistItem(const PlaylistItemRef& item)
"The file could not be opened.");
message.ReplaceFirst("%app%", kApplicationName);
BAlert* alert = new BAlert(kApplicationName, message.String(),
B_TRANSLATE("OK"));
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go();
_PlaylistItemOpened(item, ret);
@@ -1341,7 +1341,7 @@ MainWin::_PlaylistItemOpened(const PlaylistItemRef& item, status_t result)
message << B_TRANSLATE("Error: ") << strerror(result);
}
BAlert* alert = new BAlert("error", message.String(),
B_TRANSLATE("OK"));
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
alert->Go();
fControls->SetDisabledString(kDisabledSeekMessage);