mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 01:17:16 -05:00
Merge pull request #1190 from PhenomRetroShare/Add_ShowEmptySubMenuRemoteTree
Add ShowEmpty sub menu in Tree Remote SharedFilesDialog.
This commit is contained in:
commit
24d1f5d9eb
@ -146,7 +146,7 @@ public:
|
|||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareDirModel *_flat_model,QWidget *parent)
|
SharedFilesDialog::SharedFilesDialog(RetroshareDirModel *_tree_model,RetroshareDirModel *_flat_model,QWidget *parent)
|
||||||
: RsAutoUpdatePage(1000,parent),model(NULL)
|
: RsAutoUpdatePage(1000,parent), model(NULL)
|
||||||
{
|
{
|
||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
@ -410,7 +410,7 @@ void SharedFilesDialog::changeCurrentViewModel(int viewTypeIndex)
|
|||||||
ui.dirTreeView->header()->headerDataChanged(Qt::Horizontal, COLUMN_NAME, COLUMN_WN_VISU_DIR) ;
|
ui.dirTreeView->header()->headerDataChanged(Qt::Horizontal, COLUMN_NAME, COLUMN_WN_VISU_DIR) ;
|
||||||
|
|
||||||
// recursRestoreExpandedItems(ui.dirTreeView->rootIndex(),expanded_indexes);
|
// recursRestoreExpandedItems(ui.dirTreeView->rootIndex(),expanded_indexes);
|
||||||
FilterItems();
|
FilterItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalSharedFilesDialog::showProperColumns()
|
void LocalSharedFilesDialog::showProperColumns()
|
||||||
@ -491,53 +491,63 @@ void RemoteSharedFilesDialog::spawnCustomPopupMenu( QPoint point )
|
|||||||
{
|
{
|
||||||
if (!rsPeers) return; /* not ready yet! */
|
if (!rsPeers) return; /* not ready yet! */
|
||||||
|
|
||||||
|
QMenu *contextMenu = new QMenu(this);
|
||||||
|
|
||||||
QModelIndex idx = ui.dirTreeView->indexAt(point) ;
|
QModelIndex idx = ui.dirTreeView->indexAt(point) ;
|
||||||
if (!idx.isValid()) return;
|
if (idx.isValid())
|
||||||
|
|
||||||
QModelIndex midx = proxyModel->mapToSource(idx) ;
|
|
||||||
if (!midx.isValid()) return;
|
|
||||||
|
|
||||||
currentFile = model->data(midx, RetroshareDirModel::FileNameRole).toString() ;
|
|
||||||
int type = model->getType(midx) ;
|
|
||||||
if (type != DIR_TYPE_DIR && type != DIR_TYPE_FILE) return;
|
|
||||||
|
|
||||||
|
|
||||||
QMenu contextMnu( this ) ;
|
|
||||||
|
|
||||||
collCreateAct->setEnabled(true);
|
|
||||||
collOpenAct->setEnabled(true);
|
|
||||||
|
|
||||||
QMenu collectionMenu(tr("Collection"), this);
|
|
||||||
collectionMenu.setIcon(QIcon(IMAGE_LIBRARY));
|
|
||||||
collectionMenu.addAction(collCreateAct);
|
|
||||||
collectionMenu.addAction(collOpenAct);
|
|
||||||
|
|
||||||
QModelIndexList list = ui.dirTreeView->selectionModel()->selectedRows() ;
|
|
||||||
|
|
||||||
if(type == DIR_TYPE_DIR || list.size() > 1)
|
|
||||||
{
|
{
|
||||||
QAction *downloadActI = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download..." ), &contextMnu ) ;
|
|
||||||
connect( downloadActI , SIGNAL( triggered() ), this, SLOT( downloadRemoteSelectedInteractive() ) ) ;
|
QModelIndex midx = proxyModel->mapToSource(idx) ;
|
||||||
contextMnu.addAction( downloadActI) ;
|
if (midx.isValid())
|
||||||
}
|
{
|
||||||
else
|
|
||||||
{
|
currentFile = model->data(midx, RetroshareDirModel::FileNameRole).toString() ;
|
||||||
QAction *downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), &contextMnu ) ;
|
int type = model->getType(midx) ;
|
||||||
connect( downloadAct , SIGNAL( triggered() ), this, SLOT( downloadRemoteSelected() ) ) ;
|
if ( (type == DIR_TYPE_DIR) || (type == DIR_TYPE_FILE) )
|
||||||
contextMnu.addAction( downloadAct) ;
|
{
|
||||||
|
collCreateAct->setEnabled(true);
|
||||||
|
collOpenAct->setEnabled(true);
|
||||||
|
|
||||||
|
QModelIndexList list = ui.dirTreeView->selectionModel()->selectedRows() ;
|
||||||
|
|
||||||
|
if(type == DIR_TYPE_DIR || list.size() > 1)
|
||||||
|
{
|
||||||
|
QAction *downloadActI = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download..." ), contextMenu ) ;
|
||||||
|
connect( downloadActI , SIGNAL( triggered() ), this, SLOT( downloadRemoteSelectedInteractive() ) ) ;
|
||||||
|
contextMenu->addAction( downloadActI) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QAction *downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr( "Download" ), contextMenu ) ;
|
||||||
|
connect( downloadAct , SIGNAL( triggered() ), this, SLOT( downloadRemoteSelected() ) ) ;
|
||||||
|
contextMenu->addAction( downloadAct) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
contextMenu->addSeparator() ;//------------------------------------
|
||||||
|
contextMenu->addAction( copylinkAct) ;
|
||||||
|
contextMenu->addAction( sendlinkAct) ;
|
||||||
|
contextMenu->addSeparator() ;//------------------------------------
|
||||||
|
contextMenu->addAction(QIcon(IMAGE_MSG), tr("Recommend in a message to..."), this, SLOT(recommendFilesToMsg())) ;
|
||||||
|
|
||||||
|
contextMenu->addSeparator() ;//------------------------------------
|
||||||
|
|
||||||
|
QMenu collectionMenu(tr("Collection"), this);
|
||||||
|
collectionMenu.setIcon(QIcon(IMAGE_LIBRARY));
|
||||||
|
collectionMenu.addAction(collCreateAct);
|
||||||
|
collectionMenu.addAction(collOpenAct);
|
||||||
|
contextMenu->addMenu(&collectionMenu) ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.addSeparator() ;//------------------------------------
|
contextMenu = model->getContextMenu(contextMenu);
|
||||||
contextMnu.addAction( copylinkAct) ;
|
|
||||||
contextMnu.addAction( sendlinkAct) ;
|
|
||||||
contextMnu.addSeparator() ;//------------------------------------
|
|
||||||
contextMnu.addAction(QIcon(IMAGE_MSG), tr("Recommend in a message to..."), this, SLOT(recommendFilesToMsg())) ;
|
|
||||||
|
|
||||||
|
if (!contextMenu->children().isEmpty())
|
||||||
|
contextMenu->exec(QCursor::pos()) ;
|
||||||
|
|
||||||
contextMnu.addSeparator() ;//------------------------------------
|
delete contextMenu;
|
||||||
contextMnu.addMenu(&collectionMenu) ;
|
|
||||||
|
|
||||||
contextMnu.exec(QCursor::pos()) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndexList SharedFilesDialog::getSelected()
|
QModelIndexList SharedFilesDialog::getSelected()
|
||||||
@ -908,7 +918,7 @@ void SharedFilesDialog::restoreExpandedPathsAndSelection(const std::set<std::str
|
|||||||
std::string path = ui.dirTreeView->model()->index(row,0).data(Qt::DisplayRole).toString().toStdString();
|
std::string path = ui.dirTreeView->model()->index(row,0).data(Qt::DisplayRole).toString().toStdString();
|
||||||
recursRestoreExpandedItems(ui.dirTreeView->model()->index(row,0),path,expanded_indexes,hidden_indexes,selected_indexes);
|
recursRestoreExpandedItems(ui.dirTreeView->model()->index(row,0),path,expanded_indexes,hidden_indexes,selected_indexes);
|
||||||
}
|
}
|
||||||
QItemSelection selection ;
|
//QItemSelection selection ;
|
||||||
|
|
||||||
ui.dirTreeView->blockSignals(false) ;
|
ui.dirTreeView->blockSignals(false) ;
|
||||||
}
|
}
|
||||||
@ -997,12 +1007,12 @@ void SharedFilesDialog::postModDirectories(bool local)
|
|||||||
flat_model->postMods();
|
flat_model->postMods();
|
||||||
ui.dirTreeView->update() ;
|
ui.dirTreeView->update() ;
|
||||||
|
|
||||||
if (ui.filterPatternLineEdit->text().isEmpty() == false)
|
if (ui.filterPatternLineEdit->text().isEmpty() == false)
|
||||||
FilterItems();
|
FilterItems();
|
||||||
|
|
||||||
ui.dirTreeView->setSortingEnabled(true);
|
ui.dirTreeView->setSortingEnabled(true);
|
||||||
|
|
||||||
restoreExpandedPathsAndSelection(expanded_indexes,hidden_indexes,selected_indexes) ;
|
restoreExpandedPathsAndSelection(expanded_indexes,hidden_indexes,selected_indexes) ;
|
||||||
|
|
||||||
#ifdef DEBUG_SHARED_FILES_DIALOG
|
#ifdef DEBUG_SHARED_FILES_DIALOG
|
||||||
std::cerr << "****** updated directories! Re-enabling sorting ******" << std::endl;
|
std::cerr << "****** updated directories! Re-enabling sorting ******" << std::endl;
|
||||||
@ -1320,10 +1330,10 @@ void SharedFilesDialog::clearFilter()
|
|||||||
/* clear Filter */
|
/* clear Filter */
|
||||||
void SharedFilesDialog::startFilter()
|
void SharedFilesDialog::startFilter()
|
||||||
{
|
{
|
||||||
ui.filterStartButton->hide();
|
ui.filterStartButton->hide();
|
||||||
lastFilterString = ui.filterPatternLineEdit->text();
|
lastFilterString = ui.filterPatternLineEdit->text();
|
||||||
|
|
||||||
FilterItems();
|
FilterItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedFilesDialog::updateDirTreeView()
|
void SharedFilesDialog::updateDirTreeView()
|
||||||
@ -1603,4 +1613,3 @@ bool SharedFilesDialog::tree_FilterItem(const QModelIndex &index, const QString
|
|||||||
|
|
||||||
return (visible || visibleChildCount);
|
return (visible || visibleChildCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ class RemoteSharedFilesDialog : public SharedFilesDialog
|
|||||||
private slots:
|
private slots:
|
||||||
void downloadRemoteSelected();
|
void downloadRemoteSelected();
|
||||||
void downloadRemoteSelectedInteractive();
|
void downloadRemoteSelectedInteractive();
|
||||||
void expanded(const QModelIndex& indx);
|
void expanded(const QModelIndex& indx);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -50,21 +50,40 @@ static const size_t FLAT_VIEW_MAX_REFS_TABLE_SIZE = 10000 ; //
|
|||||||
static const uint32_t FLAT_VIEW_MIN_DELAY_BETWEEN_UPDATES = 120 ; // dont rebuild ref list more than every 2 mins.
|
static const uint32_t FLAT_VIEW_MIN_DELAY_BETWEEN_UPDATES = 120 ; // dont rebuild ref list more than every 2 mins.
|
||||||
|
|
||||||
RetroshareDirModel::RetroshareDirModel(bool mode, QObject *parent)
|
RetroshareDirModel::RetroshareDirModel(bool mode, QObject *parent)
|
||||||
: QAbstractItemModel(parent),
|
: QAbstractItemModel(parent), _visible(false)
|
||||||
ageIndicator(IND_ALWAYS),
|
, ageIndicator(IND_ALWAYS)
|
||||||
RemoteMode(mode), nIndex(1), indexSet(1) /* ass zero index cant be used */
|
, RemoteMode(mode)//, nIndex(1), indexSet(1) /* ass zero index cant be used */
|
||||||
|
, mLastRemote(false), mLastReq(0), mUpdating(false)
|
||||||
{
|
{
|
||||||
_visible = false ;
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK (5, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK (5, 0, 0)
|
||||||
setSupportedDragActions(Qt::CopyAction);
|
setSupportedDragActions(Qt::CopyAction);
|
||||||
#endif
|
#endif
|
||||||
treeStyle();
|
treeStyle();
|
||||||
|
|
||||||
mDirDetails.ref = (void*)intptr_t(0xffffffff) ;
|
mDirDetails.ref = (void*)intptr_t(0xffffffff) ;
|
||||||
mLastRemote = false ;
|
|
||||||
mUpdating = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TreeStyle_RDM::TreeStyle_RDM(bool mode)
|
||||||
|
: RetroshareDirModel(mode), _showEmpty(false)
|
||||||
|
{
|
||||||
|
_showEmptyAct = new QAction(QIcon(), tr("Show Empty"), this);
|
||||||
|
_showEmptyAct->setCheckable(true);
|
||||||
|
_showEmptyAct->setChecked(_showEmpty);
|
||||||
|
connect(_showEmptyAct, SIGNAL(toggled(bool)), this, SLOT(showEmpty(bool)));
|
||||||
|
}
|
||||||
|
|
||||||
|
FlatStyle_RDM::FlatStyle_RDM(bool mode)
|
||||||
|
: RetroshareDirModel(mode), _ref_mutex("Flat file list")
|
||||||
|
{
|
||||||
|
_needs_update = true ;
|
||||||
|
|
||||||
|
{
|
||||||
|
RS_STACK_MUTEX(_ref_mutex) ;
|
||||||
|
_last_update = 0 ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// QAbstractItemModel::setSupportedDragActions() was replaced by virtual QAbstractItemModel::supportedDragActions()
|
// QAbstractItemModel::setSupportedDragActions() was replaced by virtual QAbstractItemModel::supportedDragActions()
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
||||||
Qt::DropActions RetroshareDirModel::supportedDragActions() const
|
Qt::DropActions RetroshareDirModel::supportedDragActions() const
|
||||||
@ -78,7 +97,6 @@ static bool isNewerThanEpoque(uint32_t ts)
|
|||||||
return ts > 0 ; // this should be conservative enough
|
return ts > 0 ; // this should be conservative enough
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RetroshareDirModel::treeStyle()
|
void RetroshareDirModel::treeStyle()
|
||||||
{
|
{
|
||||||
categoryIcon.addPixmap(QPixmap(":/images/folder16.png"),
|
categoryIcon.addPixmap(QPixmap(":/images/folder16.png"),
|
||||||
@ -97,6 +115,21 @@ void TreeStyle_RDM::updateRef(const QModelIndex& indx) const
|
|||||||
rsFiles->requestDirUpdate(indx.internalPointer()) ;
|
rsFiles->requestDirUpdate(indx.internalPointer()) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QMenu* TreeStyle_RDM::getContextMenu(QMenu* contextMenu)
|
||||||
|
{
|
||||||
|
if (!contextMenu){
|
||||||
|
contextMenu = new QMenu();
|
||||||
|
} else {
|
||||||
|
if (RemoteMode)
|
||||||
|
contextMenu->addSeparator();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RemoteMode)
|
||||||
|
contextMenu->addAction( _showEmptyAct) ;
|
||||||
|
|
||||||
|
return contextMenu;
|
||||||
|
}
|
||||||
|
|
||||||
bool TreeStyle_RDM::hasChildren(const QModelIndex &parent) const
|
bool TreeStyle_RDM::hasChildren(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -171,9 +204,13 @@ int TreeStyle_RDM::rowCount(const QModelIndex &parent) const
|
|||||||
|
|
||||||
void *ref = (parent.isValid())? parent.internalPointer() : NULL ;
|
void *ref = (parent.isValid())? parent.internalPointer() : NULL ;
|
||||||
|
|
||||||
DirDetails details ;
|
if ((!ref) && RemoteMode)
|
||||||
|
_parentRow.clear(); //Only clear it when asking root child number and in remote mode.
|
||||||
|
|
||||||
if (! requestDirDetails(ref, RemoteMode,details))
|
|
||||||
|
DirDetails details ;
|
||||||
|
|
||||||
|
if (! requestDirDetails(ref, RemoteMode,details))
|
||||||
{
|
{
|
||||||
#ifdef RDM_DEBUG
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "lookup failed -> 0";
|
std::cerr << "lookup failed -> 0";
|
||||||
@ -181,7 +218,7 @@ int TreeStyle_RDM::rowCount(const QModelIndex &parent) const
|
|||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (details.type == DIR_TYPE_FILE)
|
if (details.type == DIR_TYPE_FILE)
|
||||||
{
|
{
|
||||||
#ifdef RDM_DEBUG
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "lookup FILE: 0";
|
std::cerr << "lookup FILE: 0";
|
||||||
@ -195,9 +232,21 @@ int TreeStyle_RDM::rowCount(const QModelIndex &parent) const
|
|||||||
std::cerr << "lookup PER/DIR #" << details->count;
|
std::cerr << "lookup PER/DIR #" << details->count;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return details.count;
|
if ((details.type == DIR_TYPE_ROOT) && !_showEmpty && RemoteMode)
|
||||||
|
{
|
||||||
|
DirDetails childDetails;
|
||||||
|
//Scan all children to know if they are empty.
|
||||||
|
//And save their real row index
|
||||||
|
//Prefer do like that than modify requestDirDetails with a new flag (rsFiles->RequestDirDetails)
|
||||||
|
for(uint64_t i = 0; i < details.count; ++i)
|
||||||
|
{
|
||||||
|
if (requestDirDetails(details.children[i].ref, RemoteMode,childDetails) && (childDetails.count > 0))
|
||||||
|
_parentRow.push_back(i);
|
||||||
|
}
|
||||||
|
return _parentRow.size();
|
||||||
|
}
|
||||||
|
return details.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FlatStyle_RDM::rowCount(const QModelIndex &parent) const
|
int FlatStyle_RDM::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
@ -210,6 +259,7 @@ int FlatStyle_RDM::rowCount(const QModelIndex &parent) const
|
|||||||
|
|
||||||
return _ref_entries.size() ;
|
return _ref_entries.size() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TreeStyle_RDM::columnCount(const QModelIndex &/*parent*/) const
|
int TreeStyle_RDM::columnCount(const QModelIndex &/*parent*/) const
|
||||||
{
|
{
|
||||||
return COLUMN_COUNT;
|
return COLUMN_COUNT;
|
||||||
@ -218,6 +268,7 @@ int FlatStyle_RDM::columnCount(const QModelIndex &/*parent*/) const
|
|||||||
{
|
{
|
||||||
return COLUMN_COUNT;
|
return COLUMN_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RetroshareDirModel::getFlagsString(FileStorageFlags flags)
|
QString RetroshareDirModel::getFlagsString(FileStorageFlags flags)
|
||||||
{
|
{
|
||||||
char str[11] = "- - -" ;
|
char str[11] = "- - -" ;
|
||||||
@ -253,7 +304,6 @@ QString RetroshareDirModel::getGroupsString(FileStorageFlags flags,const std::li
|
|||||||
return groups_str ;
|
return groups_str ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString RetroshareDirModel::getAgeIndicatorString(const DirDetails &details) const
|
QString RetroshareDirModel::getAgeIndicatorString(const DirDetails &details) const
|
||||||
{
|
{
|
||||||
QString ret("");
|
QString ret("");
|
||||||
@ -496,17 +546,6 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
} /* end of DisplayRole */
|
} /* end of DisplayRole */
|
||||||
|
|
||||||
FlatStyle_RDM::FlatStyle_RDM(bool mode)
|
|
||||||
: RetroshareDirModel(mode), _ref_mutex("Flat file list")
|
|
||||||
{
|
|
||||||
_needs_update = true ;
|
|
||||||
|
|
||||||
{
|
|
||||||
RS_STACK_MUTEX(_ref_mutex) ;
|
|
||||||
_last_update = 0 ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FlatStyle_RDM::update()
|
void FlatStyle_RDM::update()
|
||||||
{
|
{
|
||||||
if(_needs_update)
|
if(_needs_update)
|
||||||
@ -650,7 +689,6 @@ QVariant TreeStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails&
|
|||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant FlatStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails& details,int coln) const
|
QVariant FlatStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails& details,int coln) const
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -678,9 +716,6 @@ QVariant FlatStyle_RDM::sortRole(const QModelIndex& /*index*/,const DirDetails&
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
} /* end of SortRole */
|
} /* end of SortRole */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const
|
QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
#ifdef RDM_DEBUG
|
#ifdef RDM_DEBUG
|
||||||
@ -771,6 +806,7 @@ QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
//void RetroshareDirModel::getAgeIndicatorRec(const DirDetails &details, QString &ret) const {
|
//void RetroshareDirModel::getAgeIndicatorRec(const DirDetails &details, QString &ret) const {
|
||||||
// if (details.type == DIR_TYPE_FILE) {
|
// if (details.type == DIR_TYPE_FILE) {
|
||||||
// ret = getAgeIndicatorString(details);
|
// ret = getAgeIndicatorString(details);
|
||||||
@ -786,6 +822,7 @@ QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
****/
|
||||||
|
|
||||||
QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int role) const
|
QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int role) const
|
||||||
{
|
{
|
||||||
@ -895,8 +932,8 @@ QModelIndex TreeStyle_RDM::index(int row, int column, const QModelIndex & parent
|
|||||||
std::cerr << ": row:" << row << " col:" << column << " ";
|
std::cerr << ": row:" << row << " col:" << column << " ";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This function is used extensively. There's no way we can use requestDirDetails() in it, which would
|
// This function is used extensively. There's no way we can use requestDirDetails() in it, which would
|
||||||
// cause far too much overhead. So we use a dedicated function that only grabs the required information.
|
// cause far too much overhead. So we use a dedicated function that only grabs the required information.
|
||||||
|
|
||||||
if(row < 0)
|
if(row < 0)
|
||||||
return QModelIndex() ;
|
return QModelIndex() ;
|
||||||
@ -910,15 +947,19 @@ QModelIndex TreeStyle_RDM::index(int row, int column, const QModelIndex & parent
|
|||||||
}
|
}
|
||||||
********/
|
********/
|
||||||
|
|
||||||
|
//If on root and don't show empty child, get real parent row
|
||||||
|
if ((!ref) && (!_showEmpty) && RemoteMode && ((size_t)row >= _parentRow.size()))
|
||||||
|
return QModelIndex();
|
||||||
|
|
||||||
void *result ;
|
int parentRow = ((!ref) && (!_showEmpty) && RemoteMode) ? _parentRow[row] : row ;
|
||||||
|
|
||||||
if(rsFiles->findChildPointer(ref, row, result, ((RemoteMode) ? RS_FILE_HINTS_REMOTE : RS_FILE_HINTS_LOCAL)))
|
void *result ;
|
||||||
return createIndex(row, column, result) ;
|
|
||||||
else
|
if(rsFiles->findChildPointer(ref, parentRow, result, ((RemoteMode) ? RS_FILE_HINTS_REMOTE : RS_FILE_HINTS_LOCAL)))
|
||||||
|
return createIndex(row, column, result) ;
|
||||||
|
else
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex FlatStyle_RDM::index(int row, int column, const QModelIndex & parent) const
|
QModelIndex FlatStyle_RDM::index(int row, int column, const QModelIndex & parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
@ -964,10 +1005,10 @@ QModelIndex TreeStyle_RDM::parent( const QModelIndex & index ) const
|
|||||||
}
|
}
|
||||||
void *ref = index.internalPointer();
|
void *ref = index.internalPointer();
|
||||||
|
|
||||||
DirDetails details ;
|
DirDetails details ;
|
||||||
|
|
||||||
if (! requestDirDetails(ref, RemoteMode,details))
|
if (! requestDirDetails(ref, RemoteMode,details))
|
||||||
{
|
{
|
||||||
#ifdef RDM_DEBUG
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "Failed Lookup -> invalid";
|
std::cerr << "Failed Lookup -> invalid";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
@ -975,7 +1016,7 @@ QModelIndex TreeStyle_RDM::parent( const QModelIndex & index ) const
|
|||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(details.parent))
|
if (!(details.parent))
|
||||||
{
|
{
|
||||||
#ifdef RDM_DEBUG
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "success. parent is Root/NULL --> invalid";
|
std::cerr << "success. parent is Root/NULL --> invalid";
|
||||||
@ -988,9 +1029,10 @@ QModelIndex TreeStyle_RDM::parent( const QModelIndex & index ) const
|
|||||||
std::cerr << "success index(" << details->prow << ",0," << details->parent << ")";
|
std::cerr << "success index(" << details->prow << ",0," << details->parent << ")";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
std::cerr << "Creating index 3 row=" << details.prow << ", column=" << 0 << ", ref=" << (void*)details.parent << std::endl;
|
std::cerr << "Creating index 3 row=" << details.prow << ", column=" << 0 << ", ref=" << (void*)details.parent << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return createIndex(details.prow, COLUMN_NAME, details.parent);
|
|
||||||
|
return createIndex(details.prow, COLUMN_NAME, details.parent);
|
||||||
}
|
}
|
||||||
QModelIndex FlatStyle_RDM::parent( const QModelIndex & index ) const
|
QModelIndex FlatStyle_RDM::parent( const QModelIndex & index ) const
|
||||||
{
|
{
|
||||||
@ -1039,7 +1081,7 @@ Qt::ItemFlags RetroshareDirModel::flags( const QModelIndex & index ) const
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Callback from */
|
/* Callback from Core*/
|
||||||
void RetroshareDirModel::preMods()
|
void RetroshareDirModel::preMods()
|
||||||
{
|
{
|
||||||
emit layoutAboutToBeChanged();
|
emit layoutAboutToBeChanged();
|
||||||
@ -1056,7 +1098,7 @@ void RetroshareDirModel::preMods()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback from */
|
/* Callback from Core*/
|
||||||
void RetroshareDirModel::postMods()
|
void RetroshareDirModel::postMods()
|
||||||
{
|
{
|
||||||
// emit layoutAboutToBeChanged();
|
// emit layoutAboutToBeChanged();
|
||||||
@ -1075,6 +1117,30 @@ void RetroshareDirModel::postMods()
|
|||||||
emit layoutChanged();
|
emit layoutChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FlatStyle_RDM::postMods()
|
||||||
|
{
|
||||||
|
time_t now = time(NULL);
|
||||||
|
|
||||||
|
if(_last_update + FLAT_VIEW_MIN_DELAY_BETWEEN_UPDATES > now)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
if(visible())
|
||||||
|
{
|
||||||
|
emit layoutAboutToBeChanged();
|
||||||
|
|
||||||
|
{
|
||||||
|
RS_STACK_MUTEX(_ref_mutex) ;
|
||||||
|
_ref_stack.clear() ;
|
||||||
|
_ref_stack.push_back(NULL) ; // init the stack with the topmost parent directory
|
||||||
|
_ref_entries.clear();
|
||||||
|
_last_update = now;
|
||||||
|
}
|
||||||
|
QTimer::singleShot(100,this,SLOT(updateRefs())) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_needs_update = true ;
|
||||||
|
}
|
||||||
|
|
||||||
bool RetroshareDirModel::requestDirDetails(void *ref, bool remote,DirDetails& d) const
|
bool RetroshareDirModel::requestDirDetails(void *ref, bool remote,DirDetails& d) const
|
||||||
{
|
{
|
||||||
#ifdef RDM_DEBUG
|
#ifdef RDM_DEBUG
|
||||||
@ -1475,35 +1541,11 @@ int RetroshareDirModel::getType ( const QModelIndex & index ) const
|
|||||||
return rsFiles->getType(index.internalPointer(),flags);
|
return rsFiles->getType(index.internalPointer(),flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
FlatStyle_RDM::~FlatStyle_RDM()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
TreeStyle_RDM::~TreeStyle_RDM()
|
TreeStyle_RDM::~TreeStyle_RDM()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
void FlatStyle_RDM::postMods()
|
FlatStyle_RDM::~FlatStyle_RDM()
|
||||||
{
|
{
|
||||||
time_t now = time(NULL);
|
|
||||||
|
|
||||||
if(_last_update + FLAT_VIEW_MIN_DELAY_BETWEEN_UPDATES > now)
|
|
||||||
return ;
|
|
||||||
|
|
||||||
if(visible())
|
|
||||||
{
|
|
||||||
emit layoutAboutToBeChanged();
|
|
||||||
|
|
||||||
{
|
|
||||||
RS_STACK_MUTEX(_ref_mutex) ;
|
|
||||||
_ref_stack.clear() ;
|
|
||||||
_ref_stack.push_back(NULL) ; // init the stack with the topmost parent directory
|
|
||||||
_ref_entries.clear();
|
|
||||||
_last_update = now;
|
|
||||||
}
|
|
||||||
QTimer::singleShot(100,this,SLOT(updateRefs())) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_needs_update = true ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlatStyle_RDM::updateRefs()
|
void FlatStyle_RDM::updateRefs()
|
||||||
@ -1563,3 +1605,8 @@ void FlatStyle_RDM::updateRefs()
|
|||||||
RetroshareDirModel::postMods() ;
|
RetroshareDirModel::postMods() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TreeStyle_RDM::showEmpty(const bool value)
|
||||||
|
{
|
||||||
|
_showEmpty = value;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
#include <retroshare/rstypes.h>
|
#include <retroshare/rstypes.h>
|
||||||
|
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
|
#include <QAction>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QMenu>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -63,7 +65,7 @@ class RetroshareDirModel : public QAbstractItemModel
|
|||||||
RetroshareDirModel(bool mode, QObject *parent = 0);
|
RetroshareDirModel(bool mode, QObject *parent = 0);
|
||||||
virtual ~RetroshareDirModel() {}
|
virtual ~RetroshareDirModel() {}
|
||||||
|
|
||||||
Qt::ItemFlags flags ( const QModelIndex & index ) const;
|
virtual Qt::ItemFlags flags ( const QModelIndex & index ) const;
|
||||||
|
|
||||||
/* Callback from Core */
|
/* Callback from Core */
|
||||||
virtual void preMods();
|
virtual void preMods();
|
||||||
@ -82,18 +84,21 @@ class RetroshareDirModel : public QAbstractItemModel
|
|||||||
void getFileInfoFromIndexList(const QModelIndexList& list, std::list<DirDetails>& files_info) ;
|
void getFileInfoFromIndexList(const QModelIndexList& list, std::list<DirDetails>& files_info) ;
|
||||||
void openSelected(const QModelIndexList &list);
|
void openSelected(const QModelIndexList &list);
|
||||||
void getFilePaths(const QModelIndexList &list, std::list<std::string> &fullpaths);
|
void getFilePaths(const QModelIndexList &list, std::list<std::string> &fullpaths);
|
||||||
void getFilePath(const QModelIndex& index, std::string& fullpath);
|
void getFilePath(const QModelIndex& index, std::string& fullpath);
|
||||||
void changeAgeIndicator(uint32_t indicator) { ageIndicator = indicator; }
|
void changeAgeIndicator(uint32_t indicator) { ageIndicator = indicator; }
|
||||||
|
|
||||||
|
bool requestDirDetails(void *ref, bool remote,DirDetails& d) const;
|
||||||
|
|
||||||
bool requestDirDetails(void *ref, bool remote,DirDetails& d) const;
|
|
||||||
virtual void update() {}
|
virtual void update() {}
|
||||||
|
virtual void updateRef(const QModelIndex&) const =0;
|
||||||
|
|
||||||
virtual void updateRef(const QModelIndex&) const =0;
|
virtual QMenu* getContextMenu(QMenu* contextMenu) {return contextMenu;}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const;
|
//Overloaded from QAbstractItemModel
|
||||||
|
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||||
virtual QStringList mimeTypes () const;
|
virtual QStringList mimeTypes () const;
|
||||||
virtual QVariant data(const QModelIndex &index, int role) const;
|
virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
|
||||||
virtual Qt::DropActions supportedDragActions() const;
|
virtual Qt::DropActions supportedDragActions() const;
|
||||||
#endif
|
#endif
|
||||||
@ -104,10 +109,10 @@ class RetroshareDirModel : public QAbstractItemModel
|
|||||||
void treeStyle();
|
void treeStyle();
|
||||||
void downloadDirectory(const DirDetails & details, int prefixLen);
|
void downloadDirectory(const DirDetails & details, int prefixLen);
|
||||||
static QString getFlagsString(FileStorageFlags f) ;
|
static QString getFlagsString(FileStorageFlags f) ;
|
||||||
static QString getGroupsString(FileStorageFlags flags, const std::list<RsNodeGroupId> &) ;
|
static QString getGroupsString(FileStorageFlags flags, const std::list<RsNodeGroupId> &) ;
|
||||||
QString getAgeIndicatorString(const DirDetails &) const;
|
QString getAgeIndicatorString(const DirDetails &) const;
|
||||||
// void getAgeIndicatorRec(const DirDetails &details, QString &ret) const;
|
// void getAgeIndicatorRec(const DirDetails &details, QString &ret) const;
|
||||||
static const QIcon& getFlagsIcon(FileStorageFlags flags) ;
|
static const QIcon& getFlagsIcon(FileStorageFlags flags) ;
|
||||||
|
|
||||||
virtual QVariant displayRole(const DirDetails&,int) const = 0 ;
|
virtual QVariant displayRole(const DirDetails&,int) const = 0 ;
|
||||||
virtual QVariant sortRole(const QModelIndex&,const DirDetails&,int) const =0;
|
virtual QVariant sortRole(const QModelIndex&,const DirDetails&,int) const =0;
|
||||||
@ -119,46 +124,46 @@ class RetroshareDirModel : public QAbstractItemModel
|
|||||||
QIcon categoryIcon;
|
QIcon categoryIcon;
|
||||||
QIcon peerIcon;
|
QIcon peerIcon;
|
||||||
|
|
||||||
class RemoteIndex
|
//class RemoteIndex
|
||||||
{
|
//{
|
||||||
public:
|
// public:
|
||||||
RemoteIndex() {}
|
// RemoteIndex() {}
|
||||||
RemoteIndex(std::string in_person,
|
// RemoteIndex(std::string in_person,
|
||||||
std::string in_path,
|
// std::string in_path,
|
||||||
int in_idx,
|
// int in_idx,
|
||||||
int in_row,
|
// int in_row,
|
||||||
int in_column,
|
// int in_column,
|
||||||
std::string in_name,
|
// std::string in_name,
|
||||||
int in_size,
|
// int in_size,
|
||||||
int in_type,
|
// int in_type,
|
||||||
int in_ts, int in_rank)
|
// int in_ts, int in_rank)
|
||||||
:id(in_person), path(in_path), parent(in_idx),
|
// :id(in_person), path(in_path), parent(in_idx),
|
||||||
row(in_row), column(in_column),
|
// row(in_row), column(in_column),
|
||||||
name(in_name), size(in_size),
|
// name(in_name), size(in_size),
|
||||||
type(in_type), timestamp(in_ts), rank(in_rank)
|
// type(in_type), timestamp(in_ts), rank(in_rank)
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
std::string id;
|
// std::string id;
|
||||||
std::string path;
|
// std::string path;
|
||||||
int parent;
|
// int parent;
|
||||||
int row;
|
// int row;
|
||||||
int column;
|
// int column;
|
||||||
|
//
|
||||||
/* display info */
|
// /* display info */
|
||||||
std::string name;
|
// std::string name;
|
||||||
int size;
|
// int size;
|
||||||
int type;
|
// int type;
|
||||||
int timestamp;
|
// int timestamp;
|
||||||
int rank;
|
// int rank;
|
||||||
|
//
|
||||||
};
|
//};
|
||||||
|
|
||||||
bool RemoteMode;
|
bool RemoteMode;
|
||||||
|
|
||||||
mutable int nIndex;
|
//mutable int nIndex;
|
||||||
mutable std::vector<RemoteIndex> indexSet;
|
//mutable std::vector<RemoteIndex> indexSet;
|
||||||
|
|
||||||
// This material attempts to keep last request in cache, with no search cost.
|
// This material attempts to keep last request in cache, with no search cost.
|
||||||
|
|
||||||
@ -178,28 +183,36 @@ class TreeStyle_RDM: public RetroshareDirModel
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TreeStyle_RDM(bool mode)
|
TreeStyle_RDM(bool mode);
|
||||||
: RetroshareDirModel(mode)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~TreeStyle_RDM() ;
|
virtual ~TreeStyle_RDM() ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void updateRef(const QModelIndex&) const ;
|
|
||||||
|
//Overloaded from RetroshareDirModel
|
||||||
virtual void update() ;
|
virtual void update() ;
|
||||||
|
virtual void updateRef(const QModelIndex&) const ;
|
||||||
/* These are all overloaded Virtual Functions */
|
virtual QMenu* getContextMenu(QMenu* contextMenu) ;
|
||||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
|
||||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
|
||||||
|
|
||||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
|
||||||
virtual QVariant displayRole(const DirDetails&,int) const ;
|
virtual QVariant displayRole(const DirDetails&,int) const ;
|
||||||
virtual QVariant sortRole(const QModelIndex&,const DirDetails&,int) const ;
|
virtual QVariant sortRole(const QModelIndex&,const DirDetails&,int) const ;
|
||||||
|
|
||||||
|
//Overloaded from QAbstractItemModel
|
||||||
virtual QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex() ) const;
|
virtual QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex() ) const;
|
||||||
virtual QModelIndex parent ( const QModelIndex & index ) const;
|
virtual QModelIndex parent ( const QModelIndex & index ) const;
|
||||||
|
|
||||||
|
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
|
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
virtual bool hasChildren(const QModelIndex & parent = QModelIndex()) const;
|
virtual bool hasChildren(const QModelIndex & parent = QModelIndex()) const;
|
||||||
|
|
||||||
|
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void showEmpty(const bool value);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QAction *_showEmptyAct;
|
||||||
|
bool _showEmpty;
|
||||||
|
protected:
|
||||||
|
mutable std::vector<int> _parentRow ; // used to store the real parent row for non empty child
|
||||||
};
|
};
|
||||||
|
|
||||||
// This class shows a flat list of all shared files
|
// This class shows a flat list of all shared files
|
||||||
@ -212,9 +225,9 @@ class FlatStyle_RDM: public RetroshareDirModel
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
FlatStyle_RDM(bool mode);
|
FlatStyle_RDM(bool mode);
|
||||||
|
|
||||||
virtual ~FlatStyle_RDM() ;
|
virtual ~FlatStyle_RDM() ;
|
||||||
|
|
||||||
|
//Overloaded from RetroshareDirModel
|
||||||
virtual void update() ;
|
virtual void update() ;
|
||||||
|
|
||||||
bool isMaxRefsTableSize(size_t* maxSize = NULL);
|
bool isMaxRefsTableSize(size_t* maxSize = NULL);
|
||||||
@ -223,27 +236,30 @@ class FlatStyle_RDM: public RetroshareDirModel
|
|||||||
void updateRefs() ;
|
void updateRefs() ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void updateRef(const QModelIndex&) const {}
|
//Overloaded from RetroshareDirModel
|
||||||
virtual void postMods();
|
virtual void postMods();/* Callback from Core */
|
||||||
|
virtual void updateRef(const QModelIndex&) const {}
|
||||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
|
||||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
|
||||||
|
|
||||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
|
||||||
virtual QVariant displayRole(const DirDetails&,int) const ;
|
virtual QVariant displayRole(const DirDetails&,int) const ;
|
||||||
virtual QVariant sortRole(const QModelIndex&,const DirDetails&,int) const ;
|
virtual QVariant sortRole(const QModelIndex&,const DirDetails&,int) const ;
|
||||||
|
|
||||||
|
//Overloaded from QAbstractItemModel
|
||||||
virtual QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex() ) const;
|
virtual QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex() ) const;
|
||||||
virtual QModelIndex parent ( const QModelIndex & index ) const;
|
virtual QModelIndex parent ( const QModelIndex & index ) const;
|
||||||
|
|
||||||
|
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
|
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
virtual bool hasChildren(const QModelIndex & parent = QModelIndex()) const;
|
virtual bool hasChildren(const QModelIndex & parent = QModelIndex()) const;
|
||||||
|
|
||||||
|
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
|
|
||||||
|
|
||||||
QString computeDirectoryPath(const DirDetails& details) const ;
|
QString computeDirectoryPath(const DirDetails& details) const ;
|
||||||
|
|
||||||
mutable RsMutex _ref_mutex ;
|
mutable RsMutex _ref_mutex ;
|
||||||
std::vector<void *> _ref_entries ;// used to store the refs to display
|
std::vector<void *> _ref_entries ; // used to store the refs to display
|
||||||
std::vector<void *> _ref_stack ; // used to store the refs to update
|
std::vector<void *> _ref_stack ; // used to store the refs to update
|
||||||
bool _needs_update ;
|
bool _needs_update ;
|
||||||
time_t _last_update ;
|
time_t _last_update ;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user