Removed the unnecessary "Error setting up nodes" error message and reworded the most common error (missing video input) to make it more helpful to the user

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18447 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2006-08-07 20:29:56 +00:00
parent eef409055a
commit 6091ae51b0
+7 -5
View File
@@ -100,7 +100,9 @@ CodyCam::ReadyToRun()
status_t status = SetUpNodes(); status_t status = SetUpNodes();
if (status != B_OK) if (status != B_OK)
{ {
ErrorAlert("Error setting up nodes", status); // This error is not needed because SetUpNodes handles displaying any
// errors it runs into.
// ErrorAlert("Error setting up nodes", status);
return; return;
} }
@@ -207,7 +209,7 @@ CodyCam::SetUpNodes()
INFO("CodyCam acquiring VideoInput node\n"); INFO("CodyCam acquiring VideoInput node\n");
status = fMediaRoster->GetVideoInput(&fProducerNode); status = fMediaRoster->GetVideoInput(&fProducerNode);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't find a video input!", status); ErrorAlert("Can't find a video source. You need a webcam to use CodyCam.", status);
return status; return status;
} }
@@ -362,9 +364,9 @@ CodyCam::TearDownNodes()
static void static void
ErrorAlert(const char * message, status_t err) ErrorAlert(const char * message, status_t err)
{ {
char msg[256]; (new BAlert("", message, "Quit"))->Go();
sprintf(msg, "%s\n%s [%lx]", message, strerror(err), err);
(new BAlert("", msg, "Quit"))->Go(); printf("%s\n%s [%lx]", message, strerror(err), err);
be_app->PostMessage(B_QUIT_REQUESTED); be_app->PostMessage(B_QUIT_REQUESTED);
} }