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

ClipboardHistory: Add a Clear history action

This clears the history from the table view and clears the clipboard.
This commit is contained in:
Tim Ledbetter 2023-01-14 14:52:16 +00:00 committed by Jelle Raaijmakers
parent 944c43a8b4
commit 68fa8525bf
3 changed files with 15 additions and 0 deletions

View file

@ -136,6 +136,12 @@ void ClipboardHistoryModel::remove_item(int index)
invalidate();
}
void ClipboardHistoryModel::clear()
{
m_history_items.clear();
invalidate();
}
void ClipboardHistoryModel::config_string_did_change(DeprecatedString const& domain, DeprecatedString const& group, DeprecatedString const& key, DeprecatedString const& value_string)
{
if (domain != "ClipboardHistory" || group != "ClipboardHistory")