Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/FSUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ status_t FSDeleteFolder(BEntry *, CopyLoopControl *, bool updateStatus,
status_t FSCopyAttributesAndStats(BNode *, BNode *);

void FSDuplicate(BObjectList<entry_ref> *srcList, BList *pointList);
void FSMoveToFolder(BObjectList<entry_ref> *srcList, BEntry *, uint32 moveMode,
void FSMoveToFolder(BObjectList<entry_ref, true> *srcList, BEntry *, uint32 moveMode,
BList *pointList = NULL);
void FSMakeOriginalName(char *name, BDirectory *destDir, const char *suffix);
bool FSIsTrashDir(const BEntry *);
Expand All @@ -164,7 +164,7 @@ bool FSIsDeskDir(const BEntry *);
bool FSIsSystemDir(const BEntry *);
bool FSIsBeOSDir(const BEntry *);
bool FSIsHomeDir(const BEntry *);
void FSMoveToTrash(BObjectList<entry_ref> *srcList, BList *pointList = NULL,
void FSMoveToTrash(BObjectList<entry_ref, true> *srcList, BList *pointList = NULL,
bool asynch = true);
// Deprecated
// only returns actual result if asynch false
Expand Down
4 changes: 2 additions & 2 deletions source/InnerPanelIcons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ status_t TTrackerIcon::DroppedSomething( const BMessage *message )
BEntry entry( &fRef, true );
if ( entry.IsDirectory() )
{
BObjectList<entry_ref> *list = new BObjectList<entry_ref>();
BObjectList<entry_ref, true> *list = new BObjectList<entry_ref, true>();
entry_ref ref;
int i;
for ( i=0; ; i++ )
Expand Down Expand Up @@ -1506,7 +1506,7 @@ status_t TTrashIcon::DroppedSomething( const BMessage *message )
{
if ( message->what == B_SIMPLE_DATA )
{
BObjectList<entry_ref> *list = new BObjectList<entry_ref>();
BObjectList<entry_ref, true> *list = new BObjectList<entry_ref, true>();
entry_ref ref;
int i;
for ( i=0; ; i++ )
Expand Down
24 changes: 12 additions & 12 deletions source/LockingList2.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

namespace BPrivate {

template <class T>
class LockingList2 : public BObjectList<T> {
template <class T, bool Owning = false>
class LockingList2 : public BObjectList<T, Owning> {
public:
LockingList2(int32 itemsPerBlock = 20, bool owning = false);
LockingList2(int32 itemsPerBlock = 20);
~LockingList2()
{
Lock();
Expand All @@ -24,29 +24,29 @@ class LockingList2 : public BObjectList<T> {
BLocker lock;
};

template<class T>
LockingList2<T>::LockingList2(int32 itemsPerBlock, bool owning)
: BObjectList<T>(itemsPerBlock, owning)
template<class T, bool O>
LockingList2<T, O>::LockingList2(int32 itemsPerBlock)
: BObjectList<T, O>(itemsPerBlock)
{
}

template<class T>
template<class T, bool O>
bool
LockingList2<T>::Lock()
LockingList2<T, O>::Lock()
{
return lock.Lock();
}

template<class T>
template<class T, bool O>
void
LockingList2<T>::Unlock()
LockingList2<T, O>::Unlock()
{
lock.Unlock();
}

template<class T>
template<class T, bool O>
bool
LockingList2<T>::IsLocked() const
LockingList2<T, O>::IsLocked() const
{
return lock.IsLocked();
}
Expand Down
28 changes: 14 additions & 14 deletions source/NavMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ All rights reserved.
#include "SlowMenu.h"


template<class T> class BObjectList;
template<class T, bool O> class BObjectList;
class BMenuItem;

namespace BPrivate {
Expand Down Expand Up @@ -75,9 +75,9 @@ class TrackingHookData {
class BNavMenu : public BSlowMenu {
public:
BNavMenu(const char* title, uint32 message, const BHandler *,
BWindow *parentWindow = NULL, const BObjectList<BString> *list = NULL);
BWindow* parentWindow = NULL, const BStringList* list = NULL);
BNavMenu(const char* title, uint32 message, const BMessenger &,
BWindow *parentWindow = NULL, const BObjectList<BString> *list = NULL);
BWindow* parentWindow = NULL, const BStringList* list = NULL);
// parentWindow, if specified, will be closed if nav menu item invoked
// with option held down

Expand All @@ -95,8 +95,8 @@ class BNavMenu : public BSlowMenu {
void SetTarget(const BMessenger &);
BMessenger Target();

void SetTypesList(const BObjectList<BString> *list);
const BObjectList<BString> *TypesList() const;
void SetTypesList(const BStringList* list);
const BStringList* TypesList() const;

void AddNavDir(const Model *model, uint32 what, BHandler *target,
bool populateSubmenu);
Expand All @@ -110,10 +110,10 @@ class BNavMenu : public BSlowMenu {
static int CompareFolderNamesFirstOne(const BMenuItem *, const BMenuItem *);
static int CompareOne(const BMenuItem *, const BMenuItem *);

static ModelMenuItem *NewModelItem(Model *, const BMessage *, const BMessenger &,
bool suppressFolderHierarchy=false, BContainerWindow * = NULL,
const BObjectList<BString> *typeslist = NULL,
TrackingHookData *hook = NULL);
static ModelMenuItem* NewModelItem(Model*, const BMessage*,
const BMessenger&, bool suppressFolderHierarchy = false,
BContainerWindow* = NULL, const BStringList* typeslist = NULL,
TrackingHookData* hook = NULL);

TrackingHookData *InitTrackingHook(bool (*hookfunction)(BMenu *, void *),
const BMessenger *target, const BMessage *dragMessage);
Expand All @@ -137,11 +137,11 @@ class BNavMenu : public BSlowMenu {

// menu building state
uint8 fFlags;
BObjectList<BMenuItem> *fItemList;
BObjectList<BMenuItem, false>* fItemList;
EntryListBase *fContainer;
bool fIteratingDesktop;

const BObjectList<BString> *fTypesList;
BStringList* fTypesList;

TrackingHookData fTrackingHook;
};
Expand All @@ -154,11 +154,11 @@ class BNavMenu : public BSlowMenu {
bool SpringLoadedFolderCompareMessages(const BMessage *incoming,
const BMessage *dragmessage);
void SpringLoadedFolderSetMenuStates(const BMenu *menu,
const BObjectList<BString> *typeslist);
const BStringList *typeslist);
void SpringLoadedFolderAddUniqueTypeToList(entry_ref *ref,
BObjectList<BString> *typeslist);
BStringList *typeslist);
void SpringLoadedFolderCacheDragData(const BMessage *incoming,
BMessage **, BObjectList<BString> **typeslist);
BMessage **, BStringList **typeslist);

} // namespace BPrivate

Expand Down
Loading