HaikuDepot: Specific error for untracked packages
The web service currently only synchronizes with HaikuPorts. Packages from 3rd party repositories which were added by the user cannot be rated. Also, use a warning alert for errors in the UserLoginWindow and RatePackageWindow.
This commit is contained in:
@@ -503,8 +503,6 @@ RatePackageWindow::_SendRatingThread()
|
|||||||
languageCode, comment, stability, rating, info);
|
languageCode, comment, stability, rating, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
info.PrintToStream();
|
|
||||||
|
|
||||||
BString error = B_TRANSLATE(
|
BString error = B_TRANSLATE(
|
||||||
"There was a puzzling response from the web service.");
|
"There was a puzzling response from the web service.");
|
||||||
|
|
||||||
@@ -516,8 +514,15 @@ RatePackageWindow::_SendRatingThread()
|
|||||||
result.PrintToStream();
|
result.PrintToStream();
|
||||||
BString message;
|
BString message;
|
||||||
if (result.FindString("message", &message) == B_OK) {
|
if (result.FindString("message", &message) == B_OK) {
|
||||||
error << B_TRANSLATE(" It responded with: ");
|
if (message == "objectnotfound") {
|
||||||
error << message;
|
error = B_TRANSLATE("The package was not found by the "
|
||||||
|
"web service. This probably means that it comes "
|
||||||
|
"from a depot which is not tracked there. Rating "
|
||||||
|
"such packages is unfortunately not supported.");
|
||||||
|
} else {
|
||||||
|
error << B_TRANSLATE(" It responded with: ");
|
||||||
|
error << message;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -535,7 +540,8 @@ RatePackageWindow::_SendRatingThread()
|
|||||||
BAlert* alert = new(std::nothrow) BAlert(
|
BAlert* alert = new(std::nothrow) BAlert(
|
||||||
failedTitle,
|
failedTitle,
|
||||||
error,
|
error,
|
||||||
B_TRANSLATE("Close"));
|
B_TRANSLATE("Close"), NULL, NULL,
|
||||||
|
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
|
|
||||||
if (alert != NULL)
|
if (alert != NULL)
|
||||||
alert->Go();
|
alert->Go();
|
||||||
|
|||||||
@@ -427,7 +427,8 @@ UserLoginWindow::_AuthenticateThread()
|
|||||||
BAlert* alert = new(std::nothrow) BAlert(
|
BAlert* alert = new(std::nothrow) BAlert(
|
||||||
B_TRANSLATE("Authentication failed"),
|
B_TRANSLATE("Authentication failed"),
|
||||||
error,
|
error,
|
||||||
B_TRANSLATE("Close"));
|
B_TRANSLATE("Close"), NULL, NULL,
|
||||||
|
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
|
|
||||||
if (alert != NULL)
|
if (alert != NULL)
|
||||||
alert->Go();
|
alert->Go();
|
||||||
@@ -556,7 +557,8 @@ UserLoginWindow::_CreateAccountThread()
|
|||||||
BAlert* alert = new(std::nothrow) BAlert(
|
BAlert* alert = new(std::nothrow) BAlert(
|
||||||
B_TRANSLATE("Failed to create account"),
|
B_TRANSLATE("Failed to create account"),
|
||||||
error,
|
error,
|
||||||
B_TRANSLATE("Close"));
|
B_TRANSLATE("Close"), NULL, NULL,
|
||||||
|
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
|
|
||||||
if (alert != NULL)
|
if (alert != NULL)
|
||||||
alert->Go();
|
alert->Go();
|
||||||
|
|||||||
Reference in New Issue
Block a user