Closed mivoligo closed 2 years ago
FWIW I've noticed all of those values are of type Unsigned 32-bit integer
according to dconf. Meanwhile the setting which works properly: "Period of file history" (/org/gnome/desktop/privacy/recent-files-max-age) is of type Signed 32-bit integer
.
So I think the issue might be here: https://github.com/Feichtmeier/settings/blob/32b7b128f0b38a5c3d504ee9112e8f360614808e/lib/services/settings_service.dart#L80
Here's the code in dbus for unsigned integer: https://github.com/canonical/dbus.dart/blob/e003b66747ba0dea6ed4084a74331bd35d0a8af5/lib/src/dbus_value.dart#L208
Nice finding. This could be indeed an issue. So should we add one case for each type of int in the settingsservice?
I believe so but not sure how to handle that properly. Maybe @jpnurmi could help here.
Hah, yes, that's wrong. Too much convenience bites back. :slightly_smiling_face: Anyway, maybe pair the get<Type>Value()
getters with respective set<Type>Value()
setters, to eliminate ambiguity?
Hah, yes, that's wrong. Too much convenience bites back. slightly_smiling_face Anyway, maybe pair the
get<Type>Value()
getters with respectiveset<Type>Value()
setters, to eliminate ambiguity?
Looks like quite a big change :slightly_smiling_face: setValue
is used more than 130 times :smile:
BTW shouldn't this line:
https://github.com/Feichtmeier/settings/blob/32b7b128f0b38a5c3d504ee9112e8f360614808e/lib/services/settings_service.dart#L72
be changed to if (_values[key] == value) {
?
@Feichtmeier This is why tests pay off 😉
I've noticed that changing some settings do not really work. For example: In Power page I change "Blank screen" to any value and it always results in 300 seconds. That value is the default value for that settings according to Dconf Editor.
Similar issue is with: