diff options
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/ProcessManager/ProcessFileDescriptorMapModel.cpp | 18 | ||||
-rw-r--r-- | Applications/ProcessManager/ProcessFileDescriptorMapModel.h | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Applications/ProcessManager/ProcessFileDescriptorMapModel.cpp b/Applications/ProcessManager/ProcessFileDescriptorMapModel.cpp index 512d1474dd..e3233ba0b1 100644 --- a/Applications/ProcessManager/ProcessFileDescriptorMapModel.cpp +++ b/Applications/ProcessManager/ProcessFileDescriptorMapModel.cpp @@ -29,6 +29,12 @@ String ProcessFileDescriptorMapModel::column_name(int column) const switch (column) { case Column::FileDescriptor: return "FD"; + case Column::ClassName: + return "Class"; + case Column::Offset: + return "Offset"; + case Column::Access: + return "Access"; case Column::Path: return "Path"; default: @@ -41,6 +47,12 @@ GModel::ColumnMetadata ProcessFileDescriptorMapModel::column_metadata(int column switch (column) { case Column::FileDescriptor: return { 32, TextAlignment::CenterRight }; + case Column::ClassName: + return { 80, TextAlignment::CenterLeft }; + case Column::Offset: + return { 40, TextAlignment::CenterRight }; + case Column::Access: + return { 60, TextAlignment::CenterLeft }; case Column::Path: return { 300, TextAlignment::CenterLeft }; default: @@ -56,6 +68,12 @@ GVariant ProcessFileDescriptorMapModel::data(const GModelIndex& index, Role role switch (index.column()) { case Column::FileDescriptor: return fd_object.get("fd").to_int(); + case Column::ClassName: + return fd_object.get("class").to_string(); + case Column::Offset: + return fd_object.get("offset").to_int(); + case Column::Access: + return fd_object.get("seekable").to_bool() ? "Seekable" : "Sequential"; case Column::Path: return fd_object.get("absolute_path").to_string(); default: diff --git a/Applications/ProcessManager/ProcessFileDescriptorMapModel.h b/Applications/ProcessManager/ProcessFileDescriptorMapModel.h index b9386df903..88c08a3cf7 100644 --- a/Applications/ProcessManager/ProcessFileDescriptorMapModel.h +++ b/Applications/ProcessManager/ProcessFileDescriptorMapModel.h @@ -8,6 +8,9 @@ public: enum Column { FileDescriptor, Path, + Offset, + Access, + ClassName, __Count }; |