From 6091ae51b0fa0ab1406093f450f126fc949977e2 Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Mon, 7 Aug 2006 20:29:56 +0000 Subject: [PATCH] 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 --- src/apps/codycam/CodyCam.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/apps/codycam/CodyCam.cpp b/src/apps/codycam/CodyCam.cpp index 92b47a2099..8905a38133 100644 --- a/src/apps/codycam/CodyCam.cpp +++ b/src/apps/codycam/CodyCam.cpp @@ -100,7 +100,9 @@ CodyCam::ReadyToRun() status_t status = SetUpNodes(); 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; } @@ -207,7 +209,7 @@ CodyCam::SetUpNodes() INFO("CodyCam acquiring VideoInput node\n"); status = fMediaRoster->GetVideoInput(&fProducerNode); 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; } @@ -362,9 +364,9 @@ CodyCam::TearDownNodes() static void ErrorAlert(const char * message, status_t err) { - char msg[256]; - sprintf(msg, "%s\n%s [%lx]", message, strerror(err), err); - (new BAlert("", msg, "Quit"))->Go(); + (new BAlert("", message, "Quit"))->Go(); + + printf("%s\n%s [%lx]", message, strerror(err), err); be_app->PostMessage(B_QUIT_REQUESTED); }