diff --git a/src/add-ons/disk_systems/bfs/InitializeParameterEditor.cpp b/src/add-ons/disk_systems/bfs/InitializeParameterEditor.cpp index 9a7e3064ba..0fd254874b 100644 --- a/src/add-ons/disk_systems/bfs/InitializeParameterEditor.cpp +++ b/src/add-ons/disk_systems/bfs/InitializeParameterEditor.cpp @@ -23,9 +23,11 @@ #include #include + #undef B_TRANSLATE_CONTEXT #define B_TRANSLATE_CONTEXT "BFS_Initialize_Parameter" + static uint32 MSG_BLOCK_SIZE = 'blsz'; static uint32 MSG_NAME_CHANGED = 'nmch'; @@ -121,8 +123,7 @@ InitializeBFSEditor::_CreateViewControls() blocksizeMenu->AddItem(new BMenuItem( B_TRANSLATE("8192 (Mostly large files)"), message)); - fBlockSizeMF = new BMenuField(B_TRANSLATE("Blocksize:"), blocksizeMenu, - NULL); + fBlockSizeMF = new BMenuField(B_TRANSLATE("Blocksize:"), blocksizeMenu); defaultItem->SetMarked(true); fUseIndicesCB = new BCheckBox(B_TRANSLATE("Enable query support"), NULL); diff --git a/src/add-ons/translators/gif/GIFView.cpp b/src/add-ons/translators/gif/GIFView.cpp index 1e827f454d..c10638f88e 100644 --- a/src/add-ons/translators/gif/GIFView.cpp +++ b/src/add-ons/translators/gif/GIFView.cpp @@ -48,8 +48,8 @@ GIFView::GIFView(const char *name) title->SetFont(be_bold_font); char version_string[100]; - sprintf(version_string, "v%d.%d.%d %s", (int)(translatorVersion >> 8), - (int)((translatorVersion >> 4) & 0xf), (int)(translatorVersion & 0xf), + sprintf(version_string, "v%d.%d.%d %s", (int)(translatorVersion >> 8), + (int)((translatorVersion >> 4) & 0xf), (int)(translatorVersion & 0xf), __DATE__); BStringView *version = new BStringView("Version", version_string); @@ -57,13 +57,13 @@ GIFView::GIFView(const char *name) BStringView *copyright = new BStringView("Copyright", copyrightString); // menu fields (Palette & Colors) - fWebSafeMI = new BMenuItem(B_TRANSLATE("Websafe"), + fWebSafeMI = new BMenuItem(B_TRANSLATE("Websafe"), new BMessage(GV_WEB_SAFE), 0, 0); - fBeOSSystemMI = new BMenuItem(B_TRANSLATE("BeOS system"), + fBeOSSystemMI = new BMenuItem(B_TRANSLATE("BeOS system"), new BMessage(GV_BEOS_SYSTEM), 0, 0); - fGreyScaleMI = new BMenuItem(B_TRANSLATE("Greyscale"), + fGreyScaleMI = new BMenuItem(B_TRANSLATE("Greyscale"), new BMessage(GV_GREYSCALE), 0, 0); - fOptimalMI = new BMenuItem(B_TRANSLATE("Optimal"), + fOptimalMI = new BMenuItem(B_TRANSLATE("Optimal"), new BMessage(GV_OPTIMAL), 0, 0); fPaletteM = new BPopUpMenu("PalettePopUpMenu", true, true, B_ITEMS_IN_COLUMN); fPaletteM->AddItem(fWebSafeMI); @@ -71,7 +71,7 @@ GIFView::GIFView(const char *name) fPaletteM->AddItem(fGreyScaleMI); fPaletteM->AddItem(fOptimalMI); - fColorCountM = new BPopUpMenu("ColorCountPopUpMenu", true, true, + fColorCountM = new BPopUpMenu("ColorCountPopUpMenu", true, true, B_ITEMS_IN_COLUMN); int32 count = 2; for (int32 i = 0; i < 8; i++) { @@ -85,34 +85,33 @@ GIFView::GIFView(const char *name) } fColorCount256MI = fColorCountMI[7]; - fPaletteMF = new BMenuField(B_TRANSLATE("Palette"), fPaletteM, NULL); - - fColorCountMF = new BMenuField(B_TRANSLATE("Colors"), fColorCountM, NULL); - + fPaletteMF = new BMenuField(B_TRANSLATE("Palette"), fPaletteM); + fColorCountMF = new BMenuField(B_TRANSLATE("Colors"), fColorCountM); + // check boxes fUseDitheringCB = new BCheckBox(B_TRANSLATE("Use dithering"), new BMessage(GV_USE_DITHERING)); - + fInterlacedCB = new BCheckBox(B_TRANSLATE("Write interlaced images"), new BMessage(GV_INTERLACED)); - + fUseTransparentCB = new BCheckBox(B_TRANSLATE("Write transparent images"), new BMessage(GV_USE_TRANSPARENT)); - + // radio buttons fUseTransparentAutoRB = new BRadioButton( B_TRANSLATE("Automatic (from alpha channel)"), new BMessage(GV_USE_TRANSPARENT_AUTO)); - + fUseTransparentColorRB = new BRadioButton(B_TRANSLATE("Use RGB color"), new BMessage(GV_USE_TRANSPARENT_COLOR)); - + fTransparentRedTC = new BTextControl("", "0", new BMessage(GV_TRANSPARENT_RED)); - + fTransparentGreenTC = new BTextControl("", "0", new BMessage(GV_TRANSPARENT_GREEN)); - + fTransparentBlueTC = new BTextControl("", "0", new BMessage(GV_TRANSPARENT_BLUE)); - + BTextView *tr = fTransparentRedTC->TextView(); BTextView *tg = fTransparentGreenTC->TextView(); BTextView *tb = fTransparentBlueTC->TextView(); @@ -178,7 +177,7 @@ GIFView::RestorePrefs() { fPrefs = new Prefs(); - fColorCountMF->SetEnabled(false); + fColorCountMF->SetEnabled(false); fUseDitheringCB->SetEnabled(true); switch (fPrefs->palettemode) { @@ -194,7 +193,7 @@ GIFView::RestorePrefs() break; case OPTIMAL_PALETTE: fOptimalMI->SetMarked(true); - fColorCountMF->SetEnabled(true); + fColorCountMF->SetEnabled(true); break; default: fPrefs->palettemode = WEB_SAFE_PALETTE; @@ -214,7 +213,7 @@ GIFView::RestorePrefs() } fInterlacedCB->SetValue(fPrefs->interlaced); - + if (fGreyScaleMI->IsMarked()) fUseDitheringCB->SetValue(false); else fUseDitheringCB->SetValue(fPrefs->usedithering); fUseTransparentCB->SetValue(fPrefs->usetransparent); @@ -233,7 +232,7 @@ GIFView::RestorePrefs() fTransparentGreenTC->SetEnabled(false); fTransparentBlueTC->SetEnabled(false); } - + char temp[4]; sprintf(temp, "%d", fPrefs->transparentred); fTransparentRedTC->SetText(temp); diff --git a/src/add-ons/translators/ppm/PPMTranslator.cpp b/src/add-ons/translators/ppm/PPMTranslator.cpp index 0b657c56e7..5e38d46cfb 100644 --- a/src/add-ons/translators/ppm/PPMTranslator.cpp +++ b/src/add-ons/translators/ppm/PPMTranslator.cpp @@ -163,7 +163,7 @@ public: ptr++; } ptr++; - if (sscanf(ptr, "%d", + if (sscanf(ptr, "%d", (int*)&g_settings.out_space) != 1) { syslog(LOG_ERR, "illegal color space " "in PPMTranslator settings: %s", ptr); @@ -174,8 +174,8 @@ public: ptr++; } ptr++; - if (sscanf(ptr, "%f,%f", - &g_settings.window_pos.x, + if (sscanf(ptr, "%f,%f", + &g_settings.window_pos.x, &g_settings.window_pos.y) != 2) { syslog(LOG_ERR, "illegal window position " "in PPMTranslator settings: %s", ptr); @@ -455,13 +455,13 @@ public: SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); SetLowColor(ViewColor()); - mTitle = new BStringView("title", + mTitle = new BStringView("title", B_TRANSLATE("PPM Image Translator")); mTitle->SetFont(be_bold_font); char detail[100]; int ver = static_cast(translatorVersion); - sprintf(detail, B_TRANSLATE("Version %d.%d.%d %s"), ver >> 8, + sprintf(detail, B_TRANSLATE("Version %d.%d.%d %s"), ver >> 8, ((ver >> 4) & 0xf), (ver & 0xf), __DATE__); mDetail = new BStringView("detail", detail); @@ -473,26 +473,26 @@ public: B_TRANSLATE("Sample code copyright 1999, Be Incorporated")); mMenu = new BPopUpMenu("Color Space"); - mMenu->AddItem(new BMenuItem(B_TRANSLATE("None"), + mMenu->AddItem(new BMenuItem(B_TRANSLATE("None"), CSMessage(B_NO_COLOR_SPACE))); - mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 8:8:8 32 bits"), + mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 8:8:8 32 bits"), CSMessage(B_RGB32))); mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGBA 8:8:8:8 32 " "bits"), CSMessage(B_RGBA32))); - mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 5:5:5 16 bits"), + mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 5:5:5 16 bits"), CSMessage(B_RGB15))); mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGBA 5:5:5:1 16 " "bits"), CSMessage(B_RGBA15))); - mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 5:6:5 16 bits"), + mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 5:6:5 16 bits"), CSMessage(B_RGB16))); mMenu->AddItem(new BMenuItem(B_TRANSLATE("System palette 8 " "bits"), CSMessage(B_CMAP8))); mMenu->AddSeparatorItem(); - mMenu->AddItem(new BMenuItem(B_TRANSLATE("Grayscale 8 bits"), + mMenu->AddItem(new BMenuItem(B_TRANSLATE("Grayscale 8 bits"), CSMessage(B_GRAY8))); - mMenu->AddItem(new BMenuItem(B_TRANSLATE("Bitmap 1 bit"), + mMenu->AddItem(new BMenuItem(B_TRANSLATE("Bitmap 1 bit"), CSMessage(B_GRAY1))); - mMenu->AddItem(new BMenuItem(B_TRANSLATE("CMY 8:8:8 32 bits"), + mMenu->AddItem(new BMenuItem(B_TRANSLATE("CMY 8:8:8 32 bits"), CSMessage(B_CMY32))); mMenu->AddItem(new BMenuItem(B_TRANSLATE("CMYA 8:8:8:8 32 " "bits"), CSMessage(B_CMYA32))); @@ -509,8 +509,8 @@ public: "bits big-endian"), CSMessage(B_RGBA15_BIG))); mMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 5:6:5 16 bits " "big-endian"), CSMessage(B_RGB16))); - mField = new BMenuField(B_TRANSLATE("Input Color Space"), - mMenu, NULL); + mField = new BMenuField(B_TRANSLATE("Input Color Space"), + mMenu); mField->SetViewColor(ViewColor()); SelectColorSpace(g_settings.out_space); BMessage * msg = new BMessage(CHANGE_ASCII); @@ -649,7 +649,7 @@ MakeConfig( /* optional */ BView * * outView, BRect * outExtent) { - PPMView * v = new PPMView(B_TRANSLATE("PPMTranslator Settings"), + PPMView * v = new PPMView(B_TRANSLATE("PPMTranslator Settings"), B_WILL_DRAW); *outView = v; v->ResizeTo(v->ExplicitPreferredSize());; diff --git a/src/add-ons/translators/tiff/TIFFView.cpp b/src/add-ons/translators/tiff/TIFFView.cpp index ab637a2833..784223ea29 100644 --- a/src/add-ons/translators/tiff/TIFFView.cpp +++ b/src/add-ons/translators/tiff/TIFFView.cpp @@ -81,7 +81,7 @@ add_menu_item(BMenu* menu, // // Returns: // --------------------------------------------------------------- -TIFFView::TIFFView(const char *name, uint32 flags, +TIFFView::TIFFView(const char *name, uint32 flags, TranslatorSettings *settings) : BView(name, flags) { @@ -115,14 +115,14 @@ TIFFView::TIFFView(const char *name, uint32 flags, uint32 currentCompression = fSettings->SetGetInt32(TIFF_SETTING_COMPRESSION); // create the menu items with the various compression methods - add_menu_item(menu, COMPRESSION_NONE, B_TRANSLATE("None"), + add_menu_item(menu, COMPRESSION_NONE, B_TRANSLATE("None"), currentCompression); menu->AddSeparatorItem(); - add_menu_item(menu, COMPRESSION_PACKBITS, B_TRANSLATE("RLE (Packbits)"), + add_menu_item(menu, COMPRESSION_PACKBITS, B_TRANSLATE("RLE (Packbits)"), currentCompression); - add_menu_item(menu, COMPRESSION_DEFLATE, B_TRANSLATE("ZIP (Deflate)"), + add_menu_item(menu, COMPRESSION_DEFLATE, B_TRANSLATE("ZIP (Deflate)"), currentCompression); - add_menu_item(menu, COMPRESSION_LZW, B_TRANSLATE("LZW"), + add_menu_item(menu, COMPRESSION_LZW, B_TRANSLATE("LZW"), currentCompression); // TODO: the disabled compression modes are not configured in libTIFF @@ -131,12 +131,11 @@ TIFFView::TIFFView(const char *name, uint32 flags, // TODO ? - strip encoding is not implemented in libTIFF for this compression // add_menu_item(menu, COMPRESSION_JP2000, "JPEG2000", currentCompression); - fCompressionMF = new BMenuField(B_TRANSLATE("Use Compression:"), menu, - NULL); - + fCompressionMF = new BMenuField(B_TRANSLATE("Use Compression:"), menu); + // Build the layout SetLayout(new BGroupLayout(B_VERTICAL)); - + i = 0; AddChild(BGroupLayoutBuilder(B_VERTICAL, 7) .Add(fTitle) @@ -153,7 +152,7 @@ TIFFView::TIFFView(const char *name, uint32 flags, .AddGlue() .SetInsets(5, 5, 5, 5) ); - + BFont font; GetFont(&font); SetExplicitPreferredSize(BSize((font.Size() * 350)/12, (font.Size() * 200)/12)); diff --git a/src/add-ons/translators/webp/ConfigView.cpp b/src/add-ons/translators/webp/ConfigView.cpp index 23d2394d0d..333a366f35 100644 --- a/src/add-ons/translators/webp/ConfigView.cpp +++ b/src/add-ons/translators/webp/ConfigView.cpp @@ -34,6 +34,7 @@ #undef B_TRANSLATE_CONTEXT #define B_TRANSLATE_CONTEXT "ConfigView" + static const uint32 kMsgQuality = 'qlty'; static const uint32 kMsgPreset = 'prst'; static const uint32 kMsgMethod = 'metd'; @@ -97,7 +98,7 @@ ConfigView::ConfigView(TranslatorSettings* settings, uint32 flags) preset++; } BMenuField* presetsField = new BMenuField(B_TRANSLATE("Output preset:"), - fPresetsMenu, NULL); + fPresetsMenu); fQualitySlider = new BSlider("quality", B_TRANSLATE("Output quality:"), new BMessage(kMsgQuality), 0, 100, B_HORIZONTAL, B_BLOCK_THUMB); diff --git a/src/apps/codycam/CodyCam.cpp b/src/apps/codycam/CodyCam.cpp index 0b1704ea21..9cef0e3784 100644 --- a/src/apps/codycam/CodyCam.cpp +++ b/src/apps/codycam/CodyCam.cpp @@ -688,7 +688,7 @@ VideoWindow::_BuildCaptureControls() fImageFormatMenu->ItemAt(0)->SetMarked(true); fImageFormatSelector = new BMenuField("Format", B_TRANSLATE("Format:"), - fImageFormatMenu, NULL); + fImageFormatMenu); // capture rate fCaptureRateMenu = new BPopUpMenu(B_TRANSLATE("Capture Rate Menu")); @@ -701,7 +701,7 @@ VideoWindow::_BuildCaptureControls() fCaptureRateMenu->SetTargetForItems(this); fCaptureRateMenu->FindItem(fCaptureRateSetting->Value())->SetMarked(true); fCaptureRateSelector = new BMenuField("Rate", B_TRANSLATE("Rate:"), - fCaptureRateMenu, NULL); + fCaptureRateMenu); BLayoutBuilder::Grid<>(controlsLayout) .AddTextControl(fFileName, 0, 0) @@ -721,7 +721,7 @@ VideoWindow::_BuildCaptureControls() fUploadClientMenu->SetTargetForItems(this); fUploadClientMenu->FindItem(fUploadClientSetting->Value())->SetMarked(true); fUploadClientSelector = new BMenuField("UploadClient", NULL, - fUploadClientMenu, NULL); + fUploadClientMenu); fFtpSetupBox->SetLabel(B_TRANSLATE("Output")); // this doesn't work with the layout manager diff --git a/src/apps/diskprobe/OpenWindow.cpp b/src/apps/diskprobe/OpenWindow.cpp index d4acff4221..3a35eccfd0 100644 --- a/src/apps/diskprobe/OpenWindow.cpp +++ b/src/apps/diskprobe/OpenWindow.cpp @@ -1,6 +1,6 @@ /* * Copyright 2009 Ankur Sethi - * Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2004-2011, Axel Dörfler, axeld@pinc-software.de. * All rights reserved. Distributed under the terms of the MIT License. */ @@ -42,23 +42,22 @@ OpenWindow::OpenWindow() if (BMenuItem *item = fDevicesMenu->ItemAt(0)) item->SetMarked(true); - BMenuField *field = new BMenuField(B_TRANSLATE("Examine device:"), fDevicesMenu, - NULL); + BMenuField *field = new BMenuField(B_TRANSLATE("Examine device:"), + fDevicesMenu); - BButton *probeDeviceButton = new BButton("device", B_TRANSLATE("Probe device"), - new BMessage(kMsgProbeDevice)); + BButton *probeDeviceButton = new BButton("device", + B_TRANSLATE("Probe device"), new BMessage(kMsgProbeDevice)); probeDeviceButton->MakeDefault(true); - BButton *probeFileButton = new BButton("file", + BButton *probeFileButton = new BButton("file", B_TRANSLATE("Probe file" B_UTF8_ELLIPSIS), new BMessage(kMsgProbeFile)); BButton *cancelButton = new BButton("cancel", B_TRANSLATE("Cancel"), new BMessage(B_QUIT_REQUESTED)); - SetLayout(new BGroupLayout(B_HORIZONTAL)); - + AddChild(BGridLayoutBuilder(8, 8) .Add(field, 0, 0, 3) .Add(cancelButton, 0, 1) @@ -76,7 +75,7 @@ OpenWindow::~OpenWindow() } -void +void OpenWindow::MessageReceived(BMessage *message) { switch (message->what) { @@ -115,7 +114,7 @@ OpenWindow::MessageReceived(BMessage *message) } -bool +bool OpenWindow::QuitRequested() { be_app_messenger.SendMessage(kMsgOpenWindowClosed); @@ -123,7 +122,7 @@ OpenWindow::QuitRequested() } -void +void OpenWindow::CollectDevices(BMenu *menu, BEntry *startEntry) { BDirectory directory; diff --git a/src/apps/drivesetup/CreateParamsPanel.cpp b/src/apps/drivesetup/CreateParamsPanel.cpp index d4bc6baaf2..76c6e008ad 100644 --- a/src/apps/drivesetup/CreateParamsPanel.cpp +++ b/src/apps/drivesetup/CreateParamsPanel.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008-20010 Haiku Inc. All rights reserved. + * Copyright 2008-20011 Haiku Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Authors: @@ -247,7 +247,7 @@ CreateParamsPanel::_CreateViewControls(BPartition* parent, off_t offset, } fTypeMenuField = new BMenuField(B_TRANSLATE("Partition type:"), - fTypePopUpMenu, NULL); + fTypePopUpMenu); const float spacing = be_control_look->DefaultItemSpacing(); BGroupLayout* layout = new BGroupLayout(B_VERTICAL, spacing); diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp index 6f5b887f0a..28426f6965 100644 --- a/src/apps/installer/InstallerWindow.cpp +++ b/src/apps/installer/InstallerWindow.cpp @@ -4,6 +4,7 @@ * All rights reserved. Distributed under the terms of the MIT License. */ + #include "InstallerWindow.h" #include @@ -183,11 +184,11 @@ InstallerWindow::InstallerWindow() true, false); fSrcMenuField = new BMenuField("srcMenuField", - B_TRANSLATE("Install from:"), fSrcMenu, NULL); + B_TRANSLATE("Install from:"), fSrcMenu); fSrcMenuField->SetAlignment(B_ALIGN_RIGHT); fDestMenuField = new BMenuField("destMenuField", B_TRANSLATE("Onto:"), - fDestMenu, NULL); + fDestMenu); fDestMenuField->SetAlignment(B_ALIGN_RIGHT); fPackagesSwitch = new PaneSwitch("options_button"); diff --git a/src/apps/mail/Prefs.cpp b/src/apps/mail/Prefs.cpp index 18c2eb1e8a..8b1ceda142 100644 --- a/src/apps/mail/Prefs.cpp +++ b/src/apps/mail/Prefs.cpp @@ -181,34 +181,32 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap, int32 layoutRow = 0; fButtonBarMenu = _BuildButtonBarMenu(*buttonBar); - menu = new BMenuField("bar", B_TRANSLATE("Button bar:"), - fButtonBarMenu, NULL); + menu = new BMenuField("bar", B_TRANSLATE("Button bar:"), fButtonBarMenu); add_menu_to_layout(menu, interfaceLayout, layoutRow); fFontMenu = _BuildFontMenu(font); - menu = new BMenuField("font", B_TRANSLATE("Font:"), - fFontMenu, NULL); + menu = new BMenuField("font", B_TRANSLATE("Font:"), fFontMenu); add_menu_to_layout(menu, interfaceLayout, layoutRow); fSizeMenu = _BuildSizeMenu(font); - menu = new BMenuField("size", B_TRANSLATE("Size:"), fSizeMenu, NULL); + menu = new BMenuField("size", B_TRANSLATE("Size:"), fSizeMenu); add_menu_to_layout(menu, interfaceLayout, layoutRow); fColoredQuotesMenu = _BuildColoredQuotesMenu(fColoredQuotes); menu = new BMenuField("cquotes", B_TRANSLATE("Colored quotes:"), - fColoredQuotesMenu, NULL); + fColoredQuotesMenu); add_menu_to_layout(menu, interfaceLayout, layoutRow); fSpellCheckStartOnMenu = _BuildSpellCheckStartOnMenu(fSpellCheckStartOn); menu = new BMenuField("spellCheckStartOn", B_TRANSLATE("Initial spell check mode:"), - fSpellCheckStartOnMenu, NULL); + fSpellCheckStartOnMenu); add_menu_to_layout(menu, interfaceLayout, layoutRow); fAutoMarkReadMenu = _BuildAutoMarkReadMenu(fAutoMarkRead); menu = new BMenuField("autoMarkRead", B_TRANSLATE("Automatically mark mail as read:"), - fAutoMarkReadMenu, NULL); + fAutoMarkReadMenu); add_menu_to_layout(menu, interfaceLayout, layoutRow); // Mail Accounts @@ -216,12 +214,12 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap, fAccountMenu = _BuildAccountMenu(fAccount); menu = new BMenuField("account", B_TRANSLATE("Default account:"), - fAccountMenu, NULL); + fAccountMenu); add_menu_to_layout(menu, mailLayout, layoutRow); fReplyToMenu = _BuildReplyToMenu(fReplyTo); menu = new BMenuField("replyTo", B_TRANSLATE("Reply account:"), - fReplyToMenu, NULL); + fReplyToMenu); add_menu_to_layout(menu, mailLayout, layoutRow); // Mail Contents @@ -232,7 +230,7 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap, fReplyPreamble->SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT); fReplyPreambleMenu = _BuildReplyPreambleMenu(); - menu = new BMenuField("replyPreamble", NULL, fReplyPreambleMenu, NULL); + menu = new BMenuField("replyPreamble", NULL, fReplyPreambleMenu); menu->SetExplicitMaxSize(BSize(27, B_SIZE_UNSET)); mailLayout->AddItem(fReplyPreamble->CreateLabelLayoutItem(), 0, layoutRow); @@ -243,28 +241,25 @@ TPrefsWindow::TPrefsWindow(BRect rect, BFont* font, int32* level, bool* wrap, fSignatureMenu = _BuildSignatureMenu(*sig); menu = new BMenuField("sig", B_TRANSLATE("Auto signature:"), - fSignatureMenu, NULL); + fSignatureMenu); add_menu_to_layout(menu, mailLayout, layoutRow); fEncodingMenu = _BuildEncodingMenu(fEncoding); - menu = new BMenuField("enc", B_TRANSLATE("Encoding:"), - fEncodingMenu, NULL); + menu = new BMenuField("enc", B_TRANSLATE("Encoding:"), fEncodingMenu); add_menu_to_layout(menu, mailLayout, layoutRow); fWarnUnencodableMenu = _BuildWarnUnencodableMenu(fWarnUnencodable); menu = new BMenuField("warnUnencodable", B_TRANSLATE("Warn unencodable:"), - fWarnUnencodableMenu, NULL); + fWarnUnencodableMenu); add_menu_to_layout(menu, mailLayout, layoutRow); fWrapMenu = _BuildWrapMenu(*wrap); - menu = new BMenuField("wrap", B_TRANSLATE("Text wrapping:"), - fWrapMenu, NULL); + menu = new BMenuField("wrap", B_TRANSLATE("Text wrapping:"), fWrapMenu); add_menu_to_layout(menu, mailLayout, layoutRow); fAttachAttributesMenu = _BuildAttachAttributesMenu(*attachAttributes); - menu = new BMenuField("attachAttributes", - B_TRANSLATE("Attach attributes:"), - fAttachAttributesMenu, NULL); + menu = new BMenuField("attachAttributes", B_TRANSLATE("Attach attributes:"), + fAttachAttributesMenu); add_menu_to_layout(menu, mailLayout, layoutRow); SetLayout(new BGroupLayout(B_HORIZONTAL)); diff --git a/src/preferences/appearance/AntialiasingSettingsView.cpp b/src/preferences/appearance/AntialiasingSettingsView.cpp index 2b6514649c..3513e72662 100644 --- a/src/preferences/appearance/AntialiasingSettingsView.cpp +++ b/src/preferences/appearance/AntialiasingSettingsView.cpp @@ -4,6 +4,7 @@ * All rights reserved. Distributed under the terms of the MIT License. */ + #include "AntialiasingSettingsView.h" #include @@ -87,7 +88,7 @@ AntialiasingSettingsView::AntialiasingSettingsView(const char* name) // antialiasing menu _BuildAntialiasingMenu(); fAntialiasingMenuField = new BMenuField("antialiasing", - B_TRANSLATE("Antialiasing type:"), fAntialiasingMenu, NULL); + B_TRANSLATE("Antialiasing type:"), fAntialiasingMenu); // "average weight" in subpixel filtering fAverageWeightControl = new BSlider("averageWeightControl", @@ -102,7 +103,7 @@ AntialiasingSettingsView::AntialiasingSettingsView(const char* name) // hinting menu _BuildHintingMenu(); fHintingMenuField = new BMenuField("hinting", B_TRANSLATE("Glyph hinting:"), - fHintingMenu, NULL); + fHintingMenu); #ifdef DISABLE_HINTING_CONTROL fHintingMenuField->SetEnabled(false); diff --git a/src/preferences/fonts/FontSelectionView.cpp b/src/preferences/fonts/FontSelectionView.cpp index ce0b8f6a30..023f747ea9 100644 --- a/src/preferences/fonts/FontSelectionView.cpp +++ b/src/preferences/fonts/FontSelectionView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2009, Haiku. + * Copyright 2001-2011, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -99,12 +99,11 @@ FontSelectionView::FontSelectionView(const char* name, fFontsMenu = new BPopUpMenu("font menu"); // font menu - fFontsMenuField = new BMenuField("fonts", label, fFontsMenu, NULL); + fFontsMenuField = new BMenuField("fonts", label, fFontsMenu); fFontsMenuField->SetAlignment(B_ALIGN_RIGHT); // size menu - fSizesMenuField = new BMenuField("size", B_TRANSLATE("Size:"), - fSizesMenu, NULL); + fSizesMenuField = new BMenuField("size", B_TRANSLATE("Size:"), fSizesMenu); fSizesMenuField->SetAlignment(B_ALIGN_RIGHT); // preview diff --git a/src/preferences/media/MediaViews.cpp b/src/preferences/media/MediaViews.cpp index 5d7f1367e4..9917371bbf 100644 --- a/src/preferences/media/MediaViews.cpp +++ b/src/preferences/media/MediaViews.cpp @@ -1,17 +1,13 @@ -// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ -// -// Copyright (c) 2003, OpenBeOS -// -// This software is part of the OpenBeOS distribution and is covered -// by the OpenBeOS license. -// -// -// File: MediaViews.cpp -// Author: Sikosis, Jérôme Duval -// Description: Media Preferences -// Created : June 25, 2003 -// -// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +/* + * Copyright 2003-2011, Haiku. + * Distributed under the terms of the MIT License. + * + * Authors: + * Sikosis + * Jérôme Duval + */ + + #include "MediaViews.h" #include @@ -266,12 +262,12 @@ AudioSettingsView::AudioSettingsView() BBox* defaultsBox = new BBox("defaults"); defaultsBox->SetLabel(B_TRANSLATE("Defaults")); BGridView* defaultsGridView = new BGridView(); - + BMenuField* inputMenuField = new BMenuField("inputMenuField", - B_TRANSLATE("Audio input:"), InputMenu(), NULL); + B_TRANSLATE("Audio input:"), InputMenu()); BMenuField* outputMenuField = new BMenuField("outputMenuField", - B_TRANSLATE("Audio output:"), OutputMenu(), NULL); + B_TRANSLATE("Audio output:"), OutputMenu()); BLayoutBuilder::Grid<>(defaultsGridView) .SetInsets(B_USE_DEFAULT_SPACING, 0, B_USE_DEFAULT_SPACING, @@ -372,7 +368,7 @@ AudioSettingsView::_MakeChannelMenu() fChannelMenu = new BPopUpMenu(B_TRANSLATE("")); fChannelMenu->SetLabelFromMarked(true); BMenuField* channelMenuField = new BMenuField("channelMenuField", - B_TRANSLATE("Channel:"), fChannelMenu, NULL); + B_TRANSLATE("Channel:"), fChannelMenu); return channelMenuField; } @@ -493,12 +489,12 @@ VideoSettingsView::VideoSettingsView() BBox* defaultsBox = new BBox("defaults"); defaultsBox->SetLabel(B_TRANSLATE("Defaults")); BGridView* defaultsGridView = new BGridView(); - + BMenuField* inputMenuField = new BMenuField("inputMenuField", - B_TRANSLATE("Video input:"), InputMenu(), NULL); + B_TRANSLATE("Video input:"), InputMenu()); BMenuField* outputMenuField = new BMenuField("outputMenuField", - B_TRANSLATE("Video output:"), OutputMenu(), NULL); + B_TRANSLATE("Video output:"), OutputMenu()); BLayoutBuilder::Grid<>(defaultsGridView) .SetInsets(B_USE_DEFAULT_SPACING, 0, B_USE_DEFAULT_SPACING, diff --git a/src/preferences/mouse/SettingsView.cpp b/src/preferences/mouse/SettingsView.cpp index cd9f82374c..c328d27f69 100644 --- a/src/preferences/mouse/SettingsView.cpp +++ b/src/preferences/mouse/SettingsView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2009 Haiku Inc. All rights reserved. + * Copyright 2003-2011 Haiku Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -9,6 +9,7 @@ * Brecht Machiels (brecht@mos6581.org) */ + #include "SettingsView.h" #include @@ -81,7 +82,7 @@ SettingsView::SettingsView(MouseSettings &settings) new BMessage(kMsgMouseType))); BMenuField *fTypeField = new BMenuField(B_TRANSLATE("Mouse type:"), - fTypeMenu, NULL); + fTypeMenu); fTypeField->SetAlignment(B_ALIGN_RIGHT); // Create the "Double-click speed slider... @@ -136,7 +137,7 @@ SettingsView::SettingsView(MouseSettings &settings) } BMenuField *fFocusField = new BMenuField(B_TRANSLATE("Focus mode:"), - fFocusMenu, NULL); + fFocusMenu); fFocusField->SetAlignment(B_ALIGN_RIGHT); // Add the "Focus follows mouse mode" pop up menu @@ -158,7 +159,7 @@ SettingsView::SettingsView(MouseSettings &settings) } BMenuField *fFocusFollowsMouseField = new BMenuField( - "Focus follows mouse mode:", fFocusFollowsMouseMenu, NULL); + "Focus follows mouse mode:", fFocusFollowsMouseMenu); fFocusFollowsMouseField->SetAlignment(B_ALIGN_RIGHT); // Add the "Click-through" check box diff --git a/src/preferences/screen/ScreenWindow.cpp b/src/preferences/screen/ScreenWindow.cpp index ed0414c905..1a7abcc017 100644 --- a/src/preferences/screen/ScreenWindow.cpp +++ b/src/preferences/screen/ScreenWindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2009, Haiku. + * Copyright 2001-2011, Haiku. * Distributed under the terms of the MIT License. * * Authors: @@ -200,7 +200,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings) fAllWorkspacesItem->SetMarked(true); BMenuField* workspaceMenuField = new BMenuField("WorkspaceMenu", NULL, - popUpMenu, NULL); + popUpMenu); workspaceMenuField->ResizeToPreferred(); // box on the left with workspace count and monitor view @@ -283,7 +283,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings) fMonitorView->SetMaxResolution(maxWidth, maxHeight); fResolutionField = new BMenuField("ResolutionMenu", - B_TRANSLATE("Resolution:"), fResolutionMenu, NULL); + B_TRANSLATE("Resolution:"), fResolutionMenu); fColorsMenu = new BPopUpMenu("colors", true, false); @@ -303,7 +303,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings) } fColorsField = new BMenuField("ColorsMenu", B_TRANSLATE("Colors:"), - fColorsMenu, NULL); + fColorsMenu); fRefreshMenu = new BPopUpMenu("refresh rate", true, true); @@ -349,7 +349,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings) } fRefreshField = new BMenuField("RefreshMenu", B_TRANSLATE("Refresh rate:"), - fRefreshMenu, NULL); + fRefreshMenu); if (_IsVesa()) fRefreshField->Hide(); @@ -381,7 +381,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings) } fCombineField = new BMenuField("CombineMenu", - B_TRANSLATE("Combine displays:"), fCombineMenu, NULL); + B_TRANSLATE("Combine displays:"), fCombineMenu); if (!multiMonSupport) fCombineField->Hide(); @@ -399,7 +399,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings) fSwapDisplaysMenu->AddItem(new BMenuItem(B_TRANSLATE("yes"), message)); fSwapDisplaysField = new BMenuField("SwapMenu", - B_TRANSLATE("Swap displays:"), fSwapDisplaysMenu, NULL); + B_TRANSLATE("Swap displays:"), fSwapDisplaysMenu); if (!multiMonSupport) fSwapDisplaysField->Hide(); @@ -419,7 +419,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings) message)); fUseLaptopPanelField = new BMenuField("UseLaptopPanel", - B_TRANSLATE("Use laptop panel:"), fUseLaptopPanelMenu, NULL); + B_TRANSLATE("Use laptop panel:"), fUseLaptopPanelMenu); if (!useLaptopPanelSupport) fUseLaptopPanelField->Hide(); @@ -442,7 +442,7 @@ ScreenWindow::ScreenWindow(ScreenSettings* settings) } fTVStandardField = new BMenuField("tv standard", - B_TRANSLATE("Video format:"), fTVStandardMenu, NULL); + B_TRANSLATE("Video format:"), fTVStandardMenu); fTVStandardField->SetAlignment(B_ALIGN_RIGHT); if (!tvStandardSupport || i == 0) diff --git a/src/servers/print/ConfigWindow.cpp b/src/servers/print/ConfigWindow.cpp index f51a6cd930..d4befd6c05 100644 --- a/src/servers/print/ConfigWindow.cpp +++ b/src/servers/print/ConfigWindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009, Haiku. All rights reserved. + * Copyright 2002-2011, Haiku. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -153,7 +153,7 @@ ConfigWindow::ConfigWindow(config_setup_kind kind, Printer* defaultPrinter, BPopUpMenu* menu = new BPopUpMenu(B_TRANSLATE("Select a printer")); SetupPrintersMenu(menu); - fPrinters = new BMenuField(B_TRANSLATE("Printer:"), menu, NULL); + fPrinters = new BMenuField(B_TRANSLATE("Printer:"), menu); // page format button fPageSetup = AddPictureButton(panel, dummyRect, "Paper setup",