1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

ClipboardHistory: Listen for configuration changes

Resize the clipboard history size dynamically by listening for config
changes. This is currently not ideal since we don't have the callbacks
for `Config::Listener::config_i32_did_change`, so for now we are just
taking the string and attempting to convert it to an int.
This commit is contained in:
Mustafa Quraish 2021-08-26 23:08:06 -04:00 committed by Brian Gianforcaro
parent b1a3bb638b
commit 441e601689
3 changed files with 28 additions and 2 deletions

View file

@ -25,6 +25,7 @@ int main(int argc, char* argv[])
auto app = GUI::Application::construct(argc, argv);
Config::pledge_domains("ClipboardHistory");
Config::monitor_domain("ClipboardHistory");
if (pledge("stdio recvfd sendfd rpath", nullptr) < 0) {
perror("pledge");