mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +00:00
LibGUI+Userland: Store column names in JsonArrayModel as String
This commit is contained in:
parent
945f05ed76
commit
b7558a5ce4
Notes:
sideshowbarker
2024-07-17 03:51:15 +09:00
Author: https://github.com/krkk
Commit: b7558a5ce4
Pull-request: https://github.com/SerenityOS/serenity/pull/18836
9 changed files with 68 additions and 68 deletions
|
@ -21,23 +21,23 @@ ProcessFileDescriptorMapWidget::ProcessFileDescriptorMapWidget()
|
|||
m_table_view = add<GUI::TableView>();
|
||||
|
||||
Vector<GUI::JsonArrayModel::FieldSpec> pid_fds_fields;
|
||||
pid_fds_fields.empend("fd", "FD", Gfx::TextAlignment::CenterRight);
|
||||
pid_fds_fields.empend("class", "Class", Gfx::TextAlignment::CenterLeft);
|
||||
pid_fds_fields.empend("offset", "Offset", Gfx::TextAlignment::CenterRight);
|
||||
pid_fds_fields.empend("absolute_path", "Path", Gfx::TextAlignment::CenterLeft);
|
||||
pid_fds_fields.empend("Access", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
pid_fds_fields.empend("fd", "FD"_short_string, Gfx::TextAlignment::CenterRight);
|
||||
pid_fds_fields.empend("class", "Class"_short_string, Gfx::TextAlignment::CenterLeft);
|
||||
pid_fds_fields.empend("offset", "Offset"_short_string, Gfx::TextAlignment::CenterRight);
|
||||
pid_fds_fields.empend("absolute_path", "Path"_short_string, Gfx::TextAlignment::CenterLeft);
|
||||
pid_fds_fields.empend("Access"_short_string, Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_bool("seekable"sv).value_or(false) ? "Seekable" : "Sequential";
|
||||
});
|
||||
pid_fds_fields.empend("Blocking", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
pid_fds_fields.empend("Blocking"_string.release_value_but_fixme_should_propagate_errors(), Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_bool("blocking"sv).value_or(false) ? "Blocking" : "Nonblocking";
|
||||
});
|
||||
pid_fds_fields.empend("On exec", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
pid_fds_fields.empend("On exec"_short_string, Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_bool("cloexec"sv).value_or(false) ? "Close" : "Keep";
|
||||
});
|
||||
pid_fds_fields.empend("Can read", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
pid_fds_fields.empend("Can read"_string.release_value_but_fixme_should_propagate_errors(), Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_bool("can_read"sv).value_or(false) ? "Yes" : "No";
|
||||
});
|
||||
pid_fds_fields.empend("Can write", Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
pid_fds_fields.empend("Can write"_string.release_value_but_fixme_should_propagate_errors(), Gfx::TextAlignment::CenterLeft, [](auto& object) {
|
||||
return object.get_bool("can_write"sv).value_or(false) ? "Yes" : "No";
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue