Patch by Humdinger:

Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35049 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2010-01-13 14:33:35 +00:00
parent 2865e5a048
commit 7974d3dcf3
141 changed files with 1328 additions and 1326 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2004-2007, Haiku Inc. All rights reserved. * Copyright 2004-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -10,7 +10,7 @@
#define _GLMOVSTRINGS_H #define _GLMOVSTRINGS_H
#define STR_ABOUT_TEXT "3DMov reloaded.\n\n Demonstrates OpenGL and the Media Kit." #define STR_ABOUT_TEXT "3DMov reloaded.\n\n Demonstrates OpenGL and the Media Kit."
#define STR_OK "Ok" #define STR_OK "OK"
#define STR_MENU "File" //not really related.... "Object" ? #define STR_MENU "File" //not really related.... "Object" ?

View File

@ -174,7 +174,7 @@ AboutApp::AboutApp()
AboutWindow::AboutWindow() AboutWindow::AboutWindow()
: BWindow(BRect(0, 0, 500, 300), "About This System", B_TITLED_WINDOW, : BWindow(BRect(0, 0, 500, 300), "About this system", B_TITLED_WINDOW,
B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE) B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
{ {
SetLayout(new BGroupLayout(B_VERTICAL)); SetLayout(new BGroupLayout(B_VERTICAL));
@ -447,7 +447,7 @@ AboutView::AboutView()
.Add(_CreateLabel("kernellabel", "Kernel:")) .Add(_CreateLabel("kernellabel", "Kernel:"))
.Add(kernelView) .Add(kernelView)
.AddStrut(offset) .AddStrut(offset)
.Add(_CreateLabel("uptimelabel", "Time Running:")) .Add(_CreateLabel("uptimelabel", "Time running:"))
.Add(fUptimeView) .Add(fUptimeView)
.SetInsets(5, 5, 5, 5) .SetInsets(5, 5, 5, 5)
.End() .End()
@ -481,7 +481,7 @@ AboutView::MouseDown(BPoint point)
{ {
BRect r(92, 26, 105, 31); BRect r(92, 26, 105, 31);
if (r.Contains(point)) { if (r.Contains(point)) {
printf("Easter Egg\n"); printf("Easter egg\n");
PickRandomHaiku(); PickRandomHaiku();
} }
@ -728,7 +728,7 @@ AboutView::_CreateCreditsView()
font.SetFace(B_BOLD_FACE | B_ITALIC_FACE); font.SetFace(B_BOLD_FACE | B_ITALIC_FACE);
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Current Maintainers:\n"); fCreditsView->Insert("Current maintainers:\n");
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
@ -772,7 +772,7 @@ AboutView::_CreateCreditsView()
"\n"); "\n");
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Past Maintainers:\n"); fCreditsView->Insert("Past maintainers:\n");
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
@ -799,7 +799,7 @@ AboutView::_CreateCreditsView()
"\n"); "\n");
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Website, Marketing & Documentation:\n"); fCreditsView->Insert("Website, marketing & documentation:\n");
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
@ -930,7 +930,7 @@ AboutView::_CreateCreditsView()
fCreditsView->Insert("\nGerman\n\n"); fCreditsView->Insert("\nGerman\n\n");
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert( fCreditsView->Insert(
"Colin Gunther\n" "Colin Günther\n"
"svend\n" "svend\n"
"leszek\n" "leszek\n"
); );
@ -984,14 +984,14 @@ AboutView::_CreateCreditsView()
); );
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Special Thanks To:\n"); fCreditsView->Insert("Special thanks to:\n");
fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey);
fCreditsView->Insert("Travis Geiselbrecht (and his NewOS kernel)\n"); fCreditsView->Insert("Travis Geiselbrecht (and his NewOS kernel)\n");
fCreditsView->Insert("Michael Phipps (project founder)\n\n"); fCreditsView->Insert("Michael Phipps (project founder)\n\n");
fCreditsView->Insert("The Haiku-Ports Team\n"); fCreditsView->Insert("The Haiku-Ports team\n");
fCreditsView->Insert("The Haikuware Team and their Bounty Program\n"); fCreditsView->Insert("The Haikuware team and their bounty program\n");
fCreditsView->Insert("The BeGeistert Team\n\n"); fCreditsView->Insert("The BeGeistert team\n\n");
fCreditsView->Insert("... and the many community members making " fCreditsView->Insert("... and the many community members making "
"donations!\n\n"); "donations!\n\n");
@ -1085,7 +1085,7 @@ AboutView::_CreateCreditsView()
// Mesa3D (http://www.mesa3d.org) copyrights // Mesa3D (http://www.mesa3d.org) copyrights
_AddPackageCredit(PackageCredit("Mesa") _AddPackageCredit(PackageCredit("Mesa")
.SetCopyright(COPYRIGHT_STRING "1999-2006 Brian Paul. " .SetCopyright(COPYRIGHT_STRING "1999-2006 Brian Paul. "
"Mesa3D project. All rights reserved.") "Mesa3D Project. All rights reserved.")
.SetURL("http://www.mesa3d.org")); .SetURL("http://www.mesa3d.org"));
// TODO: License! // TODO: License!

View File

@ -63,7 +63,7 @@ ActivityMonitor::ShowAbout()
{ {
BAlert *alert = new BAlert("about", "ActivityMonitor\n" BAlert *alert = new BAlert("about", "ActivityMonitor\n"
"\twritten by Axel Dörfler\n" "\twritten by Axel Dörfler\n"
"\tCopyright 2008, Haiku Inc.\n", "Ok"); "\tCopyright 2008, Haiku Inc.\n", "OK");
BTextView *view = alert->TextView(); BTextView *view = alert->TextView();
BFont font; BFont font;

View File

@ -978,7 +978,7 @@ ActivityView::MouseDown(BPoint where)
BPopUpMenu *menu = new BPopUpMenu(B_EMPTY_STRING, false, false); BPopUpMenu *menu = new BPopUpMenu(B_EMPTY_STRING, false, false);
menu->SetFont(be_plain_font); menu->SetFont(be_plain_font);
BMenu* additionalMenu = new BMenu("Additional Items"); BMenu* additionalMenu = new BMenu("Additional items");
additionalMenu->SetFont(be_plain_font); additionalMenu->SetFont(be_plain_font);
SystemInfo info; SystemInfo info;
@ -1005,7 +1005,7 @@ ActivityView::MouseDown(BPoint where)
menu->AddItem(new BMenuItem(additionalMenu)); menu->AddItem(new BMenuItem(additionalMenu));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(fShowLegend ? "Hide Legend" : "Show Legend", menu->AddItem(new BMenuItem(fShowLegend ? "Hide legend" : "Show legend",
new BMessage(kMsgToggleLegend))); new BMessage(kMsgToggleLegend)));
menu->SetTargetForItems(this); menu->SetTargetForItems(this);
@ -1016,7 +1016,7 @@ ActivityView::MouseDown(BPoint where)
menu->AddSeparatorItem(); menu->AddSeparatorItem();
BMessage* message = new BMessage(kMsgRemoveView); BMessage* message = new BMessage(kMsgRemoveView);
message->AddPointer("view", this); message->AddPointer("view", this);
menu->AddItem(item = new BMenuItem("Remove View", message)); menu->AddItem(item = new BMenuItem("Remove graph", message));
item->SetTarget(window); item->SetTarget(window);
} }

View File

@ -116,7 +116,7 @@ ActivityWindow::ActivityWindow()
BMenu* menu = new BMenu("File"); BMenu* menu = new BMenu("File");
BMenuItem* item; BMenuItem* item;
menu->AddItem(new BMenuItem("Add View", new BMessage(kMsgAddView))); menu->AddItem(new BMenuItem("Add graph", new BMessage(kMsgAddView)));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem("About ActivityMonitor" B_UTF8_ELLIPSIS, menu->AddItem(item = new BMenuItem("About ActivityMonitor" B_UTF8_ELLIPSIS,

View File

@ -329,7 +329,7 @@ UsedMemoryDataSource::NextValue(SystemInfo& info)
const char* const char*
UsedMemoryDataSource::Label() const UsedMemoryDataSource::Label() const
{ {
return "Used Memory"; return "Used memory";
} }
@ -378,7 +378,7 @@ CachedMemoryDataSource::NextValue(SystemInfo& info)
const char* const char*
CachedMemoryDataSource::Label() const CachedMemoryDataSource::Label() const
{ {
return "Cached Memory"; return "Cached memory";
} }
@ -430,7 +430,7 @@ SwapSpaceDataSource::NextValue(SystemInfo& info)
const char* const char*
SwapSpaceDataSource::Label() const SwapSpaceDataSource::Label() const
{ {
return "Swap Space"; return "Swap space";
} }
@ -485,14 +485,14 @@ BlockCacheDataSource::NextValue(SystemInfo& info)
const char* const char*
BlockCacheDataSource::Label() const BlockCacheDataSource::Label() const
{ {
return "Block Cache Memory"; return "Block cache memory";
} }
const char* const char*
BlockCacheDataSource::ShortLabel() const BlockCacheDataSource::ShortLabel() const
{ {
return "Block Cache"; return "Block cache";
} }
@ -727,7 +727,7 @@ RunningAppsDataSource::NextValue(SystemInfo& info)
const char* const char*
RunningAppsDataSource::Label() const RunningAppsDataSource::Label() const
{ {
return "Running Applications"; return "Running applications";
} }
@ -839,7 +839,7 @@ CPUUsageDataSource::ShortLabel() const
const char* const char*
CPUUsageDataSource::Name() const CPUUsageDataSource::Name() const
{ {
return "CPU Usage"; return "CPU usage";
} }
@ -873,7 +873,7 @@ CPUUsageDataSource::_SetCPU(int32 cpu)
fLabel << " " << cpu; fLabel << " " << cpu;
fShortLabel = fLabel; fShortLabel = fLabel;
fLabel << " Usage"; fLabel << " usage";
const rgb_color kColors[] = { const rgb_color kColors[] = {
// TODO: find some better defaults... // TODO: find some better defaults...
@ -963,7 +963,7 @@ CPUCombinedUsageDataSource::NextValue(SystemInfo& info)
const char* const char*
CPUCombinedUsageDataSource::Label() const CPUCombinedUsageDataSource::Label() const
{ {
return "CPU Usage"; return "CPU usage";
} }
@ -977,7 +977,7 @@ CPUCombinedUsageDataSource::ShortLabel() const
const char* const char*
CPUCombinedUsageDataSource::Name() const CPUCombinedUsageDataSource::Name() const
{ {
return "CPU Usage (combined)"; return "CPU usage (combined)";
} }
@ -1061,21 +1061,21 @@ PageFaultsDataSource::NextValue(SystemInfo& info)
const char* const char*
PageFaultsDataSource::Label() const PageFaultsDataSource::Label() const
{ {
return "Page Faults"; return "Page faults";
} }
const char* const char*
PageFaultsDataSource::ShortLabel() const PageFaultsDataSource::ShortLabel() const
{ {
return "P-Faults"; return "P-faults";
} }
const char* const char*
PageFaultsDataSource::Name() const PageFaultsDataSource::Name() const
{ {
return "Page Faults"; return "Page faults";
} }
@ -1176,7 +1176,7 @@ NetworkUsageDataSource::ShortLabel() const
const char* const char*
NetworkUsageDataSource::Name() const NetworkUsageDataSource::Name() const
{ {
return fIn ? "Network Receive" : "Network Send"; return fIn ? "Network receive" : "Network send";
} }
@ -1246,7 +1246,7 @@ ClipboardSizeDataSource::NextValue(SystemInfo& info)
const char* const char*
ClipboardSizeDataSource::Label() const ClipboardSizeDataSource::Label() const
{ {
return fText ? "Text Clipboard Size" : "Raw Clipboard Size"; return fText ? "Text clipboard size" : "Raw clipboard size";
} }
@ -1300,7 +1300,7 @@ MediaNodesDataSource::NextValue(SystemInfo& info)
const char* const char*
MediaNodesDataSource::Label() const MediaNodesDataSource::Label() const
{ {
return "Media Nodes"; return "Media nodes";
} }

View File

@ -70,9 +70,9 @@ private:
bigtime_t interval = kUpdateIntervals[level]; bigtime_t interval = kUpdateIntervals[level];
if ((interval % 1000) == 0) if ((interval % 1000) == 0)
snprintf(fText, sizeof(fText), "%lld secs", interval / 1000); snprintf(fText, sizeof(fText), "%lld sec.", interval / 1000);
else else
snprintf(fText, sizeof(fText), "%lld msecs", interval); snprintf(fText, sizeof(fText), "%lld ms", interval);
return fText; return fText;
} }

View File

@ -67,7 +67,7 @@ void AutoRaiseApp::ReadyToRun()
if (!_directToDeskbar) if (!_directToDeskbar)
{ {
printf("\nUsage: " APP_NAME " [options]\n\t--deskbar\twill not open window, will just put " APP_NAME " into tray\n\t--persist will put " APP_NAME " into tray such that it remains between bootings\n"); printf("\nUsage: " APP_NAME " [options]\n\t--deskbar\twill not open window, will just put " APP_NAME " into tray\n\t--persist will put " APP_NAME " into tray such that it remains between bootings\n");
BAlert *alert = new BAlert("usage box", APP_NAME ", (c) 2002, mmu_man\nUsage: " APP_NAME " [options]\n\t--deskbar\twill not open window, will just put " APP_NAME " into tray\n\t--persist will put "APP_NAME" into tray such that it remains between bootings\n", "Ok", NULL, NULL, BAlert *alert = new BAlert("usage box", APP_NAME ", (c) 2002, mmu_man\nUsage: " APP_NAME " [options]\n\t--deskbar\twill not open window, will just put " APP_NAME " into tray\n\t--persist will put "APP_NAME" into tray such that it remains between bootings\n", "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT); B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT);
alert->SetShortcut(0, B_ENTER); alert->SetShortcut(0, B_ENTER);
alert->Go(); alert->Go();

View File

@ -22,11 +22,11 @@ extern "C" _EXPORT BView *instantiate_deskbar_item(void)
long removeFromDeskbar(void *) long removeFromDeskbar(void *)
{ {
BDeskbar db; BDeskbar db;
if (db.RemoveItem(APP_NAME) != B_OK) if (db.RemoveItem(APP_NAME) != B_OK)
printf("Unable to remove AutoRaise from BDeskbar\n"); printf("Unable to remove AutoRaise from BDeskbar\n");
return 0; return 0;
} }
@ -39,9 +39,9 @@ ConfigMenu::ConfigMenu(TrayView *tv, bool useMag)
BMenuItem *tmpi; BMenuItem *tmpi;
BMessage *msg; BMessage *msg;
bigtime_t delay; bigtime_t delay;
AutoRaiseSettings *s = tv->Settings(); AutoRaiseSettings *s = tv->Settings();
SetFont(be_plain_font); SetFont(be_plain_font);
@ -165,15 +165,16 @@ ConfigMenu::ConfigMenu(TrayView *tv, bool useMag)
tmpm->SetTargetForItems(tv); tmpm->SetTargetForItems(tv);
BMenuItem *delaym = new BMenuItem(tmpm); BMenuItem *delaym = new BMenuItem(tmpm);
delaym->SetEnabled(s->Active()); delaym->SetEnabled(s->Active());
AddItem(delaym); AddItem(delaym);
AddSeparatorItem(); AddSeparatorItem();
// AddItem(new BMenuItem("Settings...", new BMessage(OPEN_SETTINGS))); // AddItem(new BMenuItem("Settings...", new BMessage(OPEN_SETTINGS)));
AddItem(new BMenuItem("About "APP_NAME, new BMessage(B_ABOUT_REQUESTED))); AddItem(new BMenuItem("About "APP_NAME B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED)));
AddItem(new BMenuItem("Remove from tray", new BMessage(REMOVE_FROM_TRAY))); AddItem(new BMenuItem("Remove from tray", new BMessage(REMOVE_FROM_TRAY)));
SetTargetForItems(tv); SetTargetForItems(tv);
SetAsyncAutoDestruct(true); SetAsyncAutoDestruct(true);
} }
@ -202,19 +203,19 @@ void TrayView::_init()
{ {
thread_info ti; thread_info ti;
status_t err; status_t err;
watching = false; watching = false;
_settings = new AutoRaiseSettings; _settings = new AutoRaiseSettings;
_appPath = _settings->AppPath(); _appPath = _settings->AppPath();
raise_delay = _settings->Delay(); raise_delay = _settings->Delay();
current_window = 0; current_window = 0;
polling_delay = 100000; polling_delay = 100000;
fPollerSem = create_sem(0, "AutoRaise poller sync"); fPollerSem = create_sem(0, "AutoRaise poller sync");
last_raiser_thread = 0; last_raiser_thread = 0;
fNormalMM = mouse_mode(); fNormalMM = mouse_mode();
_activeIcon = NULL; _activeIcon = NULL;
_inactiveIcon = NULL; _inactiveIcon = NULL;
@ -222,7 +223,8 @@ void TrayView::_init()
fDeskbarTeam = ti.team; fDeskbarTeam = ti.team;
#ifndef USE_DANO_HACK #ifndef USE_DANO_HACK
resume_thread(poller_thread = spawn_thread(poller, "AutoRaise desktop poller", B_NORMAL_PRIORITY, (void *)this)); resume_thread(poller_thread = spawn_thread(poller, "AutoRaise desktop "
"poller", B_NORMAL_PRIORITY, (void *)this));
#endif #endif
//determine paths to icon files based on app path in settings file //determine paths to icon files based on app path in settings file
@ -230,7 +232,7 @@ void TrayView::_init()
BResources res; BResources res;
BFile theapp(&_appPath, B_READ_ONLY); BFile theapp(&_appPath, B_READ_ONLY);
if ((err = res.SetTo(&theapp)) != B_OK) { if ((err = res.SetTo(&theapp)) != B_OK) {
printf("Unable to find the app to get the resources !!!\n"); printf("Unable to find the app to get the resources !!!\n");
// removeFromDeskbar(NULL); // removeFromDeskbar(NULL);
// delete _settings; // delete _settings;
@ -241,30 +243,32 @@ void TrayView::_init()
char *p; char *p;
p = (char *)res.LoadResource('MICN', ACTIVE_ICON, &bmsz); p = (char *)res.LoadResource('MICN', ACTIVE_ICON, &bmsz);
_activeIcon = new BBitmap(BRect(0, 0, B_MINI_ICON-1, B_MINI_ICON -1), B_CMAP8); _activeIcon = new BBitmap(BRect(0, 0, B_MINI_ICON-1, B_MINI_ICON -1),
B_CMAP8);
if (!p) if (!p)
puts("ERROR loading active icon"); puts("ERROR loading active icon");
else else
_activeIcon->SetBits(p, B_MINI_ICON*B_MINI_ICON, 0, B_CMAP8); _activeIcon->SetBits(p, B_MINI_ICON*B_MINI_ICON, 0, B_CMAP8);
p = (char *)res.LoadResource('MICN', INACTIVE_ICON, &bmsz); p = (char *)res.LoadResource('MICN', INACTIVE_ICON, &bmsz);
_inactiveIcon = new BBitmap(BRect(0, 0, B_MINI_ICON-1, B_MINI_ICON -1), B_CMAP8); _inactiveIcon = new BBitmap(BRect(0, 0, B_MINI_ICON-1, B_MINI_ICON -1),
B_CMAP8);
if (!p) if (!p)
puts("ERROR loading inactive icon"); puts("ERROR loading inactive icon");
else else
_inactiveIcon->SetBits(p, B_MINI_ICON*B_MINI_ICON, 0, B_CMAP8); _inactiveIcon->SetBits(p, B_MINI_ICON*B_MINI_ICON, 0, B_CMAP8);
SetDrawingMode(B_OP_ALPHA); SetDrawingMode(B_OP_ALPHA);
SetFlags(Flags() | B_WILL_DRAW); SetFlags(Flags() | B_WILL_DRAW);
// begin watching if we want // begin watching if we want
// (doesn't work here, better do it in AttachedToWindow()) // (doesn't work here, better do it in AttachedToWindow())
} }
TrayView::~TrayView(){ TrayView::~TrayView(){
status_t ret; status_t ret;
if (watching) { if (watching) {
#ifdef USE_DANO_HACK #ifdef USE_DANO_HACK
be_roster->StopWatching(this); be_roster->StopWatching(this);
@ -281,7 +285,7 @@ TrayView::~TrayView(){
if (_activeIcon) delete _activeIcon; if (_activeIcon) delete _activeIcon;
if (_inactiveIcon) delete _inactiveIcon; if (_inactiveIcon) delete _inactiveIcon;
if (_settings) delete _settings; if (_settings) delete _settings;
return; return;
} }
@ -304,7 +308,7 @@ TrayView *TrayView::Instantiate(BMessage *data) {
{ {
return NULL; return NULL;
} }
return (new TrayView(data)); return (new TrayView(data));
} }
@ -325,11 +329,11 @@ void TrayView::AttachedToWindow() {
void TrayView::Draw(BRect updaterect) { void TrayView::Draw(BRect updaterect) {
BRect bnds(Bounds()); BRect bnds(Bounds());
if (Parent()) SetHighColor(Parent()->ViewColor()); if (Parent()) SetHighColor(Parent()->ViewColor());
else SetHighColor(189, 186, 189, 255); else SetHighColor(189, 186, 189, 255);
FillRect(bnds); FillRect(bnds);
if (_settings->Active()) if (_settings->Active())
{ {
if (_activeIcon) DrawBitmap(_activeIcon); if (_activeIcon) DrawBitmap(_activeIcon);
@ -344,43 +348,43 @@ void TrayView::MouseDown(BPoint where) {
BWindow *window = Window(); /*To handle the MouseDown message*/ BWindow *window = Window(); /*To handle the MouseDown message*/
if (!window) /*Check for proper instantiation*/ if (!window) /*Check for proper instantiation*/
return; return;
BMessage *mouseMsg = window->CurrentMessage(); BMessage *mouseMsg = window->CurrentMessage();
if (!mouseMsg) /*Check for existence*/ if (!mouseMsg) /*Check for existence*/
return; return;
if (mouseMsg->what == B_MOUSE_DOWN) { if (mouseMsg->what == B_MOUSE_DOWN) {
/*Variables for storing the button pressed / modifying key*/ /*Variables for storing the button pressed / modifying key*/
uint32 buttons = 0; uint32 buttons = 0;
uint32 modifiers = 0; uint32 modifiers = 0;
/*Get the button pressed*/ /*Get the button pressed*/
mouseMsg->FindInt32("buttons", (int32 *) &buttons); mouseMsg->FindInt32("buttons", (int32 *) &buttons);
/*Get modifier key (if any)*/ /*Get modifier key (if any)*/
mouseMsg->FindInt32("modifiers", (int32 *) &modifiers); mouseMsg->FindInt32("modifiers", (int32 *) &modifiers);
/*Now perform action*/ /*Now perform action*/
switch(buttons) { switch(buttons) {
case B_PRIMARY_MOUSE_BUTTON: case B_PRIMARY_MOUSE_BUTTON:
{ {
SetActive(!_settings->Active()); SetActive(!_settings->Active());
break; break;
} }
case B_SECONDARY_MOUSE_BUTTON: case B_SECONDARY_MOUSE_BUTTON:
{ {
ConvertToScreen(&where); ConvertToScreen(&where);
//menu will delete itself (see constructor of ConfigMenu), //menu will delete itself (see constructor of ConfigMenu),
//so all we're concerned about is calling Go() asynchronously //so all we're concerned about is calling Go() asynchronously
ConfigMenu *menu = new ConfigMenu(this, false); ConfigMenu *menu = new ConfigMenu(this, false);
menu->Go(where, true, true, ConvertToScreen(Bounds()), true); menu->Go(where, true, true, ConvertToScreen(Bounds()), true);
break; break;
} }
} }
} }
} }
int32 fronter(void *arg) int32 fronter(void *arg)
@ -449,13 +453,13 @@ int32 poller(void *arg)
if ((wi->window_left > wi->window_right) || (wi->window_top > wi->window_bottom)) if ((wi->window_left > wi->window_right) || (wi->window_top > wi->window_bottom))
goto zzz; // invalid window ? goto zzz; // invalid window ?
/* /*
printf("if (!%s && (%li, %li)isin(%li)(%li, %li, %li, %li) && (%li != %li) ", wi->is_mini?"true":"false", printf("if (!%s && (%li, %li)isin(%li)(%li, %li, %li, %li) && (%li != %li) ", wi->is_mini?"true":"false",
(long)mouse.x, (long)mouse.y, i, wi->window_left, wi->window_right, wi->window_top, wi->window_bottom, wi->id, tok); (long)mouse.x, (long)mouse.y, i, wi->window_left, wi->window_right, wi->window_top, wi->window_bottom, wi->id, tok);
*/ */
if ((!wi->is_mini) if ((!wi->is_mini)
&& (((long)mouse.x) > wi->window_left) && (((long)mouse.x) < wi->window_right) && (((long)mouse.x) > wi->window_left) && (((long)mouse.x) < wi->window_right)
&& (((long)mouse.y) > wi->window_top) && (((long)mouse.y) < wi->window_bottom)) { && (((long)mouse.y) > wi->window_top) && (((long)mouse.y) < wi->window_bottom)) {
//((tv->_settings->Mode() != Mode_DeskbarOver) || (wi->team == tv->fDeskbarTeam)) //((tv->_settings->Mode() != Mode_DeskbarOver) || (wi->team == tv->fDeskbarTeam))
@ -502,9 +506,9 @@ void TrayView::MessageReceived(BMessage* message)
bool wasactive; bool wasactive;
BPoint mouse; BPoint mouse;
uint32 buttons; uint32 buttons;
switch(message->what) switch(message->what)
{ {
case MSG_TOOGLE_ACTIVE: case MSG_TOOGLE_ACTIVE:
SetActive(!_settings->Active()); SetActive(!_settings->Active());
break; break;
@ -539,17 +543,17 @@ void TrayView::MessageReceived(BMessage* message)
{ {
thread_id tid = spawn_thread(removeFromDeskbar, "RemoveFromDeskbar", B_NORMAL_PRIORITY, NULL); thread_id tid = spawn_thread(removeFromDeskbar, "RemoveFromDeskbar", B_NORMAL_PRIORITY, NULL);
if (tid) resume_thread(tid); if (tid) resume_thread(tid);
break; break;
} }
case B_ABOUT_REQUESTED: case B_ABOUT_REQUESTED:
alert = new BAlert("about box", "AutoRaise, (c) 2002, mmu_man\nEnjoy :-)", "Ok", NULL, NULL, alert = new BAlert("about box", "AutoRaise, (c) 2002, mmu_man\nEnjoy :-)", "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT); B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_INFO_ALERT);
alert->SetShortcut(0, B_ENTER); alert->SetShortcut(0, B_ENTER);
alert->Go(NULL); // use asynchronous version alert->Go(NULL); // use asynchronous version
break; break;
case OPEN_SETTINGS: case OPEN_SETTINGS:
break; break;
#ifdef USE_DANO_HACK #ifdef USE_DANO_HACK
case B_SOME_WINDOW_ACTIVATED: case B_SOME_WINDOW_ACTIVATED:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2008, Haiku, Inc. All rights reserved. * Copyright 2008-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -46,7 +46,7 @@ BootManager::AboutRequested()
{ {
BAlert *alert = new BAlert("about", "Haiku Boot Manager\n\n" BAlert *alert = new BAlert("about", "Haiku Boot Manager\n\n"
"\twritten by Michael Pfeiffer\n" "\twritten by Michael Pfeiffer\n"
"\tCopyright 2008, Haiku Inc.\n", "Ok"); "\tCopyright 2008, Haiku Inc.\n", "OK");
BTextView *view = alert->TextView(); BTextView *view = alert->TextView();
BFont font; BFont font;

View File

@ -1,7 +1,7 @@
/* /*
* Copyright 2008, Haiku, Inc. All rights reserved. * Copyright 20082009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
* Michael Pfeiffer <laplace@users.sourceforge.net> * Michael Pfeiffer <laplace@users.sourceforge.net>
*/ */
@ -39,14 +39,14 @@ BootManagerController::BootManagerController()
#if USE_TEST_BOOT_DRIVE #if USE_TEST_BOOT_DRIVE
fBootDrive = new TestBootDrive(); fBootDrive = new TestBootDrive();
#else #else
fBootDrive = new LegacyBootDrive(); fBootDrive = new LegacyBootDrive();
#endif #endif
// set defaults // set defaults
fSettings.AddBool("install", true); fSettings.AddBool("install", true);
fSettings.AddInt32("defaultPartition", 0); fSettings.AddInt32("defaultPartition", 0);
fSettings.AddInt32("timeout", -1); fSettings.AddInt32("timeout", -1);
BPath path; BPath path;
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, true) == B_OK) { if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, true) == B_OK) {
path.Append("bootman/MBR"); path.Append("bootman/MBR");
@ -56,11 +56,11 @@ BootManagerController::BootManagerController()
if (path.GetParent(&parent) == B_OK) { if (path.GetParent(&parent) == B_OK) {
BDirectory directory; BDirectory directory;
directory.CreateDirectory(parent.Path(), NULL); directory.CreateDirectory(parent.Path(), NULL);
} }
} else { } else {
fSettings.AddString("file", ""); fSettings.AddString("file", "");
} }
fReadPartitionsStatus = fBootDrive->ReadPartitions(&fSettings); fReadPartitionsStatus = fBootDrive->ReadPartitions(&fSettings);
} }
@ -100,23 +100,23 @@ BootManagerController::NextState(int32 state)
case kStateErrorEntry: case kStateErrorEntry:
be_app->PostMessage(B_QUIT_REQUESTED); be_app->PostMessage(B_QUIT_REQUESTED);
break; break;
case kStateSaveMBR: case kStateSaveMBR:
if (_SaveMBR()) if (_SaveMBR())
return kStateMBRSaved; return kStateMBRSaved;
break; break;
case kStateMBRSaved: case kStateMBRSaved:
return kStatePartitions; return kStatePartitions;
case kStatePartitions: case kStatePartitions:
if (_HasSelectedPartitions()) if (_HasSelectedPartitions())
return kStateDefaultPartitions; return kStateDefaultPartitions;
break; break;
case kStateDefaultPartitions: case kStateDefaultPartitions:
return kStateInstallSummary; return kStateInstallSummary;
case kStateInstallSummary: case kStateInstallSummary:
if (_WriteBootMenu()) if (_WriteBootMenu())
return kStateInstalled; return kStateInstalled;
@ -125,7 +125,7 @@ BootManagerController::NextState(int32 state)
case kStateInstalled: case kStateInstalled:
be_app->PostMessage(B_QUIT_REQUESTED); be_app->PostMessage(B_QUIT_REQUESTED);
break; break;
case kStateUninstall: case kStateUninstall:
if (_RestoreMBR()) if (_RestoreMBR())
return kStateUninstalled; return kStateUninstalled;
@ -134,7 +134,7 @@ BootManagerController::NextState(int32 state)
case kStateUninstalled: case kStateUninstalled:
be_app->PostMessage(B_QUIT_REQUESTED); be_app->PostMessage(B_QUIT_REQUESTED);
break; break;
} }
// cannot leave the current state/page // cannot leave the current state/page
return -1; return -1;
} }
@ -147,13 +147,13 @@ BootManagerController::_HasSelectedPartitions()
for (int32 i = 0; fSettings.FindMessage("partition", i, &message) == B_OK; i ++) { for (int32 i = 0; fSettings.FindMessage("partition", i, &message) == B_OK; i ++) {
bool show; bool show;
if (message.FindBool("show", &show) == B_OK && show) if (message.FindBool("show", &show) == B_OK && show)
return true; return true;
} }
BAlert* alert = new BAlert("info", "At least one partition must be selected!", BAlert* alert = new BAlert("info", "At least one partition must be "
"OK"); "selected!", "OK");
alert->Go(); alert->Go();
return false; return false;
} }
@ -162,12 +162,12 @@ bool
BootManagerController::_WriteBootMenu() BootManagerController::_WriteBootMenu()
{ {
BAlert* alert = new BAlert("confirm", "About to write the boot menu " BAlert* alert = new BAlert("confirm", "About to write the boot menu "
"to disk. Are you sure you want to continue?", "Write Boot Menu", "Back", "to disk. Are you sure you want to continue?", "Write boot menu",
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); "Back", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
if (alert->Go() == 1) if (alert->Go() == 1)
return false; return false;
fWriteBootMenuStatus = fBootDrive->WriteBootMenu(&fSettings); fWriteBootMenuStatus = fBootDrive->WriteBootMenu(&fSettings);
return true; return true;
} }
@ -179,7 +179,7 @@ BootManagerController::_SaveMBR()
BString path; BString path;
fSettings.FindString("file", &path); fSettings.FindString("file", &path);
BFile file(path.String(), B_READ_WRITE | B_CREATE_FILE | B_ERASE_FILE); BFile file(path.String(), B_READ_WRITE | B_CREATE_FILE | B_ERASE_FILE);
fSaveMBRStatus = fBootDrive->SaveMasterBootRecord(&fSettings, &file); fSaveMBRStatus = fBootDrive->SaveMasterBootRecord(&fSettings, &file);
return true; return true;
} }
@ -191,19 +191,19 @@ BootManagerController::_RestoreMBR()
BString path; BString path;
fSettings.FindString("disk", &disk); fSettings.FindString("disk", &disk);
fSettings.FindString("file", &path); fSettings.FindString("file", &path);
BString message; BString message;
message << "About to restore the Master Boot Record (MBR) of " message << "About to restore the Master Boot Record (MBR) of "
<< disk << " from " << path << ". " << disk << " from " << path << ". "
"Do you wish to continue?"; "Do you wish to continue?";
BAlert* alert = new BAlert("confirm", message.String(), BAlert* alert = new BAlert("confirm", message.String(),
"Restore MBR", "Back", "Restore MBR", "Back",
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
if (alert->Go() == 1) if (alert->Go() == 1)
return false; return false;
BFile file(path.String(), B_READ_ONLY); BFile file(path.String(), B_READ_ONLY);
fRestoreMBRStatus = fBootDrive->RestoreMasterBootRecord(&fSettings, &file); fRestoreMBRStatus = fBootDrive->RestoreMasterBootRecord(&fSettings, &file);
return true; return true;
} }
@ -213,7 +213,7 @@ BootManagerController::CreatePage(int32 state, WizardView* wizard)
{ {
WizardPageView* page = NULL; WizardPageView* page = NULL;
BRect frame = wizard->PageFrame(); BRect frame = wizard->PageFrame();
switch (state) { switch (state) {
case kStateEntry: case kStateEntry:
page = new EntryPage(&fSettings, frame, "entry"); page = new EntryPage(&fSettings, frame, "entry");
@ -257,7 +257,7 @@ BootManagerController::CreatePage(int32 state, WizardView* wizard)
wizard->SetNextButtonLabel("Done"); wizard->SetNextButtonLabel("Done");
break; break;
} }
return page; return page;
} }
@ -268,16 +268,16 @@ BootManagerController::_CreateErrorEntryPage(BRect frame)
BString description; BString description;
if (fReadPartitionsStatus == kErrorBootSectorTooSmall) if (fReadPartitionsStatus == kErrorBootSectorTooSmall)
description << description <<
"Partition Table Not Compatible\n\n" "Partition table not compatible\n\n"
"The partition table of the first hard disk is not compatible " "The partition table of the first hard disk is not compatible "
"with Boot Manager.\n" "with Boot Manager.\n"
"Boot Manager needs 2 KB available space before the first partition."; "Boot Manager needs 2 KB available space before the first partition.";
else else
description << description <<
"Error Reading Partition Table\n\n" "Error reading partition table\n\n"
"Boot Manager is unable to read the partition table!"; "Boot Manager is unable to read the partition table!";
return new DescriptionPage(frame, "errorEntry", description.String(), true); return new DescriptionPage(frame, "errorEntry", description.String(), true);
} }
@ -288,8 +288,8 @@ BootManagerController::_CreateSaveMBRPage(BRect frame)
BString description; BString description;
BString disk; BString disk;
fSettings.FindString("disk", &disk); fSettings.FindString("disk", &disk);
description << description <<
"Backup Master Boot Record\n\n" "Backup Master Boot Record\n\n"
"The Master Boot Record (MBR) of the boot device:\n" "The Master Boot Record (MBR) of the boot device:\n"
"\t" << disk << "\n" "\t" << disk << "\n"
@ -297,9 +297,9 @@ BootManagerController::_CreateSaveMBRPage(BRect frame)
"save the MBR into.\n\n" "save the MBR into.\n\n"
"If something goes wrong with the installation or if " "If something goes wrong with the installation or if "
"you later wish to remove the boot menu, simply run the " "you later wish to remove the boot menu, simply run the "
"bootman program and choose the 'Uninstall' option."; "bootman program and choose the 'Uninstall' option.";
return new FileSelectionPage(&fSettings, frame, "saveMBR", description.String(), return new FileSelectionPage(&fSettings, frame, "saveMBR", description.String(),
B_SAVE_PANEL); B_SAVE_PANEL);
} }
@ -310,19 +310,19 @@ BootManagerController::_CreateMBRSavedPage(BRect frame)
BString description; BString description;
BString file; BString file;
fSettings.FindString("file", &file); fSettings.FindString("file", &file);
if (fSaveMBRStatus == B_OK) { if (fSaveMBRStatus == B_OK) {
description << description <<
"Old Master Boot Record Saved\n\n" "Old Master Boot Record saved\n\n"
"The old Master Boot Record was successfully save to " "The old Master Boot Record was successfully save to "
<< file << ".\n"; << file << ".\n";
} else { } else {
description << description <<
"Old Master Boot Record Saved Failure\n\n" "Old Master Boot Record Saved failure\n\n"
"The old Master Boot Record could not be saved to " "The old Master Boot Record could not be saved to "
<< file << ".\n"; << file << ".\n";
} }
return new DescriptionPage(frame, "summary", description.String(), true); return new DescriptionPage(frame, "summary", description.String(), true);
} }
@ -333,8 +333,8 @@ BootManagerController::_CreateInstallSummaryPage(BRect frame)
BString description; BString description;
BString disk; BString disk;
fSettings.FindString("disk", &disk); fSettings.FindString("disk", &disk);
description << description <<
"Summary\n\n" "Summary\n\n"
"About to write the following boot menu to the boot disk " "About to write the following boot menu to the boot disk "
"(" << disk << "). Please verify the information below " "(" << disk << "). Please verify the information below "
@ -342,18 +342,18 @@ BootManagerController::_CreateInstallSummaryPage(BRect frame)
BMessage message; BMessage message;
for (int32 i = 0; fSettings.FindMessage("partition", i, &message) == B_OK; i ++) { for (int32 i = 0; fSettings.FindMessage("partition", i, &message) == B_OK; i ++) {
bool show; bool show;
if (message.FindBool("show", &show) != B_OK || !show) if (message.FindBool("show", &show) != B_OK || !show)
continue; continue;
BString name; BString name;
BString path; BString path;
message.FindString("name", &name); message.FindString("name", &name);
message.FindString("path", &path); message.FindString("path", &path);
description << name << "\t(" << path << ")\n"; description << name << "\t(" << path << ")\n";
} }
return new DescriptionPage(frame, "summary", description.String(), true); return new DescriptionPage(frame, "summary", description.String(), true);
} }
@ -362,17 +362,17 @@ WizardPageView*
BootManagerController::_CreateInstalledPage(BRect frame) BootManagerController::_CreateInstalledPage(BRect frame)
{ {
const char* description; const char* description;
if (fWriteBootMenuStatus == B_OK) { if (fWriteBootMenuStatus == B_OK) {
description = "Installation Boot Menu Completed\n\n" description = "Installation of boot menu completed\n\n"
"The boot manager has been successfully installed " "The boot manager has been successfully installed "
"on your system."; "on your system.";
} else { } else {
description = "Installation Boot Menu Failed\n\n" description = "Installation of boot menu failed\n\n"
"An error occured writing the boot menu. The Master Boot Record " "An error occured writing the boot menu. The Master Boot Record "
"might be destroyed, you should restore the MBR now!"; "might be destroyed, you should restore the MBR now!";
} }
return new DescriptionPage(frame, "done", description, true); return new DescriptionPage(frame, "done", description, true);
} }
@ -381,19 +381,19 @@ WizardPageView*
BootManagerController::_CreateUninstallPage(BRect frame) BootManagerController::_CreateUninstallPage(BRect frame)
{ {
BString description; BString description;
description << description <<
"Uninstall Boot Manager\n\n" "Uninstall boot manager\n\n"
"Please locate the Master Boot Record (MBR) save file to " "Please locate the Master Boot Record (MBR) save file to "
"restore from. This is the file that was created when the " "restore from. This is the file that was created when the "
"boot manager was first installed."; "boot manager was first installed.";
return new FileSelectionPage(&fSettings, frame, "restoreMBR", description.String(), return new FileSelectionPage(&fSettings, frame, "restoreMBR", description.String(),
B_OPEN_PANEL); B_OPEN_PANEL);
} }
WizardPageView* WizardPageView*
BootManagerController::_CreateUninstalledPage(BRect frame) BootManagerController::_CreateUninstalledPage(BRect frame)
{ {
BString description; BString description;
@ -401,18 +401,18 @@ BootManagerController::_CreateUninstalledPage(BRect frame)
BString file; BString file;
fSettings.FindString("disk", &disk); fSettings.FindString("disk", &disk);
fSettings.FindString("file", &file); fSettings.FindString("file", &file);
if (fRestoreMBRStatus == B_OK) { if (fRestoreMBRStatus == B_OK) {
description << description <<
"Uninstallation Boot Menu Completed\n\n" "Uninstallation of boot menu completed\n\n"
"The Master Boot Record of the boot device " "The Master Boot Record of the boot device "
"(" << disk << ") has been successfully restored from " "(" << disk << ") has been successfully restored from "
<< file << "."; << file << ".";
} else { } else {
description << description <<
"Uninstallation Boot Menu Failed\n\n" "Uninstallation of boot menu failed\n\n"
"The Master Boot Record could not be restored!"; "The Master Boot Record could not be restored!";
} }
return new DescriptionPage(frame, "summary", description.String(), true); return new DescriptionPage(frame, "summary", description.String(), true);
} }

View File

@ -1,7 +1,7 @@
/* /*
* Copyright 2008, Haiku, Inc. All rights reserved. * Copyright 2008-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
* Michael Pfeiffer <laplace@users.sourceforge.net> * Michael Pfeiffer <laplace@users.sourceforge.net>
*/ */
@ -17,7 +17,7 @@
EntryPage::EntryPage(BMessage* settings, BRect frame, const char* name) EntryPage::EntryPage(BMessage* settings, BRect frame, const char* name)
: WizardPageView(settings, frame, name, B_FOLLOW_ALL, : WizardPageView(settings, frame, name, B_FOLLOW_ALL,
B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE) B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE)
{ {
_BuildUI(); _BuildUI();
@ -49,8 +49,8 @@ void
EntryPage::_BuildUI() EntryPage::_BuildUI()
{ {
BRect rect(Bounds()); BRect rect(Bounds());
fInstall = new BRadioButton(rect, "install", fInstall = new BRadioButton(rect, "install",
"", "",
new BMessage('null')); new BMessage('null'));
AddChild(fInstall); AddChild(fInstall);
@ -58,24 +58,24 @@ EntryPage::_BuildUI()
BRect textRect(rect); BRect textRect(rect);
textRect.left = fInstall->Frame().right + kTextDistance; textRect.left = fInstall->Frame().right + kTextDistance;
fInstallText = CreateDescription(textRect, "installText", fInstallText = CreateDescription(textRect, "installText",
"Install Boot Menu\n\n" "Install boot menu\n\n"
"Choose this option to install a boot menu, " "Choose this option to install a boot menu, "
"allowing you to select which operating " "allowing you to select which operating "
"system to boot when you turn on your " "system to boot when you turn on your "
"computer.\n"); "computer.\n");
MakeHeading(fInstallText); MakeHeading(fInstallText);
AddChild(fInstallText); AddChild(fInstallText);
fUninstall = new BRadioButton(rect, "uninstall", fUninstall = new BRadioButton(rect, "uninstall",
"", "",
new BMessage('null')); new BMessage('null'));
AddChild(fUninstall); AddChild(fUninstall);
fUninstall->ResizeToPreferred(); fUninstall->ResizeToPreferred();
fUninstallText = CreateDescription(textRect, "uninstallText", fUninstallText = CreateDescription(textRect, "uninstallText",
"Uninstall Boot Menu\n\n" "Uninstall boot menu\n\n"
"Choose this option to remove the boot menu " "Choose this option to remove the boot menu "
"previously installed by this program.\n" "previously installed by this program.\n"
); );
@ -84,12 +84,12 @@ EntryPage::_BuildUI()
bool install; bool install;
fSettings->FindBool("install", &install); fSettings->FindBool("install", &install);
if (install) if (install)
fInstall->SetValue(1); fInstall->SetValue(1);
else else
fUninstall->SetValue(1); fUninstall->SetValue(1);
_Layout(); _Layout();
} }
@ -98,11 +98,11 @@ void
EntryPage::_Layout() EntryPage::_Layout()
{ {
LayoutDescriptionVertically(fInstallText); LayoutDescriptionVertically(fInstallText);
float left = fUninstall->Frame().left; float left = fUninstall->Frame().left;
float top = fInstallText->Frame().bottom; float top = fInstallText->Frame().bottom;
fUninstall->MoveTo(left, top); fUninstall->MoveTo(left, top);
left = fUninstallText->Frame().left; left = fUninstallText->Frame().left;
fUninstallText->MoveTo(left, top); fUninstallText->MoveTo(left, top);

View File

@ -56,7 +56,7 @@ CharacterMap::AboutRequested()
{ {
BAlert *alert = new BAlert("about", "CharacterMap\n" BAlert *alert = new BAlert("about", "CharacterMap\n"
"\twritten by Axel Dörfler\n" "\twritten by Axel Dörfler\n"
"\tCopyright 2009, Haiku Inc.\n", "Ok"); "\tCopyright 2009, Haiku, Inc.\n", "OK");
BTextView *view = alert->TextView(); BTextView *view = alert->TextView();
BFont font; BFont font;

View File

@ -250,11 +250,11 @@ CharacterView::MouseDown(BPoint where)
BMessage* message = new BMessage(B_COPY); BMessage* message = new BMessage(B_COPY);
message->AddInt32("character", fCurrentCharacter); message->AddInt32("character", fCurrentCharacter);
menu->AddItem(new BMenuItem("Copy Character", message, 'C')); menu->AddItem(new BMenuItem("Copy character", message, 'C'));
message = new BMessage(kMsgCopyAsEscapedString); message = new BMessage(kMsgCopyAsEscapedString);
message->AddInt32("character", fCurrentCharacter); message->AddInt32("character", fCurrentCharacter);
menu->AddItem(new BMenuItem("Copy As Escaped Byte String", menu->AddItem(new BMenuItem("Copy as escaped byte string",
message, 'C', B_SHIFT_KEY)); message, 'C', B_SHIFT_KEY));
menu->SetTargetForItems(this); menu->SetTargetForItems(this);

View File

@ -184,7 +184,7 @@ CharacterWindow::CharacterWindow()
BScrollView* characterScroller = new BScrollView("characterScroller", BScrollView* characterScroller = new BScrollView("characterScroller",
fCharacterView, 0, false, true); fCharacterView, 0, false, true);
fFontSizeSlider = new FontSizeSlider("fontSizeSlider", "Font Size:", fFontSizeSlider = new FontSizeSlider("fontSizeSlider", "Font size:",
new BMessage(kMsgFontSizeChanged), kMinFontSize, kMaxFontSize); new BMessage(kMsgFontSizeChanged), kMinFontSize, kMaxFontSize);
fFontSizeSlider->SetValue(fontSize); fFontSizeSlider->SetValue(fontSize);
@ -223,12 +223,12 @@ CharacterWindow::CharacterWindow()
menuBar->AddItem(menu); menuBar->AddItem(menu);
menu = new BMenu("View"); menu = new BMenu("View");
menu->AddItem(item = new BMenuItem("Show Private Blocks", menu->AddItem(item = new BMenuItem("Show private blocks",
new BMessage(kMsgPrivateBlocks))); new BMessage(kMsgPrivateBlocks)));
item->SetMarked(fCharacterView->IsShowingPrivateBlocks()); item->SetMarked(fCharacterView->IsShowingPrivateBlocks());
// TODO: this feature is not yet supported by Haiku! // TODO: this feature is not yet supported by Haiku!
#if 0 #if 0
menu->AddItem(item = new BMenuItem("Only Show Blocks Contained in Font", menu->AddItem(item = new BMenuItem("Only show blocks contained in font",
new BMessage(kMsgContainedBlocks))); new BMessage(kMsgContainedBlocks)));
item->SetMarked(fCharacterView->IsShowingContainedBlocksOnly()); item->SetMarked(fCharacterView->IsShowingContainedBlocksOnly());
#endif #endif

View File

@ -11,25 +11,25 @@ const unicode_block kNoBlock;
const struct unicode_block_entry kUnicodeBlocks[] = { const struct unicode_block_entry kUnicodeBlocks[] = {
{"Basic Latin", 0x0000, 0x007f, false, B_BASIC_LATIN_BLOCK}, {"Basic Latin", 0x0000, 0x007f, false, B_BASIC_LATIN_BLOCK},
{"Latin-1 Supplement", 0x0080, 0x00ff, false, B_LATIN1_SUPPLEMENT_BLOCK}, {"Latin-1 supplement", 0x0080, 0x00ff, false, B_LATIN1_SUPPLEMENT_BLOCK},
{"Latin Extended A", 0x0100, 0x017f, false, B_LATIN_EXTENDED_A_BLOCK}, {"Latin extended A", 0x0100, 0x017f, false, B_LATIN_EXTENDED_A_BLOCK},
{"Latin Extended B", 0x0180, 0x024f, false, B_LATIN_EXTENDED_B_BLOCK}, {"Latin extended B", 0x0180, 0x024f, false, B_LATIN_EXTENDED_B_BLOCK},
{"IPA Extensions", 0x0250, 0x02af, false, B_IPA_EXTENSIONS_BLOCK}, {"IPA extensions", 0x0250, 0x02af, false, B_IPA_EXTENSIONS_BLOCK},
{"Spacing Modifier Letters", 0x02b0, 0x02ff, false, {"Spacing modifier letters", 0x02b0, 0x02ff, false,
B_SPACING_MODIFIER_LETTERS_BLOCK}, B_SPACING_MODIFIER_LETTERS_BLOCK},
{"Combining Diacritical Marks", 0x0300, 0x036f, false, {"Combining diacritical marks", 0x0300, 0x036f, false,
B_COMBINING_DIACRITICAL_MARKS_BLOCK}, B_COMBINING_DIACRITICAL_MARKS_BLOCK},
{"Greek and Coptic", 0x0370, 0x03ff, false, {"Greek and Coptic", 0x0370, 0x03ff, false,
B_BASIC_GREEK_BLOCK | B_GREEK_SYMBOLS_AND_COPTIC_BLOCK}, B_BASIC_GREEK_BLOCK | B_GREEK_SYMBOLS_AND_COPTIC_BLOCK},
{"Cyrillic", 0x0400, 0x04ff, false, B_CYRILLIC_BLOCK}, {"Cyrillic", 0x0400, 0x04ff, false, B_CYRILLIC_BLOCK},
{"Cyrillic Supplement", 0x0500, 0x052f, false, B_CYRILLIC_BLOCK}, {"Cyrillic supplement", 0x0500, 0x052f, false, B_CYRILLIC_BLOCK},
{"Armenian", 0x0530, 0x058f, false, B_ARMENIAN_BLOCK}, {"Armenian", 0x0530, 0x058f, false, B_ARMENIAN_BLOCK},
{"Hebrew", 0x0590, 0x05ff, false, {"Hebrew", 0x0590, 0x05ff, false,
B_BASIC_HEBREW_BLOCK | B_HEBREW_EXTENDED_BLOCK}, B_BASIC_HEBREW_BLOCK | B_HEBREW_EXTENDED_BLOCK},
{"Arabic", 0x0600, 0x06ff, false, {"Arabic", 0x0600, 0x06ff, false,
B_BASIC_ARABIC_BLOCK | B_ARABIC_EXTENDED_BLOCK}, B_BASIC_ARABIC_BLOCK | B_ARABIC_EXTENDED_BLOCK},
{"Syriac", 0x0700, 0x074f, false, kNoBlock}, {"Syriac", 0x0700, 0x074f, false, kNoBlock},
{"Arabic Supplement", 0x0750, 0x077f, false, kNoBlock}, {"Arabic supplement", 0x0750, 0x077f, false, kNoBlock},
{"Thaana", 0x0780, 0x07bf, false, kNoBlock}, {"Thaana", 0x0780, 0x07bf, false, kNoBlock},
{"N'Ko", 0x07c0, 0x07ff, false, kNoBlock}, {"N'Ko", 0x07c0, 0x07ff, false, kNoBlock},
{"Devanagari", 0x0900, 0x097f, false, B_DEVANAGARI_BLOCK}, {"Devanagari", 0x0900, 0x097f, false, B_DEVANAGARI_BLOCK},
@ -50,9 +50,9 @@ const struct unicode_block_entry kUnicodeBlocks[] = {
{"Hangul Jamo", 0x1100, 0x11ff, false, kNoBlock}, {"Hangul Jamo", 0x1100, 0x11ff, false, kNoBlock},
// TODO! // TODO!
{"Ethiopic", 0x1200, 0x137f, false, kNoBlock}, {"Ethiopic", 0x1200, 0x137f, false, kNoBlock},
{"Ethiopic Supplement", 0x1380, 0x139f, false, kNoBlock}, {"Ethiopic supplement", 0x1380, 0x139f, false, kNoBlock},
{"Cherokee", 0x13a0, 0x13ff, false, kNoBlock}, {"Cherokee", 0x13a0, 0x13ff, false, kNoBlock},
{"Unified Canadian Aboriginal Syllabics", 0x1400, 0x167f, false, kNoBlock}, {"Unified Canadian Aboriginal syllabics", 0x1400, 0x167f, false, kNoBlock},
{"Ogham", 0x1680, 0x169f, false, kNoBlock}, {"Ogham", 0x1680, 0x169f, false, kNoBlock},
{"Runic", 0x16a0, 0x16ff, false, kNoBlock}, {"Runic", 0x16a0, 0x16ff, false, kNoBlock},
{"Tagalog", 0x1700, 0x171f, false, kNoBlock}, {"Tagalog", 0x1700, 0x171f, false, kNoBlock},
@ -64,131 +64,131 @@ const struct unicode_block_entry kUnicodeBlocks[] = {
{"Limbu", 0x1900, 0x194f, false, kNoBlock}, {"Limbu", 0x1900, 0x194f, false, kNoBlock},
{"Tai Le", 0x1950, 0x197f, false, kNoBlock}, {"Tai Le", 0x1950, 0x197f, false, kNoBlock},
{"New Tai Lue", 0x1980, 0x19df, false, kNoBlock}, {"New Tai Lue", 0x1980, 0x19df, false, kNoBlock},
{"Khmer Symbols", 0x19e0, 0x19ff, false, kNoBlock}, {"Khmer symbols", 0x19e0, 0x19ff, false, kNoBlock},
{"Buginese", 0x1a00, 0x1a1f, false, kNoBlock}, {"Buginese", 0x1a00, 0x1a1f, false, kNoBlock},
{"Balinese", 0x1b00, 0x1b7f, false, kNoBlock}, {"Balinese", 0x1b00, 0x1b7f, false, kNoBlock},
{"Sundanese", 0x1b80, 0x1bbf, false, kNoBlock}, {"Sundanese", 0x1b80, 0x1bbf, false, kNoBlock},
{"Lepcha", 0x1c00, 0x1c4f, false, kNoBlock}, {"Lepcha", 0x1c00, 0x1c4f, false, kNoBlock},
{"Ol Chiki", 0x1c50, 0x1c7f, false, kNoBlock}, {"Ol Chiki", 0x1c50, 0x1c7f, false, kNoBlock},
{"Phonetic Extensions", 0x1d00, 0x1d7f, false, kNoBlock}, {"Phonetic extensions", 0x1d00, 0x1d7f, false, kNoBlock},
{"Phonetic Extensions Supplement", 0x1d80, 0x1dbf, false, kNoBlock}, {"Phonetic extensions supplement", 0x1d80, 0x1dbf, false, kNoBlock},
{"Combining Diacritical Marks Supplement", 0x1dc0, 0x1dff, false, kNoBlock}, {"Combining diacritical marks supplement", 0x1dc0, 0x1dff, false, kNoBlock},
{"Latin Extended Additional", 0x1e00, 0x1eff, false, kNoBlock}, {"Latin extended additional", 0x1e00, 0x1eff, false, kNoBlock},
{"Greek Extended", 0x1f00, 0x1fff, false, kNoBlock}, {"Greek extended", 0x1f00, 0x1fff, false, kNoBlock},
{"General Punctuation", 0x2000, 0x206f, false, kNoBlock}, {"General punctuation", 0x2000, 0x206f, false, kNoBlock},
{"Superscripts and Subscripts", 0x2070, 0x209f, false, kNoBlock}, {"Superscripts and subscripts", 0x2070, 0x209f, false, kNoBlock},
{"Currency Symbols", 0x20a0, 0x20cf, false, kNoBlock}, {"Currency symbols", 0x20a0, 0x20cf, false, kNoBlock},
{"Combining Diacritical Marks for Symbols", 0x20d0, 0x20ff, false, {"Combining diacritical marks for symbols", 0x20d0, 0x20ff, false,
kNoBlock}, kNoBlock},
{"Letterlike Symbols", 0x2100, 0x214f, false, kNoBlock}, {"Letterlike symbols", 0x2100, 0x214f, false, kNoBlock},
{"Number Forms", 0x2150, 0x218f, false, kNoBlock}, {"Number forms", 0x2150, 0x218f, false, kNoBlock},
{"Arrows", 0x2190, 0x21ff, false, kNoBlock}, {"Arrows", 0x2190, 0x21ff, false, kNoBlock},
{"Mathematical Operators", 0x2200, 0x22ff, false, kNoBlock}, {"Mathematical operators", 0x2200, 0x22ff, false, kNoBlock},
{"Miscellaneous Technical", 0x2300, 0x23ff, false, kNoBlock}, {"Miscellaneous technical", 0x2300, 0x23ff, false, kNoBlock},
{"Control Pictures", 0x2400, 0x243f, false, kNoBlock}, {"Control pictures", 0x2400, 0x243f, false, kNoBlock},
{"Optical Character Recognition", 0x2440, 0x245f, false, kNoBlock}, {"Optical character recognition", 0x2440, 0x245f, false, kNoBlock},
{"Enclosed Alphanumerics", 0x2460, 0x24ff, false, kNoBlock}, {"Enclosed alphanumerics", 0x2460, 0x24ff, false, kNoBlock},
{"Box Drawing", 0x2500, 0x257f, false, kNoBlock}, {"Box drawing", 0x2500, 0x257f, false, kNoBlock},
{"Block Elements", 0x2580, 0x259f, false, kNoBlock}, {"Block elements", 0x2580, 0x259f, false, kNoBlock},
{"Geometric Shapes", 0x25a0, 0x25ff, false, kNoBlock}, {"Geometric shapes", 0x25a0, 0x25ff, false, kNoBlock},
{"Miscellaneous Symbols", 0x2600, 0x26ff, false, kNoBlock}, {"Miscellaneous symbols", 0x2600, 0x26ff, false, kNoBlock},
{"Dingbats", 0x2700, 0x27bf, false, kNoBlock}, {"Dingbats", 0x2700, 0x27bf, false, kNoBlock},
{"Miscellaneous Mathematical Symbols A", 0x27c0, 0x27ef, false, kNoBlock}, {"Miscellaneous mathematical symbols A", 0x27c0, 0x27ef, false, kNoBlock},
{"Supplemental Arrows A", 0x27f0, 0x27ff, false, kNoBlock}, {"Supplemental arrows A", 0x27f0, 0x27ff, false, kNoBlock},
{"Braille Patterns", 0x2800, 0x28ff, false, kNoBlock}, {"Braille patterns", 0x2800, 0x28ff, false, kNoBlock},
{"Supplemental Arrows B", 0x2900, 0x297f, false, kNoBlock}, {"Supplemental arrows B", 0x2900, 0x297f, false, kNoBlock},
{"Miscellaneous Mathematical Symbols B", 0x2980, 0x29ff, false, kNoBlock}, {"Miscellaneous mathematical symbols B", 0x2980, 0x29ff, false, kNoBlock},
{"Supplemental Mathematical Operators", 0x2a00, 0x2aff, false, kNoBlock}, {"Supplemental mathematical operators", 0x2a00, 0x2aff, false, kNoBlock},
{"Miscellaneous Symbols And Arrows", 0x2b00, 0x2bff, false, kNoBlock}, {"Miscellaneous symbols and arrows", 0x2b00, 0x2bff, false, kNoBlock},
{"Glagotic", 0x2c00, 0x2c5f, false, kNoBlock}, {"Glagotic", 0x2c00, 0x2c5f, false, kNoBlock},
{"Latin Extended C", 0x2c60, 0x2c7f, false, kNoBlock}, {"Latin extended C", 0x2c60, 0x2c7f, false, kNoBlock},
{"Coptic", 0x2c80, 0x2cff, false, kNoBlock}, {"Coptic", 0x2c80, 0x2cff, false, kNoBlock},
{"Georgian Supplement", 0x2d00, 0x2d2f, false, kNoBlock}, {"Georgian supplement", 0x2d00, 0x2d2f, false, kNoBlock},
{"Tifinagh", 0x2d30, 0x2d7f, false, kNoBlock}, {"Tifinagh", 0x2d30, 0x2d7f, false, kNoBlock},
{"Ethiopic Extended", 0x2d80, 0x2ddf, false, kNoBlock}, {"Ethiopic extended", 0x2d80, 0x2ddf, false, kNoBlock},
{"Cyrillic Extended A", 0x2de0, 0x2dff, false, kNoBlock}, {"Cyrillic extended A", 0x2de0, 0x2dff, false, kNoBlock},
{"Supplement Punctuation", 0x2e00, 0x2e7f, false, kNoBlock}, {"Supplement punctuation", 0x2e00, 0x2e7f, false, kNoBlock},
{"CJK Radicals Supplement", 0x2e80, 0x2eff, false, kNoBlock}, {"CJK radicals supplement", 0x2e80, 0x2eff, false, kNoBlock},
{"Kangxi Radicals", 0x2f00, 0x2fdf, false, kNoBlock}, {"Kangxi radicals", 0x2f00, 0x2fdf, false, kNoBlock},
{"Ideographic Description Characters", 0x2ff0, 0x2fff, false, kNoBlock}, {"Ideographic description characters", 0x2ff0, 0x2fff, false, kNoBlock},
{"CJK Symbols and Punctuation", 0x3000, 0x303f, false, kNoBlock}, {"CJK symbols and punctuation", 0x3000, 0x303f, false, kNoBlock},
{"Hiragana", 0x3040, 0x309f, false, kNoBlock}, {"Hiragana", 0x3040, 0x309f, false, kNoBlock},
{"Katakana", 0x30a0, 0x30ff, false, kNoBlock}, {"Katakana", 0x30a0, 0x30ff, false, kNoBlock},
{"Bopomofo", 0x3100, 0x312f, false, kNoBlock}, {"Bopomofo", 0x3100, 0x312f, false, kNoBlock},
{"Hangul Compatibility Jamo", 0x3130, 0x318f, false, kNoBlock}, {"Hangul compatibility Jamo", 0x3130, 0x318f, false, kNoBlock},
{"Kanbun", 0x3190, 0x319f, false, kNoBlock}, {"Kanbun", 0x3190, 0x319f, false, kNoBlock},
{"Bopomofo Extended", 0x31a0, 0x31bf, false, kNoBlock}, {"Bopomofo extended", 0x31a0, 0x31bf, false, kNoBlock},
{"CJK Strokes", 0x31c0, 0x31ef, false, kNoBlock}, {"CJK strokes", 0x31c0, 0x31ef, false, kNoBlock},
{"Katakana Phonetic Extensions", 0x31f0, 0x31ff, false, kNoBlock}, {"Katakana phonetic extensions", 0x31f0, 0x31ff, false, kNoBlock},
{"Enclosed CJK Letters and Months", 0x3200, 0x32ff, false, kNoBlock}, {"Enclosed CJK letters and months", 0x3200, 0x32ff, false, kNoBlock},
{"CJK Compatibility", 0x3300, 0x33ff, false, kNoBlock}, {"CJK compatibility", 0x3300, 0x33ff, false, kNoBlock},
{"CJK Unified Ideographs Extension A", 0x3400, 0x4dbf, false, kNoBlock}, {"CJK unified ideographs extension A", 0x3400, 0x4dbf, false, kNoBlock},
{"Yijing Hexagram Symbols", 0x4dc0, 0x4dff, false, kNoBlock}, {"Yijing hexagram symbols", 0x4dc0, 0x4dff, false, kNoBlock},
{"CJK Unified Ideographs", 0x4e00, 0x9fff, false, kNoBlock}, {"CJK unified ideographs", 0x4e00, 0x9fff, false, kNoBlock},
{"Yi Syllables", 0xa000, 0xa48f, false, kNoBlock}, {"Yi syllables", 0xa000, 0xa48f, false, kNoBlock},
{"Yi Radicals", 0xa490, 0xa4cf, false, kNoBlock}, {"Yi Radicals", 0xa490, 0xa4cf, false, kNoBlock},
{"Vai", 0xa500, 0xa63f, false, kNoBlock}, {"Vai", 0xa500, 0xa63f, false, kNoBlock},
{"Cyrillic Extended B", 0xa640, 0xa69f, false, kNoBlock}, {"Cyrillic extended B", 0xa640, 0xa69f, false, kNoBlock},
{"Modifier Tone Letters", 0xa700, 0xa71f, false, kNoBlock}, {"Modifier tone letters", 0xa700, 0xa71f, false, kNoBlock},
{"Latin Extended D", 0xa720, 0xa7ff, false, kNoBlock}, {"Latin extended D", 0xa720, 0xa7ff, false, kNoBlock},
{"Syloti Nagri", 0xa800, 0xa82f, false, kNoBlock}, {"Syloti Nagri", 0xa800, 0xa82f, false, kNoBlock},
{"Phags-pa", 0xa840, 0xa87f, false, kNoBlock}, {"Phags-pa", 0xa840, 0xa87f, false, kNoBlock},
{"Saurashtra", 0xa880, 0xa8df, false, kNoBlock}, {"Saurashtra", 0xa880, 0xa8df, false, kNoBlock},
{"Kayah Li", 0xa900, 0xa92f, false, kNoBlock}, {"Kayah Li", 0xa900, 0xa92f, false, kNoBlock},
{"Rejang", 0xa930, 0xa95f, false, kNoBlock}, {"Rejang", 0xa930, 0xa95f, false, kNoBlock},
{"Cham", 0xaa00, 0xaa5f, false, kNoBlock}, {"Cham", 0xaa00, 0xaa5f, false, kNoBlock},
{"Hangul Syllables", 0xac00, 0xd7af, false, kNoBlock}, {"Hangul syllables", 0xac00, 0xd7af, false, kNoBlock},
// {"High Surrogates", 0xd800, 0xdb7f, false, kNoBlock}, // {"High surrogates", 0xd800, 0xdb7f, false, kNoBlock},
// {"High Private Use Surrogates", 0xdb80, 0xdbff, false, kNoBlock}, // {"High private use surrogates", 0xdb80, 0xdbff, false, kNoBlock},
// {"Low Surrogates", 0xdc00, 0xdfff, false, kNoBlock}, // {"Low surrogates", 0xdc00, 0xdfff, false, kNoBlock},
{"Private Use Area", 0xe000, 0xf8ff, true, kNoBlock}, {"Private use area", 0xe000, 0xf8ff, true, kNoBlock},
{"CJK Compatibility Ideographs", 0xf900, 0xfaff, false, kNoBlock}, {"CJK compatibility ideographs", 0xf900, 0xfaff, false, kNoBlock},
{"Alphabetic Presentation Forms", 0xfb00, 0xfb4f, false, kNoBlock}, {"Alphabetic presentation forms", 0xfb00, 0xfb4f, false, kNoBlock},
{"Arabic Presentation Forms A", 0xfb50, 0xfdff, false, kNoBlock}, {"Arabic presentation forms A", 0xfb50, 0xfdff, false, kNoBlock},
{"Variation Selectors", 0xfe00, 0xfe0f, false, kNoBlock}, {"Variation selectors", 0xfe00, 0xfe0f, false, kNoBlock},
{"Vertical Forms", 0xfe10, 0xfe1f, false, kNoBlock}, {"Vertical forms", 0xfe10, 0xfe1f, false, kNoBlock},
{"Combining Half Marks", 0xfe20, 0xfe2f, false, kNoBlock}, {"Combining half marks", 0xfe20, 0xfe2f, false, kNoBlock},
{"CJK Compatibility Forms", 0xfe30, 0xfe4f, false, kNoBlock}, {"CJK compatibility forms", 0xfe30, 0xfe4f, false, kNoBlock},
{"Small Form Variants", 0xfe50, 0xfe6f, false, kNoBlock}, {"Small form variants", 0xfe50, 0xfe6f, false, kNoBlock},
{"Arabic Presentation Forms B", 0xfe70, 0xfeff, false, kNoBlock}, {"Arabic presentation forms B", 0xfe70, 0xfeff, false, kNoBlock},
{"Halfwidth and Fullwidth Forms", 0xff00, 0xffef, false, kNoBlock}, {"Halfwidth and fullwidth forms", 0xff00, 0xffef, false, kNoBlock},
{"Specials", 0xfff0, 0xffff, false, kNoBlock}, {"Specials", 0xfff0, 0xffff, false, kNoBlock},
{"Linear B Syllabary", 0x010000, 0x01007f, false, kNoBlock}, {"Linear B syllabary", 0x010000, 0x01007f, false, kNoBlock},
{"Linear B Ideograms", 0x010080, 0x0100ff, false, kNoBlock}, {"Linear B ideograms", 0x010080, 0x0100ff, false, kNoBlock},
{"Aegean Numbers", 0x010100, 0x01013f, false, kNoBlock}, {"Aegean numbers", 0x010100, 0x01013f, false, kNoBlock},
{"Ancient Greek Numbers", 0x010140, 0x01018f, false, kNoBlock}, {"Ancient Greek numbers", 0x010140, 0x01018f, false, kNoBlock},
{"Ancient Symbols", 0x010190, 0x0101cf, false, kNoBlock}, {"Ancient smbols", 0x010190, 0x0101cf, false, kNoBlock},
{"Phaistos Disc", 0x0101d0, 0x0101ff, false, kNoBlock}, {"Phaistos disc", 0x0101d0, 0x0101ff, false, kNoBlock},
{"Lycian", 0x010280, 0x01029f, false, kNoBlock}, {"Lycian", 0x010280, 0x01029f, false, kNoBlock},
{"Carian", 0x0102a0, 0x0102df, false, kNoBlock}, {"Carian", 0x0102a0, 0x0102df, false, kNoBlock},
{"Old Italic", 0x010300, 0x01032f, false, kNoBlock}, {"Old italic", 0x010300, 0x01032f, false, kNoBlock},
{"Gothic", 0x010330, 0x01034f, false, kNoBlock}, {"Gothic", 0x010330, 0x01034f, false, kNoBlock},
{"Ugaritic", 0x010380, 0x01039f, false, kNoBlock}, {"Ugaritic", 0x010380, 0x01039f, false, kNoBlock},
{"Old Persian", 0x0103a0, 0x0103df, false, kNoBlock}, {"Old Persian", 0x0103a0, 0x0103df, false, kNoBlock},
{"Deseret", 0x010400, 0x01044f, false, kNoBlock}, {"Deseret", 0x010400, 0x01044f, false, kNoBlock},
{"Shavian", 0x010450, 0x01047f, false, kNoBlock}, {"Shavian", 0x010450, 0x01047f, false, kNoBlock},
{"Osmanya", 0x010480, 0x0104af, false, kNoBlock}, {"Osmanya", 0x010480, 0x0104af, false, kNoBlock},
{"Cypriot Syllabary", 0x010800, 0x01083f, false, kNoBlock}, {"Cypriot syllabary", 0x010800, 0x01083f, false, kNoBlock},
{"Phoenician", 0x010900, 0x01091f, false, kNoBlock}, {"Phoenician", 0x010900, 0x01091f, false, kNoBlock},
{"Lydian", 0x010920, 0x01093f, false, kNoBlock}, {"Lydian", 0x010920, 0x01093f, false, kNoBlock},
{"Kharoshthi", 0x010a00, 0x010a5f, false, kNoBlock}, {"Kharoshthi", 0x010a00, 0x010a5f, false, kNoBlock},
{"Cuneiform", 0x012000, 0x0123ff, false, kNoBlock}, {"Cuneiform", 0x012000, 0x0123ff, false, kNoBlock},
{"Cuneiform Numbers and Punctuation", 0x012400, 0x01247f, false, kNoBlock}, {"Cuneiform numbers and punctuation", 0x012400, 0x01247f, false, kNoBlock},
{"Byzantine Musical Symbols", 0x01d000, 0x01d0ff, false, kNoBlock}, {"Byzantine musical symbols", 0x01d000, 0x01d0ff, false, kNoBlock},
{"Muscial Symbols", 0x01d100, 0x01d1ff, false, kNoBlock}, {"Muscial symbols", 0x01d100, 0x01d1ff, false, kNoBlock},
{"Ancient Greek Musical Notation", 0x01d200, 0x01d24f, false, kNoBlock}, {"Ancient Greek musical notation", 0x01d200, 0x01d24f, false, kNoBlock},
{"Tai Xuan Jing Symbols", 0x01d300, 0x01d35f, false, kNoBlock}, {"Tai Xuan Jing symbols", 0x01d300, 0x01d35f, false, kNoBlock},
{"Counting Rod Numerals", 0x01d360, 0x01d37f, false, kNoBlock}, {"Counting rod numerals", 0x01d360, 0x01d37f, false, kNoBlock},
{"Mathematical Alphanumeric Symbols", 0x01d400, 0x01d7ff, false, kNoBlock}, {"Mathematical alphanumeric symbols", 0x01d400, 0x01d7ff, false, kNoBlock},
{"Mahjong Tiles", 0x01f000, 0x01f02f, false, kNoBlock}, {"Mahjong tiles", 0x01f000, 0x01f02f, false, kNoBlock},
{"Domino Tiles", 0x01f030, 0x01f09f, false, kNoBlock}, {"Domino tiles", 0x01f030, 0x01f09f, false, kNoBlock},
{"CJK Unified Ideographs Extension B", 0x020000, 0x02a6df, false, kNoBlock}, {"CJK unified ideographs extension B", 0x020000, 0x02a6df, false, kNoBlock},
{"CJK Compatibility Ideographs Supplement", 0x02f800, 0x02fa1f, false, {"CJK compatibility ideographs Supplement", 0x02f800, 0x02fa1f, false,
kNoBlock}, kNoBlock},
{"Tags", 0x0e0000, 0x0e007f, false, kNoBlock}, {"Tags", 0x0e0000, 0x0e007f, false, kNoBlock},
{"Variation Selectors Supplement", 0x0e0100, 0x0e01ef, false, kNoBlock}, {"Variation selectors supplement", 0x0e0100, 0x0e01ef, false, kNoBlock},
{"Supplementary Private Use Area A", 0x0f0000, 0x0fffff, true, kNoBlock}, {"Supplementary private use area A", 0x0f0000, 0x0fffff, true, kNoBlock},
{"Supplementary Private Use Area B", 0x100000, 0x10ffff, true, kNoBlock}, {"Supplementary private use area B", 0x100000, 0x10ffff, true, kNoBlock},
}; };
const uint32 kNumUnicodeBlocks const uint32 kNumUnicodeBlocks

View File

@ -67,7 +67,7 @@ ErrorAlert(const char* message, status_t err, BWindow *window = NULL)
} }
status_t status_t
AddTranslationItems(BMenu* intoMenu, uint32 fromType) AddTranslationItems(BMenu* intoMenu, uint32 fromType)
{ {
@ -89,33 +89,33 @@ AddTranslationItems(BMenu* intoMenu, uint32 fromType)
const translation_format* formats = NULL; const translation_format* formats = NULL;
int32 num_formats = 0; int32 num_formats = 0;
bool ok = false; bool ok = false;
err = use->GetInputFormats(ids[tix], &formats, &num_formats); err = use->GetInputFormats(ids[tix], &formats, &num_formats);
if (err == B_OK) if (err == B_OK)
for (int iix = 0; iix < num_formats; iix++) { for (int iix = 0; iix < num_formats; iix++) {
if (formats[iix].type == fromType) { if (formats[iix].type == fromType) {
ok = true; ok = true;
break; break;
} }
} }
if (!ok) if (!ok)
continue; continue;
err = use->GetOutputFormats(ids[tix], &formats, &num_formats); err = use->GetOutputFormats(ids[tix], &formats, &num_formats);
if (err == B_OK) if (err == B_OK)
for (int oix = 0; oix < num_formats; oix++) { for (int oix = 0; oix < num_formats; oix++) {
if (formats[oix].type != fromType) { if (formats[oix].type != fromType) {
BMessage* itemmsg; BMessage* itemmsg;
itemmsg = new BMessage(msg_translate); itemmsg = new BMessage(msg_translate);
itemmsg->AddInt32(translatorIdName, ids[tix]); itemmsg->AddInt32(translatorIdName, ids[tix]);
itemmsg->AddInt32(translatorTypeName, formats[oix].type); itemmsg->AddInt32(translatorTypeName, formats[oix].type);
intoMenu->AddItem(new BMenuItem(formats[oix].name, itemmsg)); intoMenu->AddItem(new BMenuItem(formats[oix].name, itemmsg));
} }
} }
} }
delete[] ids; delete[] ids;
return B_OK; return B_OK;
} }
// #pragma mark - // #pragma mark -
@ -143,12 +143,12 @@ CodyCam::~CodyCam()
fVideoConsumer->Release(); fVideoConsumer->Release();
fVideoConsumer = NULL; fVideoConsumer = NULL;
} }
CALL("CodyCam::~CodyCam - EXIT\n"); CALL("CodyCam::~CodyCam - EXIT\n");
} }
void void
CodyCam::ReadyToRun() CodyCam::ReadyToRun()
{ {
fWindow = new VideoWindow(BRect(28, 28, 28, 28), fWindow = new VideoWindow(BRect(28, 28, 28, 28),
@ -162,12 +162,12 @@ CodyCam::ReadyToRun()
bool bool
CodyCam::QuitRequested() CodyCam::QuitRequested()
{ {
_TearDownNodes(); _TearDownNodes();
snooze(100000); snooze(100000);
return true; return true;
} }
@ -216,10 +216,10 @@ CodyCam::MessageReceived(BMessage *message)
} }
case msg_about: case msg_about:
(new BAlert("About CodyCam", "CodyCam\n\nThe Original BeOS WebCam", (new BAlert("About CodyCam", "CodyCam\n\nThe Original BeOS webcam",
"Close"))->Go(); "Close"))->Go();
break; break;
case msg_control_win: case msg_control_win:
// our control window is being asked to go away // our control window is being asked to go away
// set our pointer to NULL // set our pointer to NULL
@ -233,7 +233,7 @@ CodyCam::MessageReceived(BMessage *message)
} }
status_t status_t
CodyCam::_SetUpNodes() CodyCam::_SetUpNodes()
{ {
status_t status = B_OK; status_t status = B_OK;
@ -241,14 +241,14 @@ CodyCam::_SetUpNodes()
/* find the media roster */ /* find the media roster */
fMediaRoster = BMediaRoster::Roster(&status); fMediaRoster = BMediaRoster::Roster(&status);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't find the media roster", status, fWindow); ErrorAlert("Cannot find the media roster", status, fWindow);
return status; return status;
} }
/* find the time source */ /* find the time source */
status = fMediaRoster->GetTimeSource(&fTimeSourceNode); status = fMediaRoster->GetTimeSource(&fTimeSourceNode);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't get a time source", status, fWindow); ErrorAlert("Cannot get a time source", status, fWindow);
return status; return status;
} }
@ -256,7 +256,7 @@ CodyCam::_SetUpNodes()
INFO("CodyCam acquiring VideoInput node\n"); INFO("CodyCam acquiring VideoInput node\n");
status = fMediaRoster->GetVideoInput(&fProducerNode); status = fMediaRoster->GetVideoInput(&fProducerNode);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't find a video source. You need a webcam to use CodyCam.", status, fWindow); ErrorAlert("Cannot find a video source. You need a webcam to use CodyCam.", status, fWindow);
return status; return status;
} }
@ -264,25 +264,25 @@ CodyCam::_SetUpNodes()
fVideoConsumer = new VideoConsumer("CodyCam", ((VideoWindow*)fWindow)->VideoView(), fVideoConsumer = new VideoConsumer("CodyCam", ((VideoWindow*)fWindow)->VideoView(),
((VideoWindow*)fWindow)->StatusLine(), NULL, 0); ((VideoWindow*)fWindow)->StatusLine(), NULL, 0);
if (!fVideoConsumer) { if (!fVideoConsumer) {
ErrorAlert("Can't create a video window", B_ERROR, fWindow); ErrorAlert("Cannot create a video window", B_ERROR, fWindow);
return B_ERROR; return B_ERROR;
} }
/* register the node */ /* register the node */
status = fMediaRoster->RegisterNode(fVideoConsumer); status = fMediaRoster->RegisterNode(fVideoConsumer);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't register the video window", status, fWindow); ErrorAlert("Cannot register the video window", status, fWindow);
return status; return status;
} }
fPort = fVideoConsumer->ControlPort(); fPort = fVideoConsumer->ControlPort();
/* find free producer output */ /* find free producer output */
int32 cnt = 0; int32 cnt = 0;
status = fMediaRoster->GetFreeOutputsFor(fProducerNode, &fProducerOut, 1, &cnt, status = fMediaRoster->GetFreeOutputsFor(fProducerNode, &fProducerOut, 1, &cnt,
B_MEDIA_RAW_VIDEO); B_MEDIA_RAW_VIDEO);
if (status != B_OK || cnt < 1) { if (status != B_OK || cnt < 1) {
status = B_RESOURCE_UNAVAILABLE; status = B_RESOURCE_UNAVAILABLE;
ErrorAlert("Can't find an available video stream", status, fWindow); ErrorAlert("Cannot find an available video stream", status, fWindow);
return status; return status;
} }
@ -301,13 +301,13 @@ CodyCam::_SetUpNodes()
format.type = B_MEDIA_RAW_VIDEO; format.type = B_MEDIA_RAW_VIDEO;
media_raw_video_format vid_format = {0, 1, 0, 239, B_VIDEO_TOP_LEFT_RIGHT, media_raw_video_format vid_format = {0, 1, 0, 239, B_VIDEO_TOP_LEFT_RIGHT,
1, 1, {B_RGB32, VIDEO_SIZE_X, VIDEO_SIZE_Y, VIDEO_SIZE_X * 4, 0, 0}}; 1, 1, {B_RGB32, VIDEO_SIZE_X, VIDEO_SIZE_Y, VIDEO_SIZE_X * 4, 0, 0}};
format.u.raw_video = vid_format; format.u.raw_video = vid_format;
/* connect producer to consumer */ /* connect producer to consumer */
status = fMediaRoster->Connect(fProducerOut.source, fConsumerIn.destination, status = fMediaRoster->Connect(fProducerOut.source, fConsumerIn.destination,
&format, &fProducerOut, &fConsumerIn); &format, &fProducerOut, &fConsumerIn);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't connect the video source to the video window", status); ErrorAlert("Cannot connect the video source to the video window", status);
return status; return status;
} }
@ -315,13 +315,13 @@ CodyCam::_SetUpNodes()
/* set time sources */ /* set time sources */
status = fMediaRoster->SetTimeSourceFor(fProducerNode.node, fTimeSourceNode.node); status = fMediaRoster->SetTimeSourceFor(fProducerNode.node, fTimeSourceNode.node);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't set the timesource for the video source", status); ErrorAlert("Cannot set the time source for the video source", status);
return status; return status;
} }
status = fMediaRoster->SetTimeSourceFor(fVideoConsumer->ID(), fTimeSourceNode.node); status = fMediaRoster->SetTimeSourceFor(fVideoConsumer->ID(), fTimeSourceNode.node);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't set the timesource for the video window", status); ErrorAlert("Cannot set the time source for the video window", status);
return status; return status;
} }
@ -334,12 +334,12 @@ CodyCam::_SetUpNodes()
bigtime_t initLatency = 0; bigtime_t initLatency = 0;
status = fMediaRoster->GetInitialLatencyFor(fProducerNode, &initLatency); status = fMediaRoster->GetInitialLatencyFor(fProducerNode, &initLatency);
if (status < B_OK) { if (status < B_OK) {
ErrorAlert("error getting initial latency for fCaptureNode", status); ErrorAlert("Error getting initial latency for the capture node", status);
return status; return status;
} }
initLatency += estimate_max_scheduling_latency(); initLatency += estimate_max_scheduling_latency();
BTimeSource* timeSource = fMediaRoster->MakeTimeSourceFor(fProducerNode); BTimeSource* timeSource = fMediaRoster->MakeTimeSourceFor(fProducerNode);
bool running = timeSource->IsRunning(); bool running = timeSource->IsRunning();
@ -350,59 +350,59 @@ CodyCam::_SetUpNodes()
status = fMediaRoster->StartTimeSource(fTimeSourceNode, real); status = fMediaRoster->StartTimeSource(fTimeSourceNode, real);
if (status != B_OK) { if (status != B_OK) {
timeSource->Release(); timeSource->Release();
ErrorAlert("cannot start time source!", status); ErrorAlert("Cannot start time source!", status);
return status; return status;
} }
status = fMediaRoster->SeekTimeSource(fTimeSourceNode, 0, real); status = fMediaRoster->SeekTimeSource(fTimeSourceNode, 0, real);
if (status != B_OK) { if (status != B_OK) {
timeSource->Release(); timeSource->Release();
ErrorAlert("cannot seek time source!", status); ErrorAlert("Cannot seek time source!", status);
return status; return status;
} }
} }
bigtime_t perf = timeSource->PerformanceTimeFor(real + latency + initLatency); bigtime_t perf = timeSource->PerformanceTimeFor(real + latency + initLatency);
timeSource->Release(); timeSource->Release();
/* start the nodes */ /* start the nodes */
status = fMediaRoster->StartNode(fProducerNode, perf); status = fMediaRoster->StartNode(fProducerNode, perf);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't start the video source", status); ErrorAlert("Cannot start the video source", status);
return status; return status;
} }
status = fMediaRoster->StartNode(fVideoConsumer->Node(), perf); status = fMediaRoster->StartNode(fVideoConsumer->Node(), perf);
if (status != B_OK) { if (status != B_OK) {
ErrorAlert("Can't start the video window", status); ErrorAlert("Cannot start the video window", status);
return status; return status;
} }
return status; return status;
} }
void void
CodyCam::_TearDownNodes() CodyCam::_TearDownNodes()
{ {
CALL("CodyCam::_TearDownNodes\n"); CALL("CodyCam::_TearDownNodes\n");
if (!fMediaRoster) if (!fMediaRoster)
return; return;
if (fVideoConsumer) { if (fVideoConsumer) {
/* stop */ /* stop */
INFO("stopping nodes!\n"); INFO("stopping nodes!\n");
// fMediaRoster->StopNode(fProducerNode, 0, true); // fMediaRoster->StopNode(fProducerNode, 0, true);
fMediaRoster->StopNode(fVideoConsumer->Node(), 0, true); fMediaRoster->StopNode(fVideoConsumer->Node(), 0, true);
/* disconnect */ /* disconnect */
fMediaRoster->Disconnect(fProducerOut.node.node, fProducerOut.source, fMediaRoster->Disconnect(fProducerOut.node.node, fProducerOut.source,
fConsumerIn.node.node, fConsumerIn.destination); fConsumerIn.node.node, fConsumerIn.destination);
if (fProducerNode != media_node::null) { if (fProducerNode != media_node::null) {
INFO("CodyCam releasing fProducerNode\n"); INFO("CodyCam releasing fProducerNode\n");
fMediaRoster->ReleaseNode(fProducerNode); fMediaRoster->ReleaseNode(fProducerNode);
fProducerNode = media_node::null; fProducerNode = media_node::null;
} }
fMediaRoster->ReleaseNode(fVideoConsumer->Node()); fMediaRoster->ReleaseNode(fVideoConsumer->Node());
fVideoConsumer = NULL; fVideoConsumer = NULL;
} }
} }
@ -431,30 +431,31 @@ VideoWindow::VideoWindow(BRect frame, const char* title, window_type type,
strcpy(fFtpInfo.passwordText, "password"); strcpy(fFtpInfo.passwordText, "password");
strcpy(fFtpInfo.directoryText, "directory"); strcpy(fFtpInfo.directoryText, "directory");
_SetUpSettings("codycam", ""); _SetUpSettings("codycam", "");
BMenuBar* menuBar = new BMenuBar(BRect(0, 0, 0, 0), "menu bar"); BMenuBar* menuBar = new BMenuBar(BRect(0, 0, 0, 0), "menu bar");
BMenuItem* menuItem; BMenuItem* menuItem;
BMenu* menu = new BMenu("File"); BMenu* menu = new BMenu("File");
menuItem = new BMenuItem("Video Preferences", new BMessage(msg_video), 'P'); menuItem = new BMenuItem("Video settings", new BMessage(msg_video), 'P');
menuItem->SetTarget(be_app); menuItem->SetTarget(be_app);
menu->AddItem(menuItem); menu->AddItem(menuItem);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menuItem = new BMenuItem("Start Video", new BMessage(msg_start), 'A'); menuItem = new BMenuItem("Start video", new BMessage(msg_start), 'A');
menuItem->SetTarget(be_app); menuItem->SetTarget(be_app);
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Stop Video", new BMessage(msg_stop), 'O'); menuItem = new BMenuItem("Stop video", new BMessage(msg_stop), 'O');
menuItem->SetTarget(be_app); menuItem->SetTarget(be_app);
menu->AddItem(menuItem); menu->AddItem(menuItem);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menuItem = new BMenuItem("About Codycam", new BMessage(msg_about), 'B'); menuItem = new BMenuItem("About Codycam" B_UTF8_ELLIPSIS,
new BMessage(msg_about), 'B');
menuItem->SetTarget(be_app); menuItem->SetTarget(be_app);
menu->AddItem(menuItem); menu->AddItem(menuItem);
@ -576,9 +577,9 @@ VideoWindow::MessageReceived(BMessage* message)
fFtpInfo.rate = (bigtime_t)(B_INFINITE_TIMEOUT); fFtpInfo.rate = (bigtime_t)(B_INFINITE_TIMEOUT);
break; break;
case msg_translate: case msg_translate:
message->FindInt32("be:type", (int32*)&(fFtpInfo.imageFormat)); message->FindInt32("be:type", (int32*)&(fFtpInfo.imageFormat));
message->FindInt32("be:translator", &(fFtpInfo.translator)); message->FindInt32("be:translator", &(fFtpInfo.translator));
break; break;
case msg_upl_client: case msg_upl_client:
@ -663,12 +664,12 @@ VideoWindow::_BuildCaptureControls(BView* theView)
BGridLayout *controlsLayout = new BGridLayout(kXBuffer, 0); BGridLayout *controlsLayout = new BGridLayout(kXBuffer, 0);
controlsLayout->SetInsets(10, 15, 5, 5); controlsLayout->SetInsets(10, 15, 5, 5);
fCaptureSetupBox->SetLayout(controlsLayout); fCaptureSetupBox->SetLayout(controlsLayout);
fFileName = new BTextControl("File Name", "File name:", fFileName = new BTextControl("File Name", "File name:",
fFilenameSetting->Value(), new BMessage(msg_filename)); fFilenameSetting->Value(), new BMessage(msg_filename));
fFileName->SetTarget(BMessenger(NULL, this)); fFileName->SetTarget(BMessenger(NULL, this));
fImageFormatMenu = new BPopUpMenu("Image Format Menu"); fImageFormatMenu = new BPopUpMenu("Image Format Menu");
AddTranslationItems(fImageFormatMenu, B_TRANSLATOR_BITMAP); AddTranslationItems(fImageFormatMenu, B_TRANSLATOR_BITMAP);
fImageFormatMenu->SetTargetForItems(this); fImageFormatMenu->SetTargetForItems(this);
@ -676,16 +677,14 @@ VideoWindow::_BuildCaptureControls(BView* theView)
&& fImageFormatMenu->FindItem(fImageFormatSettings->Value()) != NULL) { && fImageFormatMenu->FindItem(fImageFormatSettings->Value()) != NULL) {
fImageFormatMenu->FindItem( fImageFormatMenu->FindItem(
fImageFormatSettings->Value())->SetMarked(true); fImageFormatSettings->Value())->SetMarked(true);
} else if (fImageFormatMenu->FindItem("JPEG Image") != NULL) } else if (fImageFormatMenu->FindItem("JPEG image") != NULL)
fImageFormatMenu->FindItem("JPEG Image")->SetMarked(true);
else if (fImageFormatMenu->FindItem("JPEG image") != NULL)
fImageFormatMenu->FindItem("JPEG image")->SetMarked(true); fImageFormatMenu->FindItem("JPEG image")->SetMarked(true);
else else
fImageFormatMenu->ItemAt(0)->SetMarked(true); fImageFormatMenu->ItemAt(0)->SetMarked(true);
fImageFormatSelector = new BMenuField("Format", "Format:", fImageFormatSelector = new BMenuField("Format", "Format:",
fImageFormatMenu, NULL); fImageFormatMenu, NULL);
fCaptureRateMenu = new BPopUpMenu("Capture Rate Menu"); fCaptureRateMenu = new BPopUpMenu("Capture Rate Menu");
fCaptureRateMenu->AddItem(new BMenuItem("Every 15 seconds", fCaptureRateMenu->AddItem(new BMenuItem("Every 15 seconds",
new BMessage(msg_rate_15s))); new BMessage(msg_rate_15s)));
@ -727,7 +726,7 @@ VideoWindow::_BuildCaptureControls(BView* theView)
controlsLayout->AddItem(BSpaceLayoutItem::CreateGlue(), 0, 3, 2); controlsLayout->AddItem(BSpaceLayoutItem::CreateGlue(), 0, 3, 2);
// FTP setup box // FTP setup box
fFtpSetupBox = new BBox("Ftp Setup", B_WILL_DRAW); fFtpSetupBox = new BBox("FTP Setup", B_WILL_DRAW);
fUploadClientMenu = new BPopUpMenu("Send to" B_UTF8_ELLIPSIS); fUploadClientMenu = new BPopUpMenu("Send to" B_UTF8_ELLIPSIS);
for (int i = 0; kUploadClient[i]; i++) { for (int i = 0; kUploadClient[i]; i++) {
@ -768,7 +767,7 @@ VideoWindow::_BuildCaptureControls(BView* theView)
fDirectorySetting->Value(), new BMessage(msg_directory)); fDirectorySetting->Value(), new BMessage(msg_directory));
fDirectory->SetTarget(this); fDirectory->SetTarget(this);
fPassiveFtp = new BCheckBox("Passive ftp", "Passive FTP", fPassiveFtp = new BCheckBox("Passive FTP", "Passive FTP",
new BMessage(msg_passiveftp)); new BMessage(msg_passiveftp));
fPassiveFtp->SetTarget(this); fPassiveFtp->SetTarget(this);
fPassiveFtp->SetValue(fPassiveFtpSetting->Value()); fPassiveFtp->SetValue(fPassiveFtpSetting->Value());
@ -784,14 +783,14 @@ VideoWindow::_BuildCaptureControls(BView* theView)
ftpLayout->AddItem(fDirectory->CreateLabelLayoutItem(), 0, 4); ftpLayout->AddItem(fDirectory->CreateLabelLayoutItem(), 0, 4);
ftpLayout->AddItem(fDirectory->CreateTextViewLayoutItem(), 1, 4); ftpLayout->AddItem(fDirectory->CreateTextViewLayoutItem(), 1, 4);
ftpLayout->AddView(fPassiveFtp, 0, 5, 2); ftpLayout->AddView(fPassiveFtp, 0, 5, 2);
fStatusLine = new BStringView("Status Line", "Waiting" B_UTF8_ELLIPSIS); fStatusLine = new BStringView("Status Line", "Waiting" B_UTF8_ELLIPSIS);
BGroupLayout *groupLayout = new BGroupLayout(B_VERTICAL); BGroupLayout *groupLayout = new BGroupLayout(B_VERTICAL);
groupLayout->SetInsets(kXBuffer, kYBuffer, kXBuffer, kYBuffer); groupLayout->SetInsets(kXBuffer, kYBuffer, kXBuffer, kYBuffer);
theView->SetLayout(groupLayout); theView->SetLayout(groupLayout);
theView->AddChild(BSpaceLayoutItem::CreateVerticalStrut(kYBuffer)); theView->AddChild(BSpaceLayoutItem::CreateVerticalStrut(kYBuffer));
theView->AddChild(BGroupLayoutBuilder(B_HORIZONTAL) theView->AddChild(BGroupLayoutBuilder(B_HORIZONTAL)
.Add(BSpaceLayoutItem::CreateHorizontalStrut(0.0)) .Add(BSpaceLayoutItem::CreateHorizontalStrut(0.0))
@ -846,7 +845,7 @@ VideoWindow::_SetUpSettings(const char* filename, const char* dirname)
fFilenameSetting = new StringValueSetting("StillImageFilename", fFilenameSetting = new StringValueSetting("StillImageFilename",
"codycam.jpg", "still image filename expected", ""); "codycam.jpg", "still image filename expected", "");
fImageFormatSettings = new StringValueSetting("ImageFileFormat", fImageFormatSettings = new StringValueSetting("ImageFileFormat",
"JPEG Image", "image file format expected", ""); "JPEG image", "image file format expected", "");
fCaptureRateSetting = new EnumeratedStringValueSetting("CaptureRate", fCaptureRateSetting = new EnumeratedStringValueSetting("CaptureRate",
"Every 5 minutes", kCaptureRate, "capture rate expected", "Every 5 minutes", kCaptureRate, "capture rate expected",
"unrecognized capture rate specified"); "unrecognized capture rate specified");
@ -892,7 +891,7 @@ VideoWindow::_QuitSettings()
fImageFormatSettings->ValueChanged(fImageFormatMenu->FindMarked()->Label()); fImageFormatSettings->ValueChanged(fImageFormatMenu->FindMarked()->Label());
fCaptureRateSetting->ValueChanged(fCaptureRateMenu->FindMarked()->Label()); fCaptureRateSetting->ValueChanged(fCaptureRateMenu->FindMarked()->Label());
fUploadClientSetting->ValueChanged(fUploadClientMenu->FindMarked()->Label()); fUploadClientSetting->ValueChanged(fUploadClientMenu->FindMarked()->Label());
fSettings->SaveSettings(); fSettings->SaveSettings();
delete fSettings; delete fSettings;
} }
@ -902,25 +901,25 @@ VideoWindow::_QuitSettings()
ControlWindow::ControlWindow(const BRect& frame, BView* controls, media_node node) ControlWindow::ControlWindow(const BRect& frame, BView* controls, media_node node)
: BWindow(frame, "Video Preferences", B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS) : BWindow(frame, "Video settings", B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS)
{ {
fView = controls; fView = controls;
fNode = node; fNode = node;
AddChild(fView); AddChild(fView);
} }
void void
ControlWindow::MessageReceived(BMessage* message) ControlWindow::MessageReceived(BMessage* message)
{ {
BParameterWeb* web = NULL; BParameterWeb* web = NULL;
status_t err; status_t err;
switch (message->what) { switch (message->what) {
case B_MEDIA_WEB_CHANGED: case B_MEDIA_WEB_CHANGED:
{ {
// If this is a tab view, find out which tab // If this is a tab view, find out which tab
// is selected // is selected
BTabView* tabView = dynamic_cast<BTabView*>(fView); BTabView* tabView = dynamic_cast<BTabView*>(fView);
int32 tabNum = -1; int32 tabNum = -1;
@ -938,7 +937,7 @@ ControlWindow::MessageReceived(BMessage* message)
// Another tab view? Restore previous selection // Another tab view? Restore previous selection
if (tabNum > 0) { if (tabNum > 0) {
BTabView* newTabView = dynamic_cast<BTabView*>(fView); BTabView* newTabView = dynamic_cast<BTabView*>(fView);
if (newTabView) if (newTabView)
newTabView->Select(tabNum); newTabView->Select(tabNum);
} }
@ -952,7 +951,7 @@ ControlWindow::MessageReceived(BMessage* message)
} }
bool bool
ControlWindow::QuitRequested() ControlWindow::QuitRequested()
{ {
be_app->PostMessage(msg_control_win); be_app->PostMessage(msg_control_win);
@ -966,6 +965,6 @@ ControlWindow::QuitRequested()
int main() { int main() {
CodyCam app; CodyCam app;
app.Run(); app.Run();
return 0; return 0;
} }

View File

@ -236,7 +236,7 @@ void DormantNodeListItem::showContextMenu(
// Add the "Get Info" item // Add the "Get Info" item
BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
menu->AddItem(new BMenuItem("Get Info", message)); menu->AddItem(new BMenuItem("Get info", message));
menu->SetTargetForItems(owner); menu->SetTargetForItems(owner);
owner->ConvertToScreen(&point); owner->ConvertToScreen(&point);

View File

@ -34,7 +34,7 @@ const BRect DormantNodeWindow::s_initFrame(500.0, 350.0, 640.0, 480.0);
DormantNodeWindow::DormantNodeWindow( DormantNodeWindow::DormantNodeWindow(
BWindow* parent) BWindow* parent)
: BWindow(s_initFrame, "Media Add-Ons", : BWindow(s_initFrame, "Media add-ons",
B_FLOATING_WINDOW_LOOK, B_FLOATING_WINDOW_LOOK,
B_FLOATING_SUBSET_WINDOW_FEEL, B_FLOATING_SUBSET_WINDOW_FEEL,
B_WILL_ACCEPT_FIRST_CLICK|B_AVOID_FOCUS|B_ASYNCHRONOUS_CONTROLS), B_WILL_ACCEPT_FIRST_CLICK|B_AVOID_FOCUS|B_ASYNCHRONOUS_CONTROLS),

View File

@ -22,7 +22,7 @@ __USE_CORTEX_NAMESPACE
DormantNodeInfoView::DormantNodeInfoView( DormantNodeInfoView::DormantNodeInfoView(
const dormant_node_info &info) const dormant_node_info &info)
: InfoView(info.name, "Dormant Media Node", : InfoView(info.name, "Dormant media node",
new MediaIcon(info, B_LARGE_ICON)), new MediaIcon(info, B_LARGE_ICON)),
m_addOnID(info.addon), m_addOnID(info.addon),
m_flavorID(info.flavor_id) m_flavorID(info.flavor_id)
@ -59,9 +59,9 @@ DormantNodeInfoView::DormantNodeInfoView(
addField("Kinds", MediaString::getStringFor(static_cast<node_kind>(flavorInfo.kinds))); addField("Kinds", MediaString::getStringFor(static_cast<node_kind>(flavorInfo.kinds)));
// add "Flavor Flags" field // add "Flavor Flags" field
addField("Flavor Flags", "?"); addField("Flavor flags", "?");
// add "Max Instances" field // add "Max. instances" field
if (flavorInfo.possible_count > 0) if (flavorInfo.possible_count > 0)
{ {
s = ""; s = "";
@ -71,18 +71,18 @@ DormantNodeInfoView::DormantNodeInfoView(
{ {
s = "Any number"; s = "Any number";
} }
addField("Max Instances", s); addField("Max. instances", s);
// add "Input Formats" field // add "Input Formats" field
if (flavorInfo.in_format_count > 0) if (flavorInfo.in_format_count > 0)
{ {
if (flavorInfo.in_format_count == 1) if (flavorInfo.in_format_count == 1)
{ {
addField("Input Format", MediaString::getStringFor(flavorInfo.in_formats[0], false)); addField("Input format", MediaString::getStringFor(flavorInfo.in_formats[0], false));
} }
else else
{ {
addField("Input Formats", ""); addField("Input formats", "");
for (int32 i = 0; i < flavorInfo.in_format_count; i++) for (int32 i = 0; i < flavorInfo.in_format_count; i++)
{ {
s = ""; s = "";
@ -97,11 +97,11 @@ DormantNodeInfoView::DormantNodeInfoView(
{ {
if (flavorInfo.out_format_count == 1) if (flavorInfo.out_format_count == 1)
{ {
addField("Output Format", MediaString::getStringFor(flavorInfo.out_formats[0], false)); addField("Output format", MediaString::getStringFor(flavorInfo.out_formats[0], false));
} }
else else
{ {
addField("Output Formats", ""); addField("Output formats", "");
for (int32 i = 0; i < flavorInfo.out_format_count; i++) for (int32 i = 0; i < flavorInfo.out_format_count; i++)
{ {
s = ""; s = "";

View File

@ -18,7 +18,7 @@ __USE_CORTEX_NAMESPACE
EndPointInfoView::EndPointInfoView( EndPointInfoView::EndPointInfoView(
const media_input &input) const media_input &input)
: InfoView(input.name, "Media Input", 0), : InfoView(input.name, "Media input", 0),
m_output(false), m_output(false),
m_port(input.destination.port), m_port(input.destination.port),
m_id(input.destination.id) { m_id(input.destination.id) {
@ -37,14 +37,14 @@ EndPointInfoView::EndPointInfoView(
addField("", ""); addField("", "");
// add "Media Type" field // add "Media Type" field
addField("Media Type", MediaString::getStringFor(input.format.type)); addField("Media type", MediaString::getStringFor(input.format.type));
_addFormatFields(input.format); _addFormatFields(input.format);
} }
EndPointInfoView::EndPointInfoView( EndPointInfoView::EndPointInfoView(
const media_output &output) const media_output &output)
: InfoView(output.name, "Media Output", 0), : InfoView(output.name, "Media output", 0),
m_output(true), m_output(true),
m_port(output.source.port), m_port(output.source.port),
m_id(output.source.id) { m_id(output.source.id) {
@ -63,7 +63,7 @@ EndPointInfoView::EndPointInfoView(
addField("", ""); addField("", "");
// add "Media Type" field // add "Media Type" field
addField("Media Type", MediaString::getStringFor(output.format.type)); addField("Media type", MediaString::getStringFor(output.format.type));
_addFormatFields(output.format); _addFormatFields(output.format);
} }
@ -117,22 +117,22 @@ void EndPointInfoView::_addFormatFields(
addField("Format", s); addField("Format", s);
// add "Sample Rate" field // add "Sample Rate" field
s = MediaString::forAudioFrameRate(format.u.raw_audio.frame_rate); s = MediaString::forAudioFrameRate(format.u.raw_audio.frame_rate);
addField("Sample Rate", s); addField("Sample rate", s);
// add "Channels" field // add "Channels" field
s = MediaString::forAudioChannelCount(format.u.raw_audio.channel_count); s = MediaString::forAudioChannelCount(format.u.raw_audio.channel_count);
addField("Channels", s); addField("Channels", s);
// add "Channel Mask" field // add "Channel Mask" field
s = MediaString::forAudioChannelMask(format.u.raw_audio.channel_mask); s = MediaString::forAudioChannelMask(format.u.raw_audio.channel_mask);
addField("Channel Mask", s); addField("Channel mask", s);
// add "Matrix Mask" field // add "Matrix Mask" field
s = MediaString::forAudioMatrixMask(format.u.raw_audio.matrix_mask); s = MediaString::forAudioMatrixMask(format.u.raw_audio.matrix_mask);
addField("Matrix Mask", s); addField("Matrix mask", s);
// add the "Byte Order" field // add the "Byte Order" field
s = MediaString::forAudioByteOrder(format.u.raw_audio.byte_order); s = MediaString::forAudioByteOrder(format.u.raw_audio.byte_order);
addField("Byte Order", s); addField("Byte order", s);
// add the "Buffer Size" field // add the "Buffer Size" field
s = MediaString::forAudioBufferSize(format.u.raw_audio.buffer_size); s = MediaString::forAudioBufferSize(format.u.raw_audio.buffer_size);
addField("Buffer Size", s); addField("Buffer size", s);
break; break;
} }
case B_MEDIA_RAW_VIDEO: { case B_MEDIA_RAW_VIDEO: {
@ -149,18 +149,18 @@ void EndPointInfoView::_addFormatFields(
// add the "Field Rate" field // add the "Field Rate" field
s = MediaString::forVideoFieldRate(format.u.raw_video.field_rate, s = MediaString::forVideoFieldRate(format.u.raw_video.field_rate,
format.u.raw_video.interlace); format.u.raw_video.interlace);
addField("Field Rate", s); addField("Field rate", s);
// add the "Orientation" field // add the "Orientation" field
s = MediaString::forVideoOrientation(format.u.raw_video.orientation); s = MediaString::forVideoOrientation(format.u.raw_video.orientation);
addField("Orientation", s); addField("Orientation", s);
// add the "Aspect Ratio" field // add the "Aspect Ratio" field
s = MediaString::forVideoAspectRatio(format.u.raw_video.pixel_width_aspect, s = MediaString::forVideoAspectRatio(format.u.raw_video.pixel_width_aspect,
format.u.raw_video.pixel_height_aspect); format.u.raw_video.pixel_height_aspect);
addField("Aspect Ratio", s); addField("Aspect ratio", s);
// add the "Active Lines" field // add the "Active Lines" field
s = MediaString::forVideoActiveLines(format.u.raw_video.first_active, s = MediaString::forVideoActiveLines(format.u.raw_video.first_active,
format.u.raw_video.last_active); format.u.raw_video.last_active);
addField("Active Lines", s); addField("Active lines", s);
// add the "Offset" field // add the "Offset" field
s = MediaString::forVideoOffset(format.u.raw_video.display.pixel_offset, s = MediaString::forVideoOffset(format.u.raw_video.display.pixel_offset,
format.u.raw_video.display.line_offset); format.u.raw_video.display.line_offset);
@ -173,10 +173,10 @@ void EndPointInfoView::_addFormatFields(
BString s; BString s;
// add the "Bit Rate" field // add the "Bit Rate" field
s = MediaString::forAudioBitRate(format.u.encoded_audio.bit_rate); s = MediaString::forAudioBitRate(format.u.encoded_audio.bit_rate);
addField("Bit Rate", s); addField("Bit rate", s);
// add the "Frame Size" field // add the "Frame Size" field
s = MediaString::forAudioFrameSize(format.u.encoded_audio.frame_size); s = MediaString::forAudioFrameSize(format.u.encoded_audio.frame_size);
addField("Frame Size", s); addField("Frame size", s);
break; break;
} }
case B_MEDIA_ENCODED_VIDEO: { case B_MEDIA_ENCODED_VIDEO: {
@ -186,10 +186,10 @@ void EndPointInfoView::_addFormatFields(
// add the "Bit Rate" field // add the "Bit Rate" field
s = MediaString::forVideoBitRate(format.u.encoded_video.avg_bit_rate, s = MediaString::forVideoBitRate(format.u.encoded_video.avg_bit_rate,
format.u.encoded_video.max_bit_rate); format.u.encoded_video.max_bit_rate);
addField("Bit Rate", s); addField("Bit rate", s);
// add the "Frame Size" field // add the "Frame Size" field
s = MediaString::forVideoFrameSize(format.u.encoded_video.frame_size); s = MediaString::forVideoFrameSize(format.u.encoded_video.frame_size);
addField("Frame Size", s); addField("Frame size", s);
// add the "History" field // add the "History" field
s = MediaString::forVideoHistory(format.u.encoded_video.forward_history, s = MediaString::forVideoHistory(format.u.encoded_video.forward_history,
format.u.encoded_video.backward_history); format.u.encoded_video.backward_history);
@ -206,11 +206,11 @@ void EndPointInfoView::_addFormatFields(
// add the "Bit Rate" field // add the "Bit Rate" field
s = MediaString::forMultistreamBitRate(format.u.multistream.avg_bit_rate, s = MediaString::forMultistreamBitRate(format.u.multistream.avg_bit_rate,
format.u.multistream.max_bit_rate); format.u.multistream.max_bit_rate);
addField("Bit Rate", s); addField("Bit rate", s);
// add the "Chunk Size" field // add the "Chunk Size" field
s = MediaString::forMultistreamChunkSize(format.u.multistream.avg_chunk_size, s = MediaString::forMultistreamChunkSize(format.u.multistream.avg_chunk_size,
format.u.multistream.max_chunk_size); format.u.multistream.max_chunk_size);
addField("Chunk Size", s); addField("Chunk size", s);
// add the "Flags" field // add the "Flags" field
s = MediaString::forMultistreamFlags(format.u.multistream.flags); s = MediaString::forMultistreamFlags(format.u.multistream.flags);
addField("Flags", s); addField("Flags", s);

View File

@ -718,7 +718,7 @@ void MediaJack::showContextMenu(
BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
message->AddData("input", B_RAW_TYPE, message->AddData("input", B_RAW_TYPE,
reinterpret_cast<const void *>(&input), sizeof(input)); reinterpret_cast<const void *>(&input), sizeof(input));
menu->AddItem(item = new BMenuItem("Get Info", message)); menu->AddItem(item = new BMenuItem("Get info", message));
} }
else if (isOutput()) else if (isOutput())
{ {
@ -727,7 +727,7 @@ void MediaJack::showContextMenu(
BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
message->AddData("output", B_RAW_TYPE, message->AddData("output", B_RAW_TYPE,
reinterpret_cast<const void *>(&output), sizeof(output)); reinterpret_cast<const void *>(&output), sizeof(output));
menu->AddItem(item = new BMenuItem("Get Info", message)); menu->AddItem(item = new BMenuItem("Get info", message));
} }
menu->SetTargetForItems(view()); menu->SetTargetForItems(view());

View File

@ -533,7 +533,7 @@ void MediaNodePanel::showContextMenu(
// add the "Tweak Parameters" item // add the "Tweak Parameters" item
message = new BMessage(MediaRoutingView::M_NODE_TWEAK_PARAMETERS); message = new BMessage(MediaRoutingView::M_NODE_TWEAK_PARAMETERS);
menu->AddItem(item = new BMenuItem("Tweak Parameters", message, 'P')); menu->AddItem(item = new BMenuItem("Tweak parameters", message, 'P'));
if (!(ref->kind() & B_CONTROLLABLE)) if (!(ref->kind() & B_CONTROLLABLE))
{ {
item->SetEnabled(false); item->SetEnabled(false);
@ -541,7 +541,7 @@ void MediaNodePanel::showContextMenu(
message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
message->AddInt32("nodeID", ref->id()); message->AddInt32("nodeID", ref->id());
menu->AddItem(new BMenuItem("Get Info", message, 'I')); menu->AddItem(new BMenuItem("Get info", message, 'I'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem("Release", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T')); menu->AddItem(item = new BMenuItem("Release", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T'));
@ -562,7 +562,7 @@ void MediaNodePanel::showContextMenu(
} }
// add the "Run Mode" sub menu // add the "Run Mode" sub menu
BMenu *subMenu = new BMenu("Run Mode"); BMenu *subMenu = new BMenu("Run mode");
subMenu->SetFont(be_plain_font); subMenu->SetFont(be_plain_font);
for (uint32 runMode = 1; runMode <= BMediaNode::B_RECORDING; runMode++) for (uint32 runMode = 1; runMode <= BMediaNode::B_RECORDING; runMode++)
{ {
@ -604,12 +604,12 @@ void MediaNodePanel::showContextMenu(
message = new BMessage(MediaRoutingView::M_NODE_START_TIME_SOURCE); message = new BMessage(MediaRoutingView::M_NODE_START_TIME_SOURCE);
message->AddInt32("nodeID", ref->id()); message->AddInt32("nodeID", ref->id());
subMenu->AddItem(new BMenuItem( subMenu->AddItem(new BMenuItem(
"Start Time Source", "Start time source",
message)); message));
message = new BMessage(MediaRoutingView::M_NODE_START_TIME_SOURCE); message = new BMessage(MediaRoutingView::M_NODE_START_TIME_SOURCE);
message->AddInt32("nodeID", ref->id()); message->AddInt32("nodeID", ref->id());
subMenu->AddItem(new BMenuItem( subMenu->AddItem(new BMenuItem(
"Stop Time Source", "Stop time source",
message)); message));
} }
// [c.lenz 24dec99] support for BControllable::StartControlPanel() // [c.lenz 24dec99] support for BControllable::StartControlPanel()
@ -631,7 +631,7 @@ void MediaNodePanel::showContextMenu(
subMenu->AddSeparatorItem(); subMenu->AddSeparatorItem();
subMenu->AddItem( subMenu->AddItem(
new BMenuItem( new BMenuItem(
isLocked ? "Unlock Group" : "Lock Group", message)); isLocked ? "Unlock group" : "Lock group", message));
} }
if (subMenu->CountItems() > 0) if (subMenu->CountItems() > 0)

View File

@ -911,14 +911,14 @@ void MediaRoutingView::showContextMenu(
BMenuItem *item; BMenuItem *item;
BMessage *message = new BMessage(M_LAYOUT_CHANGED); BMessage *message = new BMessage(M_LAYOUT_CHANGED);
message->AddInt32("layout", M_ICON_VIEW); message->AddInt32("layout", M_ICON_VIEW);
menu->AddItem(item = new BMenuItem("Icon View", message)); menu->AddItem(item = new BMenuItem("Icon view", message));
if (m_layout == M_ICON_VIEW) if (m_layout == M_ICON_VIEW)
{ {
item->SetMarked(true); item->SetMarked(true);
} }
message = new BMessage(M_LAYOUT_CHANGED); message = new BMessage(M_LAYOUT_CHANGED);
message->AddInt32("layout", M_MINI_ICON_VIEW); message->AddInt32("layout", M_MINI_ICON_VIEW);
menu->AddItem(item = new BMenuItem("Mini Icon View", message)); menu->AddItem(item = new BMenuItem("Mini icon view", message));
if (m_layout == M_MINI_ICON_VIEW) if (m_layout == M_MINI_ICON_VIEW)
{ {
item->SetMarked(true); item->SetMarked(true);
@ -926,10 +926,10 @@ void MediaRoutingView::showContextMenu(
menu->AddSeparatorItem(); menu->AddSeparatorItem();
// add 'CleanUp' command // add 'CleanUp' command
menu->AddItem(new BMenuItem("Clean Up", new BMessage(M_CLEANUP_REQUESTED), 'K')); menu->AddItem(new BMenuItem("Clean up", new BMessage(M_CLEANUP_REQUESTED), 'K'));
// add 'Select All' command // add 'Select All' command
menu->AddItem(new BMenuItem("Select All", new BMessage(M_SELECT_ALL), 'A')); menu->AddItem(new BMenuItem("Select all", new BMessage(M_SELECT_ALL), 'A'));
menu->SetTargetForItems(this); menu->SetTargetForItems(this);
ConvertToScreen(&point); ConvertToScreen(&point);
@ -955,7 +955,7 @@ void MediaRoutingView::showErrorMessage(
BMessenger messenger(0, Window()); BMessenger messenger(0, Window());
if (!messenger.IsValid() if (!messenger.IsValid()
|| (messenger.SendMessage(&message) != B_OK)) { || (messenger.SendMessage(&message) != B_OK)) {
BAlert *alert = new BAlert("Error", text.String(), "Ok", 0, 0, BAlert *alert = new BAlert("Error", text.String(), "OK", 0, 0,
B_WIDTH_AS_USUAL, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_WARNING_ALERT);
alert->Go(); alert->Go();
} }
@ -1500,21 +1500,21 @@ void MediaRoutingView::_initContent()
NodeRef* videoIn = manager->videoInputNode(); NodeRef* videoIn = manager->videoInputNode();
if (videoIn) if (videoIn)
{ {
group = manager->createGroup("Video Input"); group = manager->createGroup("Video input");
group->setRunMode(BMediaNode::B_RECORDING); group->setRunMode(BMediaNode::B_RECORDING);
group->addNode(videoIn); group->addNode(videoIn);
} }
NodeRef* audioIn = manager->audioInputNode(); NodeRef* audioIn = manager->audioInputNode();
if (audioIn) if (audioIn)
{ {
group = manager->createGroup("Audio Input"); group = manager->createGroup("Audio input");
group->setRunMode(BMediaNode::B_RECORDING); group->setRunMode(BMediaNode::B_RECORDING);
group->addNode(audioIn); group->addNode(audioIn);
} }
NodeRef* videoOut = manager->videoOutputNode(); NodeRef* videoOut = manager->videoOutputNode();
if (videoOut) if (videoOut)
{ {
group = manager->createGroup("Video Output"); group = manager->createGroup("Video output");
group->addNode(videoOut); group->addNode(videoOut);
} }
} }

View File

@ -291,7 +291,7 @@ void MediaWire::showContextMenu(
BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
message->AddData("connection", B_RAW_TYPE, message->AddData("connection", B_RAW_TYPE,
reinterpret_cast<const void *>(&output), sizeof(output)); reinterpret_cast<const void *>(&output), sizeof(output));
menu->AddItem(item = new BMenuItem("Get Info", message, 'I')); menu->AddItem(item = new BMenuItem("Get info", message, 'I'));
// add the "Disconnect" item // add the "Disconnect" item
menu->AddItem(item = new BMenuItem("Disconnect", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T')); menu->AddItem(item = new BMenuItem("Disconnect", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T'));

View File

@ -40,7 +40,7 @@ ParameterWindow::ParameterWindow(
BPoint position, BPoint position,
live_node_info &nodeInfo, live_node_info &nodeInfo,
BMessenger *notifyTarget) BMessenger *notifyTarget)
: BWindow(BRect(position, position + BPoint(50.0, 50.0)), : BWindow(BRect(position, position + BPoint(50.0, 50.0)),
"parameters", B_DOCUMENT_WINDOW, "parameters", B_DOCUMENT_WINDOW,
B_WILL_ACCEPT_FIRST_CLICK | B_ASYNCHRONOUS_CONTROLS), B_WILL_ACCEPT_FIRST_CLICK | B_ASYNCHRONOUS_CONTROLS),
m_node(nodeInfo.node), m_node(nodeInfo.node),
@ -61,7 +61,7 @@ ParameterWindow::ParameterWindow(
BMenuBar *menuBar = new BMenuBar(Bounds(), "ParameterWindow MenuBar"); BMenuBar *menuBar = new BMenuBar(Bounds(), "ParameterWindow MenuBar");
BMenu *menu = new BMenu("Window"); BMenu *menu = new BMenu("Window");
menu->AddItem(new BMenuItem("Start Control Panel", menu->AddItem(new BMenuItem("Start control panel",
new BMessage(M_START_CONTROL_PANEL), new BMessage(M_START_CONTROL_PANEL),
'P', B_COMMAND_KEY | B_SHIFT_KEY)); 'P', B_COMMAND_KEY | B_SHIFT_KEY));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
@ -158,7 +158,7 @@ void ParameterWindow::MessageReceived(
default: { default: {
BWindow::MessageReceived(message); BWindow::MessageReceived(message);
} }
} }
} }
bool ParameterWindow::QuitRequested() { bool ParameterWindow::QuitRequested() {
@ -276,7 +276,7 @@ void ParameterWindow::_updateParameterView(
// adapt the window to the new dimensions // adapt the window to the new dimensions
ResizeTo(m_idealSize.Width(), m_idealSize.Height()); ResizeTo(m_idealSize.Width(), m_idealSize.Height());
m_zoomed = true; m_zoomed = true;
if (m_parameters) { if (m_parameters) {
BRect paramRect = m_parameters->Bounds(); BRect paramRect = m_parameters->Bounds();
AddChild(new ParameterContainerView(paramRect, m_parameters)); AddChild(new ParameterContainerView(paramRect, m_parameters));
@ -285,7 +285,7 @@ void ParameterWindow::_updateParameterView(
void ParameterWindow::_constrainToScreen() { void ParameterWindow::_constrainToScreen() {
D_INTERNAL(("ParameterWindow::_constrainToScreen()\n")); D_INTERNAL(("ParameterWindow::_constrainToScreen()\n"));
BScreen screen(this); BScreen screen(this);
BRect screenRect = screen.Frame(); BRect screenRect = screen.Frame();
BRect windowRect = Frame(); BRect windowRect = Frame();

View File

@ -164,7 +164,7 @@ void RouteAppNodeManager::nodeCreated(
if(ts->Node() != systemClock) if(ts->Node() != systemClock)
{ {
g->setTimeSource(ts->Node()); g->setTimeSource(ts->Node());
logMsg.AddString("line", "Synced to System Clock"); logMsg.AddString("line", "Synced to system clock");
} }
ts->Release(); ts->Release();
} }
@ -249,7 +249,7 @@ void RouteAppNodeManager::connectionMade(
logMsg.AddString("line", line); logMsg.AddString("line", line);
NodeGroup *group = 0; NodeGroup *group = 0;
BString groupName = "Untitled Group "; BString groupName = "Untitled group ";
if(_canGroup(producer) && _canGroup(consumer)) if(_canGroup(producer) && _canGroup(consumer))
{ {
if (producer->group() && consumer->group() && if (producer->group() && consumer->group() &&

View File

@ -78,7 +78,7 @@ RouteWindow::RouteWindow(RouteAppNodeManager* manager)
item->SetTarget(be_app); item->SetTarget(be_app);
pFileMenu->AddItem(item); pFileMenu->AddItem(item);
pFileMenu->AddItem(new BSeparatorItem()); pFileMenu->AddItem(new BSeparatorItem());
item = new BMenuItem("Save Nodes" B_UTF8_ELLIPSIS, item = new BMenuItem("Save nodes" B_UTF8_ELLIPSIS,
new BMessage(RouteApp::M_SHOW_SAVE_PANEL), 'S'); new BMessage(RouteApp::M_SHOW_SAVE_PANEL), 'S');
item->SetTarget(be_app); item->SetTarget(be_app);
pFileMenu->AddItem(item); pFileMenu->AddItem(item);
@ -137,19 +137,19 @@ RouteWindow::RouteWindow(RouteAppNodeManager* manager)
// construct the Window menu // construct the Window menu
BMenu* windowMenu = new BMenu("Window"); BMenu* windowMenu = new BMenu("Window");
m_transportWindowItem = new BMenuItem( m_transportWindowItem = new BMenuItem(
"Show Transport", "Show transport",
new BMessage(M_TOGGLE_TRANSPORT_WINDOW)); new BMessage(M_TOGGLE_TRANSPORT_WINDOW));
windowMenu->AddItem(m_transportWindowItem); windowMenu->AddItem(m_transportWindowItem);
m_dormantNodeWindowItem = new BMenuItem( m_dormantNodeWindowItem = new BMenuItem(
"Show Add-Ons", "Show add-ons",
new BMessage(M_TOGGLE_DORMANT_NODE_WINDOW)); new BMessage(M_TOGGLE_DORMANT_NODE_WINDOW));
windowMenu->AddItem(m_dormantNodeWindowItem); windowMenu->AddItem(m_dormantNodeWindowItem);
windowMenu->AddItem(new BSeparatorItem()); windowMenu->AddItem(new BSeparatorItem());
m_pullPalettesItem = new BMenuItem( m_pullPalettesItem = new BMenuItem(
"Pull Palettes", "Pull palettes",
new BMessage(M_TOGGLE_PULLING_PALETTES)); new BMessage(M_TOGGLE_PULLING_PALETTES));
windowMenu->AddItem(m_pullPalettesItem); windowMenu->AddItem(m_pullPalettesItem);
@ -341,7 +341,7 @@ RouteWindow::MessageReceived(BMessage* pMsg)
// //
switch (pMsg->what) { switch (pMsg->what) {
case B_ABOUT_REQUESTED: case B_ABOUT_REQUESTED:
(new BAlert("About", g_aboutText, "Ok"))->Go(); (new BAlert("About", g_aboutText, "OK"))->Go();
break; break;
case MediaRoutingView::M_GROUP_SELECTED: case MediaRoutingView::M_GROUP_SELECTED:

View File

@ -525,16 +525,16 @@ void TransportView::_releaseGroup() {
const char _run_mode_strings[][20] = { const char _run_mode_strings[][20] = {
"Offline", "Offline",
"Decrease Precision", "Decrease precision",
"Increase Latency", "Increase latency",
"Drop Data", "Drop data",
"Recording" "Recording"
}; };
const int _run_modes = 5; const int _run_modes = 5;
//const char _time_source_strings[][20] = { //const char _time_source_strings[][20] = {
// "DAC Time Source", // "DAC time source",
// "System Clock" // "System clock"
//}; //};
//const int _time_sources = 2; //const int _time_sources = 2;
@ -564,7 +564,7 @@ void TransportView::_constructControls() {
m_runModeView = new BMenuField( m_runModeView = new BMenuField(
BRect(), BRect(),
"runModeView", "runModeView",
"Run Mode:", "Run mode:",
new BPopUpMenu("runModeMenu")); new BPopUpMenu("runModeMenu"));
_populateRunModeMenu( _populateRunModeMenu(
m_runModeView->Menu()); m_runModeView->Menu());
@ -573,7 +573,7 @@ void TransportView::_constructControls() {
m_timeSourceView = new BMenuField( m_timeSourceView = new BMenuField(
BRect(), BRect(),
"timeSourceView", "timeSourceView",
"Time Source:", "Time source:",
new BPopUpMenu("timeSourceMenu")); new BPopUpMenu("timeSourceMenu"));
_populateTimeSourceMenu( _populateTimeSourceMenu(
m_timeSourceView->Menu()); m_timeSourceView->Menu());
@ -706,7 +706,7 @@ void TransportView::_populateTimeSourceMenu(
&dacTimeSource, &dacTimeSource,
sizeof(media_node)); sizeof(media_node));
i = new BMenuItem( i = new BMenuItem(
"DAC Time Source", "DAC time source",
m); m);
menu->AddItem(i); menu->AddItem(i);
_addGroupTarget(i); _addGroupTarget(i);
@ -721,7 +721,7 @@ void TransportView::_populateTimeSourceMenu(
&systemTimeSource, &systemTimeSource,
sizeof(media_node)); sizeof(media_node));
i = new BMenuItem( i = new BMenuItem(
"System Clock", "System clock",
m); m);
menu->AddItem(i); menu->AddItem(i);
_addGroupTarget(i); _addGroupTarget(i);

View File

@ -90,7 +90,7 @@ void _AudioAdapterParams::populateGroup(
param = inputGroup->MakeDiscreteParameter( param = inputGroup->MakeDiscreteParameter(
P_INPUT_FORMAT, P_INPUT_FORMAT,
B_MEDIA_NO_TYPE, B_MEDIA_NO_TYPE,
"Sample Format", "Sample format:",
B_GENERIC); B_GENERIC);
param->AddItem( param->AddItem(
0, 0,
@ -111,7 +111,7 @@ void _AudioAdapterParams::populateGroup(
param = inputGroup->MakeDiscreteParameter( param = inputGroup->MakeDiscreteParameter(
P_INPUT_CHANNEL_COUNT, P_INPUT_CHANNEL_COUNT,
B_MEDIA_NO_TYPE, B_MEDIA_NO_TYPE,
"Channels", "Channels:",
B_GENERIC); B_GENERIC);
param->AddItem( param->AddItem(
0, 0,
@ -137,7 +137,7 @@ void _AudioAdapterParams::populateGroup(
param = outputGroup->MakeDiscreteParameter( param = outputGroup->MakeDiscreteParameter(
P_OUTPUT_FORMAT, P_OUTPUT_FORMAT,
B_MEDIA_NO_TYPE, B_MEDIA_NO_TYPE,
"Sample Format", "Sample format:",
B_GENERIC); B_GENERIC);
param->AddItem( param->AddItem(
0, 0,
@ -158,7 +158,7 @@ void _AudioAdapterParams::populateGroup(
param = outputGroup->MakeDiscreteParameter( param = outputGroup->MakeDiscreteParameter(
P_OUTPUT_CHANNEL_COUNT, P_OUTPUT_CHANNEL_COUNT,
B_MEDIA_NO_TYPE, B_MEDIA_NO_TYPE,
"Channels", "Channels:",
B_GENERIC); B_GENERIC);
param->AddItem( param->AddItem(
0, 0,

View File

@ -1228,11 +1228,11 @@ void FlangerNode::initParameterWeb() {
BParameterGroup* g; BParameterGroup* g;
// mix ratio // mix ratio
g = pTopGroup->MakeGroup("Mix Ratio"); g = pTopGroup->MakeGroup("Mix ratio");
label = g->MakeNullParameter( label = g->MakeNullParameter(
P_MIX_RATIO_LABEL, P_MIX_RATIO_LABEL,
B_MEDIA_NO_TYPE, B_MEDIA_NO_TYPE,
"Mix Ratio", "Mix ratio",
B_GENERIC); B_GENERIC);
value = g->MakeContinuousParameter( value = g->MakeContinuousParameter(
@ -1244,11 +1244,11 @@ void FlangerNode::initParameterWeb() {
value->AddInput(label); value->AddInput(label);
// sweep rate // sweep rate
g = pTopGroup->MakeGroup("Sweep Rate"); g = pTopGroup->MakeGroup("Sweep rate");
label = g->MakeNullParameter( label = g->MakeNullParameter(
P_SWEEP_RATE_LABEL, P_SWEEP_RATE_LABEL,
B_MEDIA_NO_TYPE, B_MEDIA_NO_TYPE,
"Sweep Rate", "Sweep rate",
B_GENERIC); B_GENERIC);
value = g->MakeContinuousParameter( value = g->MakeContinuousParameter(
@ -1271,7 +1271,7 @@ void FlangerNode::initParameterWeb() {
P_DELAY, P_DELAY,
B_MEDIA_NO_TYPE, B_MEDIA_NO_TYPE,
"", "",
B_GAIN, "msec", 0.1, s_fMaxDelay/2.0, 0.1); B_GAIN, "ms", 0.1, s_fMaxDelay/2.0, 0.1);
label->AddOutput(value); label->AddOutput(value);
value->AddInput(label); value->AddInput(label);
@ -1287,7 +1287,7 @@ void FlangerNode::initParameterWeb() {
P_DEPTH, P_DEPTH,
B_MEDIA_NO_TYPE, B_MEDIA_NO_TYPE,
"", "",
B_GAIN, "msec", 1.0, s_fMaxDelay/4.0, 0.1); B_GAIN, "ms", 1.0, s_fMaxDelay/4.0, 0.1);
label->AddOutput(value); label->AddOutput(value);
value->AddInput(label); value->AddInput(label);

View File

@ -28,22 +28,22 @@ static BParameterWeb* build_parameter_web()
BParameterWeb* web = new BParameterWeb; BParameterWeb* web = new BParameterWeb;
BParameterGroup* mainGroup = web->MakeGroup("LoggingConsumer Parameters"); BParameterGroup* mainGroup = web->MakeGroup("LoggingConsumer Parameters");
BParameterGroup* group = mainGroup->MakeGroup("Latency Control"); BParameterGroup* group = mainGroup->MakeGroup("Latency control");
BParameter* nullParam = group->MakeNullParameter(INPUT_NULL_PARAM, B_MEDIA_NO_TYPE, "Latency", B_GENERIC); BParameter* nullParam = group->MakeNullParameter(INPUT_NULL_PARAM, B_MEDIA_NO_TYPE, "Latency", B_GENERIC);
BParameter* latencyParam = group->MakeContinuousParameter(LATENCY_PARAM, B_MEDIA_NO_TYPE, "", BParameter* latencyParam = group->MakeContinuousParameter(LATENCY_PARAM, B_MEDIA_NO_TYPE, "",
B_GAIN, "msec", 5, 100, 5); B_GAIN, "ms", 5, 100, 5);
nullParam->AddOutput(latencyParam); nullParam->AddOutput(latencyParam);
latencyParam->AddInput(nullParam); latencyParam->AddInput(nullParam);
group = mainGroup->MakeGroup("CPU Percentage"); group = mainGroup->MakeGroup("CPU percentage");
nullParam = group->MakeNullParameter(CPU_NULL_PARAM, B_MEDIA_NO_TYPE, "CPU Spin Percentage", B_GENERIC); nullParam = group->MakeNullParameter(CPU_NULL_PARAM, B_MEDIA_NO_TYPE, "CPU spin percentage", B_GENERIC);
BContinuousParameter* cpuParam = group->MakeContinuousParameter(CPU_SPIN_PARAM, B_MEDIA_NO_TYPE, "", BContinuousParameter* cpuParam = group->MakeContinuousParameter(CPU_SPIN_PARAM, B_MEDIA_NO_TYPE, "",
B_GAIN, "percent", 5, 80, 5); B_GAIN, "percent", 5, 80, 5);
nullParam->AddOutput(cpuParam); nullParam->AddOutput(cpuParam);
cpuParam->AddInput(nullParam); cpuParam->AddInput(nullParam);
group = mainGroup->MakeGroup("Priority"); group = mainGroup->MakeGroup("Priority");
nullParam = group->MakeNullParameter(PRIO_NULL_PARAM, B_MEDIA_NO_TYPE, "Thread Priority", B_GENERIC); nullParam = group->MakeNullParameter(PRIO_NULL_PARAM, B_MEDIA_NO_TYPE, "Thread priority", B_GENERIC);
BDiscreteParameter* prioParam = group->MakeDiscreteParameter(PRIORITY_PARAM, B_MEDIA_NO_TYPE, "", B_GENERIC); BDiscreteParameter* prioParam = group->MakeDiscreteParameter(PRIORITY_PARAM, B_MEDIA_NO_TYPE, "", B_GENERIC);
prioParam->AddItem(5, "B_LOW_PRIORITY"); prioParam->AddItem(5, "B_LOW_PRIORITY");
prioParam->AddItem(10, "B_NORMAL_PRIORITY"); prioParam->AddItem(10, "B_NORMAL_PRIORITY");

View File

@ -53,7 +53,7 @@ MediaNodeControlApp::MediaNodeControlApp(
sprintf(buffer, sprintf(buffer,
"MediaNodeControlApp: couldn't find node (%ld):\n%s\n", "MediaNodeControlApp: couldn't find node (%ld):\n%s\n",
nodeID, strerror(err)); nodeID, strerror(err));
(new BAlert("error", buffer, "Ok"))->Go(); (new BAlert("error", buffer, "OK"))->Go();
return; return;
} }
@ -65,7 +65,7 @@ MediaNodeControlApp::MediaNodeControlApp(
sprintf(buffer, sprintf(buffer,
"MediaNodeControlApp: couldn't get node info (%ld):\n%s\n", "MediaNodeControlApp: couldn't get node info (%ld):\n%s\n",
nodeID, strerror(err)); nodeID, strerror(err));
(new BAlert("error", buffer, "Ok"))->Go(); (new BAlert("error", buffer, "OK"))->Go();
return; return;
} }
@ -80,7 +80,7 @@ MediaNodeControlApp::MediaNodeControlApp(
sprintf(buffer, sprintf(buffer,
"MediaNodeControlApp: no parameters for node (%ld):\n%s\n", "MediaNodeControlApp: no parameters for node (%ld):\n%s\n",
nodeID, strerror(err)); nodeID, strerror(err));
(new BAlert("error", buffer, "Ok"))->Go(); (new BAlert("error", buffer, "OK"))->Go();
return; return;
} }

View File

@ -26,30 +26,30 @@ BString MediaString::getStringFor(
if (kinds & B_BUFFER_PRODUCER) { if (kinds & B_BUFFER_PRODUCER) {
if (first) { if (first) {
list = "Buffer Producer"; list = "Buffer producer";
first = false; first = false;
} }
} }
if (kinds & B_BUFFER_CONSUMER) { if (kinds & B_BUFFER_CONSUMER) {
if (first) { if (first) {
list = "Buffer Consumer"; list = "Buffer consumer";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Buffer Consumer"; last = "Buffer consumer";
} }
} }
if (kinds & B_TIME_SOURCE) { if (kinds & B_TIME_SOURCE) {
if (first) { if (first) {
list = "Time Source"; list = "Time source";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Time Source"; last = "Time source";
} }
} }
if (kinds & B_CONTROLLABLE) { if (kinds & B_CONTROLLABLE) {
@ -65,57 +65,57 @@ BString MediaString::getStringFor(
} }
if (kinds & B_FILE_INTERFACE) { if (kinds & B_FILE_INTERFACE) {
if (first) { if (first) {
list = "File Interface"; list = "File interface";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "File Interface"; last = "File interface";
} }
} }
if (kinds & B_ENTITY_INTERFACE) { if (kinds & B_ENTITY_INTERFACE) {
if (first) { if (first) {
list = "Entity Interface"; list = "Entity interface";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Entity Interface"; last = "Entity interface";
} }
} }
if (kinds & B_PHYSICAL_INPUT) { if (kinds & B_PHYSICAL_INPUT) {
if (first) { if (first) {
list = "Physical Input"; list = "Physical input";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Physical Input"; last = "Physical input";
} }
} }
if (kinds & B_PHYSICAL_OUTPUT) { if (kinds & B_PHYSICAL_OUTPUT) {
if (first) { if (first) {
list = "Physical Output"; list = "Physical output";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Physical Output"; last = "Physical output";
} }
} }
if (kinds & B_SYSTEM_MIXER) { if (kinds & B_SYSTEM_MIXER) {
if (first) { if (first) {
list = "System Mixer"; list = "System mixer";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "System Mixer"; last = "System mixer";
} }
} }
@ -133,9 +133,9 @@ BString MediaString::getStringFor(
switch (runMode) { switch (runMode) {
case BMediaNode::B_OFFLINE: return "Offline"; case BMediaNode::B_OFFLINE: return "Offline";
case BMediaNode::B_RECORDING: return "Recording"; case BMediaNode::B_RECORDING: return "Recording";
case BMediaNode::B_DECREASE_PRECISION: return "Decrease Precision"; case BMediaNode::B_DECREASE_PRECISION: return "Decrease precision";
case BMediaNode::B_INCREASE_LATENCY: return "Increase Latency"; case BMediaNode::B_INCREASE_LATENCY: return "Increase latency";
case BMediaNode::B_DROP_DATA: return "Drop Data"; case BMediaNode::B_DROP_DATA: return "Drop data";
default: return "(unknown run mode)"; default: return "(unknown run mode)";
} }
} }
@ -150,24 +150,24 @@ BString MediaString::getStringFor(
D_METHOD(("MediaString::getStringFor(media_type)\n")); D_METHOD(("MediaString::getStringFor(media_type)\n"));
switch (type) { switch (type) {
case B_MEDIA_NO_TYPE: return "Typeless Media"; case B_MEDIA_NO_TYPE: return "Typeless media";
case B_MEDIA_UNKNOWN_TYPE: return "Unknown Media Type"; case B_MEDIA_UNKNOWN_TYPE: return "Unknown media type";
case B_MEDIA_RAW_AUDIO: return "Raw Audio"; case B_MEDIA_RAW_AUDIO: return "Raw audio";
case B_MEDIA_RAW_VIDEO: return "Raw Video"; case B_MEDIA_RAW_VIDEO: return "Raw video";
case B_MEDIA_VBL: return "Raw data from VBL area"; case B_MEDIA_VBL: return "Raw data from VBL area";
case B_MEDIA_TIMECODE: return "Timecode"; case B_MEDIA_TIMECODE: return "Timecode";
case B_MEDIA_MIDI: return "MIDI"; case B_MEDIA_MIDI: return "MIDI";
case B_MEDIA_TEXT: return "Text"; case B_MEDIA_TEXT: return "Text";
case B_MEDIA_HTML: return "HTML"; case B_MEDIA_HTML: return "HTML";
case B_MEDIA_MULTISTREAM: return "Multistream Media"; case B_MEDIA_MULTISTREAM: return "Multistream media";
case B_MEDIA_PARAMETERS: return "Parameters"; case B_MEDIA_PARAMETERS: return "Parameters";
case B_MEDIA_ENCODED_AUDIO: return "Encoded Audio"; case B_MEDIA_ENCODED_AUDIO: return "Encoded audio";
case B_MEDIA_ENCODED_VIDEO: return "Encoded Video"; case B_MEDIA_ENCODED_VIDEO: return "Encoded video";
default: { default: {
if (type >= B_MEDIA_PRIVATE) if (type >= B_MEDIA_PRIVATE)
return "Private Be Media Type"; return "Private Be media type";
if (type >= B_MEDIA_FIRST_USER_TYPE) if (type >= B_MEDIA_FIRST_USER_TYPE)
return "User-defined Media Type"; return "User-defined media type";
} }
} }
return "Unknown Media Type"; return "Unknown Media Type";
@ -179,15 +179,15 @@ BString MediaString::getStringFor(
D_METHOD(("MediaString::getStringFor(media_format_family)\n")); D_METHOD(("MediaString::getStringFor(media_format_family)\n"));
switch (family) { switch (family) {
case B_ANY_FORMAT_FAMILY: return "Any Format Family"; case B_ANY_FORMAT_FAMILY: return "Any format family";
case B_BEOS_FORMAT_FAMILY: return "BeOS Format Family"; case B_BEOS_FORMAT_FAMILY: return "BeOS format family";
case B_QUICKTIME_FORMAT_FAMILY: return "QuickTime Format Family"; case B_QUICKTIME_FORMAT_FAMILY: return "QuickTime format family";
case B_AVI_FORMAT_FAMILY: return "AVI Format Family"; case B_AVI_FORMAT_FAMILY: return "AVI format family";
case B_ASF_FORMAT_FAMILY: return "ASF Format Family"; case B_ASF_FORMAT_FAMILY: return "ASF format family";
case B_MPEG_FORMAT_FAMILY: return "MPEG Format Family"; case B_MPEG_FORMAT_FAMILY: return "MPEG format family";
case B_WAV_FORMAT_FAMILY: return "WAV Format Family"; case B_WAV_FORMAT_FAMILY: return "WAV format family";
case B_AIFF_FORMAT_FAMILY: return "AIFF Format Family"; case B_AIFF_FORMAT_FAMILY: return "AIFF format family";
default: return "Miscellaneous Format Family"; default: return "Miscellaneous format family";
} }
} }
@ -460,7 +460,7 @@ BString MediaString::getStringFor(
s << "Port " << source.port << ", ID " << source.id; s << "Port " << source.port << ", ID " << source.id;
} }
else { else {
s = "(None)"; s = "(none)";
} }
return s; return s;
} }
@ -476,7 +476,7 @@ BString MediaString::getStringFor(
s << "Port " << destination.port << ", ID " << destination.id; s << "Port " << destination.port << ", ID " << destination.id;
} }
else { else {
s = "(None)"; s = "(none)";
} }
return s; return s;
} }
@ -497,13 +497,13 @@ BString MediaString::forAudioFormat(
switch (format) { switch (format) {
case media_raw_audio_format::B_AUDIO_UCHAR: { case media_raw_audio_format::B_AUDIO_UCHAR: {
return "8 bit Integer"; return "8 bit integer";
} }
case media_raw_audio_format::B_AUDIO_SHORT: { case media_raw_audio_format::B_AUDIO_SHORT: {
return "16 bit Integer"; return "16 bit integer";
} }
case media_raw_audio_format::B_AUDIO_FLOAT: { case media_raw_audio_format::B_AUDIO_FLOAT: {
return "32 bit Float"; return "32 bit float";
} }
case media_raw_audio_format::B_AUDIO_INT: { case media_raw_audio_format::B_AUDIO_INT: {
BString s = ""; BString s = "";
@ -511,7 +511,7 @@ BString MediaString::forAudioFormat(
s << validBits << " bit "; s << validBits << " bit ";
else else
s << "32 bit "; s << "32 bit ";
s << "Integer"; s << "integer";
return s; return s;
} }
default: { default: {
@ -569,10 +569,10 @@ BString MediaString::forAudioByteOrder(
switch (byteOrder) { switch (byteOrder) {
case B_MEDIA_BIG_ENDIAN: { case B_MEDIA_BIG_ENDIAN: {
return "Big Endian"; return "Big endian";
} }
case B_MEDIA_LITTLE_ENDIAN: { case B_MEDIA_LITTLE_ENDIAN: {
return "Little Endian"; return "Little endian";
} }
default: { default: {
return "(unknown byte order)"; return "(unknown byte order)";
@ -642,156 +642,156 @@ BString MediaString::forAudioChannelMask(
} }
if (channelMask & B_CHANNEL_REARLEFT) { if (channelMask & B_CHANNEL_REARLEFT) {
if (first) { if (first) {
list = "Rear-Left"; list = "Rear-left";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Rear-Left"; last = "Rear-left";
} }
} }
if (channelMask & B_CHANNEL_REARRIGHT) { if (channelMask & B_CHANNEL_REARRIGHT) {
if (first) { if (first) {
list = "Rear-Right"; list = "Rear-right";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Rear-Right"; last = "Rear-right";
} }
} }
if (channelMask & B_CHANNEL_FRONT_LEFT_CENTER) { if (channelMask & B_CHANNEL_FRONT_LEFT_CENTER) {
if (first) { if (first) {
list = "Front-Left-Center"; list = "Front-left-center";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Front-Left-Center"; last = "Front-left-center";
} }
} }
if (channelMask & B_CHANNEL_FRONT_RIGHT_CENTER) { if (channelMask & B_CHANNEL_FRONT_RIGHT_CENTER) {
if (first) { if (first) {
list = "Front-Right-Center"; list = "Front-right-center";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Front-Right-Center"; last = "Front-right-center";
} }
} }
if (channelMask & B_CHANNEL_BACK_CENTER) { if (channelMask & B_CHANNEL_BACK_CENTER) {
if (first) { if (first) {
list = "Back-Center"; list = "Back-center";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Back-Center"; last = "Back-center";
} }
} }
if (channelMask & B_CHANNEL_SIDE_LEFT) { if (channelMask & B_CHANNEL_SIDE_LEFT) {
if (first) { if (first) {
list = "Side-Left"; list = "Side-left";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Side-Left"; last = "Side-left";
} }
} }
if (channelMask & B_CHANNEL_SIDE_RIGHT) { if (channelMask & B_CHANNEL_SIDE_RIGHT) {
if (first) { if (first) {
list = "Side-Right"; list = "Side-right";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Side-Right"; last = "Side-right";
} }
} }
if (channelMask & B_CHANNEL_TOP_CENTER) { if (channelMask & B_CHANNEL_TOP_CENTER) {
if (first) { if (first) {
list = "Top-Center"; list = "Top-center";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Top-Center"; last = "Top-center";
} }
} }
if (channelMask & B_CHANNEL_TOP_FRONT_LEFT) { if (channelMask & B_CHANNEL_TOP_FRONT_LEFT) {
if (first) { if (first) {
list = "Top-Front-Left"; list = "Top-Front-left";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Top-Front-Left"; last = "Top-Front-left";
} }
} }
if (channelMask & B_CHANNEL_TOP_FRONT_CENTER) { if (channelMask & B_CHANNEL_TOP_FRONT_CENTER) {
if (first) { if (first) {
list = "Top-Front-Center"; list = "Top-Front-center";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Top-Front-Center"; last = "Top-Front-center";
} }
} }
if (channelMask & B_CHANNEL_TOP_FRONT_RIGHT) { if (channelMask & B_CHANNEL_TOP_FRONT_RIGHT) {
if (first) { if (first) {
list = "Top-Front-Right"; list = "Top-Front-right";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Top-Front-Right"; last = "Top-Front-right";
} }
} }
if (channelMask & B_CHANNEL_TOP_BACK_LEFT) { if (channelMask & B_CHANNEL_TOP_BACK_LEFT) {
if (first) { if (first) {
list = "Top-Back-Left"; list = "Top-Back-left";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Top-Back-Left"; last = "Top-Back-left";
} }
} }
if (channelMask & B_CHANNEL_TOP_BACK_CENTER) { if (channelMask & B_CHANNEL_TOP_BACK_CENTER) {
if (first) { if (first) {
list = "Top-Back-Center"; list = "Top-Back-center";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Top-Back-Center"; last = "Top-Back-center";
} }
} }
if (channelMask & B_CHANNEL_TOP_BACK_RIGHT) { if (channelMask & B_CHANNEL_TOP_BACK_RIGHT) {
if (first) { if (first) {
list = "Top-Back-Right"; list = "Top-Back-right";
first = false; first = false;
} }
else { else {
if (last != "") if (last != "")
list << ", " << last; list << ", " << last;
last = "Top-Back-Right"; last = "Top-Back-right";
} }
} }
if (last != "") { if (last != "") {
@ -876,8 +876,8 @@ BString MediaString::forVideoFormat(
case B_RGB15_BIG: return "15 bit RGB"; case B_RGB15_BIG: return "15 bit RGB";
case B_RGBA15: case B_RGBA15:
case B_RGBA15_BIG: return "15 bit RGBA"; case B_RGBA15_BIG: return "15 bit RGBA";
case B_CMAP8: return "8 bit Color-Index"; case B_CMAP8: return "8 bit color-index";
case B_GRAY8: return "8 bit Grayscale-Index"; case B_GRAY8: return "8 bit grayscale-index";
case B_GRAY1: return "Monochrome"; case B_GRAY1: return "Monochrome";
case B_YUV422: return "YUV422"; case B_YUV422: return "YUV422";
case B_YUV411: return "YUV411"; case B_YUV411: return "YUV411";
@ -942,7 +942,7 @@ BString MediaString::forVideoFieldRate(
BString s = ""; BString s = "";
if (interlace == 1) { if (interlace == 1) {
s << "Non-Interlaced "; s << "Non-interlaced ";
} }
else { else {
s << "Interlaced "; s << "Interlaced ";
@ -970,10 +970,10 @@ BString MediaString::forVideoOrientation(
switch (orientation) { switch (orientation) {
case B_VIDEO_TOP_LEFT_RIGHT: { case B_VIDEO_TOP_LEFT_RIGHT: {
return "Top to Bottom, Left to Right"; return "Top to bottom, left to right";
} }
case B_VIDEO_BOTTOM_LEFT_RIGHT: { case B_VIDEO_BOTTOM_LEFT_RIGHT: {
return "Bottom to Top, Left to Right"; return "Bottom to top, left to right";
} }
default: { default: {
return "(unkown video orientation)"; return "(unkown video orientation)";
@ -1129,7 +1129,7 @@ BString MediaString::forMultistreamFormat(
} }
switch (format) { switch (format) {
case media_multistream_format::B_VID: return "BeOS Video"; case media_multistream_format::B_VID: return "BeOS video";
case media_multistream_format::B_AVI: return "AVI"; case media_multistream_format::B_AVI: return "AVI";
case media_multistream_format::B_MPEG1: return "MPEG1"; case media_multistream_format::B_MPEG1: return "MPEG1";
case media_multistream_format::B_MPEG2: return "MPEG2"; case media_multistream_format::B_MPEG2: return "MPEG2";

View File

@ -129,7 +129,7 @@ Debugger::RefsReceived(BMessage *message)
ref.name, strerror(status)); ref.name, strerror(status));
(new BAlert("Debugger request", (new BAlert("Debugger request",
buffer, "Ok", NULL, NULL, buffer, "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go();
} }
} }
@ -219,7 +219,7 @@ Debugger::ShowAbout()
{ {
BAlert *alert = new BAlert("about", "Debugger\n" BAlert *alert = new BAlert("about", "Debugger\n"
"\twritten by Philippe Houdoin\n" "\twritten by Philippe Houdoin\n"
"\tCopyright 2009, Haiku Inc.\n", "Ok"); "\tCopyright 2009, Haiku, Inc.\n", "OK");
BTextView *view = alert->TextView(); BTextView *view = alert->TextView();
BFont font; BFont font;

View File

@ -149,8 +149,8 @@ TBeMenu::AddNextItem()
TrackingHookData* data = fBarView->GetTrackingHookData(); TrackingHookData* data = fBarView->GetTrackingHookData();
if (fAddState == kAddingRecents) { if (fAddState == kAddingRecents) {
const char* recentTitle[] = {"Recent Documents", "Recent Folders", const char* recentTitle[] = {"Recent documents", "Recent folders",
"Recent Applications"}; "Recent applications"};
const int recentType[] = {kRecentDocuments, kRecentFolders, const int recentType[] = {kRecentDocuments, kRecentFolders,
kRecentApplications}; kRecentApplications};
const int recentTypes = 3; const int recentTypes = 3;
@ -225,7 +225,7 @@ TBeMenu::AddStandardBeMenuItems()
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL #ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
"About Haiku" "About Haiku"
#else #else
"About This System" "About this system"
#endif #endif
B_UTF8_ELLIPSIS, new BMessage(kShowSplash)); B_UTF8_ELLIPSIS, new BMessage(kShowSplash));
item->SetEnabled(!dragging); item->SetEnabled(!dragging);
@ -240,7 +240,7 @@ TBeMenu::AddStandardBeMenuItems()
item->SetEnabled(!dragging); item->SetEnabled(!dragging);
AddItem(item); AddItem(item);
item = new BMenuItem("Show Replicants", new BMessage(kToggleDraggers)); item = new BMenuItem("Show replicants", new BMessage(kToggleDraggers));
item->SetEnabled(!dragging); item->SetEnabled(!dragging);
item->SetMarked(BDragger::AreDraggersDrawn()); item->SetMarked(BDragger::AreDraggersDrawn());
AddItem(item); AddItem(item);
@ -251,7 +251,7 @@ TBeMenu::AddStandardBeMenuItems()
AddItem(mountMenu); AddItem(mountMenu);
#endif #endif
item = new BMenuItem("Deskbar Preferences" B_UTF8_ELLIPSIS, item = new BMenuItem("Deskbar preferences" B_UTF8_ELLIPSIS,
new BMessage(kConfigShow)); new BMessage(kConfigShow));
item->SetTarget(be_app); item->SetTarget(be_app);
AddItem(item); AddItem(item);
@ -260,7 +260,7 @@ TBeMenu::AddStandardBeMenuItems()
BMenu* shutdownMenu = new BMenu("Shutdown" B_UTF8_ELLIPSIS); BMenu* shutdownMenu = new BMenu("Shutdown" B_UTF8_ELLIPSIS);
item = new BMenuItem("Restart System", new BMessage(kRebootSystem)); item = new BMenuItem("Restart system", new BMessage(kRebootSystem));
item->SetEnabled(!dragging); item->SetEnabled(!dragging);
shutdownMenu->AddItem(item); shutdownMenu->AddItem(item);
@ -272,7 +272,7 @@ TBeMenu::AddStandardBeMenuItems()
} }
#endif #endif
item = new BMenuItem("Power Off", new BMessage(kShutdownSystem)); item = new BMenuItem("Power off", new BMessage(kShutdownSystem));
item->SetEnabled(!dragging); item->SetEnabled(!dragging);
shutdownMenu->AddItem(item); shutdownMenu->AddItem(item);
shutdownMenu->SetFont(be_plain_font); shutdownMenu->SetFont(be_plain_font);

View File

@ -24,15 +24,15 @@
PreferencesWindow::PreferencesWindow(BRect frame) PreferencesWindow::PreferencesWindow(BRect frame)
: :
BWindow(frame, "Deskbar Preferences", B_TITLED_WINDOW, BWindow(frame, "Deskbar preferences", B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE) B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_NOT_ZOOMABLE)
{ {
// Controls // Controls
fMenuRecentDocuments = new BCheckBox("Recent Documents:", fMenuRecentDocuments = new BCheckBox("Recent documents:",
new BMessage(kUpdateRecentCounts)); new BMessage(kUpdateRecentCounts));
fMenuRecentApplications = new BCheckBox("Recent Applications:", fMenuRecentApplications = new BCheckBox("Recent applications:",
new BMessage(kUpdateRecentCounts)); new BMessage(kUpdateRecentCounts));
fMenuRecentFolders = new BCheckBox("Recent Folders:", fMenuRecentFolders = new BCheckBox("Recent folders:",
new BMessage(kUpdateRecentCounts)); new BMessage(kUpdateRecentCounts));
fMenuRecentDocumentCount = new BTextControl(NULL, NULL, fMenuRecentDocumentCount = new BTextControl(NULL, NULL,
@ -42,23 +42,23 @@ PreferencesWindow::PreferencesWindow(BRect frame)
fMenuRecentFolderCount = new BTextControl(NULL, NULL, fMenuRecentFolderCount = new BTextControl(NULL, NULL,
new BMessage(kUpdateRecentCounts)); new BMessage(kUpdateRecentCounts));
fAppsSort = new BCheckBox("Sort Running Applications", fAppsSort = new BCheckBox("Sort running applications",
new BMessage(kSortRunningApps)); new BMessage(kSortRunningApps));
fAppsSortTrackerFirst = new BCheckBox("Tracker Always First", fAppsSortTrackerFirst = new BCheckBox("Tracker always first",
new BMessage(kTrackerFirst)); new BMessage(kTrackerFirst));
fAppsShowExpanders = new BCheckBox("Show Application Expander", fAppsShowExpanders = new BCheckBox("Show application expander",
new BMessage(kSuperExpando)); new BMessage(kSuperExpando));
fAppsExpandNew = new BCheckBox("Expand New Applications", fAppsExpandNew = new BCheckBox("Expand new applications",
new BMessage(kExpandNewTeams)); new BMessage(kExpandNewTeams));
fClock24Hours = new BCheckBox("24 Hour Clock", new BMessage(kMilTime)); fClock24Hours = new BCheckBox("24 hour clock", new BMessage(kMilTime));
fClockSeconds = new BCheckBox("Show Seconds", fClockSeconds = new BCheckBox("Show seconds",
new BMessage(kShowSeconds)); new BMessage(kShowSeconds));
fClockEuropeanDate = new BCheckBox("European Date", fClockEuropeanDate = new BCheckBox("European date",
new BMessage(kEuroDate)); new BMessage(kEuroDate));
fClockFullDate = new BCheckBox("Full Date", new BMessage(kFullDate)); fClockFullDate = new BCheckBox("Full date", new BMessage(kFullDate));
fWindowAlwaysOnTop = new BCheckBox("Always On Top", fWindowAlwaysOnTop = new BCheckBox("Always on top",
new BMessage(kAlwaysTop)); new BMessage(kAlwaysTop));
fWindowAutoRaise = new BCheckBox("Auto-raise", new BMessage(kAutoRaise)); fWindowAutoRaise = new BCheckBox("Auto-raise", new BMessage(kAutoRaise));
@ -183,7 +183,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
.Add(fMenuRecentApplicationCount) .Add(fMenuRecentApplicationCount)
.End() .End()
.End() .End()
.Add(new BButton("Edit Menu" B_UTF8_ELLIPSIS, .Add(new BButton("Edit menu" B_UTF8_ELLIPSIS,
new BMessage(kEditMenuInTracker))) new BMessage(kEditMenuInTracker)))
.SetInsets(10, 10, 10, 10) .SetInsets(10, 10, 10, 10)
.End() .End()

View File

@ -558,14 +558,14 @@ TTimeView::ShowClockOptions(BPoint point)
menu->SetFont(be_plain_font); menu->SetFont(be_plain_font);
BMenuItem* item; BMenuItem* item;
item = new BMenuItem("Change Time" B_UTF8_ELLIPSIS, item = new BMenuItem("Change time" B_UTF8_ELLIPSIS,
new BMessage(kChangeClock)); new BMessage(kChangeClock));
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Hide Time", new BMessage('time')); item = new BMenuItem("Hide time", new BMessage('time'));
menu->AddItem(item); menu->AddItem(item);
item = new BMenuItem("Show Calendar" B_UTF8_ELLIPSIS, item = new BMenuItem("Show calendar" B_UTF8_ELLIPSIS,
new BMessage(kShowCalendar)); new BMessage(kShowCalendar));
menu->AddItem(item); menu->AddItem(item);

View File

@ -173,7 +173,7 @@ TWindowMenu::AttachedToWindow()
int32 itemCount = CountItems() + parentMenuItems; int32 itemCount = CountItems() + parentMenuItems;
if (itemCount < 1) { if (itemCount < 1) {
TWindowMenuItem* noWindowsItem = TWindowMenuItem* noWindowsItem =
new TWindowMenuItem("No Windows", -1, false, false); new TWindowMenuItem("No windows", -1, false, false);
noWindowsItem->SetEnabled(false); noWindowsItem->SetEnabled(false);
@ -183,7 +183,7 @@ TWindowMenu::AttachedToWindow()
// it. (but we only add this option if the application is not Tracker.) // it. (but we only add this option if the application is not Tracker.)
if (fApplicationSignature.ICompare(kTrackerSignature) != 0) { if (fApplicationSignature.ICompare(kTrackerSignature) != 0) {
AddSeparatorItem(); AddSeparatorItem();
AddItem(new TShowHideMenuItem("Quit Application", fTeam, AddItem(new TShowHideMenuItem("Quit application", fTeam,
B_QUIT_REQUESTED)); B_QUIT_REQUESTED));
} }
} else { } else {
@ -191,11 +191,11 @@ TWindowMenu::AttachedToWindow()
// to the menu // to the menu
if (!dragging) { if (!dragging) {
TShowHideMenuItem* hide = TShowHideMenuItem* hide =
new TShowHideMenuItem("Hide All", fTeam, B_MINIMIZE_WINDOW); new TShowHideMenuItem("Hide all", fTeam, B_MINIMIZE_WINDOW);
TShowHideMenuItem* show = TShowHideMenuItem* show =
new TShowHideMenuItem("Show All", fTeam, B_BRING_TO_FRONT); new TShowHideMenuItem("Show all", fTeam, B_BRING_TO_FRONT);
TShowHideMenuItem* close = TShowHideMenuItem* close =
new TShowHideMenuItem("Close All", fTeam, B_QUIT_REQUESTED); new TShowHideMenuItem("Close all", fTeam, B_QUIT_REQUESTED);
if (miniCount == itemCount) if (miniCount == itemCount)
hide->SetEnabled(false); hide->SetEnabled(false);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006 Haiku, Inc. All Rights Reserved. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Copyright 1997, 1998 R3 Software Ltd. All Rights Reserved. * Copyright 1997, 1998 R3 Software Ltd. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
@ -687,7 +687,7 @@ CalcView::AboutRequested()
"written by Timothy Wayper,\nStephan Aßmus and Ingo Weinhold\n\n" "written by Timothy Wayper,\nStephan Aßmus and Ingo Weinhold\n\n"
B_UTF8_COPYRIGHT"1997, 1998 R3 Software Ltd.\n" B_UTF8_COPYRIGHT"1997, 1998 R3 Software Ltd.\n"
B_UTF8_COPYRIGHT"2006-2009 Haiku, Inc.\n\n" B_UTF8_COPYRIGHT"2006-2009 Haiku, Inc.\n\n"
"All Rights Reserved.", "Cool"); "All Rights Reserved.", "OK");
alert->Go(NULL); alert->Go(NULL);
} }
@ -1098,13 +1098,13 @@ void
CalcView::_CreatePopUpMenu() CalcView::_CreatePopUpMenu()
{ {
// construct items // construct items
fAutoNumlockItem = new BMenuItem("Enable Num Lock on start up", fAutoNumlockItem = new BMenuItem("Enable Num Lock on startup",
new BMessage(MSG_OPTIONS_AUTO_NUM_LOCK)); new BMessage(MSG_OPTIONS_AUTO_NUM_LOCK));
fAudioFeedbackItem = new BMenuItem("Audio Feedback", fAudioFeedbackItem = new BMenuItem("Audio Feedback",
new BMessage(MSG_OPTIONS_AUDIO_FEEDBACK)); new BMessage(MSG_OPTIONS_AUDIO_FEEDBACK));
fShowKeypadItem = new BMenuItem("Show Keypad", fShowKeypadItem = new BMenuItem("Show keypad",
new BMessage(MSG_OPTIONS_SHOW_KEYPAD)); new BMessage(MSG_OPTIONS_SHOW_KEYPAD));
fAboutItem = new BMenuItem("About DeskCalc", fAboutItem = new BMenuItem("About DeskCalc" B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED)); new BMessage(B_ABOUT_REQUESTED));
// apply current settings // apply current settings

View File

@ -74,7 +74,7 @@ DevicePCI::InitFromAttributes()
const char *venFull; const char *venFull;
get_vendor_info(fVendorId, &venShort, &venFull); get_vendor_info(fVendorId, &venShort, &venFull);
if (!venShort && !venFull) { if (!venShort && !venFull) {
ManufacturerName << "Unkown"; ManufacturerName << "Unknown";
} else if (venShort && venFull) { } else if (venShort && venFull) {
ManufacturerName << venFull << "(" << venShort << ")"; ManufacturerName << venFull << "(" << venShort << ")";
} else { } else {
@ -98,7 +98,7 @@ DevicePCI::InitFromAttributes()
SetAttribute("Manufacturer", ManufacturerName); SetAttribute("Manufacturer", ManufacturerName);
SetAttribute("Driver used", "Not implemented"); SetAttribute("Driver used", "Not implemented");
SetAttribute("Device paths", "Not implemented"); SetAttribute("Device paths", "Not implemented");
SetAttribute("Class Info", classInfo); SetAttribute("Class info", classInfo);
fCategory = (Category)fClassBaseId; fCategory = (Category)fClassBaseId;
BString outlineName; BString outlineName;
outlineName << ManufacturerName << " " << DeviceName; outlineName << ManufacturerName << " " << DeviceName;

View File

@ -56,7 +56,7 @@ DevicesApplication::ShowAbout()
"\tBased on listdev by Jérôme Duval\n" "\tBased on listdev by Jérôme Duval\n"
"\tand the previous Devices preference\n" "\tand the previous Devices preference\n"
"\tby Jérôme Duval and Sikosis\n" "\tby Jérôme Duval and Sikosis\n"
"\tCopyright 2009, Haiku Inc.\n", "Ok"); "\tCopyright 2009, Haiku, Inc.\n", "OK");
BTextView* view = alert->TextView(); BTextView* view = alert->TextView();
BFont font; BFont font;

View File

@ -32,11 +32,11 @@ DevicesView::CreateLayout()
BMenuBar* menuBar = new BMenuBar("menu"); BMenuBar* menuBar = new BMenuBar("menu");
BMenu* menu = new BMenu("Devices"); BMenu* menu = new BMenu("Devices");
BMenuItem* item; BMenuItem* item;
menu->AddItem(new BMenuItem("Refresh Devices", new BMessage(kMsgRefresh), 'R')); menu->AddItem(new BMenuItem("Refresh devices", new BMessage(kMsgRefresh), 'R'));
menu->AddItem(item = new BMenuItem("Report Compatibility", menu->AddItem(item = new BMenuItem("Report compatibility",
new BMessage(kMsgReportCompatibility))); new BMessage(kMsgReportCompatibility)));
item->SetEnabled(false); item->SetEnabled(false);
menu->AddItem(item = new BMenuItem("Generate System Information", menu->AddItem(item = new BMenuItem("Generate system information",
new BMessage(kMsgGenerateSysInfo))); new BMessage(kMsgGenerateSysInfo)));
item->SetEnabled(false); item->SetEnabled(false);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
@ -60,12 +60,12 @@ DevicesView::CreateLayout()
// why? Bug? In scrollview or in outlinelistview? // why? Bug? In scrollview or in outlinelistview?
BPopUpMenu* orderByPopupMenu = new BPopUpMenu("orderByMenu"); BPopUpMenu* orderByPopupMenu = new BPopUpMenu("orderByMenu");
BMenuItem* byCategory = new BMenuItem("category", BMenuItem* byCategory = new BMenuItem("Category",
new BMessage(kMsgOrderCategory)); new BMessage(kMsgOrderCategory));
BMenuItem* byConnection = new BMenuItem("connection", BMenuItem* byConnection = new BMenuItem("Connection",
new BMessage(kMsgOrderConnection)); new BMessage(kMsgOrderConnection));
byCategory->SetMarked(true); byCategory->SetMarked(true);
fOrderBy = byCategory->IsMarked() ? ORDER_BY_CATEGORY : fOrderBy = byCategory->IsMarked() ? ORDER_BY_CATEGORY :
ORDER_BY_CONNECTION; ORDER_BY_CONNECTION;
orderByPopupMenu->AddItem(byCategory); orderByPopupMenu->AddItem(byCategory);
orderByPopupMenu->AddItem(byConnection); orderByPopupMenu->AddItem(byConnection);
@ -76,7 +76,7 @@ DevicesView::CreateLayout()
fBasicTab = new BTab(); fBasicTab = new BTab();
fBasicView = new PropertyListPlain("basicView"); fBasicView = new PropertyListPlain("basicView");
fTabView->AddTab(fBasicView, fBasicTab); fTabView->AddTab(fBasicView, fBasicTab);
fBasicTab->SetLabel("Basic Information"); fBasicTab->SetLabel("Basic information");
fDeviceTypeTab = new BTab(); fDeviceTypeTab = new BTab();
fBusView = new PropertyListPlain("busView"); fBusView = new PropertyListPlain("busView");
@ -273,27 +273,27 @@ DevicesView::AddDeviceAndChildren(device_node_cookie *node, Device* parent)
} }
attributes.push_back(Attribute(attr.name, attrString)); attributes.push_back(Attribute(attr.name, attrString));
} }
// Determine what type of device it is and create it // Determine what type of device it is and create it
for (unsigned int i = 0; i < attributes.size(); i++) { for (unsigned int i = 0; i < attributes.size(); i++) {
// Devices Root // Devices Root
if (attributes[i].fName == "device/pretty name" if (attributes[i].fName == "device/pretty name"
&& attributes[i].fValue == "Devices Root") { && attributes[i].fValue == "Devices Root") {
newDevice = new Device(parent, BUS_NONE, CAT_COMPUTER, "Computer"); newDevice = new Device(parent, BUS_NONE, CAT_COMPUTER, "Computer");
break; break;
} }
// PCI bus // PCI bus
if (attributes[i].fName == "device/pretty name" if (attributes[i].fName == "device/pretty name"
&& attributes[i].fValue == "PCI") { && attributes[i].fValue == "PCI") {
newDevice = new Device(parent, BUS_PCI, CAT_BUS, "PCI Bus"); newDevice = new Device(parent, BUS_PCI, CAT_BUS, "PCI bus");
break; break;
} }
// ISA bus // ISA bus
if (attributes[i].fName == "device/bus" if (attributes[i].fName == "device/bus"
&& attributes[i].fValue == "isa") { && attributes[i].fValue == "isa") {
newDevice = new Device(parent, BUS_ISA, CAT_BUS, "ISA Bus"); newDevice = new Device(parent, BUS_ISA, CAT_BUS, "ISA bus");
break; break;
} }
@ -304,11 +304,11 @@ DevicesView::AddDeviceAndChildren(device_node_cookie *node, Device* parent)
break; break;
} }
} }
if (newDevice == NULL) { if (newDevice == NULL) {
newDevice = new Device(parent, BUS_NONE, CAT_NONE, "Unknown Device"); newDevice = new Device(parent, BUS_NONE, CAT_NONE, "Unknown device");
} }
// Add its attributes to the device, initialize it and add to the list. // Add its attributes to the device, initialize it and add to the list.
for (unsigned int i = 0; i < attributes.size(); i++) { for (unsigned int i = 0; i < attributes.size(); i++) {
newDevice->SetAttribute(attributes[i].fName, attributes[i].fValue); newDevice->SetAttribute(attributes[i].fName, attributes[i].fValue);

View File

@ -53,7 +53,7 @@ EditorTabView::EditorTabView(BRect frame, const char *name, button_width width,
{ {
ContainerView()->MoveBy(-ContainerView()->Frame().left, ContainerView()->MoveBy(-ContainerView()->Frame().left,
TabHeight() + 1 - ContainerView()->Frame().top); TabHeight() + 1 - ContainerView()->Frame().top);
fNoEditorView = new BStringView(ContainerView()->Bounds(), "Type Editor", fNoEditorView = new BStringView(ContainerView()->Bounds(), "Type editor",
"No type editor available", B_FOLLOW_NONE); "No type editor available", B_FOLLOW_NONE);
fNoEditorView->ResizeToPreferred(); fNoEditorView->ResizeToPreferred();
fNoEditorView->SetAlignment(B_ALIGN_CENTER); fNoEditorView->SetAlignment(B_ALIGN_CENTER);
@ -128,7 +128,7 @@ EditorTabView::AddRawEditorTab(BView *view)
fRawTab = CountTabs(); fRawTab = CountTabs();
view = new BView(BRect(0, 0, 5, 5), "Raw Editor", B_FOLLOW_NONE, 0); view = new BView(BRect(0, 0, 5, 5), "Raw editor", B_FOLLOW_NONE, 0);
view->SetViewColor(ViewColor()); view->SetViewColor(ViewColor());
AddTab(view); AddTab(view);
} }
@ -208,7 +208,7 @@ AttributeWindow::AttributeWindow(BRect _rect, entry_ref *ref, const char *attrib
BMenu *menu = new BMenu("Attribute"); BMenu *menu = new BMenu("Attribute");
// the ProbeView save menu items will be inserted here // the ProbeView save menu items will be inserted here
menu->AddItem(new BMenuItem("Remove from File", new BMessage(kMsgRemoveAttribute))); menu->AddItem(new BMenuItem("Remove from file", new BMessage(kMsgRemoveAttribute)));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
// the ProbeView print menu items will be inserted here // the ProbeView print menu items will be inserted here

View File

@ -346,7 +346,7 @@ DiskProbe::RefsReceived(BMessage *message)
ref.name, strerror(status)); ref.name, strerror(status));
(new BAlert("DiskProbe request", (new BAlert("DiskProbe request",
buffer, "Ok", NULL, NULL, buffer, "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go();
} }
} }
@ -465,7 +465,7 @@ DiskProbe::AboutRequested()
BAlert *alert = new BAlert("about", "DiskProbe\n" BAlert *alert = new BAlert("about", "DiskProbe\n"
"\twritten by Axel Dörfler\n" "\twritten by Axel Dörfler\n"
"\tCopyright 2004-2007, Haiku.\n\n" "\tCopyright 2004-2007, Haiku.\n\n"
"original Be version by Robert Polic\n", "Ok"); "Original Be version by Robert Polic\n", "OK");
BTextView *view = alert->TextView(); BTextView *view = alert->TextView();
BFont font; BFont font;

View File

@ -50,12 +50,12 @@ FileWindow::FileWindow(BRect rect, entry_ref *ref, const BMessage *settings)
menu->AddItem(new BMenuItem("New" B_UTF8_ELLIPSIS, menu->AddItem(new BMenuItem("New" B_UTF8_ELLIPSIS,
new BMessage(kMsgOpenOpenWindow), 'N', B_COMMAND_KEY)); new BMessage(kMsgOpenOpenWindow), 'N', B_COMMAND_KEY));
BMenu *devicesMenu = new BMenu("Open Device"); BMenu *devicesMenu = new BMenu("Open device");
OpenWindow::CollectDevices(devicesMenu); OpenWindow::CollectDevices(devicesMenu);
devicesMenu->SetTargetForItems(be_app); devicesMenu->SetTargetForItems(be_app);
menu->AddItem(new BMenuItem(devicesMenu)); menu->AddItem(new BMenuItem(devicesMenu));
BMenu *recentsMenu = BRecentFilesList::NewFileListMenu("Open File" B_UTF8_ELLIPSIS, BMenu *recentsMenu = BRecentFilesList::NewFileListMenu("Open file" B_UTF8_ELLIPSIS,
NULL, NULL, be_app, 10, false, NULL, kSignature); NULL, NULL, be_app, 10, false, NULL, kSignature);
BMenuItem *item; BMenuItem *item;
menu->AddItem(item = new BMenuItem(recentsMenu, new BMessage(kMsgOpenFilePanel))); menu->AddItem(item = new BMenuItem(recentsMenu, new BMessage(kMsgOpenFilePanel)));

View File

@ -35,13 +35,13 @@ OpenWindow::OpenWindow()
if (BMenuItem *item = fDevicesMenu->ItemAt(0)) if (BMenuItem *item = fDevicesMenu->ItemAt(0))
item->SetMarked(true); item->SetMarked(true);
BMenuField *field = new BMenuField("Examine Device:", fDevicesMenu, NULL); BMenuField *field = new BMenuField("Examine device:", fDevicesMenu, NULL);
BButton *probeDeviceButton = new BButton("device", "Probe Device", BButton *probeDeviceButton = new BButton("device", "Probe device",
new BMessage(kMsgProbeDevice)); new BMessage(kMsgProbeDevice));
probeDeviceButton->MakeDefault(true); probeDeviceButton->MakeDefault(true);
BButton *probeFileButton = new BButton("file", "Probe File" B_UTF8_ELLIPSIS, BButton *probeFileButton = new BButton("file", "Probe file" B_UTF8_ELLIPSIS,
new BMessage(kMsgProbeFile)); new BMessage(kMsgProbeFile));
BButton *cancelButton = new BButton("cancel", "Cancel", BButton *cancelButton = new BButton("cancel", "Cancel",

View File

@ -519,7 +519,7 @@ HeaderView::HeaderView(BRect frame, const entry_ref *ref, DataEditor &editor)
if (editor.IsAttribute()) { if (editor.IsAttribute()) {
top += 3; top += 3;
stringView = new BStringView(BRect(50, top, frame.right, top + 15), stringView = new BStringView(BRect(50, top, frame.right, top + 15),
B_EMPTY_STRING, "Attribute Type: "); B_EMPTY_STRING, "Attribute type: ");
stringView->SetFont(&boldFont); stringView->SetFont(&boldFont);
stringView->ResizeToPreferred(); stringView->ResizeToPreferred();
AddChild(stringView); AddChild(stringView);
@ -590,8 +590,8 @@ HeaderView::HeaderView(BRect frame, const entry_ref *ref, DataEditor &editor)
rect.left = rect.right + 4; rect.left = rect.right + 4;
rect.right = frame.right; rect.right = frame.right;
stringView = new BStringView(rect, B_EMPTY_STRING, editor.IsAttribute() stringView = new BStringView(rect, B_EMPTY_STRING, editor.IsAttribute()
? "Attribute Offset: " : editor.IsDevice() ? "Attribute offset: " : editor.IsDevice()
? "Device Offset: " : "File Offset: "); ? "Device offset: " : "File offset: ");
stringView->SetFont(&boldFont); stringView->SetFont(&boldFont);
stringView->ResizeToPreferred(); stringView->ResizeToPreferred();
AddChild(stringView); AddChild(stringView);
@ -1092,7 +1092,7 @@ EditorLooper::Find(off_t startAt, const uint8 *data, size_t dataSize,
// If the user had to wait more than 8 seconds for the result, // If the user had to wait more than 8 seconds for the result,
// we are trying to please him with a requester... // we are trying to please him with a requester...
(new BAlert("DiskProbe request", (new BAlert("DiskProbe request",
"Could not find search string.", "Ok", NULL, NULL, "Could not find search string.", "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL);
} else } else
beep(); beep();
@ -1119,7 +1119,7 @@ TypeView::TypeView(BRect rect, const char* name, int32 index,
fTypeEditorView = GetTypeEditorAt(index, Frame(), editor); fTypeEditorView = GetTypeEditorAt(index, Frame(), editor);
if (fTypeEditorView == NULL) { if (fTypeEditorView == NULL) {
AddChild(new BStringView(Bounds(), "Type Editor", AddChild(new BStringView(Bounds(), "Type editor",
"Type editor not supported", B_FOLLOW_NONE)); "Type editor not supported", B_FOLLOW_NONE));
} else } else
AddChild(fTypeEditorView); AddChild(fTypeEditorView);
@ -1323,7 +1323,7 @@ void
ProbeView::AddPrintMenuItems(BMenu* menu, int32 index) ProbeView::AddPrintMenuItems(BMenu* menu, int32 index)
{ {
BMenuItem *item; BMenuItem *item;
menu->AddItem(item = new BMenuItem("Page Setup" B_UTF8_ELLIPSIS, menu->AddItem(item = new BMenuItem("Page setup" B_UTF8_ELLIPSIS,
new BMessage(kMsgPageSetup)), index++); new BMessage(kMsgPageSetup)), index++);
item->SetTarget(this); item->SetTarget(this);
menu->AddItem(item = new BMenuItem("Print" B_UTF8_ELLIPSIS, menu->AddItem(item = new BMenuItem("Print" B_UTF8_ELLIPSIS,
@ -1427,14 +1427,14 @@ ProbeView::AttachedToWindow()
'V')); 'V'));
fPasteMenuItem->SetTarget(NULL, Window()); fPasteMenuItem->SetTarget(NULL, Window());
_CheckClipboard(); _CheckClipboard();
menu->AddItem(item = new BMenuItem("Select All", new BMessage(B_SELECT_ALL), menu->AddItem(item = new BMenuItem("Select all", new BMessage(B_SELECT_ALL),
'A')); 'A'));
item->SetTarget(NULL, Window()); item->SetTarget(NULL, Window());
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(item = new BMenuItem("Find" B_UTF8_ELLIPSIS, menu->AddItem(item = new BMenuItem("Find" B_UTF8_ELLIPSIS,
new BMessage(kMsgOpenFindWindow), 'F')); new BMessage(kMsgOpenFindWindow), 'F'));
item->SetTarget(this); item->SetTarget(this);
menu->AddItem(fFindAgainMenuItem = new BMenuItem("Find Again", menu->AddItem(fFindAgainMenuItem = new BMenuItem("Find again",
new BMessage(kMsgFind), 'G')); new BMessage(kMsgFind), 'G'));
fFindAgainMenuItem->SetEnabled(false); fFindAgainMenuItem->SetEnabled(false);
fFindAgainMenuItem->SetTarget(this); fFindAgainMenuItem->SetTarget(this);
@ -1546,7 +1546,7 @@ ProbeView::AttachedToWindow()
// Font Size // Font Size
subMenu = new BMenu("Font Size"); subMenu = new BMenu("Font size");
subMenu->SetRadioMode(true); subMenu->SetRadioMode(true);
const int32 fontSizes[] = {9, 10, 11, 12, 13, 14, 18, 24, 36, 48}; const int32 fontSizes[] = {9, 10, 11, 12, 13, 14, 18, 24, 36, 48};
int32 fontSize = int32(fDataView->FontSize() + 0.5); int32 fontSize = int32(fDataView->FontSize() + 0.5);
@ -1841,7 +1841,7 @@ ProbeView::_Save()
strerror(status)); strerror(status));
(new BAlert("DiskProbe request", (new BAlert("DiskProbe request",
buffer, "Ok", NULL, NULL, buffer, "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL); B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(NULL);
return status; return status;
@ -1857,7 +1857,7 @@ ProbeView::QuitRequested()
return true; return true;
int32 chosen = (new BAlert("DiskProbe request", int32 chosen = (new BAlert("DiskProbe request",
"Save changes before closing?", "Don't Save", "Cancel", "Save", "Save changes before closing?", "Don't save", "Cancel", "Save",
B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go(); B_WIDTH_AS_USUAL, B_WARNING_ALERT))->Go();
if (chosen == 0) if (chosen == 0)

View File

@ -191,7 +191,7 @@ TypeEditorView::TypeMatches()
StringEditor::StringEditor(BRect rect, DataEditor& editor) StringEditor::StringEditor(BRect rect, DataEditor& editor)
: TypeEditorView(rect, "String Editor", B_FOLLOW_ALL, 0, editor) : TypeEditorView(rect, "String editor", B_FOLLOW_ALL, 0, editor)
{ {
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
@ -275,12 +275,12 @@ StringEditor::MessageReceived(BMessage *message)
MimeTypeEditor::MimeTypeEditor(BRect rect, DataEditor& editor) MimeTypeEditor::MimeTypeEditor(BRect rect, DataEditor& editor)
: TypeEditorView(rect, "MIME Type Editor", B_FOLLOW_LEFT_RIGHT, 0, editor) : TypeEditorView(rect, "MIME type editor", B_FOLLOW_LEFT_RIGHT, 0, editor)
{ {
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
fTextControl = new BTextControl(rect.InsetByCopy(5, 5), B_EMPTY_STRING, fTextControl = new BTextControl(rect.InsetByCopy(5, 5), B_EMPTY_STRING,
"MIME Type:", NULL, new BMessage(kMsgValueChanged), B_FOLLOW_ALL); "MIME type:", NULL, new BMessage(kMsgValueChanged), B_FOLLOW_ALL);
fTextControl->SetDivider(StringWidth(fTextControl->Label()) + 8); fTextControl->SetDivider(StringWidth(fTextControl->Label()) + 8);
float width, height; float width, height;
@ -366,7 +366,7 @@ MimeTypeEditor::MessageReceived(BMessage *message)
NumberEditor::NumberEditor(BRect rect, DataEditor &editor) NumberEditor::NumberEditor(BRect rect, DataEditor &editor)
: TypeEditorView(rect, "Number Editor", B_FOLLOW_LEFT_RIGHT, 0, editor) : TypeEditorView(rect, "Number editor", B_FOLLOW_LEFT_RIGHT, 0, editor)
{ {
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
@ -593,33 +593,33 @@ NumberEditor::_TypeLabel()
{ {
switch (fEditor.Type()) { switch (fEditor.Type()) {
case B_INT8_TYPE: case B_INT8_TYPE:
return "8 Bit Signed Value:"; return "8 bit signed value:";
case B_UINT8_TYPE: case B_UINT8_TYPE:
return "8 Bit Unsigned Value:"; return "8 bit unsigned value:";
case B_INT16_TYPE: case B_INT16_TYPE:
return "16 Bit Signed Value:"; return "16 bit signed value:";
case B_UINT16_TYPE: case B_UINT16_TYPE:
return "16 Bit Unsigned Value:"; return "16 bit unsigned value:";
case B_INT32_TYPE: case B_INT32_TYPE:
return "32 Bit Signed Value:"; return "32 bit signed value:";
case B_UINT32_TYPE: case B_UINT32_TYPE:
return "32 Bit Unsigned Value:"; return "32 bit unsigned value:";
case B_INT64_TYPE: case B_INT64_TYPE:
return "64 Bit Signed Value:"; return "64 bit signed value:";
case B_UINT64_TYPE: case B_UINT64_TYPE:
return "64 Bit Unsigned Value:"; return "64 bit unsigned value:";
case B_FLOAT_TYPE: case B_FLOAT_TYPE:
return "Floating-Point Value:"; return "Floating-point value:";
case B_DOUBLE_TYPE: case B_DOUBLE_TYPE:
return "Double Precision Floating-Point Value:"; return "Double precision floating-point value:";
case B_SSIZE_T_TYPE: case B_SSIZE_T_TYPE:
return "32 Bit Size or Status:"; return "32 bit size or status:";
case B_SIZE_T_TYPE: case B_SIZE_T_TYPE:
return "32 Bit Unsigned Size:"; return "32 bit unsigned size:";
case B_OFF_T_TYPE: case B_OFF_T_TYPE:
return "64 Bit Signed Offset:"; return "64 bit signed offset:";
case B_POINTER_TYPE: case B_POINTER_TYPE:
return "32 Bit Unsigned Pointer:"; return "32 bit unsigned pointer:";
default: default:
return "Number:"; return "Number:";
} }
@ -742,7 +742,7 @@ NumberEditor::MessageReceived(BMessage *message)
BooleanEditor::BooleanEditor(BRect rect, DataEditor &editor) BooleanEditor::BooleanEditor(BRect rect, DataEditor &editor)
: TypeEditorView(rect, "Boolean Editor", B_FOLLOW_NONE, 0, editor) : TypeEditorView(rect, "Boolean editor", B_FOLLOW_NONE, 0, editor)
{ {
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
@ -755,7 +755,7 @@ BooleanEditor::BooleanEditor(BRect rect, DataEditor &editor)
message->AddInt8("value", 1); message->AddInt8("value", 1);
BMenuField *menuField = new BMenuField(rect.InsetByCopy(5, 5), BMenuField *menuField = new BMenuField(rect.InsetByCopy(5, 5),
B_EMPTY_STRING, "Boolean Value:", menu, B_FOLLOW_LEFT_RIGHT); B_EMPTY_STRING, "Boolean value:", menu, B_FOLLOW_LEFT_RIGHT);
menuField->SetDivider(StringWidth(menuField->Label()) + 8); menuField->SetDivider(StringWidth(menuField->Label()) + 8);
menuField->ResizeToPreferred(); menuField->ResizeToPreferred();
ResizeTo(menuField->Bounds().Width() + 10, ResizeTo(menuField->Bounds().Width() + 10,
@ -839,7 +839,7 @@ BooleanEditor::MessageReceived(BMessage *message)
ImageView::ImageView(BRect rect, DataEditor &editor) ImageView::ImageView(BRect rect, DataEditor &editor)
: TypeEditorView(rect, "Image View", B_FOLLOW_NONE, B_WILL_DRAW, editor), : TypeEditorView(rect, "Image view", B_FOLLOW_NONE, B_WILL_DRAW, editor),
fBitmap(NULL), fBitmap(NULL),
fScaleSlider(NULL) fScaleSlider(NULL)
{ {
@ -848,7 +848,7 @@ ImageView::ImageView(BRect rect, DataEditor &editor)
|| editor.Type() == B_VECTOR_ICON_TYPE || editor.Type() == B_VECTOR_ICON_TYPE
#endif #endif
) )
SetName("Icon View"); SetName("Icon view");
#ifdef HAIKU_TARGET_PLATFORM_HAIKU #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (editor.Type() == B_VECTOR_ICON_TYPE) { if (editor.Type() == B_VECTOR_ICON_TYPE) {
@ -1020,7 +1020,7 @@ ImageView::_UpdateImage()
if (fBitmap != NULL) { if (fBitmap != NULL) {
char buffer[256]; char buffer[256];
const char *type = "Unknown Type"; const char *type = "Unknown type";
switch (fEditor.Type()) { switch (fEditor.Type()) {
case B_MINI_ICON_TYPE: case B_MINI_ICON_TYPE:
case B_LARGE_ICON_TYPE: case B_LARGE_ICON_TYPE:
@ -1030,10 +1030,10 @@ ImageView::_UpdateImage()
type = "Icon"; type = "Icon";
break; break;
case B_PNG_FORMAT: case B_PNG_FORMAT:
type = "PNG Format"; type = "PNG format";
break; break;
case B_MESSAGE_TYPE: case B_MESSAGE_TYPE:
type = "Flattened Bitmap"; type = "Flattened bitmap";
break; break;
default: default:
break; break;
@ -1042,29 +1042,29 @@ ImageView::_UpdateImage()
switch (fBitmap->ColorSpace()) { switch (fBitmap->ColorSpace()) {
case B_GRAY1: case B_GRAY1:
case B_GRAY8: case B_GRAY8:
colorSpace = "Gray Scale"; colorSpace = "Grayscale";
break; break;
case B_CMAP8: case B_CMAP8:
colorSpace = "8 Bit Palette"; colorSpace = "8 bit palette";
break; break;
case B_RGB32: case B_RGB32:
case B_RGBA32: case B_RGBA32:
case B_RGB32_BIG: case B_RGB32_BIG:
case B_RGBA32_BIG: case B_RGBA32_BIG:
colorSpace = "32 Bit"; colorSpace = "32 bit";
break; break;
case B_RGB15: case B_RGB15:
case B_RGBA15: case B_RGBA15:
case B_RGB15_BIG: case B_RGB15_BIG:
case B_RGBA15_BIG: case B_RGBA15_BIG:
colorSpace = "15 Bit"; colorSpace = "15 bit";
break; break;
case B_RGB16: case B_RGB16:
case B_RGB16_BIG: case B_RGB16_BIG:
colorSpace = "16 Bit"; colorSpace = "16 bit";
break; break;
default: default:
colorSpace = "Unknown Format"; colorSpace = "Unknown format";
break; break;
} }
snprintf(buffer, sizeof(buffer), "%s, %g x %g, %s", type, snprintf(buffer, sizeof(buffer), "%s, %g x %g, %s", type,

View File

@ -218,11 +218,11 @@ CreateParamsPanel::_CreateViewControls(BPartition* parent, off_t offset,
off_t size) off_t size)
{ {
// Setup the controls // Setup the controls
fSizeSlider = new SizeSlider("Slider", "Partition Size", NULL, offset, fSizeSlider = new SizeSlider("Slider", "Partition size", NULL, offset,
offset + size); offset + size);
fSizeSlider->SetPosition(1.0); fSizeSlider->SetPosition(1.0);
fNameTextControl = new BTextControl("Name Control", "Partition Name", fNameTextControl = new BTextControl("Name Control", "Partition name",
"", NULL); "", NULL);
if (!parent->SupportsChildName()) if (!parent->SupportsChildName())
fNameTextControl->SetEnabled(false); fNameTextControl->SetEnabled(false);
@ -242,7 +242,7 @@ CreateParamsPanel::_CreateViewControls(BPartition* parent, off_t offset,
item->SetMarked(true); item->SetMarked(true);
} }
fTypeMenuField = new BMenuField("Partition Type", fTypePopUpMenu, NULL); fTypeMenuField = new BMenuField("Partition type", fTypePopUpMenu, NULL);
fOKButton = new BButton("Create", new BMessage(MSG_OK)); fOKButton = new BButton("Create", new BMessage(MSG_OK));
fCancelButton = new BButton("Cancel", new BMessage(MSG_CANCEL)); fCancelButton = new BButton("Cancel", new BMessage(MSG_CANCEL));

View File

@ -164,7 +164,7 @@ MainWindow::MainWindow(BRect frame)
fFormatMI = new BMenuItem("Format (not implemented)", fFormatMI = new BMenuItem("Format (not implemented)",
new BMessage(MSG_FORMAT)); new BMessage(MSG_FORMAT));
fEjectMI = new BMenuItem("Eject", new BMessage(MSG_EJECT), 'E'); fEjectMI = new BMenuItem("Eject", new BMessage(MSG_EJECT), 'E');
fSurfaceTestMI = new BMenuItem("Surface Test (not implemented)", fSurfaceTestMI = new BMenuItem("Surface test (not implemented)",
new BMessage(MSG_SURFACE_TEST)); new BMessage(MSG_SURFACE_TEST));
fRescanMI = new BMenuItem("Rescan", new BMessage(MSG_RESCAN)); fRescanMI = new BMenuItem("Rescan", new BMessage(MSG_RESCAN));
@ -174,7 +174,7 @@ MainWindow::MainWindow(BRect frame)
fMountMI = new BMenuItem("Mount", new BMessage(MSG_MOUNT), 'M'); fMountMI = new BMenuItem("Mount", new BMessage(MSG_MOUNT), 'M');
fUnmountMI = new BMenuItem("Unmount", new BMessage(MSG_UNMOUNT), 'U'); fUnmountMI = new BMenuItem("Unmount", new BMessage(MSG_UNMOUNT), 'U');
fMountAllMI = new BMenuItem("Mount All", fMountAllMI = new BMenuItem("Mount all",
new BMessage(MSG_MOUNT_ALL), 'M', B_SHIFT_KEY); new BMessage(MSG_MOUNT_ALL), 'M', B_SHIFT_KEY);
// Disk menu // Disk menu
@ -622,7 +622,7 @@ MainWindow::_DisplayPartitionError(BString _message,
sprintf(message, "%s\n\nError: %s", helper.String(), strerror(error)); sprintf(message, "%s\n\nError: %s", helper.String(), strerror(error));
} }
BAlert* alert = new BAlert("error", message, "Ok", NULL, NULL, BAlert* alert = new BAlert("error", message, "OK", NULL, NULL,
B_WIDTH_FROM_WIDEST, error < B_OK ? B_STOP_ALERT : B_INFO_ALERT); B_WIDTH_FROM_WIDEST, error < B_OK ? B_STOP_ALERT : B_INFO_ALERT);
alert->Go(NULL); alert->Go(NULL);
} }
@ -642,7 +642,7 @@ MainWindow::_Mount(BDiskDevice* disk, partition_id selectedPartition)
BPartition* partition = disk->FindDescendant(selectedPartition); BPartition* partition = disk->FindDescendant(selectedPartition);
if (!partition) { if (!partition) {
_DisplayPartitionError("Unable to find the selected partition by id."); _DisplayPartitionError("Unable to find the selected partition by ID.");
return; return;
} }
@ -673,7 +673,7 @@ MainWindow::_Unmount(BDiskDevice* disk, partition_id selectedPartition)
BPartition* partition = disk->FindDescendant(selectedPartition); BPartition* partition = disk->FindDescendant(selectedPartition);
if (!partition) { if (!partition) {
_DisplayPartitionError("Unable to find the selected partition by id."); _DisplayPartitionError("Unable to find the selected partition by ID.");
return; return;
} }
@ -757,7 +757,7 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
BPartition* partition = disk->FindDescendant(selectedPartition); BPartition* partition = disk->FindDescendant(selectedPartition);
if (!partition) { if (!partition) {
_DisplayPartitionError("Unable to find the selected partition by id."); _DisplayPartitionError("Unable to find the selected partition by ID.");
return; return;
} }
@ -862,9 +862,9 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
message << "All data on the partition"; message << "All data on the partition";
if (previousName.Length() > 0) if (previousName.Length() > 0)
message << " \"" << previousName << "\""; message << " \"" << previousName << "\"";
message << " will be irrevertably lost if you do so!"; message << " will be irretrievably lost if you do so!";
alert = new BAlert("final notice", message.String(), alert = new BAlert("final notice", message.String(),
"Write Changes", "Cancel", NULL, B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); "Write changes", "Cancel", NULL, B_WIDTH_FROM_WIDEST, B_WARNING_ALERT);
choice = alert->Go(); choice = alert->Go();
if (choice == 1) if (choice == 1)
@ -873,7 +873,7 @@ MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
// commit // commit
ret = modificationPreparer.CommitModifications(); ret = modificationPreparer.CommitModifications();
// The partition pointer is toast now! Use the partition id to // The partition pointer is toast now! Use the partition ID to
// retrieve it again. // retrieve it again.
partition = disk->FindDescendant(selectedPartition); partition = disk->FindDescendant(selectedPartition);
@ -969,9 +969,9 @@ MainWindow::_Create(BDiskDevice* disk, partition_id selectedPartition)
BString message = "Are you sure you want to write the changes back to " BString message = "Are you sure you want to write the changes back to "
"disk now?\n\n"; "disk now?\n\n";
message << "All data on the partition"; message << "All data on the partition";
message << " will be irrevertably lost if you do so!"; message << " will be irretrievably lost if you do so!";
BAlert* alert = new BAlert("final notice", message.String(), BAlert* alert = new BAlert("final notice", message.String(),
"Write Changes", "Cancel", NULL, B_WIDTH_FROM_WIDEST, B_WARNING_ALERT); "Write changes", "Cancel", NULL, B_WIDTH_FROM_WIDEST, B_WARNING_ALERT);
int32 choice = alert->Go(); int32 choice = alert->Go();
if (choice == 1) if (choice == 1)
@ -1018,7 +1018,7 @@ MainWindow::_Delete(BDiskDevice* disk, partition_id selectedPartition)
BPartition* partition = disk->FindDescendant(selectedPartition); BPartition* partition = disk->FindDescendant(selectedPartition);
if (!partition) { if (!partition) {
_DisplayPartitionError("Unable to find the selected partition by id."); _DisplayPartitionError("Unable to find the selected partition by ID.");
return; return;
} }
@ -1045,9 +1045,9 @@ MainWindow::_Delete(BDiskDevice* disk, partition_id selectedPartition)
// Warn the user one more time... // Warn the user one more time...
BString message = "Are you sure you want to delete the selected "; BString message = "Are you sure you want to delete the selected ";
message << "partition?\n\nAll data on the partition"; message << "partition?\n\nAll data on the partition";
message << " will be irrevertably lost if you do so!"; message << " will be irretrievably lost if you do so!";
BAlert* alert = new BAlert("final notice", message.String(), BAlert* alert = new BAlert("final notice", message.String(),
"Delete Partition", "Cancel", NULL, B_WIDTH_FROM_WIDEST, "Delete partition", "Cancel", NULL, B_WIDTH_FROM_WIDEST,
B_WARNING_ALERT); B_WARNING_ALERT);
int32 choice = alert->Go(); int32 choice = alert->Go();

View File

@ -249,11 +249,11 @@ PartitionListView::PartitionListView(const BRect& frame, uint32 resizeMode)
{ {
AddColumn(new PartitionColumn("Device", 150, 50, 500, AddColumn(new PartitionColumn("Device", 150, 50, 500,
B_TRUNCATE_MIDDLE), kDeviceColumn); B_TRUNCATE_MIDDLE), kDeviceColumn);
AddColumn(new PartitionColumn("Filesystem", 100, 50, 500, AddColumn(new PartitionColumn("File system", 100, 50, 500,
B_TRUNCATE_MIDDLE), kFilesystemColumn); B_TRUNCATE_MIDDLE), kFilesystemColumn);
AddColumn(new PartitionColumn("Volume Name", 130, 50, 500, AddColumn(new PartitionColumn("Volume name", 130, 50, 500,
B_TRUNCATE_MIDDLE), kVolumeNameColumn); B_TRUNCATE_MIDDLE), kVolumeNameColumn);
AddColumn(new PartitionColumn("Mounted At", 100, 50, 500, AddColumn(new PartitionColumn("Mounted at", 100, 50, 500,
B_TRUNCATE_MIDDLE), kMountedAtColumn); B_TRUNCATE_MIDDLE), kMountedAtColumn);
AddColumn(new PartitionColumn("Size", 100, 50, 500, AddColumn(new PartitionColumn("Size", 100, 50, 500,
B_TRUNCATE_END, B_ALIGN_RIGHT), kSizeColumn); B_TRUNCATE_END, B_ALIGN_RIGHT), kSizeColumn);

View File

@ -29,7 +29,7 @@ ExpanderApp::AboutRequested()
"\twritten by Jérôme Duval\n" "\twritten by Jérôme Duval\n"
"\tCopyright 2004-2006, Haiku Inc.\n\n" "\tCopyright 2004-2006, Haiku Inc.\n\n"
"original Be version by \n" "original Be version by \n"
"Dominic, Hiroshi, Peter, Pavel and Robert\n", "Ok"); "Dominic, Hiroshi, Peter, Pavel and Robert\n", "OK");
BTextView *view = alert->TextView(); BTextView *view = alert->TextView();
BFont font; BFont font;

View File

@ -34,7 +34,7 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
rect.right -= 22; rect.right -= 22;
BBox *box = new BBox(rect, "background", B_FOLLOW_NONE, BBox *box = new BBox(rect, "background", B_FOLLOW_NONE,
B_WILL_DRAW | B_FRAME_EVENTS, B_FANCY_BORDER); B_WILL_DRAW | B_FRAME_EVENTS, B_FANCY_BORDER);
box->SetLabel("Expander Preferences"); box->SetLabel("Expander settings");
background->AddChild(box); background->AddChild(box);
float maxWidth = box->Bounds().right; float maxWidth = box->Bounds().right;
@ -72,7 +72,7 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
frameRect = stringView->Frame(); frameRect = stringView->Frame();
frameRect.top = fCloseWindow->Frame().bottom + 10; frameRect.top = fCloseWindow->Frame().bottom + 10;
stringView = new BStringView(frameRect, "destinationFolder", "Destination Folder:", stringView = new BStringView(frameRect, "destinationFolder", "Destination folder:",
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
stringView->ResizeToPreferred(); stringView->ResizeToPreferred();
if (stringView->Frame().right > maxWidth) if (stringView->Frame().right > maxWidth)

View File

@ -55,12 +55,12 @@ ExpanderWindow::ExpanderWindow(BRect frame, const entry_ref *ref, BMessage *sett
menu->AddItem(item = new BMenuItem("About Expander" B_UTF8_ELLIPSIS, new BMessage(B_ABOUT_REQUESTED))); menu->AddItem(item = new BMenuItem("About Expander" B_UTF8_ELLIPSIS, new BMessage(B_ABOUT_REQUESTED)));
item->SetTarget(be_app_messenger); item->SetTarget(be_app_messenger);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fSourceItem = new BMenuItem("Set Source" B_UTF8_ELLIPSIS, new BMessage(MSG_SOURCE), 'O')); menu->AddItem(fSourceItem = new BMenuItem("Set source" B_UTF8_ELLIPSIS, new BMessage(MSG_SOURCE), 'O'));
menu->AddItem(fDestItem = new BMenuItem("Set Destination" B_UTF8_ELLIPSIS, new BMessage(MSG_DEST), 'D')); menu->AddItem(fDestItem = new BMenuItem("Set destination" B_UTF8_ELLIPSIS, new BMessage(MSG_DEST), 'D'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fExpandItem = new BMenuItem("Expand", new BMessage(MSG_EXPAND), 'E')); menu->AddItem(fExpandItem = new BMenuItem("Expand", new BMessage(MSG_EXPAND), 'E'));
fExpandItem->SetEnabled(false); fExpandItem->SetEnabled(false);
menu->AddItem(fShowItem = new BMenuItem("Show Contents", new BMessage(MSG_SHOW), 'L')); menu->AddItem(fShowItem = new BMenuItem("Show contents", new BMessage(MSG_SHOW), 'L'));
fShowItem->SetEnabled(false); fShowItem->SetEnabled(false);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fStopItem = new BMenuItem("Stop", new BMessage(MSG_STOP), 'K')); menu->AddItem(fStopItem = new BMenuItem("Stop", new BMessage(MSG_STOP), 'K'));
@ -69,9 +69,9 @@ ExpanderWindow::ExpanderWindow(BRect frame, const entry_ref *ref, BMessage *sett
menu->AddItem(new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED), 'W')); menu->AddItem(new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED), 'W'));
fBar->AddItem(menu); fBar->AddItem(menu);
menu = new BMenu("Edit"); menu = new BMenu("Settings");
menu->AddItem(fPreferencesItem = new BMenuItem("Preferences" B_UTF8_ELLIPSIS, menu->AddItem(fPreferencesItem = new BMenuItem("Settings" B_UTF8_ELLIPSIS,
new BMessage(MSG_PREFERENCES), 'P')); new BMessage(MSG_PREFERENCES), 'S'));
fBar->AddItem(menu); fBar->AddItem(menu);
AddChild(fBar); AddChild(fBar);
@ -125,7 +125,7 @@ ExpanderWindow::ExpanderWindow(BRect frame, const entry_ref *ref, BMessage *sett
topView->AddChild(fDestText); topView->AddChild(fDestText);
rect.OffsetBy(0, fSourceButton->Bounds().Height() + 4 + offset); rect.OffsetBy(0, fSourceButton->Bounds().Height() + 4 + offset);
fShowContents = new BCheckBox(rect, "showContents", "Show Contents", fShowContents = new BCheckBox(rect, "showContents", "Show contents",
new BMessage(MSG_SHOWCONTENTS), B_FOLLOW_RIGHT | B_FOLLOW_TOP); new BMessage(MSG_SHOWCONTENTS), B_FOLLOW_RIGHT | B_FOLLOW_TOP);
fShowContents->ResizeToPreferred(); fShowContents->ResizeToPreferred();
fShowContents->MoveTo(Bounds().right - 8 - fShowContents->Bounds().Width(), fShowContents->MoveTo(Bounds().right - 8 - fShowContents->Bounds().Width(),
@ -186,13 +186,13 @@ ExpanderWindow::ValidateDest()
BVolume volume; BVolume volume;
if (!entry.Exists()) { if (!entry.Exists()) {
BAlert *alert = new BAlert("destAlert", "The destination" BAlert *alert = new BAlert("destAlert", "The destination"
" directory does not exist.", "Cancel", NULL, NULL, " folder does not exist.", "Cancel", NULL, NULL,
B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT);
alert->Go(); alert->Go();
return false; return false;
} else if (!entry.IsDirectory()) { } else if (!entry.IsDirectory()) {
(new BAlert("destAlert", "The destination" (new BAlert("destAlert", "The destination"
" is not a directory.", "Cancel", NULL, NULL, " is not a folder.", "Cancel", NULL, NULL,
B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT))->Go(); B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT))->Go();
return false; return false;
} else if (entry.GetVolume(&volume) != B_OK || volume.IsReadOnly()) { } else if (entry.GetVolume(&volume) != B_OK || volume.IsReadOnly()) {
@ -299,7 +299,7 @@ ExpanderWindow::MessageReceived(BMessage *msg)
case MSG_SHOWCONTENTS: case MSG_SHOWCONTENTS:
// change menu item label // change menu item label
fShowItem->SetLabel(fShowContents->Value() == B_CONTROL_OFF fShowItem->SetLabel(fShowContents->Value() == B_CONTROL_OFF
? "Show Contents" : "Hide Contents"); ? "Show contents" : "Hide contents");
if (fShowContents->Value() == B_CONTROL_OFF) { if (fShowContents->Value() == B_CONTROL_OFF) {
if (fListingStarted) if (fListingStarted)
@ -508,7 +508,7 @@ ExpanderWindow::StartExpanding()
BEntry destEntry(fDestText->Text(), true); BEntry destEntry(fDestText->Text(), true);
if (!destEntry.Exists()) { if (!destEntry.Exists()) {
BAlert *alert = new BAlert("destAlert", "The directory was either moved, renamed or not\n" BAlert *alert = new BAlert("destAlert", "The folder was either moved, renamed or not\n"
"supported.", "supported.",
"Cancel", NULL, NULL, "Cancel", NULL, NULL,
B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_EVEN_SPACING, B_WARNING_ALERT);
@ -620,7 +620,7 @@ ExpanderWindow::StartListing()
fDestItem->SetEnabled(false); fDestItem->SetEnabled(false);
fExpandItem->SetEnabled(false); fExpandItem->SetEnabled(false);
fShowItem->SetEnabled(true); fShowItem->SetEnabled(true);
fShowItem->SetLabel("Hide Contents"); fShowItem->SetLabel("Hide contents");
fStopItem->SetEnabled(false); fStopItem->SetEnabled(false);
fPreferencesItem->SetEnabled(false); fPreferencesItem->SetEnabled(false);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006, Haiku, Inc. All Rights Reserved. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -108,7 +108,7 @@ ControlView::AttachedToWindow()
AddChild(fOutlineSlider); AddChild(fOutlineSlider);
rect.OffsetBy(0.0, offsetX); rect.OffsetBy(0.0, offsetX);
fAliasingCheckBox = new BCheckBox(rect, "Aliasing", "Anti-aliased text", fAliasingCheckBox = new BCheckBox(rect, "Aliasing", "Antialiased text",
new BMessage(ALIASING_MSG)); new BMessage(ALIASING_MSG));
fAliasingCheckBox->SetValue(B_CONTROL_ON); fAliasingCheckBox->SetValue(B_CONTROL_ON);
AddChild(fAliasingCheckBox); AddChild(fAliasingCheckBox);
@ -164,7 +164,7 @@ ControlView::AttachedToWindow()
AddChild(fBoundingboxesCheckBox); AddChild(fBoundingboxesCheckBox);
rect.OffsetBy(0.0, 22.0); rect.OffsetBy(0.0, 22.0);
fCyclingFontButton = new BButton(rect, "Cyclefonts", "Cycle Fonts", fCyclingFontButton = new BButton(rect, "Cyclefonts", "Cycle fonts",
new BMessage(CYCLING_FONTS_MSG)); new BMessage(CYCLING_FONTS_MSG));
AddChild(fCyclingFontButton); AddChild(fCyclingFontButton);
@ -302,7 +302,7 @@ ControlView::MessageReceived(BMessage* msg)
case CYCLING_FONTS_MSG: case CYCLING_FONTS_MSG:
{ {
fCyclingFontButton->SetLabel(fCycleFonts ? "Cycle Fonts" : "Stop Cycling"); fCyclingFontButton->SetLabel(fCycleFonts ? "Cycle fonts" : "Stop cycling");
fCycleFonts = !fCycleFonts; fCycleFonts = !fCycleFonts;
if (fCycleFonts) { if (fCycleFonts) {

View File

@ -50,7 +50,7 @@ TeapotWindow::TeapotWindow(BRect rect, char* name, window_type wt, ulong somethi
menu->AddItem(item = new BMenuItem("Perspective", new BMessage(kMsgPerspective))); menu->AddItem(item = new BMenuItem("Perspective", new BMessage(kMsgPerspective)));
item->SetTarget(fObjectView); item->SetTarget(fObjectView);
item->SetMarked(false); item->SetMarked(false);
menu->AddItem(item = new BMenuItem("FPS Display", new BMessage(kMsgFPS))); menu->AddItem(item = new BMenuItem("FPS display", new BMessage(kMsgFPS)));
item->SetTarget(fObjectView); item->SetTarget(fObjectView);
item->SetMarked(true); item->SetMarked(true);
menu->AddItem(item = new BMenuItem("Filled polygons", new BMessage(kMsgFilled))); menu->AddItem(item = new BMenuItem("Filled polygons", new BMessage(kMsgFilled)));

View File

@ -18,7 +18,7 @@ GradientsWindow::GradientsWindow()
fGradientsMenu = new BPopUpMenu("gradientsType"); fGradientsMenu = new BPopUpMenu("gradientsType");
fLinearItem = new BMenuItem("Linear", new BMessage(MSG_LINEAR)); fLinearItem = new BMenuItem("Linear", new BMessage(MSG_LINEAR));
fRadialItem = new BMenuItem("Radial", new BMessage(MSG_RADIAL)); fRadialItem = new BMenuItem("Radial", new BMessage(MSG_RADIAL));
fRadialFocusItem = new BMenuItem("Radial Focus", fRadialFocusItem = new BMenuItem("Radial focus",
new BMessage(MSG_RADIAL_FOCUS)); new BMessage(MSG_RADIAL_FOCUS));
fDiamondItem = new BMenuItem("Diamond", new BMessage(MSG_DIAMOND)); fDiamondItem = new BMenuItem("Diamond", new BMessage(MSG_DIAMOND));

View File

@ -39,7 +39,7 @@ void
App::AboutRequested() App::AboutRequested()
{ {
BAlert* alert; BAlert* alert;
alert = new BAlert("About", "A little 3d demo", "ok"); alert = new BAlert("About", "A little 3D demo", "OK");
alert->Go(NULL); alert->Go(NULL);
} }

View File

@ -263,19 +263,19 @@ MainWindow::MessageReceived(BMessage* message)
commands[1] = pathCommand; commands[1] = pathCommand;
commands[2] = shapeCommand; commands[2] = shapeCommand;
command = new CompoundCommand(commands, 3, command = new CompoundCommand(commands, 3,
"Add Shape With Path & Style", 0); "Add shape with path & style", 0);
} else if (styleCommand) { } else if (styleCommand) {
Command** commands = new Command*[2]; Command** commands = new Command*[2];
commands[0] = styleCommand; commands[0] = styleCommand;
commands[1] = shapeCommand; commands[1] = shapeCommand;
command = new CompoundCommand(commands, 2, command = new CompoundCommand(commands, 2,
"Add Shape With Style", 0); "Add shape with style", 0);
} else { } else {
Command** commands = new Command*[2]; Command** commands = new Command*[2];
commands[0] = pathCommand; commands[0] = pathCommand;
commands[1] = shapeCommand; commands[1] = shapeCommand;
command = new CompoundCommand(commands, 2, command = new CompoundCommand(commands, 2,
"Add Shape With Path", 0); "Add shape with path", 0);
} }
} else { } else {
command = shapeCommand; command = shapeCommand;
@ -1027,12 +1027,12 @@ MainWindow::_CreateMenuBar(BRect frame)
fileMenu->AddSeparatorItem(); fileMenu->AddSeparatorItem();
fileMenu->AddItem(new BMenuItem("Save", fileMenu->AddItem(new BMenuItem("Save",
new BMessage(MSG_SAVE), 'S')); new BMessage(MSG_SAVE), 'S'));
fileMenu->AddItem(new BMenuItem("Save As"B_UTF8_ELLIPSIS, fileMenu->AddItem(new BMenuItem("Save as"B_UTF8_ELLIPSIS,
new BMessage(MSG_SAVE_AS), 'S', B_SHIFT_KEY)); new BMessage(MSG_SAVE_AS), 'S', B_SHIFT_KEY));
fileMenu->AddSeparatorItem(); fileMenu->AddSeparatorItem();
fileMenu->AddItem(new BMenuItem("Export", fileMenu->AddItem(new BMenuItem("Export",
new BMessage(MSG_EXPORT), 'P')); new BMessage(MSG_EXPORT), 'P'));
fileMenu->AddItem(new BMenuItem("Export As"B_UTF8_ELLIPSIS, fileMenu->AddItem(new BMenuItem("Export as"B_UTF8_ELLIPSIS,
new BMessage(MSG_EXPORT_AS), 'P', B_SHIFT_KEY)); new BMessage(MSG_EXPORT_AS), 'P', B_SHIFT_KEY));
fileMenu->AddSeparatorItem(); fileMenu->AddSeparatorItem();
fileMenu->AddItem(new BMenuItem("Quit", fileMenu->AddItem(new BMenuItem("Quit",
@ -1052,7 +1052,7 @@ MainWindow::_CreateMenuBar(BRect frame)
editMenu->AddItem(fRedoMI); editMenu->AddItem(fRedoMI);
// Settings // Settings
BMenu* filterModeMenu = new BMenu("Snap to Grid"); BMenu* filterModeMenu = new BMenu("Snap to grid");
BMessage* message = new BMessage(MSG_MOUSE_FILTER_MODE); BMessage* message = new BMessage(MSG_MOUSE_FILTER_MODE);
message->AddInt32("mode", SNAPPING_OFF); message->AddInt32("mode", SNAPPING_OFF);
filterModeMenu->AddItem(new BMenuItem("Off", message, '4')); filterModeMenu->AddItem(new BMenuItem("Off", message, '4'));

View File

@ -43,12 +43,12 @@ ColorPickerPanel::ColorPickerPanel(BRect frame, rgb_color color,
fMessage(message), fMessage(message),
fTarget(target) fTarget(target)
{ {
SetTitle("Pick Color"); SetTitle("Pick a color");
fColorPickerView = new ColorPickerView("color picker", color, mode); fColorPickerView = new ColorPickerView("color picker", color, mode);
#if LIB_LAYOUT #if LIB_LAYOUT
MButton* defaultButton = new MButton("Ok", new BMessage(MSG_DONE), this); MButton* defaultButton = new MButton("OK", new BMessage(MSG_DONE), this);
// interface layout // interface layout
BView* topView = new VGroup ( BView* topView = new VGroup (
@ -68,7 +68,7 @@ ColorPickerPanel::ColorPickerPanel(BRect frame, rgb_color color,
); );
#else // LIB_LAYOUT #else // LIB_LAYOUT
frame = BRect(0, 0, 40, 15); frame = BRect(0, 0, 40, 15);
BButton* defaultButton = new BButton(frame, "ok button", "Ok", BButton* defaultButton = new BButton(frame, "ok button", "OK",
new BMessage(MSG_DONE), new BMessage(MSG_DONE),
B_FOLLOW_RIGHT | B_FOLLOW_TOP); B_FOLLOW_RIGHT | B_FOLLOW_TOP);
defaultButton->ResizeToPreferred(); defaultButton->ResizeToPreferred();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006-2007, Haiku Inc. All rights reserved. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -321,7 +321,7 @@ PropertyListView::SetMenu(BMenu* menu)
fSelectM->AddItem(fSelectAllMI); fSelectM->AddItem(fSelectAllMI);
fSelectNoneMI = new BMenuItem("None", new BMessage(MSG_SELECT_NONE)); fSelectNoneMI = new BMenuItem("None", new BMessage(MSG_SELECT_NONE));
fSelectM->AddItem(fSelectNoneMI); fSelectM->AddItem(fSelectNoneMI);
fInvertSelectionMI = new BMenuItem("Invert Selection", new BMessage(MSG_INVERT_SELECTION)); fInvertSelectionMI = new BMenuItem("Invert selection", new BMessage(MSG_INVERT_SELECTION));
fSelectM->AddItem(fInvertSelectionMI); fSelectM->AddItem(fInvertSelectionMI);
fSelectM->SetTargetForItems(this); fSelectM->SetTargetForItems(this);
@ -728,8 +728,8 @@ PropertyListView::_CheckMenuStatus()
fPasteMI->SetEnabled(clipboardHasData); fPasteMI->SetEnabled(clipboardHasData);
// LanguageManager* m = LanguageManager::Default(); // LanguageManager* m = LanguageManager::Default();
if (IsEditingMultipleObjects()) if (IsEditingMultipleObjects())
// fPasteMI->SetLabel(m->GetString(MULTI_PASTE, "Multi Paste")); // fPasteMI->SetLabel(m->GetString(MULTI_PASTE, "Multi paste"));
fPasteMI->SetLabel("Multi Paste"); fPasteMI->SetLabel("Multi paste");
else else
// fPasteMI->SetLabel(m->GetString(PASTE, "Paste")); // fPasteMI->SetLabel(m->GetString(PASTE, "Paste"));
fPasteMI->SetLabel("Paste"); fPasteMI->SetLabel("Paste");

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006, Haiku. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -729,17 +729,17 @@ PathListView::SetMenu(BMenu* menu)
return; return;
fAddMI = new BMenuItem("Add", new BMessage(MSG_ADD)); fAddMI = new BMenuItem("Add", new BMessage(MSG_ADD));
fAddRectMI = new BMenuItem("Add Rect", new BMessage(MSG_ADD_RECT)); fAddRectMI = new BMenuItem("Add rect", new BMessage(MSG_ADD_RECT));
fAddCircleMI = new BMenuItem("Add Circle"/*B_UTF8_ELLIPSIS*/, fAddCircleMI = new BMenuItem("Add circle"/*B_UTF8_ELLIPSIS*/,
new BMessage(MSG_ADD_CIRCLE)); new BMessage(MSG_ADD_CIRCLE));
// fAddArcMI = new BMenuItem("Add Arc"B_UTF8_ELLIPSIS, // fAddArcMI = new BMenuItem("Add arc"B_UTF8_ELLIPSIS,
// new BMessage(MSG_ADD_ARC)); // new BMessage(MSG_ADD_ARC));
fDuplicateMI = new BMenuItem("Duplicate", new BMessage(MSG_DUPLICATE)); fDuplicateMI = new BMenuItem("Duplicate", new BMessage(MSG_DUPLICATE));
fReverseMI = new BMenuItem("Reverse", new BMessage(MSG_REVERSE)); fReverseMI = new BMenuItem("Reverse", new BMessage(MSG_REVERSE));
fCleanUpMI = new BMenuItem("Clean Up", new BMessage(MSG_CLEAN_UP)); fCleanUpMI = new BMenuItem("Clean up", new BMessage(MSG_CLEAN_UP));
fRotateIndicesRightMI = new BMenuItem("Rotate Indices Right", fRotateIndicesRightMI = new BMenuItem("Rotate indices right",
new BMessage(MSG_ROTATE_INDICES_CCW), 'R'); new BMessage(MSG_ROTATE_INDICES_CCW), 'R');
fRotateIndicesLeftMI = new BMenuItem("Rotate Indices Left", fRotateIndicesLeftMI = new BMenuItem("Rotate indices left",
new BMessage(MSG_ROTATE_INDICES_CW), 'R', B_SHIFT_KEY); new BMessage(MSG_ROTATE_INDICES_CW), 'R', B_SHIFT_KEY);
fRemoveMI = new BMenuItem("Remove", new BMessage(MSG_REMOVE)); fRemoveMI = new BMenuItem("Remove", new BMessage(MSG_REMOVE));

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006-2007, Haiku Inc. All rights reserved. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -423,25 +423,25 @@ ShapeListView::SetMenu(BMenu* menu)
return; return;
BMessage* message = new BMessage(MSG_ADD_SHAPE); BMessage* message = new BMessage(MSG_ADD_SHAPE);
fAddEmptyMI = new BMenuItem("Add Empty", message); fAddEmptyMI = new BMenuItem("Add empty", message);
message = new BMessage(MSG_ADD_SHAPE); message = new BMessage(MSG_ADD_SHAPE);
message->AddBool("path", true); message->AddBool("path", true);
fAddWidthPathMI = new BMenuItem("Add With Path", message); fAddWidthPathMI = new BMenuItem("Add with path", message);
message = new BMessage(MSG_ADD_SHAPE); message = new BMessage(MSG_ADD_SHAPE);
message->AddBool("style", true); message->AddBool("style", true);
fAddWidthStyleMI = new BMenuItem("Add With Style", message); fAddWidthStyleMI = new BMenuItem("Add with style", message);
message = new BMessage(MSG_ADD_SHAPE); message = new BMessage(MSG_ADD_SHAPE);
message->AddBool("path", true); message->AddBool("path", true);
message->AddBool("style", true); message->AddBool("style", true);
fAddWidthPathAndStyleMI = new BMenuItem("Add With Path & Style", message); fAddWidthPathAndStyleMI = new BMenuItem("Add with path & style", message);
fDuplicateMI = new BMenuItem("Duplicate", new BMessage(MSG_DUPLICATE)); fDuplicateMI = new BMenuItem("Duplicate", new BMessage(MSG_DUPLICATE));
fResetTransformationMI = new BMenuItem("Reset Transformation", fResetTransformationMI = new BMenuItem("Reset transformation",
new BMessage(MSG_RESET_TRANSFORMATION)); new BMessage(MSG_RESET_TRANSFORMATION));
fFreezeTransformationMI = new BMenuItem("Freeze Transformation", fFreezeTransformationMI = new BMenuItem("Freeze transformation",
new BMessage(MSG_FREEZE_TRANSFORMATION)); new BMessage(MSG_FREEZE_TRANSFORMATION));
fRemoveMI = new BMenuItem("Remove", new BMessage(MSG_REMOVE)); fRemoveMI = new BMenuItem("Remove", new BMessage(MSG_REMOVE));

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006, Haiku. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -600,7 +600,7 @@ StyleListView::SetMenu(BMenu* menu)
fDuplicateMI = new BMenuItem("Duplicate", new BMessage(MSG_DUPLICATE)); fDuplicateMI = new BMenuItem("Duplicate", new BMessage(MSG_DUPLICATE));
fMenu->AddItem(fDuplicateMI); fMenu->AddItem(fDuplicateMI);
fResetTransformationMI = new BMenuItem("Reset Transformation", fResetTransformationMI = new BMenuItem("Reset transformation",
new BMessage(MSG_RESET_TRANSFORMATION)); new BMessage(MSG_RESET_TRANSFORMATION));
fMenu->AddItem(fResetTransformationMI); fMenu->AddItem(fResetTransformationMI);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006, Haiku. All rights reserved. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -74,14 +74,14 @@ StyleView::StyleView(BRect frame)
BGridLayout* layout = new BGridLayout(5, 5); BGridLayout* layout = new BGridLayout(5, 5);
SetLayout(layout); SetLayout(layout);
fStyleType = new BMenuField( "Style Type", menu, NULL); fStyleType = new BMenuField( "Style type", menu, NULL);
#else #else
frame.OffsetTo(B_ORIGIN); frame.OffsetTo(B_ORIGIN);
frame.InsetBy(5, 5); frame.InsetBy(5, 5);
frame.bottom = frame.top + 15; frame.bottom = frame.top + 15;
fStyleType = new BMenuField(frame, "style type", "Style Type", fStyleType = new BMenuField(frame, "style type", "Style type",
menu, true); menu, true);
AddChild(fStyleType); AddChild(fStyleType);
@ -110,7 +110,7 @@ StyleView::StyleView(BRect frame)
menu->AddItem(new BMenuItem("Conic", message)); menu->AddItem(new BMenuItem("Conic", message));
#if __HAIKU__ #if __HAIKU__
fGradientType = new BMenuField("Gradient Type", menu, NULL); fGradientType = new BMenuField("Gradient type", menu, NULL);
fGradientControl = new GradientControl(new BMessage(MSG_SET_COLOR), this); fGradientControl = new GradientControl(new BMessage(MSG_SET_COLOR), this);
layout->AddItem(BSpaceLayoutItem::CreateVerticalStrut(3), 0, 0, 4); layout->AddItem(BSpaceLayoutItem::CreateVerticalStrut(3), 0, 0, 4);
@ -129,7 +129,7 @@ StyleView::StyleView(BRect frame)
#else // !__HAIKU__ #else // !__HAIKU__
frame.OffsetBy(0, fStyleType->Frame().Height() + 6); frame.OffsetBy(0, fStyleType->Frame().Height() + 6);
fGradientType = new BMenuField(frame, "gradient type", "Gradient Type", fGradientType = new BMenuField(frame, "gradient type", "Gradient type",
menu, true); menu, true);
AddChild(fGradientType); AddChild(fGradientType);
@ -160,7 +160,7 @@ StyleView::StyleView(BRect frame)
divider = max_c(divider, fStyleType->StringWidth(fStyleType->Label())); divider = max_c(divider, fStyleType->StringWidth(fStyleType->Label()));
fGradientType->SetDivider(divider + 8); fGradientType->SetDivider(divider + 8);
fStyleType->SetDivider(divider + 8); fStyleType->SetDivider(divider + 8);
#endif // __HAIKU__ #endif // __HAIKU__
fStyleType->SetEnabled(false); fStyleType->SetEnabled(false);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006, Haiku. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -129,7 +129,7 @@ TransformerListView::Draw(BRect updateRect)
// display helpful messages // display helpful messages
const char* message1 = "Click on a shape above"; const char* message1 = "Click on a shape above";
const char* message2 = "to attach Transformers."; const char* message2 = "to attach transformers.";
SetHighColor(tint_color(LowColor(), B_DARKEN_2_TINT)); SetHighColor(tint_color(LowColor(), B_DARKEN_2_TINT));
font_height fh; font_height fh;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2008, Haiku. All rights reserved. * Copyright 2008-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -60,7 +60,7 @@ class ShapeIterator : public BShapeIterator {
bool fHasLastPoint; bool fHasLastPoint;
}; };
ShapeIterator::ShapeIterator(Icon *icon, Shape *to, BPoint offset, ShapeIterator::ShapeIterator(Icon *icon, Shape *to, BPoint offset,
const char *name) const char *name)
{ {
CALLED(); CALLED();
@ -112,7 +112,7 @@ ShapeIterator::IterateBezierTo(int32 bezierCount, BPoint *bezierPts)
if (fHasLastPoint) if (fHasLastPoint)
start = fLastPoint; start = fLastPoint;
while (bezierCount--) { while (bezierCount--) {
fPath->AddPoint(fOffset + bezierPts[0], fPath->AddPoint(fOffset + bezierPts[0],
fLastPoint, fOffset + bezierPts[1], true); fLastPoint, fOffset + bezierPts[1], true);
fLastPoint = fOffset + bezierPts[2]; fLastPoint = fOffset + bezierPts[2];
bezierPts += 3; bezierPts += 3;
@ -184,11 +184,11 @@ StyledTextImporter::Import(Icon* icon, BMessage* clipping)
if (clipping == NULL) if (clipping == NULL)
return ENOENT; return ENOENT;
if (clipping->FindData("text/plain", if (clipping->FindData("text/plain",
B_MIME_TYPE, (const void **)&text, &textLength) == B_OK) { B_MIME_TYPE, (const void **)&text, &textLength) == B_OK) {
text_run_array *runs = NULL; text_run_array *runs = NULL;
int32 runsLength; int32 runsLength;
if (clipping->FindData("application/x-vnd.Be-text_run_array", if (clipping->FindData("application/x-vnd.Be-text_run_array",
B_MIME_TYPE, (const void **)&runs, &runsLength) < B_OK) B_MIME_TYPE, (const void **)&runs, &runsLength) < B_OK)
runs = NULL; runs = NULL;
BString str(text, textLength); BString str(text, textLength);
@ -223,7 +223,7 @@ StyledTextImporter::Import(Icon* icon, const entry_ref* ref)
return err; return err;
if (size > 1 * 1024 * 1024) // Don't load files that big if (size > 1 * 1024 * 1024) // Don't load files that big
return E2BIG; return E2BIG;
BMallocIO mio; BMallocIO mio;
mio.SetSize((size_t)size + 1); mio.SetSize((size_t)size + 1);
memset((void *)mio.Buffer(), 0, (size_t)size + 1); memset((void *)mio.Buffer(), 0, (size_t)size + 1);
@ -247,8 +247,8 @@ StyledTextImporter::_Import(Icon* icon, const char *text, text_run_array *runs)
BString str(text); BString str(text);
if (str.Length() > 50) { if (str.Length() > 50) {
BAlert* alert = new BAlert("too big", BAlert* alert = new BAlert("too big",
"The text you are trying to import is quite long, are you sure ?", "The text you are trying to import is quite long, are you sure?",
"Yes", "No", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); "Yes", "No", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
if (alert->Go()) if (alert->Go())
return B_CANCELED; return B_CANCELED;
@ -274,7 +274,7 @@ StyledTextImporter::_Import(Icon* icon, const char *text, text_run_array *runs)
for (int32 i = 0, c = 0; i < len && c < chars; c++) { for (int32 i = 0, c = 0; i < len && c < chars; c++) {
// make sure we are still on the (good) run // make sure we are still on the (good) run
while (run && currentRun < runs->count - 1 && while (run && currentRun < runs->count - 1 &&
i >= runs->runs[currentRun + 1].offset) { i >= runs->runs[currentRun + 1].offset) {
run = &runs->runs[++currentRun]; run = &runs->runs[++currentRun];
//printf("switching to run %d\n", currentRun); //printf("switching to run %d\n", currentRun);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006, Haiku. All rights reserved. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -68,10 +68,10 @@ SVGImporter::Import(Icon* icon, const entry_ref* ref)
} catch(agg::svg::exception& e) { } catch(agg::svg::exception& e) {
char error[1024]; char error[1024];
sprintf(error, "Failed to open the file '%s' as " sprintf(error, "Failed to open the file '%s' as "
"an SVG Document.\n\n" "an SVG document.\n\n"
"Error: %s", ref->name, e.msg()); "Error: %s", ref->name, e.msg());
BAlert* alert = new BAlert("load error", BAlert* alert = new BAlert("load error",
error, "Ok", NULL, NULL, error, "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_WARNING_ALERT);
alert->Go(NULL); alert->Go(NULL);
ret = B_ERROR; ret = B_ERROR;

View File

@ -52,7 +52,7 @@ static const char* kInfoText =
"1) If you are installing Haiku onto real hardware (not inside an emulator) " "1) If you are installing Haiku onto real hardware (not inside an emulator) "
"it is recommended that you have already prepared a hard disk partition. The " "it is recommended that you have already prepared a hard disk partition. The "
"Installer and the DriveSetup tool offer to initialize existing partitions " "Installer and the DriveSetup tool offer to initialize existing partitions "
"with the Haiku native filesystem, but the options to change the actual " "with the Haiku native file system, but the options to change the actual "
"partition layout may not have been tested on a sufficiently great variety of " "partition layout may not have been tested on a sufficiently great variety of "
"computer installations so we do not recommend using it.\n" "computer installations so we do not recommend using it.\n"
"If you have not created a partition yet, simply reboot, create the partition " "If you have not created a partition yet, simply reboot, create the partition "
@ -130,7 +130,7 @@ InstallerApp::AboutRequested()
{ {
BAlert *alert = new BAlert("about", "Installer\n" BAlert *alert = new BAlert("about", "Installer\n"
"\twritten by Jérôme Duval\n" "\twritten by Jérôme Duval\n"
"\tCopyright 2005, Haiku.\n\n", "Ok"); "\tCopyright 2005, Haiku.\n\n", "OK");
BTextView *view = alert->TextView(); BTextView *view = alert->TextView();
BFont font; BFont font;

View File

@ -173,8 +173,8 @@ InstallerWindow::InstallerWindow()
fDestMenuField->SetAlignment(B_ALIGN_RIGHT); fDestMenuField->SetAlignment(B_ALIGN_RIGHT);
fPackagesSwitch = new PaneSwitch("options_button"); fPackagesSwitch = new PaneSwitch("options_button");
fPackagesSwitch->SetLabels("Hide Optional Packages", fPackagesSwitch->SetLabels("Hide optional packages",
"Show Optional Packages"); "Show optional packages");
fPackagesSwitch->SetMessage(new BMessage(SHOW_BOTTOM_MESSAGE)); fPackagesSwitch->SetMessage(new BMessage(SHOW_BOTTOM_MESSAGE));
fPackagesSwitch->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, fPackagesSwitch->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED,
B_SIZE_UNSET)); B_SIZE_UNSET));
@ -193,7 +193,7 @@ InstallerWindow::InstallerWindow()
fSizeView->SetExplicitAlignment( fSizeView->SetExplicitAlignment(
BAlignment(B_ALIGN_RIGHT, B_ALIGN_MIDDLE)); BAlignment(B_ALIGN_RIGHT, B_ALIGN_MIDDLE));
fProgressBar = new BStatusBar("progress", "Install Progress: "); fProgressBar = new BStatusBar("progress", "Install progress: ");
fProgressBar->SetMaxValue(100.0); fProgressBar->SetMaxValue(100.0);
fBeginButton = new BButton("begin_button", "Begin", fBeginButton = new BButton("begin_button", "Begin",
@ -205,7 +205,7 @@ InstallerWindow::InstallerWindow()
"Set up partitions" B_UTF8_ELLIPSIS, new BMessage(SETUP_MESSAGE)); "Set up partitions" B_UTF8_ELLIPSIS, new BMessage(SETUP_MESSAGE));
fMakeBootableButton = new BButton("makebootable_button", fMakeBootableButton = new BButton("makebootable_button",
"Write Boot Sector", new BMessage(MSG_WRITE_BOOT_SECTOR)); "Write boot sector", new BMessage(MSG_WRITE_BOOT_SECTOR));
fMakeBootableButton->SetEnabled(false); fMakeBootableButton->SetEnabled(false);
SetLayout(new BGroupLayout(B_HORIZONTAL)); SetLayout(new BGroupLayout(B_HORIZONTAL));
@ -305,7 +305,7 @@ InstallerWindow::MessageReceived(BMessage *msg)
snprintf(errorMessage, sizeof(errorMessage), "An error was " snprintf(errorMessage, sizeof(errorMessage), "An error was "
"encountered and the installation was not completed:\n\n" "encountered and the installation was not completed:\n\n"
"Error: %s", strerror(error)); "Error: %s", strerror(error));
(new BAlert("error", errorMessage, "Ok"))->Go(); (new BAlert("error", errorMessage, "OK"))->Go();
} }
_DisableInterface(false); _DisableInterface(false);
@ -383,8 +383,8 @@ InstallerWindow::MessageReceived(BMessage *msg)
{ {
(new BAlert("use drive setup", "No partitions have been found that " (new BAlert("use drive setup", "No partitions have been found that "
"are suitable for installation. Please set up partitions and " "are suitable for installation. Please set up partitions and "
"initialize at least one partition with the Be File System." , "initialize at least one partition with the Be file system." ,
"Ok"))->Go(); "OK"))->Go();
} }
case MSG_STATUS_MESSAGE: case MSG_STATUS_MESSAGE:
{ {
@ -482,7 +482,7 @@ InstallerWindow::QuitRequested()
if (fDriveSetupLaunched) { if (fDriveSetupLaunched) {
(new BAlert("driveSetup", (new BAlert("driveSetup",
"Please close the DriveSetup window before closing the " "Please close the DriveSetup window before closing the "
"Installer window.", "Ok"))->Go(); "Installer window.", "OK"))->Go();
return false; return false;
} }
_QuitCopyEngine(false); _QuitCopyEngine(false);
@ -522,7 +522,7 @@ InstallerWindow::_LaunchDriveSetup()
if (entry.GetRef(&ref) != B_OK || be_roster->Launch(&ref) != B_OK) { if (entry.GetRef(&ref) != B_OK || be_roster->Launch(&ref) != B_OK) {
BAlert* alert = new BAlert("error", "DriveSetup, the application " BAlert* alert = new BAlert("error", "DriveSetup, the application "
"to configure disk partitions, could not be launched.", "to configure disk partitions, could not be launched.",
"Ok"); "OK");
alert->Go(); alert->Go();
} }
} }
@ -599,7 +599,7 @@ InstallerWindow::_UpdateControls()
if (fDestMenu->CountItems() == 0) if (fDestMenu->CountItems() == 0)
label = "<none>"; label = "<none>";
else else
label = "Please Choose Target"; label = "Please choose target";
} }
fDestMenuField->MenuItem()->SetLabel(label.String()); fDestMenuField->MenuItem()->SetLabel(label.String());
@ -624,7 +624,7 @@ InstallerWindow::_UpdateControls()
fBeginButton->SetEnabled(srcItem && dstItem); fBeginButton->SetEnabled(srcItem && dstItem);
// adjust "Write Boot Sector" button // adjust "Write Boot Sector" button
label = "Write Boot Sector"; label = "Write boot sector";
if (dstItem) if (dstItem)
label << " to \'" <<dstItem->Name() << '\''; label << " to \'" <<dstItem->Name() << '\'';
fMakeBootableButton->SetEnabled(dstItem); fMakeBootableButton->SetEnabled(dstItem);

View File

@ -392,7 +392,7 @@ WorkerThread::_PerformInstall(BMenu* srcMenu, BMenu* targetMenu)
"merged, whereas files and links that exist on both the source " "merged, whereas files and links that exist on both the source "
"and target volume will be overwritten with the source volume " "and target volume will be overwritten with the source volume "
"version.", "version.",
"Install Anyway", "Cancel", 0, "Install anyway", "Cancel", 0,
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) { B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go() != 0)) {
// TODO: Would be cool to offer the option here to clean additional // TODO: Would be cool to offer the option here to clean additional
// folders at the user's choice (like /boot/common and /boot/develop). // folders at the user's choice (like /boot/common and /boot/develop).

View File

@ -30,7 +30,7 @@ NamePanel::NamePanel(const char* label, const char* text, BWindow* window,
fTarget(target), fTarget(target),
fMessage(message) fMessage(message)
{ {
BButton* defaultButton = new BButton("Ok", new BMessage(MSG_PANEL_OK)); BButton* defaultButton = new BButton("OK", new BMessage(MSG_PANEL_OK));
BButton* cancelButton = new BButton("Cancel", BButton* cancelButton = new BButton("Cancel",
new BMessage(MSG_PANEL_CANCEL)); new BMessage(MSG_PANEL_CANCEL));
fNameTC = new BTextControl(label, text, NULL); fNameTC = new BTextControl(label, text, NULL);

View File

@ -320,7 +320,7 @@ PadView::DisplayMenu(BPoint where, LaunchButton* button) const
// add button // add button
BMessage* message = new BMessage(MSG_ADD_SLOT); BMessage* message = new BMessage(MSG_ADD_SLOT);
message->AddPointer("be:source", (void*)nearestButton); message->AddPointer("be:source", (void*)nearestButton);
BMenuItem* item = new BMenuItem("Add Button Here", message); BMenuItem* item = new BMenuItem("Add button here", message);
item->SetTarget(window); item->SetTarget(window);
menu->AddItem(item); menu->AddItem(item);
// button options // button options
@ -328,20 +328,20 @@ PadView::DisplayMenu(BPoint where, LaunchButton* button) const
// clear button // clear button
message = new BMessage(MSG_CLEAR_SLOT); message = new BMessage(MSG_CLEAR_SLOT);
message->AddPointer("be:source", (void*)button); message->AddPointer("be:source", (void*)button);
item = new BMenuItem("Clear Button", message); item = new BMenuItem("Clear button", message);
item->SetTarget(window); item->SetTarget(window);
menu->AddItem(item); menu->AddItem(item);
// remove button // remove button
message = new BMessage(MSG_REMOVE_SLOT); message = new BMessage(MSG_REMOVE_SLOT);
message->AddPointer("be:source", (void*)button); message->AddPointer("be:source", (void*)button);
item = new BMenuItem("Remove Button", message); item = new BMenuItem("Remove button", message);
item->SetTarget(window); item->SetTarget(window);
menu->AddItem(item); menu->AddItem(item);
// set button description // set button description
if (button->Ref()) { if (button->Ref()) {
message = new BMessage(MSG_SET_DESCRIPTION); message = new BMessage(MSG_SET_DESCRIPTION);
message->AddPointer("be:source", (void*)button); message->AddPointer("be:source", (void*)button);
item = new BMenuItem("Set Description"B_UTF8_ELLIPSIS, message); item = new BMenuItem("Set description"B_UTF8_ELLIPSIS, message);
item->SetTarget(window); item->SetTarget(window);
menu->AddItem(item); menu->AddItem(item);
} }
@ -353,9 +353,9 @@ PadView::DisplayMenu(BPoint where, LaunchButton* button) const
const char* toggleLayoutLabel; const char* toggleLayoutLabel;
if (fButtonLayout->Orientation() == B_HORIZONTAL) if (fButtonLayout->Orientation() == B_HORIZONTAL)
toggleLayoutLabel = "Vertical Layout"; toggleLayoutLabel = "Vertical layout";
else else
toggleLayoutLabel = "Horizontal Layout"; toggleLayoutLabel = "Horizontal layout";
item = new BMenuItem(toggleLayoutLabel, new BMessage(MSG_TOGGLE_LAYOUT)); item = new BMenuItem(toggleLayoutLabel, new BMessage(MSG_TOGGLE_LAYOUT));
item->SetTarget(this); item->SetTarget(this);
settingsM->AddItem(item); settingsM->AddItem(item);
@ -374,24 +374,24 @@ PadView::DisplayMenu(BPoint where, LaunchButton* button) const
} }
settingsM->AddItem(iconSizeM); settingsM->AddItem(iconSizeM);
item = new BMenuItem("Ignore Double-click", item = new BMenuItem("Ignore double-click",
new BMessage(MSG_SET_IGNORE_DOUBLECLICK)); new BMessage(MSG_SET_IGNORE_DOUBLECLICK));
item->SetTarget(this); item->SetTarget(this);
item->SetMarked(IgnoreDoubleClick()); item->SetMarked(IgnoreDoubleClick());
settingsM->AddItem(item); settingsM->AddItem(item);
uint32 what = window->Look() == B_BORDERED_WINDOW_LOOK ? MSG_SHOW_BORDER : MSG_HIDE_BORDER; uint32 what = window->Look() == B_BORDERED_WINDOW_LOOK ? MSG_SHOW_BORDER : MSG_HIDE_BORDER;
item = new BMenuItem("Show Window Border", new BMessage(what)); item = new BMenuItem("Show window border", new BMessage(what));
item->SetTarget(window); item->SetTarget(window);
item->SetMarked(what == MSG_HIDE_BORDER); item->SetMarked(what == MSG_HIDE_BORDER);
settingsM->AddItem(item); settingsM->AddItem(item);
item = new BMenuItem("Auto Raise", new BMessage(MSG_TOGGLE_AUTORAISE)); item = new BMenuItem("Auto-raise", new BMessage(MSG_TOGGLE_AUTORAISE));
item->SetTarget(window); item->SetTarget(window);
item->SetMarked(window->AutoRaise()); item->SetMarked(window->AutoRaise());
settingsM->AddItem(item); settingsM->AddItem(item);
item = new BMenuItem("Show On All Workspaces", new BMessage(MSG_SHOW_ON_ALL_WORKSPACES)); item = new BMenuItem("Show on all workspaces", new BMessage(MSG_SHOW_ON_ALL_WORKSPACES));
item->SetTarget(window); item->SetTarget(window);
item->SetMarked(window->ShowOnAllWorkspaces()); item->SetMarked(window->ShowOnAllWorkspaces());
settingsM->AddItem(item); settingsM->AddItem(item);

View File

@ -48,18 +48,18 @@ LoginApp::ReadyToRun()
if (fEditShelfMode) { if (fEditShelfMode) {
(new BAlert("Info", "You can customize the desktop shown " (new BAlert("Info", "You can customize the desktop shown "
"behind the Login app by dropping replicants onto it.\n" "behind the Login application by dropping replicants onto it.\n"
"\n" "\n"
"When you are finished just quit the application (Alt-Q).", "When you are finished just quit the application (Alt-Q).",
"Ok"))->Go(NULL); "OK"))->Go(NULL);
} else { } else {
BRect frame(0, 0, 400, 150); BRect frame(0, 0, 400, 150);
frame.OffsetBySelf(screen.Frame().Width()/2 - frame.Width()/2, frame.OffsetBySelf(screen.Frame().Width()/2 - frame.Width()/2,
screen.Frame().Height()/2 - frame.Height()/2); screen.Frame().Height()/2 - frame.Height()/2);
fLoginWindow = new LoginWindow(frame); fLoginWindow = new LoginWindow(frame);
fLoginWindow->Show(); fLoginWindow->Show();
} }
fDesktopWindow = new DesktopWindow(screen.Frame(), fEditShelfMode); fDesktopWindow = new DesktopWindow(screen.Frame(), fEditShelfMode);
fDesktopWindow->Show(); fDesktopWindow->Show();
// TODO: add a shelf with Activity Monitor replicant :) // TODO: add a shelf with Activity Monitor replicant :)
@ -89,12 +89,12 @@ LoginApp::MessageReceived(BMessage *message)
if (error < B_OK) { if (error < B_OK) {
BString msg("Error: "); BString msg("Error: ");
msg << strerror(error); msg << strerror(error);
(new BAlert("Error", msg.String(), "Ok"))->Go(); (new BAlert("Error", msg.String(), "OK"))->Go();
} }
break; break;
} }
case kSuspendAction: case kSuspendAction:
(new BAlert("Error", "Unimplemented", "Ok"))->Go(); (new BAlert("Error", "Unimplemented", "OK"))->Go();
break; break;
#endif #endif
default: default:
@ -106,8 +106,7 @@ LoginApp::MessageReceived(BMessage *message)
void void
LoginApp::ArgvReceived(int32 argc, char **argv) LoginApp::ArgvReceived(int32 argc, char **argv)
{ {
int i; for (int i = 1; i < argc; i++) {
for (i = 1; i < argc; i++) {
BString arg(argv[i]); BString arg(argv[i]);
//printf("[%d]: %s\n", i, argv[i]); //printf("[%d]: %s\n", i, argv[i]);
if (arg == "--edit") if (arg == "--edit")
@ -118,7 +117,7 @@ LoginApp::ArgvReceived(int32 argc, char **argv)
printf("Login application for Haiku\nUsage:\n"); printf("Login application for Haiku\nUsage:\n");
printf("%s [--nonmodal] [--edit]\n", argv[0]); printf("%s [--nonmodal] [--edit]\n", argv[0]);
printf("--nonmodal Do not make the window modal\n"); printf("--nonmodal Do not make the window modal\n");
printf("--edit Launch in Shelf editting mode to " printf("--edit Launch in shelf editting mode to "
"allow customizing the desktop.\n"); "allow customizing the desktop.\n");
// just return to the shell // just return to the shell
exit((arg == "--help") ? 0 : 1); exit((arg == "--help") ? 0 : 1);
@ -143,10 +142,10 @@ LoginApp::TryLogin(BMessage *message)
if (err == B_OK) { if (err == B_OK) {
reply.what = kLoginOk; reply.what = kLoginOk;
message->SendReply(&reply); message->SendReply(&reply);
if (password == NULL) if (password == NULL)
return; return;
// start a session // start a session
//kSetProgress //kSetProgress
StartUserSession(login); StartUserSession(login);
@ -155,7 +154,7 @@ LoginApp::TryLogin(BMessage *message)
message->SendReply(&reply); message->SendReply(&reply);
return; return;
} }
} else { } else {
reply.AddInt32("error", EINVAL); reply.AddInt32("error", EINVAL);
message->SendReply(&reply); message->SendReply(&reply);
@ -168,7 +167,7 @@ status_t
LoginApp::ValidateLogin(const char *login, const char *password) LoginApp::ValidateLogin(const char *login, const char *password)
{ {
struct passwd *pwd; struct passwd *pwd;
pwd = getpwnam(login); pwd = getpwnam(login);
if (!pwd) if (!pwd)
return ENOENT; return ENOENT;
@ -207,7 +206,7 @@ LoginApp::getpty(char *pty, char *tty)
static const char minor[] = "0123456789abcdef"; static const char minor[] = "0123456789abcdef";
uint32 i, j; uint32 i, j;
int32 fd = -1; int32 fd = -1;
for (i = 0; i < sizeof(major); i++) for (i = 0; i < sizeof(major); i++)
{ {
for (j = 0; j < sizeof(minor); j++) for (j = 0; j < sizeof(minor); j++)
@ -221,7 +220,7 @@ LoginApp::getpty(char *pty, char *tty)
} }
} }
} }
return fd; return fd;
} }

View File

@ -21,7 +21,7 @@
class PwdItem : public BStringItem { class PwdItem : public BStringItem {
public: public:
PwdItem(struct passwd *pwd, uint32 level = 0, PwdItem(struct passwd *pwd, uint32 level = 0,
bool expanded = true) bool expanded = true)
: BStringItem("", level, expanded) : BStringItem("", level, expanded)
{ {
@ -42,58 +42,58 @@ private:
LoginView::LoginView(BRect frame) LoginView::LoginView(BRect frame)
: BView(frame, "LoginView", B_FOLLOW_ALL, B_PULSE_NEEDED) : BView(frame, "LoginView", B_FOLLOW_ALL, B_PULSE_NEEDED)
{ {
// TODO: when I don't need to test in BeOS anymore, // TODO: when I don't need to test in BeOS anymore,
// rewrite to use layout engine. // rewrite to use layout engine.
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
SetLowColor(ViewColor()); SetLowColor(ViewColor());
BRect r; BRect r;
r.Set(CSEP, CSEP, LW, Bounds().Height() - 3 * CSEP - BH); r.Set(CSEP, CSEP, LW, Bounds().Height() - 3 * CSEP - BH);
fUserList = new BListView(r, "users"); fUserList = new BListView(r, "users");
BScrollView *sv = new BScrollView("userssv", fUserList, BScrollView *sv = new BScrollView("userssv", fUserList,
B_FOLLOW_LEFT | B_FOLLOW_TOP, 0, false, true); B_FOLLOW_LEFT | B_FOLLOW_TOP, 0, false, true);
AddChild(sv); AddChild(sv);
fUserList->SetSelectionMessage(new BMessage(kUserSelected)); fUserList->SetSelectionMessage(new BMessage(kUserSelected));
fUserList->SetInvocationMessage(new BMessage(kUserInvoked)); fUserList->SetInvocationMessage(new BMessage(kUserInvoked));
r.Set(LW + 30, Bounds().top + CSEP, r.Set(LW + 30, Bounds().top + CSEP,
Bounds().right - CSEP, Bounds().top + CSEP + CSEP); Bounds().right - CSEP, Bounds().top + CSEP + CSEP);
fLoginControl = new BTextControl(r, "login", "login:", "", fLoginControl = new BTextControl(r, "login", "Login:", "",
new BMessage(kLoginEdited)); new BMessage(kLoginEdited));
AddChild(fLoginControl); AddChild(fLoginControl);
r.OffsetBySelf(0, CSEP + CSEP); r.OffsetBySelf(0, CSEP + CSEP);
fPasswordControl = new BTextControl(r, "password", "password:", "", fPasswordControl = new BTextControl(r, "password", "Password:", "",
new BMessage(kPasswordEdited)); new BMessage(kPasswordEdited));
fPasswordControl->TextView()->HideTyping(true); fPasswordControl->TextView()->HideTyping(true);
AddChild(fPasswordControl); AddChild(fPasswordControl);
r.OffsetBySelf(0, CSEP + CSEP); r.OffsetBySelf(0, CSEP + CSEP);
fHidePasswordCheckBox = new BCheckBox(r, "hidepw", "Hide Password", fHidePasswordCheckBox = new BCheckBox(r, "hidepw", "Hide password",
new BMessage(kHidePassword)); new BMessage(kHidePassword));
fHidePasswordCheckBox->SetValue(1); fHidePasswordCheckBox->SetValue(1);
AddChild(fHidePasswordCheckBox); AddChild(fHidePasswordCheckBox);
// buttons // buttons
float buttonWidth = BW; //(Bounds().Width() - 4 * CSEP) / 3; float buttonWidth = BW; //(Bounds().Width() - 4 * CSEP) / 3;
BRect buttonRect(0, Bounds().bottom - BH, BRect buttonRect(0, Bounds().bottom - BH,
buttonWidth, Bounds().bottom); buttonWidth, Bounds().bottom);
buttonRect.OffsetBySelf(CSEP, -CSEP); buttonRect.OffsetBySelf(CSEP, -CSEP);
fHaltButton = new BButton(buttonRect, "halt", "Halt", fHaltButton = new BButton(buttonRect, "halt", "Halt",
new BMessage(kHaltAction)); new BMessage(kHaltAction));
AddChild(fHaltButton); AddChild(fHaltButton);
buttonRect.OffsetBySelf(CSEP + buttonWidth, 0); buttonRect.OffsetBySelf(CSEP + buttonWidth, 0);
fRebootButton = new BButton(buttonRect, "reboot", "Reboot", fRebootButton = new BButton(buttonRect, "reboot", "Reboot",
new BMessage(kRebootAction)); new BMessage(kRebootAction));
AddChild(fRebootButton); AddChild(fRebootButton);
BRect infoRect(buttonRect); BRect infoRect(buttonRect);
infoRect.OffsetBySelf(buttonWidth + CSEP, 0); infoRect.OffsetBySelf(buttonWidth + CSEP, 0);
buttonRect.OffsetToSelf(Bounds().Width() - CSEP - buttonWidth, buttonRect.OffsetToSelf(Bounds().Width() - CSEP - buttonWidth,
Bounds().Height() - CSEP - BH); Bounds().Height() - CSEP - BH);
fLoginButton = new BButton(buttonRect, "ok", "Ok", fLoginButton = new BButton(buttonRect, "ok", "OK",
new BMessage(kAttemptLogin)); new BMessage(kAttemptLogin));
AddChild(fLoginButton); AddChild(fLoginButton);
@ -161,7 +161,7 @@ LoginView::MessageReceived(BMessage *message)
// if no pass specified and we were selecting the user, // if no pass specified and we were selecting the user,
// give a chance to enter the password // give a chance to enter the password
// else we might want to enter an empty password. // else we might want to enter an empty password.
if (strlen(fPasswordControl->Text()) < 1 if (strlen(fPasswordControl->Text()) < 1
&& (fUserList->IsFocus() || fLoginControl->IsFocus())) { && (fUserList->IsFocus() || fLoginControl->IsFocus())) {
fPasswordControl->MakeFocus(); fPasswordControl->MakeFocus();
break; break;
@ -224,10 +224,10 @@ LoginView::AddNextUser()
pwd = getpwent(); pwd = getpwent();
if (pwd && pwd->pw_shell && if (pwd && pwd->pw_shell &&
strcmp(pwd->pw_shell, "false") && strcmp(pwd->pw_shell, "false") &&
strcmp(pwd->pw_shell, "true") && strcmp(pwd->pw_shell, "true") &&
strcmp(pwd->pw_shell, "/bin/false") && strcmp(pwd->pw_shell, "/bin/false") &&
strcmp(pwd->pw_shell, "/bin/true")) { strcmp(pwd->pw_shell, "/bin/true")) {
// not disabled // not disabled
PwdItem *item = new PwdItem(pwd); PwdItem *item = new PwdItem(pwd);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2008, Haiku, Inc. All Rights Reserved. * Copyright 2002-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Updated by Sikosis (beos@gravity24hr.com) * Updated by Sikosis (beos@gravity24hr.com)
@ -132,40 +132,40 @@ BuildInfoMenu(BMenu *menu)
menu->AddItem(menuItem); menu->AddItem(menuItem);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menuItem = new BMenuItem("Save Image", new BMessage(msg_save),'S'); menuItem = new BMenuItem("Save image", new BMessage(msg_save),'S');
menu->AddItem(menuItem); menu->AddItem(menuItem);
// menuItem = new BMenuItem("Save Selection", new BMessage(msg_save),'S'); // menuItem = new BMenuItem("Save selection", new BMessage(msg_save),'S');
// menu->AddItem(menuItem); // menu->AddItem(menuItem);
menuItem = new BMenuItem("Copy Image", new BMessage(msg_copy_image),'C'); menuItem = new BMenuItem("Copy image", new BMessage(msg_copy_image),'C');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menuItem = new BMenuItem("Hide/Show Info", new BMessage(msg_show_info),'T'); menuItem = new BMenuItem("Hide/Show info", new BMessage(msg_show_info),'T');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Add a Crosshair", new BMessage(msg_add_cross_hair),'H'); menuItem = new BMenuItem("Add a crosshair", new BMessage(msg_add_cross_hair),'H');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Remove a Crosshair", new BMessage(msg_remove_cross_hair), 'H', menuItem = new BMenuItem("Remove a crosshair", new BMessage(msg_remove_cross_hair), 'H',
B_SHIFT_KEY); B_SHIFT_KEY);
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Hide/Show Grid", new BMessage(msg_toggle_grid),'G'); menuItem = new BMenuItem("Hide/Show grid", new BMessage(msg_toggle_grid),'G');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menuItem = new BMenuItem("Freeze/Unfreeze image", new BMessage(msg_freeze),'F'); menuItem = new BMenuItem("Freeze/Unfreeze image", new BMessage(msg_freeze),'F');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Stick Coordinates", new BMessage(msg_stick), 'I'); menuItem = new BMenuItem("Stick coordinates", new BMessage(msg_stick), 'I');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menuItem = new BMenuItem("Make Square", new BMessage(msg_make_square),'/'); menuItem = new BMenuItem("Make square", new BMessage(msg_make_square),'/');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Decrease Window Size", new BMessage(msg_shrink),'-'); menuItem = new BMenuItem("Decrease window size", new BMessage(msg_shrink),'-');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Increase Window Size", new BMessage(msg_grow),'+'); menuItem = new BMenuItem("Increase window size", new BMessage(msg_grow),'+');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Decrease Pixel Size", new BMessage(msg_shrink_pixel),','); menuItem = new BMenuItem("Decrease pixel size", new BMessage(msg_shrink_pixel),',');
menu->AddItem(menuItem); menu->AddItem(menuItem);
menuItem = new BMenuItem("Increase Pixel Size", new BMessage(msg_grow_pixel),'.'); menuItem = new BMenuItem("Increase pixel size", new BMessage(msg_grow_pixel),'.');
menu->AddItem(menuItem); menu->AddItem(menuItem);
} }
@ -771,7 +771,7 @@ void
TWindow::ShowHelp() TWindow::ShowHelp()
{ {
BRect r(0, 0, 375, 240); BRect r(0, 0, 375, 240);
BWindow* w = new BWindow(r, "Magnify Help", B_TITLED_WINDOW, BWindow* w = new BWindow(r, "Magnify help", B_TITLED_WINDOW,
B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_NOT_RESIZABLE); B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_NOT_RESIZABLE);
r.right -= B_V_SCROLL_BAR_WIDTH; r.right -= B_V_SCROLL_BAR_WIDTH;
@ -810,7 +810,7 @@ TWindow::ShowHelp()
text->Insert(" freeze - freezes/unfreezes magnification of whatever the\n"); text->Insert(" freeze - freezes/unfreezes magnification of whatever the\n");
text->Insert(" cursor is currently over\n"); text->Insert(" cursor is currently over\n");
text->Insert("\n\n"); text->Insert("\n\n");
text->Insert("Sizing & Resizing:\n"); text->Insert("Sizing/Resizing:\n");
text->Insert(" make square - sets the width and the height to the larger\n"); text->Insert(" make square - sets the width and the height to the larger\n");
text->Insert(" of the two making a square image\n"); text->Insert(" of the two making a square image\n");
text->Insert(" increase/decrease window size - grows or shrinks the window\n"); text->Insert(" increase/decrease window size - grows or shrinks the window\n");
@ -1013,31 +1013,31 @@ TMenu::AttachedToWindow()
if (fMainWindow) if (fMainWindow)
state = fMainWindow->IsActive(); state = fMainWindow->IsActive();
BMenuItem* menuItem = FindItem("Hide/Show Info"); BMenuItem* menuItem = FindItem("Hide/Show info");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);
menuItem = FindItem("Add a Crosshair"); menuItem = FindItem("Add a crosshair");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);
menuItem = FindItem("Remove a Crosshair"); menuItem = FindItem("Remove a crosshair");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);
menuItem = FindItem("Hide/Show Grid"); menuItem = FindItem("Hide/Show grid");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);
menuItem = FindItem("Make Square"); menuItem = FindItem("Make square");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);
menuItem = FindItem("Decrease Window Size"); menuItem = FindItem("Decrease window size");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);
menuItem = FindItem("Increase Window Size"); menuItem = FindItem("Increase window size");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);
menuItem = FindItem("Decrease Pixel Size"); menuItem = FindItem("Decrease pixel size");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);
menuItem = FindItem("Increase Pixel Size"); menuItem = FindItem("Increase pixel size");
if (menuItem) if (menuItem)
menuItem->SetEnabled(state); menuItem->SetEnabled(state);

View File

@ -56,10 +56,10 @@ TMainWindow::TMainWindow(BRect bound, char* name, window_type type, long flags)
menuBar->AddItem(menu); menuBar->AddItem(menu);
menu = new BMenu("Palette"); menu = new BMenu("Palette");
menu->AddItem(new BMenuItem("Palette1", new BMessage(P1))); menu->AddItem(new BMenuItem("Palette 1", new BMessage(P1)));
menu->AddItem(new BMenuItem("Palette2", new BMessage(P2))); menu->AddItem(new BMenuItem("Palette 2", new BMessage(P2)));
menu->AddItem(item = new BMenuItem("Palette3", new BMessage(P3))); menu->AddItem(item = new BMenuItem("Palette 3", new BMessage(P3)));
menu->AddItem(new BMenuItem("Palette4", new BMessage(P4))); menu->AddItem(new BMenuItem("Palette 4", new BMessage(P4)));
menuBar->AddItem(menu); menuBar->AddItem(menu);
item->SetMarked(true); item->SetMarked(true);

View File

@ -602,7 +602,7 @@ MediaConverterWindow::BuildAudioVideoMenus()
format.u.raw_audio = media_raw_audio_format::wildcard; format.u.raw_audio = media_raw_audio_format::wildcard;
while (get_next_encoder(&cookie, mf_format, &format, &outfmt, &codec_info) == B_OK) { while (get_next_encoder(&cookie, mf_format, &format, &outfmt, &codec_info) == B_OK) {
if (separator) { if (separator) {
menu->AddItem(new BMenuItem("No Audio", menu->AddItem(new BMenuItem("No audio",
new BMessage(AUDIO_CODEC_SELECT_MESSAGE))); new BMessage(AUDIO_CODEC_SELECT_MESSAGE)));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
separator = false; separator = false;
@ -656,7 +656,7 @@ MediaConverterWindow::BuildAudioVideoMenus()
cookie = 0; cookie = 0;
while (get_next_encoder(&cookie, mf_format, &format, &outfmt, &codec_info) == B_OK) { while (get_next_encoder(&cookie, mf_format, &format, &outfmt, &codec_info) == B_OK) {
if (separator) { if (separator) {
menu->AddItem(new BMenuItem("No Video", menu->AddItem(new BMenuItem("No video",
new BMessage(VIDEO_CODEC_SELECT_MESSAGE))); new BMessage(VIDEO_CODEC_SELECT_MESSAGE)));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
separator = false; separator = false;

View File

@ -26,14 +26,14 @@
#define SOURCE_BOX_LABEL _T("Source files") #define SOURCE_BOX_LABEL _T("Source files")
#define INFO_BOX_LABEL _T("File details") #define INFO_BOX_LABEL _T("File details")
#define OUTPUT_BOX_LABEL _T("Output format") #define OUTPUT_BOX_LABEL _T("Output format")
#define FORMAT_LABEL _T("File format") #define FORMAT_LABEL _T("File format:")
#define VIDEO_LABEL _T("Video encoding") #define VIDEO_LABEL _T("Video encoding:")
#define AUDIO_LABEL _T("Audio encoding") #define AUDIO_LABEL _T("Audio encoding:")
// //
#define OUTPUT_FOLDER_LABEL _T("Output Folder") #define OUTPUT_FOLDER_LABEL _T("Output folder")
#define PREVIEW_BUTTON_LABEL _T("Preview") #define PREVIEW_BUTTON_LABEL _T("Preview")
#define START_LABEL _T("Start mSec ") #define START_LABEL _T("Start [ms]: ")
#define END_LABEL _T("End mSec ") #define END_LABEL _T("End [ms]: ")
// //
#define FORMAT_MENU_LABEL _T("Format") #define FORMAT_MENU_LABEL _T("Format")
#define VIDEO_MENU_LABEL _T("Video") #define VIDEO_MENU_LABEL _T("Video")
@ -43,8 +43,8 @@
#define AUDIO_INFO_LABEL _T("Audio:") #define AUDIO_INFO_LABEL _T("Audio:")
#define CONVERT_LABEL _T("Convert") #define CONVERT_LABEL _T("Convert")
#define CANCEL_LABEL _T("Cancel") #define CANCEL_LABEL _T("Cancel")
#define VIDEO_QUALITY_LABEL _T("Video quality %3d%%") #define VIDEO_QUALITY_LABEL _T("Video quality: %3d%%")
#define AUDIO_QUALITY_LABEL _T("Audio quality %3d%%") #define AUDIO_QUALITY_LABEL _T("Audio quality: %3d%%")
#define SLIDER_LOW_LABEL _T("Low") #define SLIDER_LOW_LABEL _T("Low")
#define SLIDER_HIGH_LABEL _T("High") #define SLIDER_HIGH_LABEL _T("High")
#define NONE_LABEL _T("None available") #define NONE_LABEL _T("None available")
@ -54,14 +54,14 @@
#define OK_LABEL _T("OK") #define OK_LABEL _T("OK")
#define CONV_COMPLETE_LABEL _T("Conversion completed") #define CONV_COMPLETE_LABEL _T("Conversion completed")
#define CONV_CANCEL_LABEL _T("Conversion cancelled") #define CONV_CANCEL_LABEL _T("Conversion cancelled")
#define SELECT_DIR_LABEL _T("Select This Directory") #define SELECT_DIR_LABEL _T("Select this folder")
#define SELECT_LABEL _T("Select") #define SELECT_LABEL _T("Select")
#define SAVE_DIR_LABEL _T("MediaConverter+:SaveDirectory") #define SAVE_DIR_LABEL _T("MediaConverter+:SaveDirectory")
#define NO_FILE_LABEL _T("No file selected") #define NO_FILE_LABEL _T("No file selected")
// //
#define FILE_MENU_LABEL _T("File") #define FILE_MENU_LABEL _T("File")
#define OPEN_MENU_LABEL _T("Open") #define OPEN_MENU_LABEL _T("Open")
#define ABOUT_MENU_LABEL _T("About") #define ABOUT_MENU_LABEL _T("About MediaConverter")
#define QUIT_MENU_LABEL _T("Quit") #define QUIT_MENU_LABEL _T("Quit")
#define WRITE_AUDIO_STRING _T("Writing audio track:") #define WRITE_AUDIO_STRING _T("Writing audio track:")
@ -86,7 +86,7 @@
#define ERROR_READ_AUDIO_STRING _T("Error read audio frame ") #define ERROR_READ_AUDIO_STRING _T("Error read audio frame ")
#define ERROR_LOAD_STRING _T("Error loading file") #define ERROR_LOAD_STRING _T("Error loading file")
#define ENCODER_PARAMETERS _T("Encoder Parameters") #define ENCODER_PARAMETERS _T("Encoder parameters")
#endif // STRINGS_H #endif // STRINGS_H

View File

@ -8,10 +8,10 @@
"File format" "Format du fichier" "File format" "Format du fichier"
"Video encoding" "Codage Vidéo" "Video encoding" "Codage Vidéo"
"Audio encoding" "Codage Audio" "Audio encoding" "Codage Audio"
"Output Folder" "Dossier de sortie" "Output folder" "Dossier de sortie"
"Preview" "Prévue" "Preview" "Prévue"
"Start mSec " "Début (mSec)" "Start [ms] " "Début (mSec)"
"End mSec " "FIn (mSec)" "End [ms] " "FIn (mSec)"
"Format" "Format" "Format" "Format"
"Video" "Vidéo" "Video" "Vidéo"
"Audio" "Audio" "Audio" "Audio"
@ -22,8 +22,8 @@
"Cancel" "Annuler" "Cancel" "Annuler"
"Low" "Faible" "Low" "Faible"
"High" "Haute" "High" "Haute"
"Video quality %3d%%" "QualitéVidéo %3d%%" "Video quality %3d%%" "Qualité vidéo %3d%%"
"Audio quality %3d%%" "QualitéAudio %3d%%" "Audio quality %3d%%" "Qualité audio %3d%%"
"Drop media files onto this window" "Jeter les fichiers media dans cette fenêtre" "Drop media files onto this window" "Jeter les fichiers media dans cette fenêtre"
"None available" "Non disponible" "None available" "Non disponible"
"Converting" "Conversion en cours" "Converting" "Conversion en cours"
@ -33,13 +33,13 @@
"Cancelling" "Annulation en cours" "Cancelling" "Annulation en cours"
"OK" "Ok" "OK" "Ok"
"No file selected" "Aucun fichier sélectionné" "No file selected" "Aucun fichier sélectionné"
"Select This Directory" "Choisir ce dossier" "Select this folder" "Choisir ce dossier"
"Select" "Sélectionner" "Select" "Sélectionner"
"MediaConverter+:SaveDirectory" "MediaConverter+:DossierSauvegarde" "MediaConverter+:SaveDirectory" "MediaConverter+:DossierSauvegarde"
"Output file" "Fichier cible" "Output file" "Fichier cible"
"created" "créé" "created" "créé"
"AudioQuality doesn't support" "Qualité Audio non supportée" "Audio quality doesn't support" "Qualité audio non supportée"
"VideoQuality doesn't support" "Qualité Vidéo non supportée" "Video quality doesn't support" "Qualité vidéo non supportée"
"Writing audio track:" "Ecriture de la piste audio:" "Writing audio track:" "Ecriture de la piste audio:"
"Writing video track:" "Ecriture de la piste vidéo:" "Writing video track:" "Ecriture de la piste vidéo:"
"Error launching: " "Erreur de lancement : " "Error launching: " "Erreur de lancement : "

View File

@ -8,10 +8,10 @@
"File format" "Formato del file" "File format" "Formato del file"
"Video encoding" "Codifica video" "Video encoding" "Codifica video"
"Audio encoding" "Codifica audio" "Audio encoding" "Codifica audio"
"Output Folder" "Cartella di destinazione" "Output folder" "Cartella di destinazione"
"Preview" "Anteprima" "Preview" "Anteprima"
"Start mSec " "Inizio mSec" "Start [ms] " "Inizio mSec"
"End mSec " "Fine mSec" "End [ms] " "Fine mSec"
"Format" "Formato" "Format" "Formato"
"Video" "Video" "Video" "Video"
"Audio" "Audio" "Audio" "Audio"
@ -33,13 +33,13 @@
"Cancelling" "Interruzione" "Cancelling" "Interruzione"
"OK" "OK" "OK" "OK"
"No file selected" "Nessun file selezionato" "No file selected" "Nessun file selezionato"
"Select This Directory" "Seleziona questa directory" "Select this folder" "Seleziona questa directory"
"Select" "Seleziona" "Select" "Seleziona"
"MediaConverter+:SaveDirectory" "MediaConverter+:Directory di salvataggio" "MediaConverter+:SaveDirectory" "MediaConverter+:Directory di salvataggio"
"Output file" "File di output" "Output file" "File di output"
"created" "creato" "created" "creato"
"Audio-Quality doesn't support" "Audio-Quality non supportata" "Audio quality doesn't support" "Audio quality non supportata"
"Video-Quality doesn't support" "Video-Quality non supportata" "Video quality doesn't support" "Video quality non supportata"
"Writing audio track:" "Scrittura traccia audio in corso:" "Writing audio track:" "Scrittura traccia audio in corso:"
"Writing video track:" "Scrittura traccia video in corso:" "Writing video track:" "Scrittura traccia video in corso:"
"Error launching: " "Errore lanciando: " "Error launching: " "Errore lanciando: "

View File

@ -8,10 +8,10 @@
"File format" "ファイル形式" "File format" "ファイル形式"
"Video encoding" "映像エンコード形式" "Video encoding" "映像エンコード形式"
"Audio encoding" "音声エンコード形式" "Audio encoding" "音声エンコード形式"
"Output Folder" "出力フォルダ" "Output folder" "出力フォルダ"
"Preview" "プレビュー" "Preview" "プレビュー"
"Start mSec " "開始 mSec" "Start [ms] " "開始 mSec"
"End mSec " "終了 mSec" "End [ms] " "終了 mSec"
"Format" "形式" "Format" "形式"
"Video" "映像" "Video" "映像"
"Audio" "音声" "Audio" "音声"
@ -33,13 +33,13 @@
"Cancelling" "中止しています" "Cancelling" "中止しています"
"OK" "了解" "OK" "了解"
"No file selected" "ファイル未選択" "No file selected" "ファイル未選択"
"Select This Directory" "現在のディレクトリを選択" "Select this folder" "現在のディレクトリを選択"
"Select" "選択" "Select" "選択"
"MediaConverter+:SaveDirectory" "MediaConverter+:保存先のディレクトリ" "MediaConverter+:SaveDirectory" "MediaConverter+:保存先のディレクトリ"
"Output file" "出力ファイル" "Output file" "出力ファイル"
"created" "生成" "created" "生成"
"AudioQuality doesn't support" "音質調整機能なし" "Audio quality doesn't support" "音質調整機能なし"
"VideoQuality doesn't support" "画質調整機能なし" "Video quality doesn't support" "画質調整機能なし"
"Writing audio track:" "音声トラック書き込み中:" "Writing audio track:" "音声トラック書き込み中:"
"Writing video track:" "映像トラック書き込み中:" "Writing video track:" "映像トラック書き込み中:"
"Error launching: " "起動エラー : " "Error launching: " "起動エラー : "

View File

@ -415,7 +415,7 @@ printf("InfoWin::Update(0x%08lx)\n", which);
fContentsView->Insert(s.String()); fContentsView->Insert(s.String());
// TODO: demux/video/audio/... perfs (Kb/s) // TODO: demux/video/audio/... perfs (Kb/s)
fLabelsView->Insert("Display Mode\n"); fLabelsView->Insert("Display mode\n");
if (fController->IsOverlayActive()) if (fController->IsOverlayActive())
fContentsView->Insert("Overlay\n"); fContentsView->Insert("Overlay\n");
else else

View File

@ -80,8 +80,8 @@ MainApp::MainApp()
if (!fMediaServerRunning || !fMediaAddOnServerRunning) { if (!fMediaServerRunning || !fMediaAddOnServerRunning) {
BAlert* alert = new BAlert("start_media_server", BAlert* alert = new BAlert("start_media_server",
"It appears the Media Server is not running.\n" "It appears the media server is not running.\n"
"Would you like to start it ?", "Quit", "Start Media Server", NULL, "Would you like to start it ?", "Quit", "Start media server", NULL,
B_WIDTH_AS_USUAL, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_WARNING_ALERT);
if (alert->Go() == 0) { if (alert->Go() == 0) {
PostMessage(B_QUIT_REQUESTED); PostMessage(B_QUIT_REQUESTED);
@ -344,7 +344,7 @@ MainApp::MessageReceived(BMessage* message)
void void
MainApp::AboutRequested() MainApp::AboutRequested()
{ {
BAlert* alert = new BAlert("about", NAME"\n\n Written by Marcus Overhagen " BAlert* alert = new BAlert("about", NAME"\n\nWritten by Marcus Overhagen "
", Stephan Aßmus and Frederik Modéen", "Thanks"); ", Stephan Aßmus and Frederik Modéen", "Thanks");
alert->SetFeel(B_FLOATING_ALL_WINDOW_FEEL); alert->SetFeel(B_FLOATING_ALL_WINDOW_FEEL);
// Make sure it is on top of any player windows that may have the // Make sure it is on top of any player windows that may have the
@ -586,7 +586,7 @@ MainApp::_InstallPlaylistMimeType()
} }
// set descriptions // set descriptions
ret = mime.SetShortDescription("MediaPlayer Playlist"); ret = mime.SetShortDescription("MediaPlayer playlist");
if (ret != B_OK) { if (ret != B_OK) {
fprintf(stderr, "Could not set short description of mime type: %s\n", fprintf(stderr, "Could not set short description of mime type: %s\n",
strerror(ret)); strerror(ret));

View File

@ -1071,7 +1071,7 @@ MainWin::_CreateMenu()
fPlaylistMenu = new BMenu("Playlist"B_UTF8_ELLIPSIS); fPlaylistMenu = new BMenu("Playlist"B_UTF8_ELLIPSIS);
fAudioMenu = new BMenu("Audio"); fAudioMenu = new BMenu("Audio");
fVideoMenu = new BMenu("Video"); fVideoMenu = new BMenu("Video");
fVideoAspectMenu = new BMenu("Aspect Ratio"); fVideoAspectMenu = new BMenu("Aspect ratio");
fSettingsMenu = new BMenu("Settings"); fSettingsMenu = new BMenu("Settings");
fAudioTrackMenu = new BMenu("Track"); fAudioTrackMenu = new BMenu("Track");
fVideoTrackMenu = new BMenu("Track"); fVideoTrackMenu = new BMenu("Track");
@ -1081,7 +1081,7 @@ MainWin::_CreateMenu()
fMenuBar->AddItem(fVideoMenu); fMenuBar->AddItem(fVideoMenu);
fMenuBar->AddItem(fSettingsMenu); fMenuBar->AddItem(fSettingsMenu);
fFileMenu->AddItem(new BMenuItem("New Player"B_UTF8_ELLIPSIS, fFileMenu->AddItem(new BMenuItem("New player"B_UTF8_ELLIPSIS,
new BMessage(M_FILE_NEWPLAYER), 'N')); new BMessage(M_FILE_NEWPLAYER), 'N'));
fFileMenu->AddSeparatorItem(); fFileMenu->AddSeparatorItem();
@ -1090,12 +1090,12 @@ MainWin::_CreateMenu()
// Add recent files // Add recent files
BRecentFilesList recentFiles(10, false, NULL, kAppSig); BRecentFilesList recentFiles(10, false, NULL, kAppSig);
BMenuItem *item = new BMenuItem(recentFiles.NewFileListMenu( BMenuItem *item = new BMenuItem(recentFiles.NewFileListMenu(
"Open File"B_UTF8_ELLIPSIS, new BMessage(B_REFS_RECEIVED), "Open file"B_UTF8_ELLIPSIS, new BMessage(B_REFS_RECEIVED),
NULL, this, 10, false, NULL, 0, kAppSig), new BMessage(M_FILE_OPEN)); NULL, this, 10, false, NULL, 0, kAppSig), new BMessage(M_FILE_OPEN));
item->SetShortcut('O', 0); item->SetShortcut('O', 0);
fFileMenu->AddItem(item); fFileMenu->AddItem(item);
fFileMenu->AddItem(new BMenuItem("File Info"B_UTF8_ELLIPSIS, fFileMenu->AddItem(new BMenuItem("File info"B_UTF8_ELLIPSIS,
new BMessage(M_FILE_INFO), 'I')); new BMessage(M_FILE_INFO), 'I'));
fFileMenu->AddItem(fPlaylistMenu); fFileMenu->AddItem(fPlaylistMenu);
fPlaylistMenu->Superitem()->SetShortcut('P', B_COMMAND_KEY); fPlaylistMenu->Superitem()->SetShortcut('P', B_COMMAND_KEY);
@ -1136,7 +1136,7 @@ MainWin::_CreateMenu()
fVideoMenu->AddSeparatorItem(); fVideoMenu->AddSeparatorItem();
fVideoMenu->AddItem(new BMenuItem("Full Screen", fVideoMenu->AddItem(new BMenuItem("Full screen",
new BMessage(M_TOGGLE_FULLSCREEN), 'F')); new BMessage(M_TOGGLE_FULLSCREEN), 'F'));
fVideoMenu->AddSeparatorItem(); fVideoMenu->AddSeparatorItem();
@ -1144,10 +1144,10 @@ MainWin::_CreateMenu()
_SetupVideoAspectItems(fVideoAspectMenu); _SetupVideoAspectItems(fVideoAspectMenu);
fVideoMenu->AddItem(fVideoAspectMenu); fVideoMenu->AddItem(fVideoAspectMenu);
fNoInterfaceMenuItem = new BMenuItem("No Interface", fNoInterfaceMenuItem = new BMenuItem("No interface",
new BMessage(M_TOGGLE_NO_INTERFACE), 'B'); new BMessage(M_TOGGLE_NO_INTERFACE), 'B');
fSettingsMenu->AddItem(fNoInterfaceMenuItem); fSettingsMenu->AddItem(fNoInterfaceMenuItem);
fSettingsMenu->AddItem(new BMenuItem("Always on Top", fSettingsMenu->AddItem(new BMenuItem("Always on top",
new BMessage(M_TOGGLE_ALWAYS_ON_TOP), 'T')); new BMessage(M_TOGGLE_ALWAYS_ON_TOP), 'T'));
fSettingsMenu->AddSeparatorItem(); fSettingsMenu->AddSeparatorItem();
item = new BMenuItem("Settings"B_UTF8_ELLIPSIS, item = new BMenuItem("Settings"B_UTF8_ELLIPSIS,
@ -1176,12 +1176,12 @@ MainWin::_SetupVideoAspectItems(BMenu* menu)
// "Stream Settings" and "16 : 9" if the stream settings happen to // "Stream Settings" and "16 : 9" if the stream settings happen to
// be "16 : 9". // be "16 : 9".
menu->AddItem(item = new BMenuItem("Stream Settings", menu->AddItem(item = new BMenuItem("Stream settings",
new BMessage(M_ASPECT_SAME_AS_SOURCE))); new BMessage(M_ASPECT_SAME_AS_SOURCE)));
item->SetMarked(widthAspect == fWidthAspect item->SetMarked(widthAspect == fWidthAspect
&& heightAspect == fHeightAspect); && heightAspect == fHeightAspect);
menu->AddItem(item = new BMenuItem("No Aspect Correction", menu->AddItem(item = new BMenuItem("No aspect correction",
new BMessage(M_ASPECT_NO_DISTORTION))); new BMessage(M_ASPECT_NO_DISTORTION)));
item->SetMarked(width == fWidthAspect && height == fHeightAspect); item->SetMarked(width == fWidthAspect && height == fHeightAspect);
@ -1546,18 +1546,18 @@ MainWin::_ShowContextMenu(const BPoint &screen_point)
printf("Show context menu\n"); printf("Show context menu\n");
BPopUpMenu *menu = new BPopUpMenu("context menu", false, false); BPopUpMenu *menu = new BPopUpMenu("context menu", false, false);
BMenuItem *item; BMenuItem *item;
menu->AddItem(item = new BMenuItem("Full Screen", menu->AddItem(item = new BMenuItem("Full screen",
new BMessage(M_TOGGLE_FULLSCREEN), 'F')); new BMessage(M_TOGGLE_FULLSCREEN), 'F'));
item->SetMarked(fIsFullscreen); item->SetMarked(fIsFullscreen);
item->SetEnabled(fHasVideo); item->SetEnabled(fHasVideo);
BMenu* aspectSubMenu = new BMenu("Aspect Ratio"); BMenu* aspectSubMenu = new BMenu("Aspect ratio");
_SetupVideoAspectItems(aspectSubMenu); _SetupVideoAspectItems(aspectSubMenu);
aspectSubMenu->SetTargetForItems(this); aspectSubMenu->SetTargetForItems(this);
menu->AddItem(item = new BMenuItem(aspectSubMenu)); menu->AddItem(item = new BMenuItem(aspectSubMenu));
item->SetEnabled(fHasVideo); item->SetEnabled(fHasVideo);
menu->AddItem(item = new BMenuItem("No Interface", menu->AddItem(item = new BMenuItem("No interface",
new BMessage(M_TOGGLE_NO_INTERFACE), 'B')); new BMessage(M_TOGGLE_NO_INTERFACE), 'B'));
item->SetMarked(fNoInterface); item->SetMarked(fNoInterface);
item->SetEnabled(fHasVideo); item->SetEnabled(fHasVideo);
@ -1565,8 +1565,8 @@ MainWin::_ShowContextMenu(const BPoint &screen_point)
menu->AddSeparatorItem(); menu->AddSeparatorItem();
// Add track selector menus // Add track selector menus
BMenu* audioTrackMenu = new BMenu("Audio Track"); BMenu* audioTrackMenu = new BMenu("Audio track");
BMenu* videoTrackMenu = new BMenu("Video Track"); BMenu* videoTrackMenu = new BMenu("Video track");
_SetupTrackMenus(audioTrackMenu, videoTrackMenu); _SetupTrackMenus(audioTrackMenu, videoTrackMenu);
audioTrackMenu->SetTargetForItems(this); audioTrackMenu->SetTargetForItems(this);

View File

@ -315,7 +315,7 @@ NodeManager::_SetUpVideoNodes(color_space preferredVideoFormat,
bool useOverlays) bool useOverlays)
{ {
// create the video producer node // create the video producer node
fVideoProducer = new VideoProducer(NULL, "MediaPlayer Video Out", 0, fVideoProducer = new VideoProducer(NULL, "MediaPlayer video out", 0,
this, fVideoSupplier); this, fVideoSupplier);
// register the producer node // register the producer node
@ -331,7 +331,7 @@ NodeManager::_SetUpVideoNodes(color_space preferredVideoFormat,
fVideoConnection.producer = fVideoProducer->Node(); fVideoConnection.producer = fVideoProducer->Node();
// create the video consumer node // create the video consumer node
fVideoConsumer = new VideoConsumer("MediaPlayer Video In", NULL, 0, this, fVideoConsumer = new VideoConsumer("MediaPlayer video in", NULL, 0, this,
fVideoTarget); fVideoTarget);
// register the consumer node // register the consumer node
@ -448,7 +448,7 @@ NodeManager::_SetUpVideoNodes(color_space preferredVideoFormat,
status_t status_t
NodeManager::_SetUpAudioNodes(float audioFrameRate, uint32 audioChannels) NodeManager::_SetUpAudioNodes(float audioFrameRate, uint32 audioChannels)
{ {
fAudioProducer = new AudioProducer("MediaPlayer Audio Out", fAudioSupplier); fAudioProducer = new AudioProducer("MediaPlayer audio out", fAudioSupplier);
fAudioProducer->SetPeakListener(fPeakListener); fAudioProducer->SetPeakListener(fPeakListener);
fStatus = fMediaRoster->RegisterNode(fAudioProducer); fStatus = fMediaRoster->RegisterNode(fAudioProducer);
if (fStatus != B_OK) { if (fStatus != B_OK) {

View File

@ -44,7 +44,7 @@ ImportPLItemsCommand::ImportPLItemsCommand(Playlist* playlist,
fNewCount = temp.CountItems(); fNewCount = temp.CountItems();
if (fNewCount <= 0) { if (fNewCount <= 0) {
BAlert* alert = new BAlert("Nothing to Play", "None of the files " BAlert* alert = new BAlert("Nothing to Play", "None of the files "
"you wanted to play appear to be media files.", "Ok"); "you wanted to play appear to be media files.", "OK");
alert->Go(NULL); alert->Go(NULL);
return; return;
} }

View File

@ -228,7 +228,7 @@ PlaylistWindow::_CreateMenu(BRect& frame)
menuBar->AddItem(fileMenu); menuBar->AddItem(fileMenu);
fileMenu->AddItem(new BMenuItem("Open"B_UTF8_ELLIPSIS, fileMenu->AddItem(new BMenuItem("Open"B_UTF8_ELLIPSIS,
new BMessage(M_PLAYLIST_OPEN), 'O')); new BMessage(M_PLAYLIST_OPEN), 'O'));
fileMenu->AddItem(new BMenuItem("Save As"B_UTF8_ELLIPSIS, fileMenu->AddItem(new BMenuItem("Save as"B_UTF8_ELLIPSIS,
new BMessage(M_PLAYLIST_SAVE_AS), 'S', B_SHIFT_KEY)); new BMessage(M_PLAYLIST_SAVE_AS), 'S', B_SHIFT_KEY));
// fileMenu->AddItem(new BMenuItem("Save", // fileMenu->AddItem(new BMenuItem("Save",
// new BMessage(M_PLAYLIST_SAVE), 'S')); // new BMessage(M_PLAYLIST_SAVE), 'S'));
@ -249,9 +249,9 @@ PlaylistWindow::_CreateMenu(BRect& frame)
editMenu->AddSeparatorItem(); editMenu->AddSeparatorItem();
editMenu->AddItem(new BMenuItem("Remove (Del)", editMenu->AddItem(new BMenuItem("Remove (Del)",
new BMessage(M_PLAYLIST_REMOVE)/*, B_DELETE, 0*/)); new BMessage(M_PLAYLIST_REMOVE)/*, B_DELETE, 0*/));
editMenu->AddItem(new BMenuItem("Remove and Put into Trash", editMenu->AddItem(new BMenuItem("Remove and put into Trash",
new BMessage(M_PLAYLIST_REMOVE_AND_PUT_INTO_TRASH), 'T')); new BMessage(M_PLAYLIST_REMOVE_AND_PUT_INTO_TRASH), 'T'));
editMenu->AddItem(new BMenuItem("Remove All", editMenu->AddItem(new BMenuItem("Remove all",
new BMessage(M_PLAYLIST_EMPTY), 'N')); new BMessage(M_PLAYLIST_EMPTY), 'N'));
menuBar->AddItem(editMenu); menuBar->AddItem(editMenu);
@ -292,7 +292,7 @@ PlaylistWindow::_ObjectChanged(const Notifier* object)
static void static void
display_save_alert(const char* message) display_save_alert(const char* message)
{ {
BAlert* alert = new BAlert("Save Error", message, "Ok", NULL, NULL, BAlert* alert = new BAlert("Save error", message, "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_STOP_ALERT); B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->Go(NULL); alert->Go(NULL);
} }
@ -315,7 +315,7 @@ PlaylistWindow::_SavePlaylist(const BMessage* message)
if (message->FindRef("directory", &ref) != B_OK if (message->FindRef("directory", &ref) != B_OK
|| message->FindString("name", &name) != B_OK) { || message->FindString("name", &name) != B_OK) {
display_save_alert("Internal error (malformed message). " display_save_alert("Internal error (malformed message). "
"Saving the Playlist failed."); "Saving the playlist failed.");
return; return;
} }
@ -328,7 +328,7 @@ PlaylistWindow::_SavePlaylist(const BMessage* message)
|| origPath.Append(name) != B_OK || origPath.Append(name) != B_OK
|| tempPath.Append(tempName.String()) != B_OK) { || tempPath.Append(tempName.String()) != B_OK) {
display_save_alert("Internal error (out of memory). " display_save_alert("Internal error (out of memory). "
"Saving the Playlist failed."); "Saving the playlist failed.");
return; return;
} }
@ -336,7 +336,7 @@ PlaylistWindow::_SavePlaylist(const BMessage* message)
BEntry tempEntry(tempPath.Path()); BEntry tempEntry(tempPath.Path());
if (origEntry.InitCheck() != B_OK || tempEntry.InitCheck() != B_OK) { if (origEntry.InitCheck() != B_OK || tempEntry.InitCheck() != B_OK) {
display_save_alert("Internal error (out of memory). " display_save_alert("Internal error (out of memory). "
"Saving the Playlist failed."); "Saving the playlist failed.");
return; return;
} }
@ -393,7 +393,7 @@ PlaylistWindow::_SavePlaylist(BEntry& origEntry, BEntry& tempEntry,
AutoLocker<Playlist> lock(fPlaylist); AutoLocker<Playlist> lock(fPlaylist);
if (!lock.IsLocked()) { if (!lock.IsLocked()) {
display_save_alert("Internal error (locking failed). " display_save_alert("Internal error (locking failed). "
"Saving the Playlist failed."); "Saving the playlist failed.");
return; return;
} }

View File

@ -109,10 +109,10 @@ RemovePLItemsCommand::Perform()
message << "All "; message << "All ";
else else
message << "Some "; message << "Some ";
message << "files could not be moved into the Trash.\n\n"; message << "files could not be moved into Trash.\n\n";
message << "Error: " << strerror(moveError); message << "Error: " << strerror(moveError);
(new BAlert("Move Into Trash Error", message.String(), (new BAlert("Move Into Trash Error", message.String(),
"Ok", NULL, NULL, B_WIDTH_AS_USUAL, "OK", NULL, NULL, B_WIDTH_AS_USUAL,
B_WARNING_ALERT))->Go(NULL); B_WARNING_ALERT))->Go(NULL);
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2008, Haiku. All rights reserved. * Copyright 2008-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -46,7 +46,7 @@ enum {
#define BUTTONHEIGHT 20 #define BUTTONHEIGHT 20
SettingsWindow::SettingsWindow(BRect frame) SettingsWindow::SettingsWindow(BRect frame)
: BWindow(frame, "MediaPlayer Settings", B_FLOATING_WINDOW_LOOK, : BWindow(frame, "MediaPlayer settings", B_FLOATING_WINDOW_LOOK,
B_FLOATING_APP_WINDOW_FEEL, B_FLOATING_APP_WINDOW_FEEL,
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE
#ifdef __HAIKU__ #ifdef __HAIKU__
@ -115,7 +115,7 @@ SettingsWindow::SettingsWindow(BRect frame)
BButton* cancelButton = new BButton("cancel", "Cancel", BButton* cancelButton = new BButton("cancel", "Cancel",
new BMessage(M_SETTINGS_CANCEL)); new BMessage(M_SETTINGS_CANCEL));
BButton* okButton = new BButton("ok", "Ok", BButton* okButton = new BButton("ok", "OK",
new BMessage(M_SETTINGS_SAVE)); new BMessage(M_SETTINGS_SAVE));
okButton->MakeDefault(true); okButton->MakeDefault(true);

View File

@ -192,7 +192,7 @@ void MidiPlayerWindow::CreateInputMenu()
inputPopUp->AddItem(inputOff); inputPopUp->AddItem(inputOff);
inputMenu = new BMenuField("Live Input:", inputPopUp, NULL); inputMenu = new BMenuField("Live input:", inputPopUp, NULL);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -211,7 +211,7 @@ void MidiPlayerWindow::CreateReverbMenu()
"Garage", new BMessage(MSG_REVERB_GARAGE)); "Garage", new BMessage(MSG_REVERB_GARAGE));
reverbIgor = new BMenuItem( reverbIgor = new BMenuItem(
"Igor's Lab", new BMessage(MSG_REVERB_IGOR)); "Igor's lab", new BMessage(MSG_REVERB_IGOR));
reverbCavern = new BMenuItem( reverbCavern = new BMenuItem(
"Cavern", new BMessage(MSG_REVERB_CAVERN)); "Cavern", new BMessage(MSG_REVERB_CAVERN));
@ -397,7 +397,7 @@ void MidiPlayerWindow::LoadFile(entry_ref* ref)
scopeView->Invalidate(); scopeView->Invalidate();
(new BAlert( (new BAlert(
NULL, "Could not load song", "Okay", NULL, NULL, NULL, "Could not load song", "OK", NULL, NULL,
B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go();
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006-2007, Haiku, Inc. All Rights Reserved. * Copyright 2006-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -43,7 +43,7 @@
static const char *kStatusDescriptions[] = { static const char *kStatusDescriptions[] = {
"Unknown", "Unknown",
"No Link", "No link",
"No stateful configuration", "No stateful configuration",
"Configuring", "Configuring",
"Ready" "Ready"
@ -346,7 +346,7 @@ NetworkStatusView::_ShowConfiguration(BMessage* message)
text += address; text += address;
} }
BAlert* alert = new BAlert(name, text.String(), "Ok"); BAlert* alert = new BAlert(name, text.String(), "OK");
BTextView* view = alert->TextView(); BTextView* view = alert->TextView();
BFont font; BFont font;
@ -382,7 +382,7 @@ NetworkStatusView::MouseDown(BPoint point)
menu->AddSeparatorItem(); menu->AddSeparatorItem();
//menu->AddItem(new BMenuItem("About NetworkStatus" B_UTF8_ELLIPSIS, //menu->AddItem(new BMenuItem("About NetworkStatus" B_UTF8_ELLIPSIS,
// new BMessage(B_ABOUT_REQUESTED))); // new BMessage(B_ABOUT_REQUESTED)));
menu->AddItem(new BMenuItem("Open Networks Preferences" B_UTF8_ELLIPSIS, menu->AddItem(new BMenuItem("Open network preferences" B_UTF8_ELLIPSIS,
new BMessage(kMsgOpenNetworkPreferences))); new BMessage(kMsgOpenNetworkPreferences)));
if (fInDeskbar) if (fInDeskbar)
@ -399,7 +399,7 @@ NetworkStatusView::_AboutRequested()
{ {
BAlert* alert = new BAlert("about", "NetworkStatus\n" BAlert* alert = new BAlert("about", "NetworkStatus\n"
"\twritten by Axel Dörfler and Hugo Santos\n" "\twritten by Axel Dörfler and Hugo Santos\n"
"\tCopyright 2007, Haiku, Inc.\n", "Ok"); "\tCopyright 2007, Haiku, Inc.\n", "OK");
BTextView *view = alert->TextView(); BTextView *view = alert->TextView();
BFont font; BFont font;
@ -512,11 +512,11 @@ NetworkStatusView::_OpenNetworksPreferences()
{ {
status_t status = be_roster->Launch("application/x-vnd.Haiku-Network"); status_t status = be_roster->Launch("application/x-vnd.Haiku-Network");
if (status != B_OK && status != B_ALREADY_RUNNING) { if (status != B_OK && status != B_ALREADY_RUNNING) {
BString errorMessage("Launching the Network preflet failed.\n\n" BString errorMessage("Launching the network preflet failed.\n\n"
"Error: "); "Error: ");
errorMessage << strerror(status); errorMessage << strerror(status);
BAlert* alert = new BAlert("launch error", errorMessage.String(), BAlert* alert = new BAlert("launch error", errorMessage.String(),
"Ok"); "OK");
// asynchronous alert in order to not block replicant host application // asynchronous alert in order to not block replicant host application
alert->Go(NULL); alert->Go(NULL);

View File

@ -44,7 +44,7 @@ enum {
PackageInfo::PackageInfo() PackageInfo::PackageInfo()
: :
fStatus(B_NO_INIT), fStatus(B_NO_INIT),
fPackageFile(0), fPackageFile(0),
fDescription(T("No package available.")), fDescription(T("No package available.")),
@ -55,7 +55,7 @@ PackageInfo::PackageInfo()
PackageInfo::PackageInfo(const entry_ref *ref) PackageInfo::PackageInfo(const entry_ref *ref)
: :
fStatus(B_NO_INIT), fStatus(B_NO_INIT),
fPackageFile(new BFile(ref, B_READ_ONLY)), fPackageFile(new BFile(ref, B_READ_ONLY)),
fDescription(T("No package selected.")), fDescription(T("No package selected.")),
@ -97,13 +97,13 @@ PackageInfo::Parse()
if (!fPackageFile || fPackageFile->InitCheck() != B_OK) { if (!fPackageFile || fPackageFile->InitCheck() != B_OK) {
RETURN_AND_SET_STATUS(B_ERROR); RETURN_AND_SET_STATUS(B_ERROR);
} }
// Check for the presence of the first AlB tag - as the 'magic number'. // Check for the presence of the first AlB tag - as the 'magic number'.
// This also ensures that the file header section is present - which // This also ensures that the file header section is present - which
// is a crucial pkg section // is a crucial pkg section
char buffer[16]; char buffer[16];
fPackageFile->Read(buffer, 8); fPackageFile->Read(buffer, 8);
if (buffer[0] != 'A' || buffer[1] != 'l' || buffer[2] != 'B' if (buffer[0] != 'A' || buffer[1] != 'l' || buffer[2] != 'B'
|| buffer[3] != 0x1a) { || buffer[3] != 0x1a) {
RETURN_AND_SET_STATUS(B_ERROR); RETURN_AND_SET_STATUS(B_ERROR);
} }
@ -111,7 +111,7 @@ PackageInfo::Parse()
fHasImage = false; fHasImage = false;
// Parse all known parts of the given .pkg file // Parse all known parts of the given .pkg file
uint32 i; uint32 i;
int8 bytesRead; int8 bytesRead;
off_t actualSize = 0; off_t actualSize = 0;
@ -122,7 +122,7 @@ PackageInfo::Parse()
system_info sysinfo; system_info sysinfo;
get_system_info(&sysinfo); get_system_info(&sysinfo);
uint64 infoOffset = 0, groupsOffset = 0; uint64 infoOffset = 0, groupsOffset = 0;
uint64 length = 0; uint64 length = 0;
@ -261,7 +261,7 @@ PackageInfo::Parse()
fDisclaimer = (char *)disclaimer; fDisclaimer = (char *)disclaimer;
delete disclaimer; delete disclaimer;
continue; continue;
} else if (!memcmp(buffer, splashScreenMarker, 7)) { } else if (!memcmp(buffer, splashScreenMarker, 7)) {
uint64 length; uint64 length;
fPackageFile->Read(&length, 8); fPackageFile->Read(&length, 8);
@ -283,9 +283,9 @@ PackageInfo::Parse()
delete compressed; delete compressed;
RETURN_AND_SET_STATUS(B_ERROR); RETURN_AND_SET_STATUS(B_ERROR);
} }
fImage.SetSize(original); fImage.SetSize(original);
status_t ret = inflate_data(compressed, length, status_t ret = inflate_data(compressed, length,
static_cast<uint8 *>(const_cast<void *>(fImage.Buffer())), static_cast<uint8 *>(const_cast<void *>(fImage.Buffer())),
original); original);
delete compressed; delete compressed;
@ -393,7 +393,7 @@ PackageInfo::Parse()
} }
fProfiles.AddItem(new pkg_profile(group)); fProfiles.AddItem(new pkg_profile(group));
parser_debug("Group added: %s %s\n", group.name.String(), parser_debug("Group added: %s %s\n", group.name.String(),
group.description.String()); group.description.String());
groupStarted = false; groupStarted = false;
@ -874,7 +874,7 @@ PackageInfo::Parse()
BString dest = ""; BString dest = "";
uint8 localType = pathType; uint8 localType = pathType;
if (path == 0xfffffffe) if (path == 0xfffffffe)
dest << itemPath << "/" << nameString.String(); dest << itemPath << "/" << nameString.String();
else if (path == 0xffffffff) { else if (path == 0xffffffff) {
localType = P_INSTALL_PATH; localType = P_INSTALL_PATH;
@ -912,7 +912,7 @@ PackageInfo::Parse()
signatureString, mode); signatureString, mode);
} }
} else if (element == P_DIRECTORY) { } else if (element == P_DIRECTORY) {
if (itemGroups) { if (itemGroups) {
if (installDirectoryFlag != 0) { if (installDirectoryFlag != 0) {
if (installDirectoryFlag < 0) { if (installDirectoryFlag < 0) {
// Normal directory // Normal directory
@ -938,7 +938,7 @@ PackageInfo::Parse()
pathType = P_SYSTEM_PATH; pathType = P_SYSTEM_PATH;
else else
pathType = P_USER_PATH; pathType = P_USER_PATH;
itemPath = *def; itemPath = *def;
} else { } else {
BPath *def = static_cast<BPath *>( BPath *def = static_cast<BPath *>(
@ -981,7 +981,7 @@ PackageInfo::Parse()
BString dest = ""; BString dest = "";
uint8 localType = pathType; uint8 localType = pathType;
if (path == 0xfffffffe) if (path == 0xfffffffe)
dest << itemPath << "/" << nameString.String(); dest << itemPath << "/" << nameString.String();
else if (path == 0xffffffff) { else if (path == 0xffffffff) {
localType = P_INSTALL_PATH; localType = P_INSTALL_PATH;
@ -998,7 +998,7 @@ PackageInfo::Parse()
localType = P_SYSTEM_PATH; localType = P_SYSTEM_PATH;
else else
localType = P_USER_PATH; localType = P_USER_PATH;
dest << *def << "/" << nameString; dest << *def << "/" << nameString;
} else { } else {
BPath *def = static_cast<BPath *>(systemPaths.ItemAt(path)); BPath *def = static_cast<BPath *>(systemPaths.ItemAt(path));
@ -1011,7 +1011,7 @@ PackageInfo::Parse()
} }
} }
parser_debug("Adding link: %s! (type %s)\n", dest.String(), parser_debug("Adding link: %s! (type %s)\n", dest.String(),
pathType == P_SYSTEM_PATH pathType == P_SYSTEM_PATH
? "System" : localType == P_INSTALL_PATH ? "System" : localType == P_INSTALL_PATH
? "Install" : "User"); ? "Install" : "User");
@ -1056,12 +1056,13 @@ PackageInfo::Parse()
// Inform the user of a possible error // Inform the user of a possible error
int32 selection; int32 selection;
BAlert *warning = new BAlert(T("filesize_wrong"), BAlert *warning = new BAlert(T("filesize_wrong"),
T("There seems to be a filesize mismatch in the package file. " T("There seems to be a file size mismatch in the package file. "
"The package might be corrupted or have been modified after its " "The package might be corrupted or have been modified after its "
"creation. Do you still wish to continue?"), T("Yes"), T("No"), NULL, "creation. Do you still wish to continue?"), T("Continue"),
T("Abort"), NULL,
B_WIDTH_AS_USUAL, B_WARNING_ALERT); B_WIDTH_AS_USUAL, B_WARNING_ALERT);
selection = warning->Go(); selection = warning->Go();
if (selection == 1) { if (selection == 1) {
RETURN_AND_SET_STATUS(B_ERROR); RETURN_AND_SET_STATUS(B_ERROR);
} }
@ -1097,7 +1098,7 @@ PackageInfo::_AddItem(PackageItem *item, uint64 size, uint32 groups,
// the destination volume // the destination volume
if (path == 0xffffffff) if (path == 0xffffffff)
profile->path_type = P_INSTALL_PATH; profile->path_type = P_INSTALL_PATH;
else if (path < 0xfffffffe && else if (path < 0xfffffffe &&
profile->path_type != P_INSTALL_PATH) { profile->path_type != P_INSTALL_PATH) {
if (cust) { if (cust) {
profile->path_type = P_USER_PATH; profile->path_type = P_USER_PATH;

View File

@ -266,7 +266,7 @@ PackageView::Install()
BAlert *reinstall = new BAlert("reinstall", BAlert *reinstall = new BAlert("reinstall",
T("The given package seems to be already installed on your system. " T("The given package seems to be already installed on your system. "
"Would you like to uninstall the existing one and continue the " "Would you like to uninstall the existing one and continue the "
"installation?"), T("Yes"), T("No")); "installation?"), T("Continue"), T("Abort"));
if (reinstall->Go() == 0) { if (reinstall->Go() == 0) {
// Uninstall the package // Uninstall the package
@ -301,7 +301,7 @@ PackageView::Install()
return err; return err;
} }
fStatusWindow->StageStep(1, "Installing files and directories"); fStatusWindow->StageStep(1, "Installing files and folders");
// Install files and directories // Install files and directories
PackageItem *iter; PackageItem *iter;
@ -570,11 +570,11 @@ PackageView::_ItemExists(PackageItem &item, BPath &path)
BString alertString = T("The "); BString alertString = T("The ");
alertString << item.ItemKind() << T(" named \'") << path.Leaf() << "\' "; alertString << item.ItemKind() << T(" named \'") << path.Leaf() << "\' ";
alertString << T("already exists in the given path. Should the " alertString << T("already exists in the given path.\nReplace the file with "
"existing file be replaced with the one from this package?"); "the one from this package or skip it?");
BAlert *alert = new BAlert(T("file_exists"), alertString.String(), BAlert *alert = new BAlert(T("file_exists"), alertString.String(),
T("Yes"), T("No"), T("Abort")); T("Replace"), T("Skip"), T("Abort"));
choice = alert->Go(); choice = alert->Go();
switch (choice) { switch (choice) {
@ -590,8 +590,8 @@ PackageView::_ItemExists(PackageItem &item, BPath &path)
if (fItemExistsPolicy == P_EXISTS_NONE) { if (fItemExistsPolicy == P_EXISTS_NONE) {
// TODO: Maybe add 'No, but ask again' type of choice as well? // TODO: Maybe add 'No, but ask again' type of choice as well?
alertString = T("Should this decision be remembered and all " alertString = T("Do you want to remember this decision for the rest of "
"existing files encountered in the future be "); "this installation?\nAll existing files will be ");
alertString << ((choice == P_EXISTS_OVERWRITE) alertString << ((choice == P_EXISTS_OVERWRITE)
? T("replaced?") : T("skipped?")); ? T("replaced?") : T("skipped?"));

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2007, Haiku, Inc. * Copyright (c) 2007-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license. * Distributed under the terms of the MIT license.
* *
* Author: * Author:
@ -18,7 +18,7 @@
PackageWindow::PackageWindow(const entry_ref *ref) PackageWindow::PackageWindow(const entry_ref *ref)
: BWindow(BRect(100, 100, 600, 300), T("Package Installer"), B_TITLED_WINDOW, : BWindow(BRect(100, 100, 600, 300), T("PackageInstaller"), B_TITLED_WINDOW,
B_NOT_ZOOMABLE | B_NOT_RESIZABLE) B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
{ {
//SetLayout(new BGroupLayout(B_HORIZONTAL)); //SetLayout(new BGroupLayout(B_HORIZONTAL));

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2007, Haiku, Inc. * Copyright (c) 2007-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license. * Distributed under the terms of the MIT license.
* *
* Author: * Author:
@ -139,7 +139,7 @@ PackageInstaller::AboutRequested()
"BeOS legacy .pkg file installer for Haiku.\n\n" "BeOS legacy .pkg file installer for Haiku.\n\n"
"Copyright 2007,\nŁukasz 'Sil2100' Zemczak\n\n" "Copyright 2007,\nŁukasz 'Sil2100' Zemczak\n\n"
"Copyright (c) 2007 Haiku, Inc. \n", "Copyright (c) 2007 Haiku, Inc. \n",
"Close"); "OK");
BTextView *view = about->TextView(); BTextView *view = about->TextView();
BFont font; BFont font;

View File

@ -158,7 +158,7 @@ PairsView::_ReadRandomIcons()
if (fCard[i] == NULL) { if (fCard[i] == NULL) {
BAlert* alert = new BAlert("fatal", "Pairs did not find enough " BAlert* alert = new BAlert("fatal", "Pairs did not find enough "
"vector icons in the system, it needs at least eight.", "vector icons in the system, it needs at least eight.",
"Oh!", NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT); "OK", NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
alert->Go(); alert->Go();
exit(1); exit(1);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2005 - 2008, Haiku, Inc. * Copyright 2005-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license. * Distributed under the terms of the MIT license.
* *
* Authors: * Authors:
@ -29,7 +29,7 @@
struct people_field gFields[] = { struct people_field gFields[] = {
{ "META:name", 120, "Contact Name" }, { "META:name", 120, "Contact name" },
{ "META:nickname", 120, "Nickname" }, { "META:nickname", 120, "Nickname" },
{ "META:company", 120, "Company" }, { "META:company", 120, "Company" },
{ "META:address", 120, "Address" }, { "META:address", 120, "Address" },
@ -37,8 +37,8 @@ struct people_field gFields[] = {
{ "META:state", 50, "State" }, { "META:state", 50, "State" },
{ "META:zip", 50, "Zip" }, { "META:zip", 50, "Zip" },
{ "META:country", 120, "Country" }, { "META:country", 120, "Country" },
{ "META:hphone", 90, "Home Phone" }, { "META:hphone", 90, "Home phone" },
{ "META:wphone", 90, "Work Phone" }, { "META:wphone", 90, "Work phone" },
{ "META:fax", 90, "Fax" }, { "META:fax", 90, "Fax" },
{ "META:email", 120, "E-mail" }, { "META:email", 120, "E-mail" },
{ "META:url", 120, "URL" }, { "META:url", 120, "URL" },
@ -140,7 +140,7 @@ TPeopleApp::~TPeopleApp(void)
void void
TPeopleApp::AboutRequested(void) TPeopleApp::AboutRequested(void)
{ {
(new BAlert("", "...by Robert Polic", "Big Deal"))->Go(); (new BAlert("", "...by Robert Polic", "OK"))->Go();
} }
@ -230,7 +230,7 @@ TPeopleApp::NewWindow(entry_ref *ref)
{ {
TPeopleWindow *window; TPeopleWindow *window;
window = new TPeopleWindow(fPosition, "New Person", ref); window = new TPeopleWindow(fPosition, "New person", ref);
window->Show(); window->Show();
fWindowCount++; fWindowCount++;
fPosition.OffsetBy(20, 20); fPosition.OffsetBy(20, 20);

View File

@ -42,13 +42,13 @@ TPeopleWindow::TPeopleWindow(BRect frame, const char *title, entry_ref *ref)
BRect rect(0, 0, 32767, 15); BRect rect(0, 0, 32767, 15);
BMenuBar* menuBar = new BMenuBar(rect, ""); BMenuBar* menuBar = new BMenuBar(rect, "");
menu = new BMenu("File"); menu = new BMenu("File");
menu->AddItem(item = new BMenuItem("New Person" B_UTF8_ELLIPSIS, new BMessage(M_NEW), 'N')); menu->AddItem(item = new BMenuItem("New person" B_UTF8_ELLIPSIS, new BMessage(M_NEW), 'N'));
item->SetTarget(NULL, be_app); item->SetTarget(NULL, be_app);
menu->AddItem(new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED), 'W')); menu->AddItem(new BMenuItem("Close", new BMessage(B_QUIT_REQUESTED), 'W'));
menu->AddSeparatorItem(); menu->AddSeparatorItem();
menu->AddItem(fSave = new BMenuItem("Save", new BMessage(M_SAVE), 'S')); menu->AddItem(fSave = new BMenuItem("Save", new BMessage(M_SAVE), 'S'));
fSave->SetEnabled(FALSE); fSave->SetEnabled(FALSE);
menu->AddItem(new BMenuItem("Save As"B_UTF8_ELLIPSIS, new BMessage(M_SAVE_AS))); menu->AddItem(new BMenuItem("Save as"B_UTF8_ELLIPSIS, new BMessage(M_SAVE_AS)));
menu->AddItem(fRevert = new BMenuItem("Revert", new BMessage(M_REVERT), 'R')); menu->AddItem(fRevert = new BMenuItem("Revert", new BMessage(M_REVERT), 'R'));
fRevert->SetEnabled(FALSE); fRevert->SetEnabled(FALSE);
menu->AddSeparatorItem(); menu->AddSeparatorItem();
@ -68,7 +68,7 @@ TPeopleWindow::TPeopleWindow(BRect frame, const char *title, entry_ref *ref)
fCopy->SetTarget(NULL, this); fCopy->SetTarget(NULL, this);
menu->AddItem(fPaste = new BMenuItem("Paste", new BMessage(B_PASTE), 'V')); menu->AddItem(fPaste = new BMenuItem("Paste", new BMessage(B_PASTE), 'V'));
fPaste->SetTarget(NULL, this); fPaste->SetTarget(NULL, this);
menu->AddItem(item = new BMenuItem("Select All", new BMessage(M_SELECT), 'A')); menu->AddItem(item = new BMenuItem("Select all", new BMessage(M_SELECT), 'A'));
item->SetTarget(NULL, this); item->SetTarget(NULL, this);
menuBar->AddItem(menu); menuBar->AddItem(menu);
AddChild(menuBar); AddChild(menuBar);

Some files were not shown because too many files have changed in this diff Show More