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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user