[haiku-commits] haiku: hrev46662 - src/apps/soundrecorder

  • From: humdingerb@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 12 Jan 2014 17:47:21 +0100 (CET)

hrev46662 adds 1 changeset to branch 'master'
old head: 130db54051570a3eaa11deb64ca7971d40b0be76
new head: 193a3956d26bc0c97ac884850b080d988e1bd66e
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=193a395+%5E130db54

----------------------------------------------------------------------------

193a395: Improved error message
  
  ...in case a single drag&dropped file isn't an audio file.

                                        [ Humdinger <humdingerb@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev46662
Commit:      193a3956d26bc0c97ac884850b080d988e1bd66e
URL:         http://cgit.haiku-os.org/haiku/commit/?id=193a395
Author:      Humdinger <humdingerb@xxxxxxxxx>
Date:        Sun Jan 12 16:39:23 2014 UTC

----------------------------------------------------------------------------

1 file changed, 9 insertions(+), 3 deletions(-)
src/apps/soundrecorder/RecorderWindow.cpp | 12 +++++++++---

----------------------------------------------------------------------------

diff --git a/src/apps/soundrecorder/RecorderWindow.cpp 
b/src/apps/soundrecorder/RecorderWindow.cpp
index 91f9ea4..f2fb731 100644
--- a/src/apps/soundrecorder/RecorderWindow.cpp
+++ b/src/apps/soundrecorder/RecorderWindow.cpp
@@ -1335,16 +1335,22 @@ RecorderWindow::RefsReceived(BMessage *msg)
                countBad++;
        }
 
-       if (countBad > 0 && countGood == 0) {
+       if (countBad == 1 && countGood == 0) {
                BAlert* alert = new BAlert(B_TRANSLATE("Nothing to play"),
-                       B_TRANSLATE("None of the files appear to be audio 
files"),
+                       B_TRANSLATE("The file doesn't appear to be an audio 
file."),
+                       B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, 
B_STOP_ALERT);
+               alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
+               alert->Go();
+       } else if (countBad > 0 && countGood == 0) {
+               BAlert* alert = new BAlert(B_TRANSLATE("Nothing to play"),
+                       B_TRANSLATE("None of the files appear to be audio 
files."),
                        B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL, 
B_STOP_ALERT);
                alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
                alert->Go();
        } else if (countGood > 0) {
                if (countBad > 0) {
                        BAlert* alert = new BAlert(B_TRANSLATE("Invalid audio 
files"),
-                       B_TRANSLATE("Some of the files don't appear to be audio 
files"),
+                       B_TRANSLATE("Some of the files don't appear to be audio 
files."),
                                B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
                                B_WARNING_ALERT);
                        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);


Other related posts:

  • » [haiku-commits] haiku: hrev46662 - src/apps/soundrecorder - humdingerb