mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-28 00:07:09 -05:00
Added to sort by Age when one day, one week or one month is selected
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4215 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a748f88686
commit
0429baf807
@ -325,6 +325,8 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
|
|||||||
return QString::fromUtf8(details.name.c_str());
|
return QString::fromUtf8(details.name.c_str());
|
||||||
case 1:
|
case 1:
|
||||||
return QString() ;
|
return QString() ;
|
||||||
|
case 2:
|
||||||
|
return misc::userFriendlyDuration(details.min_age);
|
||||||
default:
|
default:
|
||||||
return QString() ;
|
return QString() ;
|
||||||
}
|
}
|
||||||
@ -433,6 +435,8 @@ QVariant TreeStyle_RDM::sortRole(const QModelIndex& index,const DirDetails& deta
|
|||||||
return QString::fromUtf8(details.name.c_str());
|
return QString::fromUtf8(details.name.c_str());
|
||||||
case 1:
|
case 1:
|
||||||
return QString();
|
return QString();
|
||||||
|
case 2:
|
||||||
|
return details.min_age;
|
||||||
default:
|
default:
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
@ -907,10 +907,19 @@ void SharedFilesDialog::indicatorChanged(int index)
|
|||||||
model->changeAgeIndicator(correct_indicator[index]);
|
model->changeAgeIndicator(correct_indicator[index]);
|
||||||
localModel->changeAgeIndicator(correct_indicator[index]);
|
localModel->changeAgeIndicator(correct_indicator[index]);
|
||||||
|
|
||||||
ui.remoteDirTreeView->update(ui.remoteDirTreeView->rootIndex());
|
ui.remoteDirTreeView->update(ui.remoteDirTreeView->rootIndex());
|
||||||
ui.localDirTreeView->update(ui.localDirTreeView->rootIndex()) ;
|
ui.localDirTreeView->update(ui.localDirTreeView->rootIndex()) ;
|
||||||
|
|
||||||
|
if (correct_indicator[index] != IND_ALWAYS)
|
||||||
|
{
|
||||||
|
ui.remoteDirTreeView->sortByColumn(2, Qt::AscendingOrder);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui.remoteDirTreeView->sortByColumn(0, Qt::AscendingOrder);
|
||||||
|
}
|
||||||
|
|
||||||
updateDisplay() ;
|
updateDisplay() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedFilesDialog::filterRegExpChanged()
|
void SharedFilesDialog::filterRegExpChanged()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user