Commit 7c9aa812 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applet: add connection type to `Accessible.description`

parent 4859fb8f
......@@ -96,6 +96,8 @@ PlasmaExtras.ExpandableListItem {
customExpandedViewContent: detailsComponent
Accessible.description: `${ListView.view.connectionTypeToString(Type)} ${subtitle}`
Component {
id: detailsComponent
......
......@@ -142,6 +142,39 @@ PlasmaExtras.Representation {
delegate: ConnectionItem {
width: connectionView.width - PlasmaCore.Units.smallSpacing * 4
}
function connectionTypeToString(type): string {
switch (type) {
case PlasmaNM.Enums.Adsl:
return i18nc("@info:tooltip", "The connection type is ADSL");
case PlasmaNM.Enums.Bluetooth:
return i18nc("@info:tooltip", "The connection type is Bluetooth");
case PlasmaNM.Enums.Bridge:
return i18nc("@info:tooltip", "The connection type is Bridge");
case PlasmaNM.Enums.Cdma:
return i18nc("@info:tooltip", "The connection type is CDMA");
case PlasmaNM.Enums.Gsm:
return i18nc("@info:tooltip", "The connection type is GSM");
case PlasmaNM.Enums.Infiniband:
return i18nc("@info:tooltip", "The connection type is Infiniband");
case PlasmaNM.Enums.OLPCMesh:
return i18nc("@info:tooltip", "The connection type is OLPC Mesh");
case PlasmaNM.Enums.Pppoe:
return i18nc("@info:tooltip", "The connection type is PPOPE");
case PlasmaNM.Enums.Vlan:
return i18nc("@info:tooltip", "The connection type is VLAN");
case PlasmaNM.Enums.Vpn:
return i18nc("@info:tooltip", "The connection type is VPN");
case PlasmaNM.Enums.Wimax:
return i18nc("@info:tooltip", "The connection type is Wimax");
case PlasmaNM.Enums.Wired:
return i18nc("@info:tooltip", "The connection type is Wired");
case PlasmaNM.Enums.Wireless:
return i18nc("@info:tooltip", "The connection type is Wireless");
default:
return i18nc("@info:tooltip", "The connection type is Unknown");
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment