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

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 15 Dec 2010 11:47:02 +0100 (CET)

Author: stippi
Date: 2010-12-15 11:47:02 +0100 (Wed, 15 Dec 2010)
New Revision: 39854
Changeset: http://dev.haiku-os.org/changeset/39854

Modified:
   haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp
Log:
More cleanup.


Modified: haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp
===================================================================
--- haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp        
2010-12-15 10:34:58 UTC (rev 39853)
+++ haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp        
2010-12-15 10:47:02 UTC (rev 39854)
@@ -114,25 +114,9 @@
        fConverting(false),
        fCancelling(false)
 {
-       char defaultdirectory[] = "/boot/home";
-       fOutputDir.SetTo(defaultdirectory);
+       const char* defaultDirectory = "/boot/home";
+       fOutputDir.SetTo(defaultDirectory);
 
-#if B_BEOS_VERSION >= 0x530 // 0x520 RC2 0x530 RC3
-       // load Locale files for ZETA
-       entry_ref mypath;
-       app_info info;
-
-       be_app->GetAppInfo(&info);
-       mypath = info.ref;
-
-       BPath path(&mypath);
-       path.GetParent(&path);
-       path.Append("Language/Dictionaries");
-       path.Append("MediaConverter");
-       be_locale.LoadLanguageFile(path.Path());
-
-#endif
-
        fMenuBar = new BMenuBar("menubar");
        _CreateMenu();
 
@@ -154,24 +138,19 @@
        // Output format box
        fOutputBox = new BBox(B_FANCY_BORDER, NULL);
        float padding = be_control_look->DefaultItemSpacing();
-       BGridLayout* ouputGrid = new BGridLayout(padding, padding);
-       fOutputBox->SetLayout(ouputGrid);
-       // fOutputBox's layout is also adjusted in _UpdateLabels
+       BGridLayout* outputGrid = new BGridLayout(padding, padding);
+       fOutputBox->SetLayout(outputGrid);
+               // fOutputBox's layout is also adjusted in _UpdateLabels
 
-       BPopUpMenu* popmenu = new BPopUpMenu("");
-       fFormatMenu = new BMenuField(NULL, FORMAT_LABEL, popmenu);
+       fFormatMenu = new BMenuField(NULL, FORMAT_LABEL, new BPopUpMenu(""));
+       fAudioMenu = new BMenuField(NULL, AUDIO_LABEL, new BPopUpMenu(""));
+       fVideoMenu = new BMenuField(NULL, VIDEO_LABEL, new BPopUpMenu(""));
 
-       popmenu = new BPopUpMenu("");
-       fAudioMenu = new BMenuField(NULL, AUDIO_LABEL, popmenu);
-
-       popmenu = new BPopUpMenu("");
-       fVideoMenu = new BMenuField(NULL, VIDEO_LABEL, popmenu);
-
        // output folder
        fDestButton = new BButton(OUTPUT_FOLDER_LABEL,
                new BMessage(OUTPUT_FOLDER_MESSAGE));
        BAlignment labelAlignment(be_control_look->DefaultLabelAlignment());
-       fOutputFolder = new BStringView(NULL, defaultdirectory);
+       fOutputFolder = new BStringView(NULL, defaultDirectory);
        fOutputFolder->SetExplicitAlignment(labelAlignment);
 
        // start/end duration
@@ -193,7 +172,7 @@
        fAudioQualitySlider->SetValue(fAudioQuality);
        fAudioQualitySlider->SetEnabled(false);
 
-       BLayoutBuilder::Grid<>(ouputGrid)
+       BLayoutBuilder::Grid<>(outputGrid)
                .SetInsets(padding, padding, padding, padding)
                .AddMenuField(fFormatMenu, 0, 0)
                .AddMenuField(fAudioMenu, 0, 1)


Other related posts:

  • » [haiku-commits] r39854 - haiku/trunk/src/apps/mediaconverter - superstippi