1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:07:43 +00:00

ClipboardHistory: Add Time column

Add a Time column to ClipboardHistory that shows the time when each
item in the list was copied.
This commit is contained in:
Nícolas F. R. A. Prado 2022-02-21 21:07:28 -05:00 committed by Andreas Kling
parent 9d94c85b6a
commit eebdd86fbd
3 changed files with 20 additions and 7 deletions

View file

@ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
table_view->set_model(model);
table_view->on_activation = [&](GUI::ModelIndex const& index) {
auto& data_and_type = model->item_at(index.row());
auto& data_and_type = model->item_at(index.row()).data_and_type;
GUI::Clipboard::the().set_data(data_and_type.data, data_and_type.mime_type, data_and_type.metadata);
};