Author: stippi Date: 2010-01-13 15:33:35 +0100 (Wed, 13 Jan 2010) New Revision: 35049 Changeset: http://dev.haiku-os.org/changeset/35049/haiku Ticket: http://dev.haiku-os.org/ticket/5169 Modified: haiku/trunk/src/apps/3dmov/GLMovStrings.h haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp haiku/trunk/src/apps/activitymonitor/ActivityMonitor.cpp haiku/trunk/src/apps/activitymonitor/ActivityView.cpp haiku/trunk/src/apps/activitymonitor/ActivityWindow.cpp haiku/trunk/src/apps/activitymonitor/DataSource.cpp haiku/trunk/src/apps/activitymonitor/SettingsWindow.cpp haiku/trunk/src/apps/autoraise/AutoRaiseApp.cpp haiku/trunk/src/apps/autoraise/AutoRaiseIcon.cpp haiku/trunk/src/apps/bootman/BootManager.cpp haiku/trunk/src/apps/bootman/BootManagerController.cpp haiku/trunk/src/apps/bootman/EntryPage.cpp haiku/trunk/src/apps/charactermap/CharacterMap.cpp haiku/trunk/src/apps/charactermap/CharacterView.cpp haiku/trunk/src/apps/charactermap/CharacterWindow.cpp haiku/trunk/src/apps/charactermap/UnicodeBlocks.cpp haiku/trunk/src/apps/codycam/CodyCam.cpp haiku/trunk/src/apps/cortex/DormantNodeView/DormantNodeListItem.cpp haiku/trunk/src/apps/cortex/DormantNodeView/DormantNodeWindow.cpp haiku/trunk/src/apps/cortex/InfoView/DormantNodeInfoView.cpp haiku/trunk/src/apps/cortex/InfoView/EndPointInfoView.cpp haiku/trunk/src/apps/cortex/MediaRoutingView/MediaJack.cpp haiku/trunk/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp haiku/trunk/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp haiku/trunk/src/apps/cortex/MediaRoutingView/MediaWire.cpp haiku/trunk/src/apps/cortex/ParameterView/ParameterWindow.cpp haiku/trunk/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp haiku/trunk/src/apps/cortex/RouteApp/RouteWindow.cpp haiku/trunk/src/apps/cortex/TransportView/TransportView.cpp haiku/trunk/src/apps/cortex/addons/AudioAdapter/AudioAdapterParams.cpp haiku/trunk/src/apps/cortex/addons/Flanger/FlangerNode.cpp haiku/trunk/src/apps/cortex/addons/LoggingConsumer/LoggingConsumer.cpp haiku/trunk/src/apps/cortex/addons/common/MediaNodeControlApp.cpp haiku/trunk/src/apps/cortex/support/MediaString.cpp haiku/trunk/src/apps/debugger/user_interface/gui/running_teams_window/hdb.cpp haiku/trunk/src/apps/deskbar/BeMenu.cpp haiku/trunk/src/apps/deskbar/PreferencesWindow.cpp haiku/trunk/src/apps/deskbar/TimeView.cpp haiku/trunk/src/apps/deskbar/WindowMenu.cpp haiku/trunk/src/apps/deskcalc/CalcView.cpp haiku/trunk/src/apps/devices/DevicePCI.cpp haiku/trunk/src/apps/devices/DevicesApplication.cpp haiku/trunk/src/apps/devices/DevicesView.cpp haiku/trunk/src/apps/diskprobe/AttributeWindow.cpp haiku/trunk/src/apps/diskprobe/DiskProbe.cpp haiku/trunk/src/apps/diskprobe/FileWindow.cpp haiku/trunk/src/apps/diskprobe/OpenWindow.cpp haiku/trunk/src/apps/diskprobe/ProbeView.cpp haiku/trunk/src/apps/diskprobe/TypeEditors.cpp haiku/trunk/src/apps/drivesetup/CreateParamsPanel.cpp haiku/trunk/src/apps/drivesetup/MainWindow.cpp haiku/trunk/src/apps/drivesetup/PartitionList.cpp haiku/trunk/src/apps/expander/ExpanderApp.cpp haiku/trunk/src/apps/expander/ExpanderPreferences.cpp haiku/trunk/src/apps/expander/ExpanderWindow.cpp haiku/trunk/src/apps/fontdemo/ControlView.cpp haiku/trunk/src/apps/glteapot/TeapotWindow.cpp haiku/trunk/src/apps/gradients/GradientsWindow.cpp haiku/trunk/src/apps/haiku3d/App.cpp haiku/trunk/src/apps/icon-o-matic/MainWindow.cpp haiku/trunk/src/apps/icon-o-matic/generic/gui/panel/color_picker/ColorPickerPanel.cpp haiku/trunk/src/apps/icon-o-matic/generic/property/view/PropertyListView.cpp haiku/trunk/src/apps/icon-o-matic/gui/PathListView.cpp haiku/trunk/src/apps/icon-o-matic/gui/ShapeListView.cpp haiku/trunk/src/apps/icon-o-matic/gui/StyleListView.cpp haiku/trunk/src/apps/icon-o-matic/gui/StyleView.cpp haiku/trunk/src/apps/icon-o-matic/gui/TransformerListView.cpp haiku/trunk/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp haiku/trunk/src/apps/icon-o-matic/import_export/svg/SVGImporter.cpp haiku/trunk/src/apps/installer/InstallerApp.cpp haiku/trunk/src/apps/installer/InstallerWindow.cpp haiku/trunk/src/apps/installer/WorkerThread.cpp haiku/trunk/src/apps/launchbox/NamePanel.cpp haiku/trunk/src/apps/launchbox/PadView.cpp haiku/trunk/src/apps/login/LoginApp.cpp haiku/trunk/src/apps/login/LoginView.cpp haiku/trunk/src/apps/magnify/Magnify.cpp haiku/trunk/src/apps/mandelbrot/Mandelbrot.cpp haiku/trunk/src/apps/mediaconverter/MediaConverterWindow.cpp haiku/trunk/src/apps/mediaconverter/Strings.h haiku/trunk/src/apps/mediaconverter/languages/MediaConverter.frFR haiku/trunk/src/apps/mediaconverter/languages/MediaConverter.itIT haiku/trunk/src/apps/mediaconverter/languages/MediaConverter.jaJP haiku/trunk/src/apps/mediaplayer/InfoWin.cpp haiku/trunk/src/apps/mediaplayer/MainApp.cpp haiku/trunk/src/apps/mediaplayer/MainWin.cpp haiku/trunk/src/apps/mediaplayer/media_node_framework/NodeManager.cpp haiku/trunk/src/apps/mediaplayer/playlist/ImportPLItemsCommand.cpp haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp haiku/trunk/src/apps/mediaplayer/playlist/RemovePLItemsCommand.cpp haiku/trunk/src/apps/mediaplayer/settings/SettingsWindow.cpp haiku/trunk/src/apps/midiplayer/MidiPlayerWindow.cpp haiku/trunk/src/apps/networkstatus/NetworkStatusView.cpp haiku/trunk/src/apps/packageinstaller/PackageInfo.cpp haiku/trunk/src/apps/packageinstaller/PackageView.cpp haiku/trunk/src/apps/packageinstaller/PackageWindow.cpp haiku/trunk/src/apps/packageinstaller/main.cpp haiku/trunk/src/apps/pairs/PairsView.cpp haiku/trunk/src/apps/people/PeopleApp.cpp haiku/trunk/src/apps/people/PeopleWindow.cpp [... truncated: 41 changed files follow ...] Log: 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. Modified: haiku/trunk/src/apps/3dmov/GLMovStrings.h =================================================================== --- haiku/trunk/src/apps/3dmov/GLMovStrings.h 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/3dmov/GLMovStrings.h 2010-01-13 14:33:35 UTC (rev 35049) @@ -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. * * Authors: @@ -10,7 +10,7 @@ #define _GLMOVSTRINGS_H #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" ? Modified: haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp =================================================================== --- haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -174,7 +174,7 @@ 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) { SetLayout(new BGroupLayout(B_VERTICAL)); @@ -447,7 +447,7 @@ .Add(_CreateLabel("kernellabel", "Kernel:")) .Add(kernelView) .AddStrut(offset) - .Add(_CreateLabel("uptimelabel", "Time Running:")) + .Add(_CreateLabel("uptimelabel", "Time running:")) .Add(fUptimeView) .SetInsets(5, 5, 5, 5) .End() @@ -481,7 +481,7 @@ { BRect r(92, 26, 105, 31); if (r.Contains(point)) { - printf("Easter Egg\n"); + printf("Easter egg\n"); PickRandomHaiku(); } @@ -728,7 +728,7 @@ font.SetFace(B_BOLD_FACE | B_ITALIC_FACE); 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->Insert( @@ -772,7 +772,7 @@ "\n"); 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->Insert( @@ -799,7 +799,7 @@ "\n"); 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->Insert( @@ -930,7 +930,7 @@ fCreditsView->Insert("\nGerman\n\n"); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->Insert( - "Colin Gunther\n" + "Colin Günther\n" "svend\n" "leszek\n" ); @@ -984,14 +984,14 @@ ); 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->Insert("Travis Geiselbrecht (and his NewOS kernel)\n"); fCreditsView->Insert("Michael Phipps (project founder)\n\n"); - fCreditsView->Insert("The Haiku-Ports Team\n"); - fCreditsView->Insert("The Haikuware Team and their Bounty Program\n"); - fCreditsView->Insert("The BeGeistert Team\n\n"); + fCreditsView->Insert("The Haiku-Ports team\n"); + fCreditsView->Insert("The Haikuware team and their bounty program\n"); + fCreditsView->Insert("The BeGeistert team\n\n"); fCreditsView->Insert("... and the many community members making " "donations!\n\n"); @@ -1085,7 +1085,7 @@ // Mesa3D (http://www.mesa3d.org) copyrights _AddPackageCredit(PackageCredit("Mesa") .SetCopyright(COPYRIGHT_STRING "1999-2006 Brian Paul. " - "Mesa3D project. All rights reserved.") + "Mesa3D Project. All rights reserved.") .SetURL("http://www.mesa3d.org";)); // TODO: License! Modified: haiku/trunk/src/apps/activitymonitor/ActivityMonitor.cpp =================================================================== --- haiku/trunk/src/apps/activitymonitor/ActivityMonitor.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/activitymonitor/ActivityMonitor.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -63,7 +63,7 @@ { BAlert *alert = new BAlert("about", "ActivityMonitor\n" "\twritten by Axel Dörfler\n" - "\tCopyright 2008, Haiku Inc.\n", "Ok"); + "\tCopyright 2008, Haiku Inc.\n", "OK"); BTextView *view = alert->TextView(); BFont font; Modified: haiku/trunk/src/apps/activitymonitor/ActivityView.cpp =================================================================== --- haiku/trunk/src/apps/activitymonitor/ActivityView.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/activitymonitor/ActivityView.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -978,7 +978,7 @@ BPopUpMenu *menu = new BPopUpMenu(B_EMPTY_STRING, false, false); menu->SetFont(be_plain_font); - BMenu* additionalMenu = new BMenu("Additional Items"); + BMenu* additionalMenu = new BMenu("Additional items"); additionalMenu->SetFont(be_plain_font); SystemInfo info; @@ -1005,7 +1005,7 @@ menu->AddItem(new BMenuItem(additionalMenu)); menu->AddSeparatorItem(); - menu->AddItem(new BMenuItem(fShowLegend ? "Hide Legend" : "Show Legend", + menu->AddItem(new BMenuItem(fShowLegend ? "Hide legend" : "Show legend", new BMessage(kMsgToggleLegend))); menu->SetTargetForItems(this); @@ -1016,7 +1016,7 @@ menu->AddSeparatorItem(); BMessage* message = new BMessage(kMsgRemoveView); message->AddPointer("view", this); - menu->AddItem(item = new BMenuItem("Remove View", message)); + menu->AddItem(item = new BMenuItem("Remove graph", message)); item->SetTarget(window); } Modified: haiku/trunk/src/apps/activitymonitor/ActivityWindow.cpp =================================================================== --- haiku/trunk/src/apps/activitymonitor/ActivityWindow.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/activitymonitor/ActivityWindow.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -116,7 +116,7 @@ BMenu* menu = new BMenu("File"); BMenuItem* item; - menu->AddItem(new BMenuItem("Add View", new BMessage(kMsgAddView))); + menu->AddItem(new BMenuItem("Add graph", new BMessage(kMsgAddView))); menu->AddSeparatorItem(); menu->AddItem(item = new BMenuItem("About ActivityMonitor" B_UTF8_ELLIPSIS, Modified: haiku/trunk/src/apps/activitymonitor/DataSource.cpp =================================================================== --- haiku/trunk/src/apps/activitymonitor/DataSource.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/activitymonitor/DataSource.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -329,7 +329,7 @@ const char* UsedMemoryDataSource::Label() const { - return "Used Memory"; + return "Used memory"; } @@ -378,7 +378,7 @@ const char* CachedMemoryDataSource::Label() const { - return "Cached Memory"; + return "Cached memory"; } @@ -430,7 +430,7 @@ const char* SwapSpaceDataSource::Label() const { - return "Swap Space"; + return "Swap space"; } @@ -485,14 +485,14 @@ const char* BlockCacheDataSource::Label() const { - return "Block Cache Memory"; + return "Block cache memory"; } const char* BlockCacheDataSource::ShortLabel() const { - return "Block Cache"; + return "Block cache"; } @@ -727,7 +727,7 @@ const char* RunningAppsDataSource::Label() const { - return "Running Applications"; + return "Running applications"; } @@ -839,7 +839,7 @@ const char* CPUUsageDataSource::Name() const { - return "CPU Usage"; + return "CPU usage"; } @@ -873,7 +873,7 @@ fLabel << " " << cpu; fShortLabel = fLabel; - fLabel << " Usage"; + fLabel << " usage"; const rgb_color kColors[] = { // TODO: find some better defaults... @@ -963,7 +963,7 @@ const char* CPUCombinedUsageDataSource::Label() const { - return "CPU Usage"; + return "CPU usage"; } @@ -977,7 +977,7 @@ const char* CPUCombinedUsageDataSource::Name() const { - return "CPU Usage (combined)"; + return "CPU usage (combined)"; } @@ -1061,21 +1061,21 @@ const char* PageFaultsDataSource::Label() const { - return "Page Faults"; + return "Page faults"; } const char* PageFaultsDataSource::ShortLabel() const { - return "P-Faults"; + return "P-faults"; } const char* PageFaultsDataSource::Name() const { - return "Page Faults"; + return "Page faults"; } @@ -1176,7 +1176,7 @@ const char* NetworkUsageDataSource::Name() const { - return fIn ? "Network Receive" : "Network Send"; + return fIn ? "Network receive" : "Network send"; } @@ -1246,7 +1246,7 @@ const char* ClipboardSizeDataSource::Label() const { - return fText ? "Text Clipboard Size" : "Raw Clipboard Size"; + return fText ? "Text clipboard size" : "Raw clipboard size"; } @@ -1300,7 +1300,7 @@ const char* MediaNodesDataSource::Label() const { - return "Media Nodes"; + return "Media nodes"; } Modified: haiku/trunk/src/apps/activitymonitor/SettingsWindow.cpp =================================================================== --- haiku/trunk/src/apps/activitymonitor/SettingsWindow.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/activitymonitor/SettingsWindow.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -70,9 +70,9 @@ bigtime_t interval = kUpdateIntervals[level]; if ((interval % 1000) == 0) - snprintf(fText, sizeof(fText), "%lld secs", interval / 1000); + snprintf(fText, sizeof(fText), "%lld sec.", interval / 1000); else - snprintf(fText, sizeof(fText), "%lld msecs", interval); + snprintf(fText, sizeof(fText), "%lld ms", interval); return fText; } Modified: haiku/trunk/src/apps/autoraise/AutoRaiseApp.cpp =================================================================== --- haiku/trunk/src/apps/autoraise/AutoRaiseApp.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/autoraise/AutoRaiseApp.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -67,7 +67,7 @@ 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"); - 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); alert->SetShortcut(0, B_ENTER); alert->Go(); Modified: haiku/trunk/src/apps/autoraise/AutoRaiseIcon.cpp =================================================================== --- haiku/trunk/src/apps/autoraise/AutoRaiseIcon.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/autoraise/AutoRaiseIcon.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -22,11 +22,11 @@ long removeFromDeskbar(void *) -{ +{ BDeskbar db; if (db.RemoveItem(APP_NAME) != B_OK) printf("Unable to remove AutoRaise from BDeskbar\n"); - + return 0; } @@ -39,9 +39,9 @@ BMenuItem *tmpi; BMessage *msg; bigtime_t delay; - + AutoRaiseSettings *s = tv->Settings(); - + SetFont(be_plain_font); @@ -165,15 +165,16 @@ tmpm->SetTargetForItems(tv); BMenuItem *delaym = new BMenuItem(tmpm); delaym->SetEnabled(s->Active()); - + AddItem(delaym); - + AddSeparatorItem(); // 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))); - + SetTargetForItems(tv); SetAsyncAutoDestruct(true); } @@ -202,19 +203,19 @@ { thread_info ti; status_t err; - + watching = false; _settings = new AutoRaiseSettings; - + _appPath = _settings->AppPath(); - + raise_delay = _settings->Delay(); current_window = 0; polling_delay = 100000; fPollerSem = create_sem(0, "AutoRaise poller sync"); last_raiser_thread = 0; fNormalMM = mouse_mode(); - + _activeIcon = NULL; _inactiveIcon = NULL; @@ -222,7 +223,8 @@ fDeskbarTeam = ti.team; #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 //determine paths to icon files based on app path in settings file @@ -230,7 +232,7 @@ BResources res; BFile theapp(&_appPath, B_READ_ONLY); if ((err = res.SetTo(&theapp)) != B_OK) { - + printf("Unable to find the app to get the resources !!!\n"); // removeFromDeskbar(NULL); // delete _settings; @@ -241,30 +243,32 @@ char *p; 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) puts("ERROR loading active icon"); else _activeIcon->SetBits(p, B_MINI_ICON*B_MINI_ICON, 0, B_CMAP8); - + 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) puts("ERROR loading inactive icon"); else _inactiveIcon->SetBits(p, B_MINI_ICON*B_MINI_ICON, 0, B_CMAP8); - - + + SetDrawingMode(B_OP_ALPHA); SetFlags(Flags() | B_WILL_DRAW); - + // begin watching if we want // (doesn't work here, better do it in AttachedToWindow()) } TrayView::~TrayView(){ status_t ret; - + if (watching) { #ifdef USE_DANO_HACK be_roster->StopWatching(this); @@ -281,7 +285,7 @@ if (_activeIcon) delete _activeIcon; if (_inactiveIcon) delete _inactiveIcon; if (_settings) delete _settings; - + return; } @@ -304,7 +308,7 @@ { return NULL; } - + return (new TrayView(data)); } @@ -325,11 +329,11 @@ void TrayView::Draw(BRect updaterect) { BRect bnds(Bounds()); - + if (Parent()) SetHighColor(Parent()->ViewColor()); else SetHighColor(189, 186, 189, 255); FillRect(bnds); - + if (_settings->Active()) { if (_activeIcon) DrawBitmap(_activeIcon); @@ -344,43 +348,43 @@ BWindow *window = Window(); /*To handle the MouseDown message*/ if (!window) /*Check for proper instantiation*/ return; - + BMessage *mouseMsg = window->CurrentMessage(); if (!mouseMsg) /*Check for existence*/ return; - + if (mouseMsg->what == B_MOUSE_DOWN) { /*Variables for storing the button pressed / modifying key*/ uint32 buttons = 0; uint32 modifiers = 0; - + /*Get the button pressed*/ mouseMsg->FindInt32("buttons", (int32 *) &buttons); /*Get modifier key (if any)*/ mouseMsg->FindInt32("modifiers", (int32 *) &modifiers); - + /*Now perform action*/ switch(buttons) { case B_PRIMARY_MOUSE_BUTTON: { SetActive(!_settings->Active()); - + break; } - case B_SECONDARY_MOUSE_BUTTON: + case B_SECONDARY_MOUSE_BUTTON: { ConvertToScreen(&where); //menu will delete itself (see constructor of ConfigMenu), //so all we're concerned about is calling Go() asynchronously ConfigMenu *menu = new ConfigMenu(this, false); - menu->Go(where, true, true, ConvertToScreen(Bounds()), true); + menu->Go(where, true, true, ConvertToScreen(Bounds()), true); break; } } } -} +} int32 fronter(void *arg) @@ -449,13 +453,13 @@ if ((wi->window_left > wi->window_right) || (wi->window_top > wi->window_bottom)) 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); */ - if ((!wi->is_mini) - && (((long)mouse.x) > wi->window_left) && (((long)mouse.x) < wi->window_right) + if ((!wi->is_mini) + && (((long)mouse.x) > wi->window_left) && (((long)mouse.x) < wi->window_right) && (((long)mouse.y) > wi->window_top) && (((long)mouse.y) < wi->window_bottom)) { //((tv->_settings->Mode() != Mode_DeskbarOver) || (wi->team == tv->fDeskbarTeam)) @@ -502,9 +506,9 @@ bool wasactive; BPoint mouse; uint32 buttons; - + switch(message->what) - { + { case MSG_TOOGLE_ACTIVE: SetActive(!_settings->Active()); break; @@ -539,17 +543,17 @@ { thread_id tid = spawn_thread(removeFromDeskbar, "RemoveFromDeskbar", B_NORMAL_PRIORITY, NULL); if (tid) resume_thread(tid); - + break; } 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); alert->SetShortcut(0, B_ENTER); alert->Go(NULL); // use asynchronous version break; case OPEN_SETTINGS: - + break; #ifdef USE_DANO_HACK case B_SOME_WINDOW_ACTIVATED: Modified: haiku/trunk/src/apps/bootman/BootManager.cpp =================================================================== --- haiku/trunk/src/apps/bootman/BootManager.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/bootman/BootManager.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -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. * * Authors: @@ -46,7 +46,7 @@ { BAlert *alert = new BAlert("about", "Haiku Boot Manager\n\n" "\twritten by Michael Pfeiffer\n" - "\tCopyright 2008, Haiku Inc.\n", "Ok"); + "\tCopyright 2008, Haiku Inc.\n", "OK"); BTextView *view = alert->TextView(); BFont font; Modified: haiku/trunk/src/apps/bootman/BootManagerController.cpp =================================================================== --- haiku/trunk/src/apps/bootman/BootManagerController.cpp 2010-01-13 12:06:51 UTC (rev 35048) +++ haiku/trunk/src/apps/bootman/BootManagerController.cpp 2010-01-13 14:33:35 UTC (rev 35049) @@ -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. - * + * * Authors: * Michael Pfeiffer <laplace@xxxxxxxxxxxxxxxxxxxxx> */ @@ -39,14 +39,14 @@ #if USE_TEST_BOOT_DRIVE fBootDrive = new TestBootDrive(); #else - fBootDrive = new LegacyBootDrive(); + fBootDrive = new LegacyBootDrive(); #endif // set defaults fSettings.AddBool("install", true); fSettings.AddInt32("defaultPartition", 0); fSettings.AddInt32("timeout", -1); - + BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, true) == B_OK) { path.Append("bootman/MBR"); @@ -56,11 +56,11 @@ if (path.GetParent(&parent) == B_OK) { BDirectory directory; directory.CreateDirectory(parent.Path(), NULL); - } + } } else { fSettings.AddString("file", ""); } - + fReadPartitionsStatus = fBootDrive->ReadPartitions(&fSettings); } @@ -100,23 +100,23 @@ case kStateErrorEntry: be_app->PostMessage(B_QUIT_REQUESTED); break; - + case kStateSaveMBR: - if (_SaveMBR()) + if (_SaveMBR()) return kStateMBRSaved; break; - + case kStateMBRSaved: return kStatePartitions; - + case kStatePartitions: if (_HasSelectedPartitions()) return kStateDefaultPartitions; break; - + case kStateDefaultPartitions: return kStateInstallSummary; - + case kStateInstallSummary: if (_WriteBootMenu()) return kStateInstalled; @@ -125,7 +125,7 @@ case kStateInstalled: be_app->PostMessage(B_QUIT_REQUESTED); break; - + case kStateUninstall: if (_RestoreMBR()) return kStateUninstalled; @@ -134,7 +134,7 @@ case kStateUninstalled: be_app->PostMessage(B_QUIT_REQUESTED); break; - } + } // cannot leave the current state/page return -1; } @@ -147,13 +147,13 @@ for (int32 i = 0; fSettings.FindMessage("partition", i, &message) == B_OK; i ++) { bool 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!", - "OK"); + + BAlert* alert = new BAlert("info", "At least one partition must be " + "selected!", "OK"); alert->Go(); - + return false; } @@ -162,12 +162,12 @@ BootManagerController::_WriteBootMenu() { BAlert* alert = new BAlert("confirm", "About to write the boot menu " - "to disk. Are you sure you want to continue?", "Write Boot Menu", "Back", - NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); - + "to disk. Are you sure you want to continue?", "Write boot menu", + "Back", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); + if (alert->Go() == 1) return false; - + fWriteBootMenuStatus = fBootDrive->WriteBootMenu(&fSettings); return true; } @@ -179,7 +179,7 @@ BString path; fSettings.FindString("file", &path); 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; } @@ -191,19 +191,19 @@ BString path; fSettings.FindString("disk", &disk); fSettings.FindString("file", &path); - + BString message; message << "About to restore the Master Boot Record (MBR) of " << disk << " from " << path << ". " "Do you wish to continue?"; - BAlert* alert = new BAlert("confirm", message.String(), + BAlert* alert = new BAlert("confirm", message.String(), "Restore MBR", "Back", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); if (alert->Go() == 1) return false; BFile file(path.String(), B_READ_ONLY); - fRestoreMBRStatus = fBootDrive->RestoreMasterBootRecord(&fSettings, &file); + fRestoreMBRStatus = fBootDrive->RestoreMasterBootRecord(&fSettings, &file); return true; } @@ -213,7 +213,7 @@ { WizardPageView* page = NULL; BRect frame = wizard->PageFrame(); - + switch (state) { case kStateEntry: page = new EntryPage(&fSettings, frame, "entry"); @@ -257,7 +257,7 @@ wizard->SetNextButtonLabel("Done"); break; } - + return page; } @@ -268,16 +268,16 @@ BString description; if (fReadPartitionsStatus == kErrorBootSectorTooSmall) - description << - "Partition Table Not Compatible\n\n" + description << + "Partition table not compatible\n\n" "The partition table of the first hard disk is not compatible " "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 - description << - "Error Reading Partition Table\n\n" - "Boot Manager is unable to read the partition table!"; - + description << + "Error reading partition table\n\n" + "Boot Manager is unable to read the partition table!"; + return new DescriptionPage(frame, "errorEntry", description.String(), true); } @@ -288,8 +288,8 @@ BString description; BString disk; fSettings.FindString("disk", &disk); - - description << + + description << "Backup Master Boot Record\n\n" "The Master Boot Record (MBR) of the boot device:\n" "\t" << disk << "\n" @@ -297,9 +297,9 @@ "save the MBR into.\n\n" "If something goes wrong with the installation or if " "you later wish to remove the boot menu, simply run the " - "bootman program and choose the 'Uninstall' option."; - - return new FileSelectionPage(&fSettings, frame, "saveMBR", description.String(), + "bootman program and choose the 'Uninstall' option."; + + return new FileSelectionPage(&fSettings, frame, "saveMBR", description.String(), B_SAVE_PANEL); } @@ -310,19 +310,19 @@ BString description; BString file; fSettings.FindString("file", &file); - + if (fSaveMBRStatus == B_OK) { - description << - "Old Master Boot Record Saved\n\n" + description << + "Old Master Boot Record saved\n\n" "The old Master Boot Record was successfully save to " - << file << ".\n"; + << file << ".\n"; } else { - description << - "Old Master Boot Record Saved Failure\n\n" + description << + "Old Master Boot Record Saved failure\n\n" "The old Master Boot Record could not be saved to " - << file << ".\n"; + << file << ".\n"; } - + return new DescriptionPage(frame, "summary", description.String(), true); } @@ -333,8 +333,8 @@ BString description; BString disk; fSettings.FindString("disk", &disk); - - description << + + description << "Summary\n\n" "About to write the following boot menu to the boot disk " "(" << disk << "). Please verify the information below " @@ -342,18 +342,18 @@ BMessage message; for (int32 i = 0; fSettings.FindMessage("partition", i, &message) == B_OK; i ++) { - + bool show; if (message.FindBool("show", &show) != B_OK || !show) continue; - + BString name; BString path; message.FindString("name", &name); message.FindString("path", &path); description << name << "\t(" << path << ")\n"; } - + return new DescriptionPage(frame, "summary", description.String(), true); } @@ -362,17 +362,17 @@ BootManagerController::_CreateInstalledPage(BRect frame) { const char* description; - + 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 " "on your system."; } 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 " "might be destroyed, you should restore the MBR now!"; } - + return new DescriptionPage(frame, "done", description, true); } @@ -381,19 +381,19 @@ BootManagerController::_CreateUninstallPage(BRect frame) { BString description; - - description << - "Uninstall Boot Manager\n\n" + + description << + "Uninstall boot manager\n\n" "Please locate the Master Boot Record (MBR) save file to " "restore from. This is the file that was created when the " "boot manager was first installed."; - + return new FileSelectionPage(&fSettings, frame, "restoreMBR", description.String(), B_OPEN_PANEL); } -WizardPageView* +WizardPageView* BootManagerController::_CreateUninstalledPage(BRect frame) { BString description; @@ -401,18 +401,18 @@ BString file; fSettings.FindString("disk", &disk); fSettings.FindString("file", &file); - + if (fRestoreMBRStatus == B_OK) { - description << - "Uninstallation Boot Menu Completed\n\n" - "The Master Boot Record of the boot device " + description << + "Uninstallation of boot menu completed\n\n" + "The Master Boot Record of the boot device " "(" << disk << ") has been successfully restored from " << file << "."; } else { description << - "Uninstallation Boot Menu Failed\n\n" + "Uninstallation of boot menu failed\n\n" [... truncated: 7801 lines follow ...]