mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibGUI: Add a ClipboardClient for GUI::Clipboard
Anyone who inherits from `GUI::Clipboard::ClipboardClient` will receive clipboard notifications via `clipboard_content_did_change()`. Update ClipboardHistoryModel, TextEditor and TerminalWidget to inherit from this class.
This commit is contained in:
parent
95f393ebcd
commit
0c53c2dfa2
8 changed files with 106 additions and 72 deletions
|
@ -143,10 +143,6 @@ TerminalWidget::TerminalWidget(int ptm_fd, bool automatic_size_policy, RefPtr<Co
|
|||
m_context_menu->add_separator();
|
||||
m_context_menu->add_action(clear_including_history_action());
|
||||
|
||||
GUI::Clipboard::the().on_change = [this](const String&) {
|
||||
update_paste_action();
|
||||
};
|
||||
|
||||
update_copy_action();
|
||||
update_paste_action();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue