Version: (using Devel) Installed from: Compiled sources Some users prefer descriptive names eg 'Wireless Interface', others prefer technical names eg 'eth0, wlan0'. This junior-job is about making it possible to choose. The different styles are illustrated in the UnconfiguredInterfaceItem constructor in monolithic/unconfiguredinterfaceitem.cpp For this job you would have to 1) extend KNetworkManagerServicePrefs (via libs/internals/knmserviceprefs.kcfg) to store this preference 2) provide a checkbox somewhere in settings/config/traysettings.ui and settings/config/managetraywidget.cpp to control this setting 3) use this setting throughout monolithic and libs/ui to show either the Solid::Device description or interface name. At some points in the code I have already provided an if clause to do this, see UnconfiguredInterfaceItem as above. You can probably find all the places to change by grepping for Solid::Device.
Created attachment 37211 [details] Patch
Here is a patch. Fell free to advice any change.
The only changes I would advise are 1) Change Technical Names throughout to 'Interface Name'. Possibly the best solution would be to change the bool kconfigxt type to an enum and use a combobox with 2 entries' 'System Interface Names' and 'Descriptive Names'. 2) The patch adds ipv4 to gsm which is something else.
Created attachment 37265 [details] patch Modified it as suggested. I will commit if its ok.
1) In networkmanager.cpp and wiredwidget.cpp the indentation is not right - it's 4 spaces per indent + deviceText = iface->interfaceName(); 2) and there is no need to #define DESCRIPTIVE, because in the KConfigXT-generated knmservicepref.h (look in libs/internals in the _build_ tree) there is a public enum: enum InterfaceNamingChoices { DescriptiveNames, SystemNames }; that are the values returned by KNetworkManagerServicePrefs::self()->interfaceNamingStyle()
Created attachment 37282 [details] Updated
Created attachment 37284 [details] Just modified a bit. This should be the final, if nothing is wrong
It's good, commit it!
SVN commit 1030904 by rduran: BUG: 207445 Now users can configure different interface naming styles. Like "WLAN Interface" or "wlan0" M +13 -2 applet/interfaceitem.cpp M +13 -2 applet/networkmanager.cpp M +6 -0 libs/internals/knmserviceprefs.kcfg M +13 -2 libs/service/notificationmanager.cpp M +15 -2 libs/ui/802_11_wirelesswidget.cpp M +13 -2 libs/ui/wiredwidget.cpp M +16 -0 monolithic/otherwirelessnetworkdialog.cpp M +7 -3 monolithic/unconfiguredinterfaceitem.cpp M +38 -9 settings/config/traysettings.ui WebSVN link: http://websvn.kde.org/?view=rev&revision=1030904