From 612ab9791896498800cce95a52d2a50f61f6b78f Mon Sep 17 00:00:00 2001 From: Humdinger Date: Tue, 1 Jan 2013 17:44:25 +0100 Subject: [PATCH 01/10] Re-arranged tabs Pu the tabs back in the order it used to be. "Fonts" and "Colors" are probably changed more often than "Look and feel". Also re-arranged a few lines of code to reflect that order and sorted the includes. --- src/preferences/appearance/APRWindow.cpp | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/preferences/appearance/APRWindow.cpp b/src/preferences/appearance/APRWindow.cpp index 61203bcacbd..87afe9487cf 100644 --- a/src/preferences/appearance/APRWindow.cpp +++ b/src/preferences/appearance/APRWindow.cpp @@ -21,9 +21,9 @@ #include "AntialiasingSettingsView.h" #include "APRView.h" -#include "LookAndFeelSettingsView.h" #include "defs.h" #include "FontView.h" +#include "LookAndFeelSettingsView.h" #undef B_TRANSLATION_CONTEXT @@ -50,19 +50,19 @@ APRWindow::APRWindow(BRect frame) BTabView* tabView = new BTabView("tabview", B_WIDTH_FROM_LABEL); - fLookAndFeelSettings = new LookAndFeelSettingsView( - B_TRANSLATE("Look and feel")); - fFontSettings = new FontView(B_TRANSLATE("Fonts")); fColorsView = new APRView(B_TRANSLATE("Colors")); + fLookAndFeelSettings = new LookAndFeelSettingsView( + B_TRANSLATE("Look and feel")); + fAntialiasingSettings = new AntialiasingSettingsView( B_TRANSLATE("Antialiasing")); - tabView->AddTab(fLookAndFeelSettings); tabView->AddTab(fFontSettings); tabView->AddTab(fColorsView); + tabView->AddTab(fLookAndFeelSettings); tabView->AddTab(fAntialiasingSettings); _UpdateButtons(); @@ -91,8 +91,8 @@ APRWindow::MessageReceived(BMessage *message) case kMsgSetDefaults: fFontSettings->SetDefaults(); fColorsView->SetDefaults(); - fAntialiasingSettings->SetDefaults(); fLookAndFeelSettings->SetDefaults(); + fAntialiasingSettings->SetDefaults(); _UpdateButtons(); break; @@ -100,8 +100,8 @@ APRWindow::MessageReceived(BMessage *message) case kMsgRevert: fColorsView->Revert(); fAntialiasingSettings->Revert(); - fFontSettings->Revert(); fLookAndFeelSettings->Revert(); + fFontSettings->Revert(); _UpdateButtons(); break; @@ -128,10 +128,10 @@ APRWindow::_IsDefaultable() const // printf("colors defaultable: %d\n", fColorsView->IsDefaultable()); // printf("AA defaultable: %d\n", fAntialiasingSettings->IsDefaultable()); // printf("decor defaultable: %d\n", fLookAndFeelSettings->IsDefaultable()); - return fColorsView->IsDefaultable() - || fFontSettings->IsDefaultable() - || fAntialiasingSettings->IsDefaultable() - || fLookAndFeelSettings->IsDefaultable(); + return fFontSettings->IsDefaultable() + || fColorsView->IsDefaultable() + || fLookAndFeelSettings->IsDefaultable() + || fAntialiasingSettings->IsDefaultable(); } @@ -142,8 +142,8 @@ APRWindow::_IsRevertable() const // printf("colors revertable: %d\n", fColorsView->IsRevertable()); // printf("AA revertable: %d\n", fAntialiasingSettings->IsRevertable()); // printf("decor revertable: %d\n", fLookAndFeelSettings->IsRevertable()); - return fColorsView->IsRevertable() - || fFontSettings->IsRevertable() - || fAntialiasingSettings->IsRevertable() - || fLookAndFeelSettings->IsRevertable(); + return fFontSettings->IsRevertable() + || fColorsView->IsRevertable() + || fLookAndFeelSettings->IsRevertable() + || fAntialiasingSettings->IsRevertable(); } From ec269755757a4577b5d7b513805a4a36dd9ffa49 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 1 Jan 2013 16:12:50 -0500 Subject: [PATCH 02/10] Disable populating return values onto the variable list. - Still needs some work with respect to false positives in the most recent code, as well as the missing bits for PIC. --- src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp index 6d60b1b8e8e..b96814da886 100644 --- a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp @@ -673,10 +673,14 @@ DwarfImageDebugInfo::CreateFrame(Image* image, instructionPointer, functionInstance->Address() - fRelocationDelta, subprogramEntry->Variables(), subprogramEntry->Blocks()); + // TODO: re-enable once PIC and false positive issues + // are properly dealt with +#if 0 if (returnFunctionAddress != 0) { _CreateReturnValue(returnFunctionAddress, image, frame, *stackFrameDebugInfo); } +#endif } _frame = frameReference.Detach(); From 10e65baba81b9bfb10d77f3aac382f1241bc14b7 Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Wed, 2 Jan 2013 08:24:15 +0000 Subject: [PATCH 03/10] Disabled "Application flags" in liblayout.so Repackaged the optional packages, BePDF and Wonderbrush to disable the Application flags setting in their Filetype window. Fixes #8821. --- build/jam/OptionalPackages | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages index 59bcdc68db3..39525947e49 100644 --- a/build/jam/OptionalPackages +++ b/build/jam/OptionalPackages @@ -297,8 +297,8 @@ if [ IsOptionalHaikuImagePackageAdded BePDF ] { : $(baseURL)/bepdf-1.1.1b4-x86-gcc4-2012-08-11.zip ; } else { InstallOptionalHaikuImagePackage - bepdf-1.1.1b4-r1a4-x86-gcc2-2012-08-30.zip - : $(baseURL)/bepdf-1.1.1b4-r1a4-x86-gcc2-2012-08-30.zip ; + bepdf-1.1.1b4-r1a4-x86-gcc2-2013-01-02.zip + : $(baseURL)/bepdf-1.1.1b4-r1a4-x86-gcc2-2013-01-02.zip ; } AddSymlinkToHaikuImage home config settings deskbar Applications : /boot/apps/BePDF/BePDF ; @@ -2282,8 +2282,8 @@ if [ IsOptionalHaikuImagePackageAdded WonderBrush ] { } else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) { Echo "No optional package WonderBrush available for gcc4" ; } else { - InstallOptionalHaikuImagePackage WonderBrush-2.1.2.zip - : $(baseURL)/WonderBrush-2.1.2-x86-gcc2-2008-11-08.zip + InstallOptionalHaikuImagePackage WonderBrush-2.1.2-a.zip + : $(baseURL)/WonderBrush-2.1.2-x86-gcc2-2013-01-02.zip : apps ; AddSymlinkToHaikuImage home config settings deskbar Applications : /boot/apps/WonderBrush/WonderBrush ; From 364389a05700b43f91065d906d846d73aaf60c5f Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Wed, 2 Jan 2013 09:07:13 +0000 Subject: [PATCH 04/10] Make ReadOnlyBootPrompt visible on all workspaces. Fixes #8003 --- src/apps/readonlybootprompt/BootPromptWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/readonlybootprompt/BootPromptWindow.cpp b/src/apps/readonlybootprompt/BootPromptWindow.cpp index 12611894cce..f34d3af4221 100644 --- a/src/apps/readonlybootprompt/BootPromptWindow.cpp +++ b/src/apps/readonlybootprompt/BootPromptWindow.cpp @@ -137,7 +137,8 @@ compare_void_list_items(const void* _a, const void* _b) BootPromptWindow::BootPromptWindow() : BWindow(BRect(0, 0, 530, 400), "", - B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_NOT_CLOSABLE), + B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_NOT_CLOSABLE, + B_ALL_WORKSPACES), fDefaultKeymapItem(NULL) { SetSizeLimits(450, 16384, 350, 16384); From db41683495bfde817554415d14ae6f9cc91e77eb Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Wed, 2 Jan 2013 10:11:56 +0000 Subject: [PATCH 05/10] Automatic whitespace cleanup. No functional change. --- src/kits/tracker/AUTHORS | 2 +- src/kits/tracker/AttributeStream.h | 6 ++-- src/kits/tracker/Bitmaps.h | 2 +- src/kits/tracker/DeskWindow.h | 8 ++--- src/kits/tracker/DesktopPoseView.cpp | 4 +-- src/kits/tracker/DesktopPoseView.h | 2 +- src/kits/tracker/DialogPane.cpp | 2 +- src/kits/tracker/DialogPane.h | 14 ++++---- src/kits/tracker/FBCPadding.cpp | 2 +- src/kits/tracker/FSClipboard.cpp | 10 +++--- src/kits/tracker/FavoritesMenu.cpp | 4 +-- src/kits/tracker/FavoritesMenu.h | 6 ++-- src/kits/tracker/FindPanel.cpp | 2 +- src/kits/tracker/FunctionObject.h | 2 +- src/kits/tracker/GroupedMenu.cpp | 2 +- src/kits/tracker/IconCache.cpp | 2 +- src/kits/tracker/IconCache.h | 28 +++++++-------- src/kits/tracker/InfoWindow.cpp | 2 +- src/kits/tracker/MiniMenuField.cpp | 8 ++--- src/kits/tracker/Navigator.cpp | 10 +++--- src/kits/tracker/Navigator.h | 4 +-- src/kits/tracker/NodePreloader.cpp | 4 +-- src/kits/tracker/NodeWalker.cpp | 10 +++--- src/kits/tracker/NodeWalker.h | 12 +++---- src/kits/tracker/OverrideAlert.cpp | 22 ++++++------ src/kits/tracker/Pose.cpp | 40 +++++++++++----------- src/kits/tracker/PoseList.cpp | 4 +-- src/kits/tracker/PoseView.cpp | 2 +- src/kits/tracker/PoseViewScripting.cpp | 32 ++++++++--------- src/kits/tracker/QueryPoseView.cpp | 16 ++++----- src/kits/tracker/RecentItems.h | 2 +- src/kits/tracker/RegExp.cpp | 2 +- src/kits/tracker/RegExp.h | 6 ++-- src/kits/tracker/Settings.cpp | 2 +- src/kits/tracker/SettingsHandler.cpp | 6 ++-- src/kits/tracker/SettingsHandler.h | 4 +-- src/kits/tracker/SlowContextPopup.cpp | 28 +++++++-------- src/kits/tracker/SlowContextPopup.h | 4 +-- src/kits/tracker/SlowMenu.cpp | 2 +- src/kits/tracker/TaskLoop.h | 8 ++--- src/kits/tracker/TemplatesMenu.cpp | 2 +- src/kits/tracker/TextWidget.cpp | 4 +-- src/kits/tracker/TextWidget.h | 8 ++--- src/kits/tracker/TitleView.cpp | 16 ++++----- src/kits/tracker/TitleView.h | 6 ++-- src/kits/tracker/Tracker.cpp | 2 +- src/kits/tracker/TrackerScripting.cpp | 6 ++-- src/kits/tracker/TrackerSettings.h | 4 +-- src/kits/tracker/TrackerSettingsWindow.cpp | 10 +++--- src/kits/tracker/TrackerString.cpp | 22 ++++++------ src/kits/tracker/TrackerString.h | 10 +++--- src/kits/tracker/TrashWatcher.cpp | 4 +-- src/kits/tracker/TrashWatcher.h | 2 +- src/kits/tracker/ViewState.h | 4 +-- 54 files changed, 214 insertions(+), 214 deletions(-) diff --git a/src/kits/tracker/AUTHORS b/src/kits/tracker/AUTHORS index 183f215bc19..a000c92b5f2 100644 --- a/src/kits/tracker/AUTHORS +++ b/src/kits/tracker/AUTHORS @@ -7,4 +7,4 @@ Jeff Bush, Robert Chinn, Doug Fulton, Kenny Carruthers, -Dianne Hackborn \ No newline at end of file +Dianne Hackborn diff --git a/src/kits/tracker/AttributeStream.h b/src/kits/tracker/AttributeStream.h index f029ad16781..21dfab8e8bd 100644 --- a/src/kits/tracker/AttributeStream.h +++ b/src/kits/tracker/AttributeStream.h @@ -79,7 +79,7 @@ class AttributeInfo { AttributeInfo(const AttributeInfo &); AttributeInfo(const char*, attr_info); AttributeInfo(const char*, uint32, off_t); - + void SetTo(const AttributeInfo &); void SetTo(const char*, attr_info); void SetTo(const char*, uint32, off_t); @@ -186,7 +186,7 @@ class AttributeStreamFileNode : public AttributeStreamNode { private: AttributeInfo fCurrentAttr; BNode* fNode; - + typedef AttributeStreamNode _inherited; }; @@ -224,7 +224,7 @@ class AttributeStreamMemoryNode : public AttributeStreamNode { { delete [] fData; } - + AttributeInfo fAttr; char* fData; }; diff --git a/src/kits/tracker/Bitmaps.h b/src/kits/tracker/Bitmaps.h index c04331fd679..b32698ca0e9 100644 --- a/src/kits/tracker/Bitmaps.h +++ b/src/kits/tracker/Bitmaps.h @@ -87,7 +87,7 @@ class BImageResources private: image_id find_image(void* memAddr) const; - + mutable BLocker fLock; BResources fResources; }; diff --git a/src/kits/tracker/DeskWindow.h b/src/kits/tracker/DeskWindow.h index f2099df8a27..d83a55a7155 100644 --- a/src/kits/tracker/DeskWindow.h +++ b/src/kits/tracker/DeskWindow.h @@ -67,9 +67,9 @@ class BDeskWindow : public BContainerWindow { void UpdateDesktopBackgroundImages(); // Desktop window has special background image handling - + void SaveDesktopPoseLocations(); - + protected: virtual void AddWindowContextMenus(BMenu*); virtual BPoseView* NewPoseView(Model*, BRect, uint32); @@ -84,7 +84,7 @@ class BDeskWindow : public BContainerWindow { BPopUpMenu* fTrashContextMenu; BRect fOldFrame; - + // in the desktop window addon shortcuts have to be added by AddShortcut // and we don't always get the MenusBeginning call to check for new // addons/update the shortcuts -- instead we need to node monitor the @@ -93,7 +93,7 @@ class BDeskWindow : public BContainerWindow { bool fShouldUpdateAddonShortcuts; std::set fCurrentAddonShortcuts; // keeps track of which shortcuts are installed for Tracker addons - + typedef BContainerWindow _inherited; }; diff --git a/src/kits/tracker/DesktopPoseView.cpp b/src/kits/tracker/DesktopPoseView.cpp index 4a34df9f7e4..de9828a3c02 100644 --- a/src/kits/tracker/DesktopPoseView.cpp +++ b/src/kits/tracker/DesktopPoseView.cpp @@ -271,11 +271,11 @@ DesktopPoseView::AdaptToDesktopIntegrationChange(BMessage* message) { bool mountVolumesOnDesktop = true; bool mountSharedVolumesOntoDesktop = true; - + message->FindBool("MountVolumesOntoDesktop", &mountVolumesOnDesktop); message->FindBool("MountSharedVolumesOntoDesktop", &mountSharedVolumesOntoDesktop); - + ShowVolumes(false, mountSharedVolumesOntoDesktop); ShowVolumes(mountVolumesOnDesktop, mountSharedVolumesOntoDesktop); } diff --git a/src/kits/tracker/DesktopPoseView.h b/src/kits/tracker/DesktopPoseView.h index 8d7ffad52e6..a6c8731b779 100644 --- a/src/kits/tracker/DesktopPoseView.h +++ b/src/kits/tracker/DesktopPoseView.h @@ -31,7 +31,7 @@ of Be Incorporated in the United States and other countries. Other brand product names are registered trademarks or trademarks of their respective holders. All rights reserved. */ - + // DesktopPoseView adds support for displaying integrated desktops // from multiple volumes to BPoseView #ifndef _DESKTOP_POSE_VIEW_H diff --git a/src/kits/tracker/DialogPane.cpp b/src/kits/tracker/DialogPane.cpp index 06b60369a24..ececc6492d3 100644 --- a/src/kits/tracker/DialogPane.cpp +++ b/src/kits/tracker/DialogPane.cpp @@ -505,7 +505,7 @@ PaneSwitch::DrawInState(PaneSwitch::State state) switch (state) { case kCollapsed: BeginLineArray(6); - + if (fLeftAligned) { AddLine(BPoint(rect.left + 3, rect.top + 1), BPoint(rect.left + 3, rect.bottom - 1), outlineColor); diff --git a/src/kits/tracker/DialogPane.h b/src/kits/tracker/DialogPane.h index c9d12a0b8aa..495ad7c149a 100644 --- a/src/kits/tracker/DialogPane.h +++ b/src/kits/tracker/DialogPane.h @@ -68,15 +68,15 @@ class DialogPane : public BView { uint32 flags = B_WILL_DRAW); virtual ~DialogPane(); - + BRect FrameForMode(int32); BRect BoundsForMode(int32); - + int32 Mode() const; virtual void SetMode(int32, bool initialSetup = false); - + void AddItem(BView*, int32 toMode); - + void SetSwitch(BControl*); virtual void AttachedToWindow(); @@ -87,18 +87,18 @@ class DialogPane : public BView { // called only by the constructor virtual void MessageReceived(BMessage* message); - + private: int32 fMode; BRect fMode1Frame; BRect fMode2Frame; BRect fMode3Frame; - + ViewList fMode2Items; ViewList fMode3Items; BControl* fLatch; - + typedef BView _inherited; }; diff --git a/src/kits/tracker/FBCPadding.cpp b/src/kits/tracker/FBCPadding.cpp index 9b1ac457cb0..20aef9e3a85 100644 --- a/src/kits/tracker/FBCPadding.cpp +++ b/src/kits/tracker/FBCPadding.cpp @@ -145,6 +145,6 @@ SetPanelDirectory__10BFilePanelFP9entry_ref { self->SetPanelDirectory(r); } - + } #endif diff --git a/src/kits/tracker/FSClipboard.cpp b/src/kits/tracker/FSClipboard.cpp index ce90756fc57..851ce4ad34e 100644 --- a/src/kits/tracker/FSClipboard.cpp +++ b/src/kits/tracker/FSClipboard.cpp @@ -266,7 +266,7 @@ FSClipboardAddPoses(const node_ref* directory, PoseList* list, refsAdded++; } else { clip->RemoveName(modeName); - + clipNode.node = *node; clipNode.moveMode = kDelete; // note removing node updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, @@ -280,7 +280,7 @@ FSClipboardAddPoses(const node_ref* directory, PoseList* list, if (clip->AddRef(refName, model->EntryRef()) == B_OK && clip->AddInt32(modeName, (int32)moveMode) == B_OK) { pose->SetClipboardMode(moveMode); - + clipNode.node = *node; updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, &clipNode, sizeof(TClipboardNodeRef), true, @@ -422,7 +422,7 @@ FSClipboardPaste(Model* model, uint32 linksMode) uint32 newMoveMode = 0; bool sameDirectory = destNodeRef->device == ref.device && destNodeRef->node == ref.directory; - + if (!entry.Exists()) { // The entry doesn't exist anymore, so we'll remove // that entry from the clipboard as well @@ -567,7 +567,7 @@ FSClipboardFindNodeMode(Model* model, bool autoLock, bool updateRefIfNeeded) } if (change) be_clipboard->Commit(); - + if (autoLock) be_clipboard->Unlock(); @@ -744,7 +744,7 @@ BClipboardRefsWatcher::UpdateNode(node_ref* node, entry_ref* ref) clip->RemoveName(name); MakeModeName(name); clip->RemoveName(name); - + RemoveNode(node); } be_clipboard->Commit(); diff --git a/src/kits/tracker/FavoritesMenu.cpp b/src/kits/tracker/FavoritesMenu.cpp index 294448a326d..ba169b15f61 100644 --- a/src/kits/tracker/FavoritesMenu.cpp +++ b/src/kits/tracker/FavoritesMenu.cpp @@ -166,7 +166,7 @@ FavoritesMenu::AddNextItem() BMenuItem* item = BNavMenu::NewModelItem(&model, model.IsDirectory() ? fOpenFolderMessage : fOpenFileMessage, fTarget); - + if (item == NULL) return true; @@ -314,7 +314,7 @@ FavoritesMenu::ShouldShowModel(const Model* model) if (!fRefFilter || model->Node() == NULL) return true; - + struct stat_beos statBeOS; convert_to_stat_beos(model->StatBuf(), &statBeOS); diff --git a/src/kits/tracker/FavoritesMenu.h b/src/kits/tracker/FavoritesMenu.h index 2863534bf4e..496d77a5d50 100644 --- a/src/kits/tracker/FavoritesMenu.h +++ b/src/kits/tracker/FavoritesMenu.h @@ -58,7 +58,7 @@ class FavoritesMenu : public BSlowMenu { BMessage* openFileMessage, const BMessenger &, bool isSavePanel, BRefFilter* filter = NULL); virtual ~FavoritesMenu(); - + void SetRefFilter(BRefFilter* filter); private: @@ -67,9 +67,9 @@ class FavoritesMenu : public BSlowMenu { virtual bool AddNextItem(); virtual void DoneBuildingItemList(); virtual void ClearMenuBuildingState(); - + bool ShouldShowModel(const Model* model); - + BMessage* fOpenFolderMessage; BMessage* fOpenFileMessage; BMessenger fTarget; diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp index 939fb192f80..258f39bab3e 100644 --- a/src/kits/tracker/FindPanel.cpp +++ b/src/kits/tracker/FindPanel.cpp @@ -219,7 +219,7 @@ FindWindow::FindWindow(const entry_ref* newRef, bool editIfTemplateOnly) fFromTemplate = IsQueryTemplate(fFile); - fBackground = new FindPanel(Bounds(), fFile, this, fFromTemplate, + fBackground = new FindPanel(Bounds(), fFile, this, fFromTemplate, fEditTemplateOnly); AddChild(fBackground); } diff --git a/src/kits/tracker/FunctionObject.h b/src/kits/tracker/FunctionObject.h index 9b53ae7a6fc..d3a406185cc 100644 --- a/src/kits/tracker/FunctionObject.h +++ b/src/kits/tracker/FunctionObject.h @@ -240,7 +240,7 @@ class ThreeParamFunctionObject : public FunctionObject { p3(p3) { } - + virtual void operator()() { (function)(p1.Pass(), p2.Pass(), p3.Pass()); } private: diff --git a/src/kits/tracker/GroupedMenu.cpp b/src/kits/tracker/GroupedMenu.cpp index 7d73de2a25a..4b3323c38f9 100644 --- a/src/kits/tracker/GroupedMenu.cpp +++ b/src/kits/tracker/GroupedMenu.cpp @@ -24,7 +24,7 @@ TMenuItemGroup::TMenuItemGroup(const char* name) TMenuItemGroup::~TMenuItemGroup() { free((char*)fName); - + if (fMenu == NULL) { BMenuItem* item; while ((item = RemoveItem((int32)0)) != NULL) diff --git a/src/kits/tracker/IconCache.cpp b/src/kits/tracker/IconCache.cpp index 8cf9d8e195c..d64e1401139 100644 --- a/src/kits/tracker/IconCache.cpp +++ b/src/kits/tracker/IconCache.cpp @@ -526,7 +526,7 @@ IconCache::GetIconFromFileTypes(ModelNodeLazyOpener* modelOpener, (SharedCacheEntry*)entry); // OK to cast here, have a runtime check source = kPreferredAppForNode; - // set source as preferred for node, so that next time we + // set source as preferred for node, so that next time we // get a hit in the initial find that uses // GetIconForPreferredApp } else diff --git a/src/kits/tracker/IconCache.h b/src/kits/tracker/IconCache.h index 9ca10f2cc06..571489ac8a6 100644 --- a/src/kits/tracker/IconCache.h +++ b/src/kits/tracker/IconCache.h @@ -126,15 +126,15 @@ class IconCacheEntry { public: IconCacheEntry(); ~IconCacheEntry(); - + void SetAliasFor(const SharedIconCache*, const SharedCacheEntry*); static IconCacheEntry* ResolveIfAlias(const SharedIconCache*, IconCacheEntry*); IconCacheEntry* ResolveIfAlias(const SharedIconCache*); - + void SetIcon(BBitmap* bitmap, IconDrawMode mode, icon_size size, bool create = false); - + bool HaveIconBitmap(IconDrawMode mode, icon_size size) const; bool CanConstructBitmap(IconDrawMode mode, icon_size size) const; static bool AlternateModeForIconConstructing(IconDrawMode requestedMode, @@ -169,9 +169,9 @@ class IconCacheEntry { BBitmap* fHilitedLargeIcon; BBitmap* fHilitedMiniIcon; int32 fAliasForIndex; - + // list of other icon kinds would be added here - + friend class SharedIconCache; friend class NodeIconCache; }; @@ -191,7 +191,7 @@ class SimpleIconCache { bool Lock(); void Unlock(); bool IsLocked() const; - + private: Benaphore fLock; }; @@ -210,7 +210,7 @@ class SharedCacheEntry : public IconCacheEntry { const char* FileType() const; const char* AppSignature() const; - + // hash table support uint32 Hash() const; static uint32 Hash(const char* fileType, const char* appSignature = 0); @@ -277,19 +277,19 @@ class NodeCacheEntry : public IconCacheEntry { NodeCacheEntry(const node_ref*, bool permanent = false); void Draw(BView*, BPoint, IconDrawMode mode, icon_size size, bool async = false); - + void Draw(BView*, BPoint, IconDrawMode, icon_size, void (*)(BView*, BPoint, BBitmap*, void*), void* = NULL); const node_ref* Node() const; - + uint32 Hash() const; static uint32 Hash(const node_ref*); bool operator==(const NodeCacheEntry&) const; void SetTo(const node_ref*); void MakePermanent(); bool Permanent() const; - + int32 fNext; private: node_ref fRef; @@ -348,7 +348,7 @@ const int32 kColorTransformTableSize = 256; class IconCache { public: IconCache(); - + void Draw(Model*, BView*, BPoint where, IconDrawMode mode, icon_size size, bool async = false); // draw an icon for a model, load the icon from the appropriate @@ -376,13 +376,13 @@ class IconCache { void Deleting(const BView*); // hook to manage deleting draw view caches for views that are // going away - + // icon changed calls, used when a node or a file type has an icon changed // the icons for the node/file type will be flushed and re-cached during // the next draw void IconChanged(Model*); void IconChanged(const char* mimeType, const char* appSignature); - + bool IsIconFrom(const Model*, const char* mimeType, const char* appSignature) const; // called when metamime database changed to figure out which models @@ -510,7 +510,7 @@ SharedIconCache::ResolveIfAlias(IconCacheEntry* entry) const { if (entry->fAliasForIndex < 0) return entry; - + return fHashTable.ElementAt(entry->fAliasForIndex); } diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp index b5c9840ad38..f07c50342af 100644 --- a/src/kits/tracker/InfoWindow.cpp +++ b/src/kits/tracker/InfoWindow.cpp @@ -2129,7 +2129,7 @@ AttributeView::BuildContextMenu(BMenu* parent) parent->AddItem(new BMenuItem(B_TRANSLATE("Edit name"), new BMessage(kEditItem), 'E')); parent->AddSeparatorItem(); - + if (fModel->IsVolume()) { BMenuItem* item = new BMenuItem(B_TRANSLATE("Unmount"), new BMessage(kUnmountVolume), 'U'); diff --git a/src/kits/tracker/MiniMenuField.cpp b/src/kits/tracker/MiniMenuField.cpp index c67af408c78..27ac5181e77 100644 --- a/src/kits/tracker/MiniMenuField.cpp +++ b/src/kits/tracker/MiniMenuField.cpp @@ -100,14 +100,14 @@ MiniMenuField::Draw(BRect) BRect rect(bounds); rect.right--; rect.bottom--; - + rgb_color darkest = tint_color(kBlack, 0.6f); rgb_color dark = tint_color(kBlack, 0.4f); rgb_color medium = dark; rgb_color light = tint_color(kBlack, 0.03f); - + SetHighColor(medium); - + // draw frame and shadow BeginLineArray(10); AddLine(rect.RightTop(), rect.RightBottom(), darkest); @@ -123,7 +123,7 @@ MiniMenuField::Draw(BRect) AddLine(rect.LeftTop(), rect.RightTop(), light); EndLineArray(); - + // draw triangle rect = BRect(5, 5, 15, 15); const rgb_color outlineColor = kBlack; diff --git a/src/kits/tracker/Navigator.cpp b/src/kits/tracker/Navigator.cpp index 5aff95950f2..9f29594587c 100644 --- a/src/kits/tracker/Navigator.cpp +++ b/src/kits/tracker/Navigator.cpp @@ -85,7 +85,7 @@ BNavigatorButton::AttachedToWindow() &bmpOn); SetPicture(bmpOn, true, true); delete bmpOn; - + BBitmap* bmpOff = 0; GetTrackerResources()->GetBitmapResource(B_MESSAGE_TYPE, fResIDOff, &bmpOff); @@ -139,7 +139,7 @@ BNavigator::BNavigator(const Model* model, BRect rect, uint32 resizeMask) { // Get initial path model->GetPath(&fPath); - + SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); float top = 2 + (be_plain_font->Size() - 8) / 2; @@ -298,14 +298,14 @@ BNavigator::SendNavigationMessage(NavigationAction action, BEntry* entry, BMessage message; message.AddRef("refs", &ref); message.AddInt32("action", action); - + // get the node of this folder for selecting it in the new location const node_ref* nodeRef; if (Window() && Window()->TargetModel()) nodeRef = Window()->TargetModel()->NodeRef(); else nodeRef = NULL; - + // if the option key was held down, open in new window (send message // to be_app) otherwise send message to this window. TTracker // (be_app) understands nodeRefToSlection, BContainerWindow doesn't, @@ -361,7 +361,7 @@ BNavigator::GoTo() Window()->PostMessage(&message); } else { BPath path; - + if (Window() && Window()->TargetModel()) { Window()->TargetModel()->GetPath(&path); fLocation->SetText(path.Path()); diff --git a/src/kits/tracker/Navigator.h b/src/kits/tracker/Navigator.h index be317705471..56fe2d42d74 100644 --- a/src/kits/tracker/Navigator.h +++ b/src/kits/tracker/Navigator.h @@ -68,9 +68,9 @@ class BNavigatorButton : public BPictureButton { public: BNavigatorButton(BRect rect, const char* name, BMessage* message, int32 resIDon, int32 resIDoff, int32 resIDdisabled); - + ~BNavigatorButton(); - + virtual void AttachedToWindow(); void SetPicture(BBitmap*, bool enabled, bool on); diff --git a/src/kits/tracker/NodePreloader.cpp b/src/kits/tracker/NodePreloader.cpp index d01333868a8..dbea4199dc9 100644 --- a/src/kits/tracker/NodePreloader.cpp +++ b/src/kits/tracker/NodePreloader.cpp @@ -106,7 +106,7 @@ void NodePreloader::MessageReceived(BMessage* message) { // respond to node monitor notifications - + node_ref itemNode; switch (message->what) { case B_NODE_MONITOR: @@ -173,7 +173,7 @@ NodePreloader::PreloadOne(const char* dirPath) entry_ref ref; if (dir.GetNextRef(&ref) != B_OK) break; - + BEntry entry(&ref); if (!entry.IsFile()) // only interrested in files diff --git a/src/kits/tracker/NodeWalker.cpp b/src/kits/tracker/NodeWalker.cpp index e95ef660a8b..b539644edc7 100644 --- a/src/kits/tracker/NodeWalker.cpp +++ b/src/kits/tracker/NodeWalker.cpp @@ -258,7 +258,7 @@ status_t TNodeWalker::PopDirCommon() { ASSERT(fTopIndex >= 0); - + // done with the old dir, pop it fDirs.RemoveItemAt(fTopIndex); fTopIndex--; @@ -303,7 +303,7 @@ TNodeWalker::GetNextEntry(BEntry* entry, bool traverse) fIncludeTopDir = false; return fTopDir->GetEntry(entry); } - + // Get the next entry. status_t err = fTopDir->GetNextEntry(entry, traverse); @@ -346,7 +346,7 @@ TNodeWalker::GetNextRef(entry_ref* ref) err = entry.GetRef(ref); return err; } - + // Get the next entry. status_t err = fTopDir->GetNextRef(ref); if (err != B_OK) { @@ -370,7 +370,7 @@ build_dirent(const BEntry* source, struct dirent* ent, { entry_ref ref; source->GetRef(&ref); - + size_t recordLength = strlen(ref.name) + sizeof(dirent); if (recordLength > size || count <= 0) // can't fit in buffer, bail @@ -424,7 +424,7 @@ TNodeWalker::GetNextDirents(struct dirent* ent, size_t size, int32 count) return build_dirent(fJustFile, ent, size, count); } - + // Get the next entry. int32 result = fTopDir->GetNextDirents(ent, size, count); diff --git a/src/kits/tracker/NodeWalker.h b/src/kits/tracker/NodeWalker.h index f13f65e23b4..8cf76385cd0 100644 --- a/src/kits/tracker/NodeWalker.h +++ b/src/kits/tracker/NodeWalker.h @@ -57,7 +57,7 @@ class TWalker : public BEntryList { public: virtual ~TWalker(); - + virtual status_t GetNextEntry(BEntry*, bool traverse = false) = 0; virtual status_t GetNextRef(entry_ref*) = 0; virtual int32 GetNextDirents(struct dirent*, size_t, @@ -83,7 +83,7 @@ class TNodeWalker : public TWalker { TNodeWalker(const char* path); TNodeWalker(const entry_ref* ref); TNodeWalker(const BDirectory* dir); - + virtual status_t GetNextEntry(BEntry*, bool traverse = false); virtual status_t GetNextRef(entry_ref*); virtual int32 GetNextDirents(struct dirent*, size_t, @@ -126,7 +126,7 @@ class TVolWalker : public TNodeWalker { virtual int32 GetNextDirents(struct dirent*, size_t, int32 count = INT_MAX); virtual status_t Rewind(); - + virtual status_t NextVolume(); // skips to the next volume // Note: it would be cool to return const BVolume* @@ -150,13 +150,13 @@ class TQueryWalker : public TWalker { public: TQueryWalker(const char* predicate); virtual ~TQueryWalker(); - + // Does an in-fix walk of all entries virtual status_t GetNextEntry(BEntry*, bool traverse = false); virtual status_t GetNextRef(entry_ref*); virtual int32 GetNextDirents(struct dirent*, size_t, int32 count = INT_MAX); - + virtual status_t NextVolume(); // skips to the next volume virtual status_t Rewind(); @@ -164,7 +164,7 @@ class TQueryWalker : public TWalker { private: virtual int32 CountEntries(); // can't count - + BQuery fQuery; BVolumeRoster fVolRoster; BVolume fVol; diff --git a/src/kits/tracker/OverrideAlert.cpp b/src/kits/tracker/OverrideAlert.cpp index b282b8006f2..6c74d45abef 100644 --- a/src/kits/tracker/OverrideAlert.cpp +++ b/src/kits/tracker/OverrideAlert.cpp @@ -53,7 +53,7 @@ OverrideAlert::OverrideAlert(const char* title, const char* text, fButtonModifiers[1] = modifiers2; fButtonModifiers[2] = modifiers3; UpdateButtons(modifiers(), true); - + BPoint where = OverPosition(Frame().Width(), Frame().Height()); MoveTo(where.x, where.y); } @@ -71,7 +71,7 @@ OverrideAlert::OverrideAlert(const char* title, const char* text, fButtonModifiers[1] = modifiers2; fButtonModifiers[2] = modifiers3; UpdateButtons(modifiers(), true); - + BPoint where = OverPosition(Frame().Width(), Frame().Height()); MoveTo(where.x, where.y); } @@ -89,7 +89,7 @@ OverrideAlert::DispatchMessage(BMessage* message, BHandler* handler) || message->what == B_UNMAPPED_KEY_DOWN || message->what == B_UNMAPPED_KEY_UP) { uint32 modifiers; - if (message->FindInt32("modifiers", (int32*)&modifiers) == B_OK) + if (message->FindInt32("modifiers", (int32*)&modifiers) == B_OK) UpdateButtons(modifiers); } BAlert::DispatchMessage(message, handler); @@ -107,36 +107,36 @@ OverrideAlert::OverPosition(float width, float height) BRect screenFrame; BRect desirableRect; screenFrame = BScreen(window).Frame(); - + if (window) { // If we found a window associated with this calling thread, // place alert over that window so that the first button is // on top of it. This allows name editing confirmations to // work with focus follows mouse -- when the alert goes away, // the underlying window will still have focus. - + desirableRect = window->Frame(); float midX = (desirableRect.left + desirableRect.right) / 2.0f; float midY = (desirableRect.top * 3.0f + desirableRect.bottom) / 4.0f; - + desirableRect.left = midX - ceilf(width / 2.0f); desirableRect.right = desirableRect.left+width; desirableRect.top = midY - ceilf(height / 3.0f); desirableRect.bottom = desirableRect.top + height; - + } else { // Otherwise, just place alert in center of screen. - + desirableRect = screenFrame; float midX = (desirableRect.left + desirableRect.right) / 2.0f; float midY = (desirableRect.top * 3.0f + desirableRect.bottom) / 4.0f; - + desirableRect.left = midX - ceilf(width / 2.0f); desirableRect.right = desirableRect.left + width; desirableRect.top = midY - ceilf(height / 3.0f); desirableRect.bottom = desirableRect.top + height; } - + return desirableRect.LeftTop(); } @@ -146,7 +146,7 @@ OverrideAlert::UpdateButtons(uint32 modifiers, bool force) { if (modifiers == fCurModifiers && !force) return; - + fCurModifiers = modifiers; for (int32 i = 0; i < 3; i++) { BButton* button = ButtonAt(i); diff --git a/src/kits/tracker/Pose.cpp b/src/kits/tracker/Pose.cpp index 7befef57925..88ddbc0c82a 100644 --- a/src/kits/tracker/Pose.cpp +++ b/src/kits/tracker/Pose.cpp @@ -143,7 +143,7 @@ BPose::AddWidget(BPoseView* poseView, BColumn* column) BModelOpener opener(fModel); if (fModel->InitCheck() != B_OK) return NULL; - + BTextWidget* widget = new BTextWidget(fModel, column, poseView); fWidgetList.AddItem(widget); return widget; @@ -157,7 +157,7 @@ BPose::AddWidget(BPoseView* poseView, BColumn* column, opener.OpenNode(); if (fModel->InitCheck() != B_OK) return NULL; - + BTextWidget* widget = new BTextWidget(fModel, column, poseView); fWidgetList.AddItem(widget); return widget; @@ -494,7 +494,7 @@ BPose::PointInPose(const BPoseView* poseView, BPoint where) const return rect.Contains(where); } - + // MINI_ICON_MODE rect calc BRect rect(location, location); rect.right += B_MINI_ICON + kMiniIconSeparator; @@ -502,7 +502,7 @@ BPose::PointInPose(const BPoseView* poseView, BPoint where) const BTextWidget* widget = WidgetFor(poseView->FirstColumn()->AttrHash()); if (widget) rect.right += ceil(widget->TextWidth(poseView) + 1); - + return rect.Contains(where); } @@ -552,14 +552,14 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, return; } else fBackgroundClean = false; - + bool directDraw = (drawView == poseView); bool windowActive = poseView->Window()->IsActive(); bool showSelectionWhenInactive = poseView->fShowSelectionWhenInactive; bool isDrawingSelectionRect = poseView->fIsDrawingSelectionRect; - + ModelNodeLazyOpener modelOpener(fModel); - + if (poseView->ViewMode() == kListMode) { uint32 size = poseView->IconSizeInt(); BRect iconRect(rect); @@ -571,37 +571,37 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, DrawIcon(iconRect.LeftTop(), drawView, poseView->IconSize(), directDraw, !windowActive && !showSelectionWhenInactive); } - + // draw text int32 columnsToDraw = 1; if (fullDraw) columnsToDraw = poseView->CountColumns(); - + for (int32 index = 0; index < columnsToDraw; index++) { BColumn* column = poseView->ColumnAt(index); if (!column) break; - + // if widget doesn't exist, create it BTextWidget* widget = WidgetFor(column, poseView, modelOpener); - + if (widget && widget->IsVisible()) { BRect widgetRect(widget->ColumnRect(rect.LeftTop(), column, poseView)); - + if (updateRect.Intersects(widgetRect)) { BRect widgetTextRect(widget->CalcRect(rect.LeftTop(), column, poseView)); - + bool selectDuringDraw = directDraw && selected && windowActive; - + if (index == 0 && selectDuringDraw) { //draw with dark background to select text drawView->PushState(); drawView->SetLowColor(0, 0, 0); } - + if (index == 0) { widget->Draw(widgetRect, widgetTextRect, column->Width(), poseView, drawView, selected, @@ -611,7 +611,7 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, poseView, drawView, false, fClipboardMode, offset, directDraw); } - + if (index == 0 && selectDuringDraw) drawView->PopState(); else if (index == 0 && selected) { @@ -640,11 +640,11 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, DrawIcon(iconOrigin, drawView, poseView->IconSize(), directDraw, !windowActive && !showSelectionWhenInactive); - + BColumn* column = poseView->FirstColumn(); if (!column) return; - + BTextWidget* widget = WidgetFor(column, poseView, modelOpener); if (!widget || !widget->IsVisible()) return; @@ -653,7 +653,7 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView, bool selectDuringDraw = directDraw && selected && (poseView->IsDesktopWindow() || windowActive); - + if (selectDuringDraw) { // draw with dark background to select text drawView->PushState(); @@ -698,7 +698,7 @@ BPose::DeselectWithoutErasingBackground(BRect, BPoseView* poseView) BColumn* column = poseView->FirstColumn(); if (!column) return; - + BTextWidget* widget = WidgetFor(column->AttrHash()); if (!widget || !widget->IsVisible()) return; diff --git a/src/kits/tracker/PoseList.cpp b/src/kits/tracker/PoseList.cpp index d90e7b077a3..b8058273568 100644 --- a/src/kits/tracker/PoseList.cpp +++ b/src/kits/tracker/PoseList.cpp @@ -126,7 +126,7 @@ PoseList::FindAllPoses(const node_ref* node) const result->AddItem(pose, 0); continue; } - + if (!model->IsSymLink()) continue; @@ -135,7 +135,7 @@ PoseList::FindAllPoses(const node_ref* node) const result->AddItem(pose); continue; } - + if (model == NULL) { Model model(pose->TargetModel()->EntryRef(), true); if (*model.NodeRef() == *node) diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp index 23e356b5afc..cda2c0ee9a8 100644 --- a/src/kits/tracker/PoseView.cpp +++ b/src/kits/tracker/PoseView.cpp @@ -8366,7 +8366,7 @@ BPoseView::OpenParent() void BPoseView::IdentifySelection(bool force) -{ +{ int32 count = fSelectionList->CountItems(); for (int32 index = 0; index < count; index++) { BPose* pose = fSelectionList->ItemAt(index); diff --git a/src/kits/tracker/PoseViewScripting.cpp b/src/kits/tracker/PoseViewScripting.cpp index 0d87eb2ccde..cb9d299acba 100644 --- a/src/kits/tracker/PoseViewScripting.cpp +++ b/src/kits/tracker/PoseViewScripting.cpp @@ -214,7 +214,7 @@ BPoseView::GetSupportedSuites(BMessage* _SCRIPTING_ONLY(data)) BPropertyInfo propertyInfo( const_cast(kPosesPropertyList)); data->AddFlat("messages", &propertyInfo); - + return _inherited::GetSupportedSuites(data); #else return B_UNSUPPORTED; @@ -247,9 +247,9 @@ BPoseView::HandleScriptingMessage(BMessage* _SCRIPTING_ONLY(message)) if (result != B_OK || index == -1) return false; - + ASSERT(property); - + switch (message->what) { case B_CREATE_PROPERTY: handled = CreateProperty(message, &specifier, form, property, @@ -259,12 +259,12 @@ BPoseView::HandleScriptingMessage(BMessage* _SCRIPTING_ONLY(message)) case B_GET_PROPERTY: handled = GetProperty(&specifier, form, property, &reply); break; - + case B_SET_PROPERTY: handled = SetProperty(message, &specifier, form, property, &reply); break; - + case B_COUNT_PROPERTIES: handled = CountProperty(&specifier, form, property, &reply); break; @@ -272,7 +272,7 @@ BPoseView::HandleScriptingMessage(BMessage* _SCRIPTING_ONLY(message)) case B_DELETE_PROPERTY: handled = DeleteProperty(&specifier, form, property, &reply); break; - + case B_EXECUTE_PROPERTY: handled = ExecuteProperty(&specifier, form, property, &reply); break; @@ -300,7 +300,7 @@ BPoseView::ExecuteProperty(BMessage* _SCRIPTING_ONLY(specifier), bool handled = false; if (strcmp(property, kPropertyEntry) == 0) { BMessage launchMessage(B_REFS_RECEIVED); - + if (form == (int32)B_ENTRY_SPECIFIER) { // move all poses specified by entry_ref to Trash entry_ref ref; @@ -574,21 +574,21 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), entry_ref ref; if (specifier->FindRef("data", &ref) != B_OK) break; - + int32 poseIndex; BPose* pose = FindPose(&ref, &poseIndex); - + for (;;) { if (form == (int32)kPreviousSpecifier) pose = PoseAtIndex(--poseIndex); else if (form == (int32)kNextSpecifier) pose = PoseAtIndex(++poseIndex); - + if (!pose) { error = B_ENTRY_NOT_FOUND; break; } - + if (pose->IsSelected()) { reply->AddRef("result", pose->TargetModel()->EntryRef()); @@ -596,7 +596,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), break; } } - + handled = true; break; } @@ -622,7 +622,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), int32 index; if (specifier->FindInt32("index", &index) != B_OK) break; - + if (!PoseAtIndex(index)) { error = B_BAD_INDEX; handled = true; @@ -643,7 +643,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), entry_ref ref; if (specifier->FindRef("data", &ref) != B_OK) break; - + int32 tmp; BPose* pose = FindPose(&ref, form, &tmp); @@ -652,7 +652,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), handled = true; break; } - + reply->AddRef("result", pose->TargetModel()->EntryRef()); reply->AddInt32("index", IndexOfPose(pose)); @@ -661,7 +661,7 @@ BPoseView::GetProperty(BMessage* _SCRIPTING_ONLY(specifier), } } } - + if (error != B_OK) reply->AddInt32("error", error); diff --git a/src/kits/tracker/QueryPoseView.cpp b/src/kits/tracker/QueryPoseView.cpp index b74a3a9f1d3..30723ce1961 100644 --- a/src/kits/tracker/QueryPoseView.cpp +++ b/src/kits/tracker/QueryPoseView.cpp @@ -264,20 +264,20 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) fQueryListContainer = new QueryEntryListCollection(&sourceModel, this, oldPoseList); fCreateOldPoseList = false; - + if (fQueryListContainer->InitCheck() != B_OK) { delete fQueryListContainer; fQueryListContainer = NULL; return NULL; } - + fShowResultsFromTrash = fQueryListContainer->ShowResultsFromTrash(); TTracker::WatchNode(sourceModel.NodeRef(), B_WATCH_NAME | B_WATCH_STAT | B_WATCH_ATTR, this); fQueryList = fQueryListContainer->QueryList(); - + if (fQueryListContainer->DynamicDateQuery()) { // calculate the time to trigger the query refresh - next midnight @@ -328,7 +328,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) PRINT(("%" B_PRId32 " hours, %" B_PRId32 " minutes, %" B_PRId32 " seconds till midnight\n", hoursTillMidnight, minutesTillMidnight, secondsTillMidnight)); - + int32 refreshInSeconds = delta % 60; int32 refreshInMinutes = delta / 60; int32 refreshInHours = refreshInMinutes / 60; @@ -348,7 +348,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref) NewLockingMemberFunctionObject(&BQueryPoseView::Refresh, this), delta); } - + return fQueryListContainer->Clone(); } @@ -603,7 +603,7 @@ status_t QueryEntryListCollection::GetNextEntry(BEntry* entry, bool traverse) { status_t result = B_ERROR; - + for (int32 count = fQueryListRep->fQueryList->CountItems(); fQueryListRep->fQueryListIndex < count; fQueryListRep->fQueryListIndex++) { @@ -641,7 +641,7 @@ status_t QueryEntryListCollection::GetNextRef(entry_ref* ref) { status_t result = B_ERROR; - + for (int32 count = fQueryListRep->fQueryList->CountItems(); fQueryListRep->fQueryListIndex < count; fQueryListRep->fQueryListIndex++) { @@ -660,7 +660,7 @@ status_t QueryEntryListCollection::Rewind() { fQueryListRep->fQueryListIndex = 0; - + return B_OK; } diff --git a/src/kits/tracker/RecentItems.h b/src/kits/tracker/RecentItems.h index 7bfb60c23d2..b40655eaba7 100644 --- a/src/kits/tracker/RecentItems.h +++ b/src/kits/tracker/RecentItems.h @@ -103,7 +103,7 @@ class BRecentFilesList : public BRecentItemsList { const char* ofType = NULL, const char* openedByAppSig = NULL); BRecentFilesList(int32 maxItems, bool navMenuFolders, const char* ofTypeList[], int32 ofTypeListCount, - const char* openedByAppSig = NULL); + const char* openedByAppSig = NULL); virtual ~BRecentFilesList(); // use one of the two NewFileListMenu calls to get an entire menu diff --git a/src/kits/tracker/RegExp.cpp b/src/kits/tracker/RegExp.cpp index bad5947bcc5..15cf7b89f60 100644 --- a/src/kits/tracker/RegExp.cpp +++ b/src/kits/tracker/RegExp.cpp @@ -108,7 +108,7 @@ const uint8 kRegExpMagic = 0234; // of node is a literal string; for others, it is a node leading into a // sub-FSM. In particular, the operand of a kRegExpBranch node is the first // node of the branch. (NB this is* not* a tree structure: the tail of the -// branch connects to the thing following the set of kRegExpBranches). +// branch connects to the thing following the set of kRegExpBranches). // The opcodes are: // diff --git a/src/kits/tracker/RegExp.h b/src/kits/tracker/RegExp.h index 699e0d66ad6..f1021e10fe6 100644 --- a/src/kits/tracker/RegExp.h +++ b/src/kits/tracker/RegExp.h @@ -108,12 +108,12 @@ class RegExp { RegExp(const char*); RegExp(const BString&); ~RegExp(); - + status_t InitCheck() const; - + status_t SetTo(const char*); status_t SetTo(const BString &); - + bool Matches(const char* string) const; bool Matches(const BString &) const; diff --git a/src/kits/tracker/Settings.cpp b/src/kits/tracker/Settings.cpp index 99df1bbeb72..0c20b53dade 100644 --- a/src/kits/tracker/Settings.cpp +++ b/src/kits/tracker/Settings.cpp @@ -97,7 +97,7 @@ StringValueSetting::Handle(const char* const* argv) { if (!*++argv) return fValueExpectedErrorString; - + ValueChanged(*argv); return 0; } diff --git a/src/kits/tracker/SettingsHandler.cpp b/src/kits/tracker/SettingsHandler.cpp index 32f4fb84b1d..ca42949c91d 100644 --- a/src/kits/tracker/SettingsHandler.cpp +++ b/src/kits/tracker/SettingsHandler.cpp @@ -91,7 +91,7 @@ ArgvParser::MakeArgvEmpty() // done with current argv, free it up for (int32 index = 0; index < fArgc; index++) delete[] fCurrentArgv[index]; - + fArgc = 0; } @@ -125,7 +125,7 @@ ArgvParser::NextArgv() } fCurrentArgs[++fCurrentArgsPos] = '\0'; // terminate current arg pos - + // copy it as a string to the current argv slot fCurrentArgv[fArgc] = new char [strlen(fCurrentArgs) + 1]; strcpy(fCurrentArgv[fArgc], fCurrentArgs); @@ -409,7 +409,7 @@ Settings::MakeSettingsDirectory(BDirectory* resultingSettingsDir) BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path, true) != B_OK) return; - + // make sure there is a directory // mkdir() will only make one leaf at a time, unfortunately path.Append(fSettingsDir); diff --git a/src/kits/tracker/SettingsHandler.h b/src/kits/tracker/SettingsHandler.h index 6b959f2a3c7..6f5a1c88bd3 100644 --- a/src/kits/tracker/SettingsHandler.h +++ b/src/kits/tracker/SettingsHandler.h @@ -85,7 +85,7 @@ class ArgvParser { FILE* fFile; char* fBuffer; int32 fPos; - + int fArgc; char** fCurrentArgv; @@ -108,7 +108,7 @@ class SettingsArgvDispatcher { virtual ~SettingsArgvDispatcher() {}; void SaveSettings(Settings* settings, bool onlyIfNonDefault); - + const char* Name() const { return name; } // name as it appears in the settings file diff --git a/src/kits/tracker/SlowContextPopup.cpp b/src/kits/tracker/SlowContextPopup.cpp index 814ba39f299..5b1a4237f54 100644 --- a/src/kits/tracker/SlowContextPopup.cpp +++ b/src/kits/tracker/SlowContextPopup.cpp @@ -134,7 +134,7 @@ BSlowContextMenu::SetNavDir(const entry_ref* ref) { ForceRebuild(); // reset the slow menu building mechanism so we can add more stuff - + fNavDir = *ref; } @@ -188,7 +188,7 @@ BSlowContextMenu::AddDynamicItem(add_state state) { if (fMenuBuilt) return false; - + if (state == B_ABORT) { ClearMenuBuildingState(); return false; @@ -229,7 +229,7 @@ BSlowContextMenu::StartBuildingItemList() } fIteratingDesktop = false; - + BDirectory parent; status_t err = entry.GetParent(&parent); fItemList = new BObjectList(50); @@ -308,7 +308,7 @@ BSlowContextMenu::AddNextItem() BuildVolumeMenu(); return false; } - + // limit nav menus to 500 items only if (fItemList->CountItems() > 500) return false; @@ -332,7 +332,7 @@ BSlowContextMenu::AddNextItem() } model.CloseNode(); - + if (!BPoseView::PoseVisible(&model, &poseInfo)) { return true; } @@ -367,7 +367,7 @@ BSlowContextMenu::NewModelItem(Model* model, const BMessage* invokeMessage, entry_ref ref; bool container = false; if (model->IsSymLink()) { - + Model* newResolvedModel = NULL; Model* result = model->LinkTo(); @@ -379,21 +379,21 @@ BSlowContextMenu::NewModelItem(Model* model, const BMessage* invokeMessage, delete newResolvedModel; newResolvedModel = NULL; } - + result = newResolvedModel; } if (result) { BModelOpener opener(result); // open the model, if it ain't open already - + PoseInfo poseInfo; - + if (result->Node()) { result->Node()->ReadAttr(kAttrPoseInfo, B_RAW_TYPE, 0, &poseInfo, sizeof(poseInfo)); } - + result->CloseNode(); ref = *result->EntryRef(); @@ -421,7 +421,7 @@ BSlowContextMenu::NewModelItem(Model* model, const BMessage* invokeMessage, } else { BNavMenu* menu = new BNavMenu(truncatedString.String(), invokeMessage->what, target, parentWindow, typeslist); - + menu->SetNavDir(&ref); if (hook) menu->InitTrackingHook(hook->fTrackingHook, &(hook->fTarget), @@ -443,10 +443,10 @@ BSlowContextMenu::BuildVolumeMenu() roster.Rewind(); while (roster.GetNextVolume(&volume) == B_OK) { - + if (!volume.IsPersistent()) continue; - + BDirectory startDir; if (volume.GetRootDirectory(&startDir) == B_OK) { BEntry entry; @@ -457,7 +457,7 @@ BSlowContextMenu::BuildVolumeMenu() delete model; continue; } - + BNavMenu* menu = new BNavMenu(model->Name(), fMessage.what, fMessenger, fParentWindow, fTypesList); diff --git a/src/kits/tracker/SlowContextPopup.h b/src/kits/tracker/SlowContextPopup.h index c29769b6d58..31fac100955 100644 --- a/src/kits/tracker/SlowContextPopup.h +++ b/src/kits/tracker/SlowContextPopup.h @@ -50,9 +50,9 @@ class BSlowContextMenu : public BPopUpMenu { virtual void DetachedFromWindow(); void SetNavDir(const entry_ref*); - + void ClearMenu(); - + void ForceRebuild(); bool NeedsToRebuild() const; // will cause menu to get rebuilt next time it is shown diff --git a/src/kits/tracker/SlowMenu.cpp b/src/kits/tracker/SlowMenu.cpp index 45a4f52c0ce..7077a5f6428 100644 --- a/src/kits/tracker/SlowMenu.cpp +++ b/src/kits/tracker/SlowMenu.cpp @@ -52,7 +52,7 @@ BSlowMenu::AddDynamicItem(add_state state) { if (fMenuBuilt) return false; - + if (state == B_ABORT) { ClearMenuBuildingState(); return false; diff --git a/src/kits/tracker/TaskLoop.h b/src/kits/tracker/TaskLoop.h index 5282ef838dd..e5c0014d19e 100644 --- a/src/kits/tracker/TaskLoop.h +++ b/src/kits/tracker/TaskLoop.h @@ -69,7 +69,7 @@ class OneShotDelayedTask : public DelayedTask { public: OneShotDelayedTask(FunctionObject* functor, bigtime_t delay); virtual ~OneShotDelayedTask(); - + virtual bool RunIfNeeded(bigtime_t currentTime); protected: @@ -196,7 +196,7 @@ class TaskLoop { bool Pulse(); // return true if quitting bigtime_t LatestRunTime() const; - + virtual bool KeepPulsingWhenEmpty() const = 0; virtual void StartPulsingIfNeeded() = 0; @@ -226,7 +226,7 @@ class StandAloneTaskLoop : public TaskLoop { volatile bool fNeedToQuit; volatile thread_id fScanThread; bool fKeepThread; - + typedef TaskLoop _inherited; }; @@ -243,7 +243,7 @@ class PiggybackTaskLoop : public TaskLoop { private: virtual bool KeepPulsingWhenEmpty() const; virtual void StartPulsingIfNeeded(); - + bigtime_t fNextHeartBeatTime; bool fPulseMe; }; diff --git a/src/kits/tracker/TemplatesMenu.cpp b/src/kits/tracker/TemplatesMenu.cpp index 20dfc36cbf1..eda9cedc972 100644 --- a/src/kits/tracker/TemplatesMenu.cpp +++ b/src/kits/tracker/TemplatesMenu.cpp @@ -164,7 +164,7 @@ TemplatesMenu::BuildMenu(bool addItems) entry_ref ref; entry.GetRef(&ref); - + BMessage* message = new BMessage(kNewEntryFromTemplate); message->AddRef("refs_template", &ref); message->AddString("name", fileName); diff --git a/src/kits/tracker/TextWidget.cpp b/src/kits/tracker/TextWidget.cpp index 1713031a3a0..8a63e861812 100644 --- a/src/kits/tracker/TextWidget.cpp +++ b/src/kits/tracker/TextWidget.cpp @@ -229,7 +229,7 @@ BTextWidget::CheckExpiration() get_click_speed(&doubleClickSpeed); bigtime_t delta = system_time() - fLastClickedTime; - + if (delta > doubleClickSpeed) { // at least 'doubleClickSpeed' microseconds ellapsed and no click // was registered since. @@ -278,7 +278,7 @@ BTextWidget::MouseUp(BRect bounds, BPoseView* view, BPose* pose, BPoint) fParams.pose = pose; fParams.bounds = bounds; - fParams.poseView = view; + fParams.poseView = view; } else fLastClickedTime = 0; } diff --git a/src/kits/tracker/TextWidget.h b/src/kits/tracker/TextWidget.h index 1c3e9df9802..6571ec168bd 100644 --- a/src/kits/tracker/TextWidget.h +++ b/src/kits/tracker/TextWidget.h @@ -66,7 +66,7 @@ class BTextWidget { // and current drawing view are different void MouseUp(BRect bounds, BPoseView*, BPose*, BPoint mouseLoc); - + BRect CalcRect(BPoint poseLoc, const BColumn*, const BPoseView*); // returns the rect derived from the formatted string width // may force WidgetAttributeText recalculation @@ -79,7 +79,7 @@ class BTextWidget { BRect CalcOldRect(BPoint poseLoc, const BColumn*, const BPoseView*); // after an update call this to determine the old rect so that // we can invalidate properly - + void StartEdit(BRect bounds, BPoseView*, BPose*); void StopEdit(bool saveChanges, BPoint loc, BPoseView*, BPose*, int32 index); @@ -104,7 +104,7 @@ class BTextWidget { void CheckExpiration(); void CancelWait(); - + private: BRect CalcRectCommon(BPoint poseLoc, const BColumn*, const BPoseView*, float width); @@ -118,7 +118,7 @@ class BTextWidget { bool fVisible : 1; bool fActive : 1; bool fSymLink : 1; - + bigtime_t fLastClickedTime; struct MouseUpParams fParams; }; diff --git a/src/kits/tracker/TitleView.cpp b/src/kits/tracker/TitleView.cpp index a0838d9ef94..471e9b19a63 100644 --- a/src/kits/tracker/TitleView.cpp +++ b/src/kits/tracker/TitleView.cpp @@ -235,7 +235,7 @@ BTitleView::Draw(BRect /*updateRect*/, bool useOffscreen, bool updateOnly, // fill background with light gray background if (!updateOnly) view->FillRect(bounds, B_SOLID_LOW); - + view->BeginLineArray(4); view->AddLine(bounds.LeftTop(), bounds.RightTop(), sShadowColor); view->AddLine(bounds.LeftBottom(), bounds.RightBottom(), @@ -399,7 +399,7 @@ BTitleView::MouseMoved(BPoint where, uint32 code, const BMessage* message) else SetViewCursor(B_CURSOR_SYSTEM_DEFAULT); break; - + case B_EXITED_VIEW: SetViewCursor(B_CURSOR_SYSTEM_DEFAULT); break; @@ -546,10 +546,10 @@ BColumnTitle::Draw(BView* view, bool pressed) triangle[1] = center + BPoint(3.5, -1.5); triangle[2] = center + BPoint(0.0, 2.0); } - + uint32 flags = view->Flags(); view->SetFlags(flags | B_SUBPIXEL_PRECISE); - + if (secondary) { view->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), 1.3)); @@ -559,7 +559,7 @@ BColumnTitle::Draw(BView* view, bool pressed) 1.6)); view->FillTriangle(triangle[0], triangle[1], triangle[2]); } - + view->SetFlags(flags); } @@ -579,7 +579,7 @@ BColumnTitle::Draw(BView* view, bool pressed) pressed ? sLightShadowColor : sLightShadowColor); view->AddLine(rect.LeftTop(), rect.RightTop(), pressed ? sDarkShadowColor : sShineColor); - + view->AddLine(rect.LeftTop(), rect.LeftBottom(), pressed ? sDarkShadowColor : sShineColor); view->AddLine(rect.RightTop(), rect.RightBottom(), @@ -820,7 +820,7 @@ ColumnDragState::Moved(BPoint where, uint32) } else drawOutline = true; } - + if (drawOutline) DrawOutline(where.x - fInitialMouseTrackOffset); else if (undrawOutline) @@ -845,7 +845,7 @@ ColumnDragState::Clicked(BPoint /*where*/) uint32 primarySort = poseView->PrimarySort(); uint32 secondarySort = poseView->SecondarySort(); bool shift = (modifiers() & B_SHIFT_KEY) != 0; - + // For now: // if we hit the primary sort field again // then if shift key was down, switch primary and secondary diff --git a/src/kits/tracker/TitleView.h b/src/kits/tracker/TitleView.h index 9df1d201411..9ad50f2dc10 100644 --- a/src/kits/tracker/TitleView.h +++ b/src/kits/tracker/TitleView.h @@ -85,7 +85,7 @@ class BTitleView : public BView { protected: void MouseMoved(BPoint, uint32, const BMessage*); - + private: BColumnTitle* FindColumnTitle(BPoint) const; BColumnTitle* InColumnResizeArea(BPoint) const; @@ -100,7 +100,7 @@ class BTitleView : public BView { ColumnTrackState* fTrackingState; static OffscreenBitmap* sOffscreen; - + typedef BView _inherited; friend class ColumnTrackState; @@ -112,7 +112,7 @@ class BColumnTitle { public: BColumnTitle(BTitleView*, BColumn*); virtual ~BColumnTitle() {} - + virtual void Draw(BView*, bool pressed = false); BColumn* Column() const; diff --git a/src/kits/tracker/Tracker.cpp b/src/kits/tracker/Tracker.cpp index e327762bdfc..021fff7aea1 100644 --- a/src/kits/tracker/Tracker.cpp +++ b/src/kits/tracker/Tracker.cpp @@ -233,7 +233,7 @@ TTracker::TTracker() setrlimit(RLIMIT_NOFILE, &rl); fNodeMonitorCount = DEFAULT_MON_NUM; - + gLocalizedNamePreferred = BLocaleRoster::Default()->IsFilesystemTranslationPreferred(); diff --git a/src/kits/tracker/TrackerScripting.cpp b/src/kits/tracker/TrackerScripting.cpp index 421b0549da5..86ea02d41b6 100644 --- a/src/kits/tracker/TrackerScripting.cpp +++ b/src/kits/tracker/TrackerScripting.cpp @@ -237,7 +237,7 @@ TTracker::DeleteProperty(BMessage* /*specifier*/, int32 form, if (form != B_DIRECT_SPECIFIER) // only support direct specifier return false; - + // empty the trash FSEmptyTrash(); return true; @@ -293,11 +293,11 @@ bool TTracker::ExecuteProperty(BMessage*, int32 form, const char* property, BMessage*) { if (strcmp(property, kPropertyPreferences) == 0) { - + if (form != B_DIRECT_SPECIFIER) // only support direct specifier return false; - + ShowSettingsWindow(); return true; diff --git a/src/kits/tracker/TrackerSettings.h b/src/kits/tracker/TrackerSettings.h index efec805a58c..78f2f335e54 100644 --- a/src/kits/tracker/TrackerSettings.h +++ b/src/kits/tracker/TrackerSettings.h @@ -76,7 +76,7 @@ class TrackerSettings { void SetMountSharedVolumesOntoDesktop(bool); bool EjectWhenUnmounting(); void SetEjectWhenUnmounting(bool); - + bool ShowVolumeSpaceBar(); void SetShowVolumeSpaceBar(bool); rgb_color UsedSpaceColor(); @@ -85,7 +85,7 @@ class TrackerSettings { void SetFreeSpaceColor(rgb_color color); rgb_color WarningSpaceColor(); void SetWarningSpaceColor(rgb_color color); - + bool ShowFullPathInTitleBar(); void SetShowFullPathInTitleBar(bool); bool SortFolderNamesFirst(); diff --git a/src/kits/tracker/TrackerSettingsWindow.cpp b/src/kits/tracker/TrackerSettingsWindow.cpp index 4be73c1bc30..66267a60d38 100644 --- a/src/kits/tracker/TrackerSettingsWindow.cpp +++ b/src/kits/tracker/TrackerSettingsWindow.cpp @@ -195,12 +195,12 @@ TrackerSettingsWindow::_ViewAt(int32 i) { if (!Lock()) return NULL; - + SettingsItem* item = dynamic_cast (fSettingsTypeListView->ItemAt(i)); - + Unlock(); - + return item->View(); } @@ -227,7 +227,7 @@ TrackerSettingsWindow::_UpdateButtons() defaultable |= _ViewAt(i)->IsDefaultable(); revertable |= _ViewAt(i)->IsRevertable(); } - + fDefaultsButton->SetEnabled(defaultable); fRevertButton->SetEnabled(revertable); } @@ -237,7 +237,7 @@ void TrackerSettingsWindow::_HandlePressedDefaultsButton() { int32 itemCount = fSettingsTypeListView->CountItems(); - + for (int32 i = 0; i < itemCount; i++) { if (_ViewAt(i)->IsDefaultable()) _ViewAt(i)->SetDefaults(); diff --git a/src/kits/tracker/TrackerString.cpp b/src/kits/tracker/TrackerString.cpp index 175c1c90894..201c4490691 100644 --- a/src/kits/tracker/TrackerString.cpp +++ b/src/kits/tracker/TrackerString.cpp @@ -73,13 +73,13 @@ TrackerString::Matches(const char* string, bool caseSensitivity, default: case kNone: return false; - + case kStartsWith: return StartsWith(string, caseSensitivity); - + case kEndsWith: return EndsWith(string, caseSensitivity); - + case kContains: return Contains(string, caseSensitivity); @@ -97,14 +97,14 @@ TrackerString::MatchesRegExp(const char* pattern, bool caseSensitivity) const { BString patternString(pattern); BString textString(String()); - + if (caseSensitivity == false) { patternString.ToLower(); textString.ToLower(); } - + RegExp expression(patternString); - + if (expression.InitCheck() != B_OK) return false; @@ -127,7 +127,7 @@ TrackerString::EndsWith(const char* string, bool caseSensitivity) const int32 position = Length() - (int32)strlen(string); if (position < 0) return false; - + if (caseSensitivity) return FindLast(string) == position; else @@ -442,7 +442,7 @@ TrackerString::MatchesBracketExpression(const char* string, bool inverse = *pattern == '^' || *pattern == '!'; // We allow both ^ and ! as a initial inverting character. - + if (inverse) pattern++; @@ -533,7 +533,7 @@ TrackerString::StringMatchesPattern(const char* string, const char* pattern, string = MoveToEndOfGlyph(string); } } - + if (*pattern == '\0') { // An ending * matches all strings. return true; @@ -588,7 +588,7 @@ TrackerString::StringMatchesPattern(const char* string, const char* pattern, } break; } - + case '[': pattern++; @@ -603,7 +603,7 @@ TrackerString::StringMatchesPattern(const char* string, const char* pattern, // Skip the rest of the bracket: while (*pattern != ']' && *pattern != '\0') pattern++; - + // Failure if no closing bracket; if (*pattern == '\0') return false; diff --git a/src/kits/tracker/TrackerString.h b/src/kits/tracker/TrackerString.h index 0fb890c5297..be9929f3a34 100644 --- a/src/kits/tracker/TrackerString.h +++ b/src/kits/tracker/TrackerString.h @@ -70,7 +70,7 @@ class TrackerString : public BString bool MatchesRegExp(const char*, bool caseSensitivity = true) const; bool MatchesRegExp(const RegExp&) const; bool MatchesRegExp(const RegExp*) const; - + bool MatchesGlob(const char*, bool caseSensitivity = false) const; bool EndsWith(const char*, bool caseSensitivity = false) const; bool StartsWith(const char*, bool caseSensitivity = false) const; @@ -106,13 +106,13 @@ class TrackerString : public BString // Not counting start! bool IsStartOfGlyph(char) const; const char* MoveToEndOfGlyph(const char*) const; - + // Functions for Glob matching: bool MatchesBracketExpression(const char* string, const char* pattern, bool caseSensitivity) const; bool StringMatchesPattern(const char* string, const char* pattern, bool caseSensitivity) const; - + char ConditionalToLower(char c, bool toLower) const; bool CharsAreEqual(char char1, char char2, bool toLower) const; bool UTF8CharsAreEqual(const char* string1, const char* string2) const; @@ -124,7 +124,7 @@ TrackerString::MatchesRegExp(const RegExp* expression) const { if (expression == NULL || expression->InitCheck() != B_OK) return false; - + return expression->Matches(*this); } @@ -134,7 +134,7 @@ TrackerString::MatchesRegExp(const RegExp &expression) const { if (expression.InitCheck() != B_OK) return false; - + return expression.Matches(*this); } diff --git a/src/kits/tracker/TrashWatcher.cpp b/src/kits/tracker/TrashWatcher.cpp index c5ce5a7d558..7143fbb82bd 100644 --- a/src/kits/tracker/TrashWatcher.cpp +++ b/src/kits/tracker/TrashWatcher.cpp @@ -172,7 +172,7 @@ BTrashWatcher::UpdateTrashIcons() const void* vectorData = GetTrackerResources()->LoadResource( B_VECTOR_ICON_TYPE, fTrashFull ? R_TrashFullIcon : R_TrashIcon, &vectorSize); - + if (vectorData) { trashDir.WriteAttr(kAttrIcon, B_VECTOR_ICON_TYPE, 0, vectorData, vectorSize); @@ -185,7 +185,7 @@ BTrashWatcher::UpdateTrashIcons() largeData, largeSize); } else TRESPASS(); - + if (smallData) { trashDir.WriteAttr(kAttrMiniIcon, 'MICN', 0, smallData, smallSize); diff --git a/src/kits/tracker/TrashWatcher.h b/src/kits/tracker/TrashWatcher.h index 789666a9a4b..ef0e2d324ad 100644 --- a/src/kits/tracker/TrashWatcher.h +++ b/src/kits/tracker/TrashWatcher.h @@ -53,7 +53,7 @@ class BTrashWatcher : public BLooper { protected: virtual void MessageReceived(BMessage*); - + private: void WatchTrashDirs(); void UpdateTrashIcons(); diff --git a/src/kits/tracker/ViewState.h b/src/kits/tracker/ViewState.h index 8284a282939..40484e390e5 100644 --- a/src/kits/tracker/ViewState.h +++ b/src/kits/tracker/ViewState.h @@ -151,10 +151,10 @@ class BViewState { uint32 fPrimarySortType; uint32 fSecondarySortType; bool fReverseSort; - + void _Init(); void _StorePreviousState(); - + uint32 fPreviousViewMode; uint32 fPreviousLastIconMode; uint32 fPreviousIconSize; From 630404be03b9422bc35c437ade7cba21142138a1 Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Wed, 2 Jan 2013 11:33:14 +0000 Subject: [PATCH 06/10] Automatic white space cleanup. No functional change. --- src/apps/installer/InstallerApp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/installer/InstallerApp.cpp b/src/apps/installer/InstallerApp.cpp index 22b7ee6e1b4..e48f0cae46f 100644 --- a/src/apps/installer/InstallerApp.cpp +++ b/src/apps/installer/InstallerApp.cpp @@ -183,7 +183,7 @@ InstallerApp::ReadyToRun() infoText << B_TRANSLATE( "NOTE: While the naming strategy for hard disks is still as described " "under 2.1) the naming scheme for partitions has changed.\n\n"); - infoText << B_TRANSLATE( + infoText << B_TRANSLATE( "GRUB's naming scheme is still: (hdN,n)\n\n"); infoText << B_TRANSLATE( "All hard disks start with \"hd\".\n"); From 87d333ee131f27cbab8bac9ee778865efba69fb6 Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Wed, 2 Jan 2013 11:34:09 +0000 Subject: [PATCH 07/10] Make the EULA and Installer appear on all workspaces. Fixes #9287 --- src/apps/installer/InstallerApp.cpp | 4 ++-- src/apps/installer/InstallerWindow.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/installer/InstallerApp.cpp b/src/apps/installer/InstallerApp.cpp index e48f0cae46f..a4e72373be6 100644 --- a/src/apps/installer/InstallerApp.cpp +++ b/src/apps/installer/InstallerApp.cpp @@ -250,8 +250,8 @@ InstallerApp::ReadyToRun() BRect eulaFrame = BRect(0, 0, 600, 450); fEULAWindow = new BWindow(eulaFrame, B_TRANSLATE("README"), - B_MODAL_WINDOW, B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE - | B_AUTO_UPDATE_SIZE_LIMITS); + B_MODAL_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, B_NOT_ZOOMABLE + | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS, B_ALL_WORKSPACES); BLayoutBuilder::Group<>(fEULAWindow, B_VERTICAL, 10) .SetInsets(10) diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp index 4dd4899640d..a43fe39826d 100644 --- a/src/apps/installer/InstallerWindow.cpp +++ b/src/apps/installer/InstallerWindow.cpp @@ -157,7 +157,7 @@ InstallerWindow::InstallerWindow() : BWindow(BRect(-2000, -2000, -1800, -1800), B_TRANSLATE_SYSTEM_NAME("Installer"), B_TITLED_WINDOW, - B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS), + B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, B_ALL_WORKSPACES), fEncouragedToSetupPartitions(false), fDriveSetupLaunched(false), fBootManagerLaunched(false), From 1565964a118a8c28bfa98ce6347ffdf22c2f1446 Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Thu, 3 Jan 2013 08:26:20 +0000 Subject: [PATCH 08/10] Show Installer on all workspaces when Tracker isn't running. This applies to the EULA window as well. Addresses #9287:comment:5 --- src/apps/installer/InstallerApp.cpp | 8 +++++++- src/apps/installer/InstallerWindow.cpp | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/apps/installer/InstallerApp.cpp b/src/apps/installer/InstallerApp.cpp index a4e72373be6..8f16d340150 100644 --- a/src/apps/installer/InstallerApp.cpp +++ b/src/apps/installer/InstallerApp.cpp @@ -10,9 +10,12 @@ #include #include #include +#include #include #include +#include "tracker_private.h" + static const uint32 kMsgAgree = 'agre'; @@ -251,7 +254,10 @@ InstallerApp::ReadyToRun() BRect eulaFrame = BRect(0, 0, 600, 450); fEULAWindow = new BWindow(eulaFrame, B_TRANSLATE("README"), B_MODAL_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, B_NOT_ZOOMABLE - | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS, B_ALL_WORKSPACES); + | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS); + + if (!be_roster->IsRunning(kTrackerSignature)) + fEULAWindow->SetWorkspaces(B_ALL_WORKSPACES); BLayoutBuilder::Group<>(fEULAWindow, B_VERTICAL, 10) .SetInsets(10) diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp index a43fe39826d..251f4f57e3d 100644 --- a/src/apps/installer/InstallerWindow.cpp +++ b/src/apps/installer/InstallerWindow.cpp @@ -157,7 +157,7 @@ InstallerWindow::InstallerWindow() : BWindow(BRect(-2000, -2000, -1800, -1800), B_TRANSLATE_SYSTEM_NAME("Installer"), B_TITLED_WINDOW, - B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, B_ALL_WORKSPACES), + B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS), fEncouragedToSetupPartitions(false), fDriveSetupLaunched(false), fBootManagerLaunched(false), @@ -165,6 +165,9 @@ InstallerWindow::InstallerWindow() fWorkerThread(new WorkerThread(this)), fCopyEngineCancelSemaphore(-1) { + if (!be_roster->IsRunning(kTrackerSignature)) + SetWorkspaces(B_ALL_WORKSPACES); + LogoView* logoView = new LogoView(); fStatusView = new BTextView("statusView", be_plain_font, NULL, From a0e655bff13f418f714840beebf6221008520d55 Mon Sep 17 00:00:00 2001 From: Hamish Morrison Date: Thu, 3 Jan 2013 19:59:32 +0000 Subject: [PATCH 09/10] Fix BWindow::DecoratorFrame for top-titled windows. Also take into account the border width for the edge with the title. Fixes #8614. --- src/kits/interface/Window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 78089889e21..10cd771a538 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -2139,13 +2139,13 @@ BWindow::DecoratorFrame() const // else use fall-back values from above } - if (fLook & kLeftTitledWindowLook) { + if (fLook == kLeftTitledWindowLook) { decoratorFrame.top -= borderWidth; - decoratorFrame.left -= tabRect.Width(); + decoratorFrame.left -= borderWidth + tabRect.Width(); decoratorFrame.right += borderWidth; decoratorFrame.bottom += borderWidth; } else { - decoratorFrame.top -= tabRect.Height(); + decoratorFrame.top -= borderWidth + tabRect.Height(); decoratorFrame.left -= borderWidth; decoratorFrame.right += borderWidth; decoratorFrame.bottom += borderWidth; From d6b2fbac191c0531f6dfc8bd68c71d326d985317 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Thu, 3 Jan 2013 16:54:35 -0600 Subject: [PATCH 10/10] libglu: Make sure glu.h gets placed into image * Resolves #9323 --- build/jam/HaikuImage | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index fb77abdbe61..020b9fc39cc 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -751,10 +751,12 @@ CopyDirectoryToHaikuImage develop sample-code : [ FDirName $(HAIKU_TOP) src libs pdflib bind pdflib ] : pdflib ; -# Copy Mesa3D GL headers into image +# Copy OpenGL kit headers into image if $(TARGET_ARCH) = x86 { CopyDirectoryToHaikuImage develop headers os opengl : [ FDirName $(HAIKU_MESA_HEADERS) GL ] ; + CopyDirectoryToHaikuImage develop headers os opengl + : [ FDirName $(HAIKU_GLU_HEADERS) GL ] ; } #pragma mark - Optional Packages