gplugin/gplugin

Implement widgets for settings that use basic types

15 months ago, Elliott Sales de Andrade
7e519d51af72
Implement widgets for settings that use basic types

This implements enums, integral types, double, and string. I have not yet implemented flags, and I'm not sure if we need those. The numeric types use spin buttons, though I suppose they could be sliders. The rates/digits/increments are somewhat arbitrary and could probably be adjusted, but seem good enough for now.

I _think_ this should be sufficient for all libpurple plugins. The GTK plugins may or may not be possible. For example, `spellchk` has a full table of replacements. This may work as a `dict[str, str]` in a table widget, but this is so far not implemented here. We should probably think about whether that makes sense to handle `dict` semi-generically or whether to expose some kind of GTK extension point as in the old API.

Also note that there are no `GSettings` types for things like directories or files, so those don't get any special treatment other than a string input. If we do want special handling, we may have to come up with some setting conventions (e.g., a setting name ending in `-dir` gets a directory chooser widget instead of an entry automatically, or similar).

Testing Done:
Ran `gplugin-gtk4-viewer -p gplugin/native-settings-plugin` and checked that all the settings had widgets with expected limits, and that setting them then going to another plugin and back preserved the settings. (Note that it does warn once for the unimplemented `flags` type.)

Also checked that plugins set up in /r/2131 had some settings.

Reviewed at https://reviews.imfreedom.org/r/2150/
66681de84f796ca93eee09fbc6485f1d2c1ef774 v0.0.1
03055d6dfbf1b5f1ba0207f8688ffd7d7f12bbfd v0.0.2
cb57f868f558f910227895e5cca945cf37545305 v0.0.3
c74e2f3b5cd6ea96cc0165472e798d7f8a15e135 v0.0.4
61f92f9a679ae66f403cfdf53e83521cc06ce601 v0.0.5
a4424c931f1643eb267448af28a9e4b022a04935 v0.0.6
9b2fb4fd6c355fb14d827b17ddf99349b7262d86 v0.0.7
56f5de7f1de7dbcc157e78b6d8db759a3999306f v0.0.8
421249d706b5e877dac95639e57e97ae55bb6196 v0.0.9
63bc1be9a3656a290adde127cb23fac180a109cb v0.0.10
5da52080bca941d95104280088913855110deab8 v0.0.11
733b3914b74dd14d22e62cd9d26d5c4f8665b625 v0.0.12
f4619c1a1c4cf0acb7701a1dad93881fd0ceec82 v0.0.13
3393032be1681c0171fd555dc44cae3f37312d85 v0.0.14
9dc750a2b9ce3719641f8572efae88f4e15b4e23 v0.0.15
4a38a01ef478a28ceb49d58b788fa2491ab4a03a v0.0.16
79c4d3fea9a25c7eccb50ade2c3e5a5c9726aaff v0.0.17
9f4dea11d6ebb7f4dac8d40e3cd163ed81025835 v0.0.18
4958c5722fd223df2042ea589e4127c015adf9a0 v0.0.19
d161290ac41e2153fed2f59114131fa8cb646d31 v0.0.20
004f9b0be689db1d191105c59944a09398509635 v0.0.21
b85bc4dd3051afd5876001309369143816629d83 v0.0.22
7d5e467e1770f0ae2296324b0c2245551d8d8000 v0.23
d67243b9c1292826637730736a69ae8c35f474bc v0.24
4008734db845dd2d982cb98921346394c6051482 v0.24.1
1a59ff41ba47bd803e27139ec777cd0bbb6220f0 v0.25
98178efd03b1431eb0c9a99bda81fe70e7ddd4a5 v0.26
4c9f60803079441e4e58994e4768ebe1490b3c1f v0.27
741a484ae91c05937a9a4435497dbb4924a4681d v0.0.28
0aec4b15554d3d5b9a8e24e84387bd81988071b0 v0.28.0
741a484ae91c05937a9a4435497dbb4924a4681d v0.0.28
0000000000000000000000000000000000000000 v0.0.28
85f1c51427fe6ad61aa43fb2724e994fe234383a v0.28.1
1924632f9d60ea8eeb32a9e19f27c78861051ec2 v0.28.2
fc9c95c883aeeef4c0a796fc2a5e5786d14c2de1 v0.29.0
de3ef2273a74fd57f70196aab26f596909fe8eda v0.30.0
f25e021e405360fd903d874c4890e87f97ce6b80 v0.31.0
f09c25208609bb49a8152c764621104293c38e97 v0.32.0
328552e20a3f66c9e59eb3172273a25b5a053d99 v0.32.1
f04edbdc6e9e4944bd6d0e86296859c4a3a8e136 v0.33.0
77a1778c7a1b06f29cc63ddc9c6f5b02a2b4f630 v0.34.0
d01d2ae04291637bb039470d69e3eb5a2b78bd82 v0.34.1
82687b8b1f978e24c22889197cfe82f0dcf6b730 v0.35.0
0721598070450b10a45e4faa6b011003d2e66e58 v0.36.0
edd74683ec344524dba9e8ff4a30a340ac079355 v0.37.0
09d4e545c5510a92fd7fd8d862583f197f98b360 v0.38.0
9e61e94fda633fc5a9da4fb314b4fa91dab91c53 v0.38.1
a0a98165f39cd8c1bdd7c13855b615863085c6a4 v0.39.0
da782d1b051f0a891fc86cab587a7fca6fd2f54a v0.39.1