This is done by introducing the concept of "static init" functions. A static init function is a function that is run only once during the lifetime of GNOME Settings, before any panel is initialized. This function has the signature
void (*func) (void), i.e. it doesn't receive nor return anything. This is an opt-in feature - panels must explicitly define such a function.
The Wi-Fi panel was adapted to rely on such new API, as a way to demonstrate the new feature. The next obvious target is the Bluetooth panel, but I'd rather receive some comments before changing other panels now. Thunderbolt panel must also be ported, but that's a (hopefully small) side work for @gicmo. I'm not entirely sure whether the Wacom panel is a candidate for this feature too, since it relies on USBs and that is common hardware.
Issue: #77 (closed)