mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
GDirectoryModel: Allow retrieving an item's full path via Role::Custom
This commit is contained in:
@@ -238,6 +238,10 @@ GVariant GDirectoryModel::data(const GModelIndex& index, Role role) const
|
||||
{
|
||||
ASSERT(is_valid(index));
|
||||
auto& entry = this->entry(index.row());
|
||||
if (role == Role::Custom) {
|
||||
ASSERT(index.column() == Column::Name);
|
||||
return entry.full_path(*this);
|
||||
}
|
||||
if (role == Role::Sort) {
|
||||
switch (index.column()) {
|
||||
case Column::Icon:
|
||||
|
||||
Reference in New Issue
Block a user