[haiku-commits] r40032 - haiku/trunk/src/apps/mediaconverter

  • From: pulkomandy@xxxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 29 Dec 2010 16:57:26 +0100 (CET)

Author: pulkomandy
Date: 2010-12-29 16:57:26 +0100 (Wed, 29 Dec 2010)
New Revision: 40032
Changeset: http://dev.haiku-os.org/changeset/40032

Removed:
   haiku/trunk/src/apps/mediaconverter/Strings.h
   haiku/trunk/src/apps/mediaconverter/languages/
Modified:
   haiku/trunk/src/apps/mediaconverter/MediaFileInfoView.cpp
Log:
Missing part of MediaConverter patch. Was a problem with svn getting lost.


Modified: haiku/trunk/src/apps/mediaconverter/MediaFileInfoView.cpp
===================================================================
--- haiku/trunk/src/apps/mediaconverter/MediaFileInfoView.cpp   2010-12-29 
14:54:34 UTC (rev 40031)
+++ haiku/trunk/src/apps/mediaconverter/MediaFileInfoView.cpp   2010-12-29 
15:57:26 UTC (rev 40032)
@@ -5,14 +5,18 @@
 #include "MediaFileInfoView.h"
 
 #include <Alert.h>
+#include <Catalog.h>
 #include <ControlLook.h>
+#include <Locale.h>
 #include <MediaFile.h>
 #include <MediaTrack.h>
 #include <String.h>
 
-#include "Strings.h"
 
+#undef B_TRANSLATE_CONTEXT
+#define B_TRANSLATE_CONTEXT "MediaConverter-FileInfo"
 
+
 const float kSpacing = 5.0f;
 
 
@@ -44,7 +48,7 @@
        BPoint labelStart(kSpacing, fh.ascent + fh.leading + 1);
 
        if (fMediaFile == NULL) {
-               DrawString(NO_FILE_LABEL, labelStart);
+               DrawString(B_TRANSLATE("No file selected"), labelStart);
                return;
        }
 
@@ -54,13 +58,13 @@
        BPoint infoStart(labelStart.x + fMaxLabelWidth + kSpacing, 
labelStart.y);
        
        // draw labels
-       DrawString(AUDIO_INFO_LABEL, labelStart);
+       DrawString(B_TRANSLATE("Audio:"), labelStart);
        labelStart.y += fLineHeight * 2;
 
-       DrawString(VIDEO_INFO_LABEL, labelStart);
+       DrawString(B_TRANSLATE("Video:"), labelStart);
        labelStart.y += fLineHeight * 2;
 
-       DrawString(DURATION_LABEL, labelStart);
+       DrawString(B_TRANSLATE("Duration:"), labelStart);
        labelStart.y += fLineHeight * 2;
 
        // draw audio/video/duration info
@@ -125,11 +129,11 @@
        bold.SetFace(B_BOLD_FACE);
        fMaxLabelWidth = 0;
 
-       BString labels[] = {VIDEO_INFO_LABEL, DURATION_LABEL, AUDIO_INFO_LABEL};
+       BString labels[] = {B_TRANSLATE("Video:"), B_TRANSLATE("Duration:"), 
B_TRANSLATE("Audio:")};
        int32 labelCount = sizeof(labels) / sizeof(BString);
        fMaxLabelWidth = _MaxLineWidth(labels, labelCount, bold);
 
-       fNoFileLabelWidth = ceilf(bold.StringWidth(NO_FILE_LABEL));
+       fNoFileLabelWidth = ceilf(bold.StringWidth(B_TRANSLATE("No file 
selected")));
        InvalidateLayout();
 }
 
@@ -155,11 +159,12 @@
                fRef = *ref;
                status_t ret = fInfo.LoadInfo(file);
                if (ret != B_OK) {
-                       BString error("An error has occurred reading the "
-                               "file info.\n\nError : ");
+                       BString error(B_TRANSLATE("An error has occurred 
reading the "
+                               "file info.\n\nError : "));
                        error << strerror(ret);
-                       BAlert* alert = new BAlert("File Error", error.String(),
-                               "OK");
+                       BAlert* alert = new BAlert(
+                               B_TRANSLATE("File Error"), error.String(),
+                               B_TRANSLATE("OK"));
                        alert->Go(NULL);
                }
        } else {


Other related posts:

  • » [haiku-commits] r40032 - haiku/trunk/src/apps/mediaconverter - pulkomandy