[Kde-hardware-devel] NM 0.7 settings update
Will Stephenson
wstephenson at kde.org
Wed Jun 18 00:05:11 CEST 2008
So I have the settings stuff for NM 0.7 nearly working now.
0) testservice is a test service
1) A dummy (hardwired config dialog) is shown by testservice's configure
button. As in KConfigXt, some widgets are named "kcfg_SETTINGNAME" where
SETTINGNAME is something in NM's dbus settings. This widget is a KCModule
loaded as a plugin
2) A KConfigSkeleton is created at runtime by ConfigXml (from Plasma) for each
NM setting group by reading a corresponding .kcfg file and added to the KCM to
manage its widgets.
3) On Ok the KCM's data is saved to /tmp/testconfigxmlrc automatically
4) testservice reads this file on startup using KConfigToService and ConfigXml
again to restore the persisted data and put it into a Connection object and
then onto the bus. Only items which are not the setting's default value (set
in the .kcfg) go into the map on the bus.
Many of NM's key names contain '-' which makes them illegal variable names, so
i have a conversion function. I'll try to get NM to change their key names.
The outcome tonight is that if you run testservice with a configured setting
NM will go offline because it can't do anything with the setting I have
configured ;).
Still todo:
* secrets
* converting stuff which doesn't map straight from 1 widget to kconfig items
* converting UIntListLists
* converting from storage format (eg ascii formatted ByteArrays and IP
addresses, which are nicer to have in kconfig to wire format
* changing connections
* more stuff I can't think of yet
The code is in branches/work/~wstephens/networkmanager atm. I would like to
merge it soon but I failed at my first attempt tonight, weird things happened
indicating conflicts in files not changed on my side. Please diff it vs trunk
to see what it changes, mostly in Networksettings and Connection
Will
More information about the Kde-hardware-devel
mailing list