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