Add systemPreferences.removeUserDefault()

This can be used to restore the default or global value of a `key`
previously set with `setUserDefault`.
This commit is contained in:
Birunthan Mohanathas 2017-10-10 22:55:15 +03:00
parent 30abdbccf8
commit 06d782279c
5 changed files with 35 additions and 4 deletions

View file

@ -67,6 +67,7 @@ void SystemPreferences::BuildPrototype(
&SystemPreferences::UnsubscribeLocalNotification)
.SetMethod("getUserDefault", &SystemPreferences::GetUserDefault)
.SetMethod("setUserDefault", &SystemPreferences::SetUserDefault)
.SetMethod("removeUserDefault", &SystemPreferences::RemoveUserDefault)
.SetMethod("isSwipeTrackingFromScrollEventsEnabled",
&SystemPreferences::IsSwipeTrackingFromScrollEventsEnabled)
#endif