mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 01:50:24 +00:00
PartitionEditor: Add total blocks column
This commit is contained in:
parent
2f8c20816e
commit
ba9f60785b
Notes:
sideshowbarker
2024-07-17 18:46:57 +09:00
Author: https://github.com/SamuelBowman Commit: https://github.com/SerenityOS/serenity/commit/ba9f60785b Pull-request: https://github.com/SerenityOS/serenity/pull/14432 Reviewed-by: https://github.com/linusg
2 changed files with 5 additions and 0 deletions
|
@ -20,6 +20,8 @@ String PartitionModel::column_name(int column) const
|
|||
return "Start Block";
|
||||
case Column::EndBlock:
|
||||
return "End Block";
|
||||
case Column::TotalBlocks:
|
||||
return "Total Blocks";
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
@ -43,6 +45,8 @@ GUI::Variant PartitionModel::data(GUI::ModelIndex const& index, GUI::ModelRole r
|
|||
return partition.start_block();
|
||||
case Column::EndBlock:
|
||||
return partition.end_block();
|
||||
case Column::TotalBlocks:
|
||||
return partition.end_block() - partition.start_block() + 1;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ public:
|
|||
Partition,
|
||||
StartBlock,
|
||||
EndBlock,
|
||||
TotalBlocks,
|
||||
__Count,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue