Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/DeviceListItem.qml
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 29 | ColumnLayout { | |||
---|---|---|---|---|---|
65 | 65 | | |||
66 | ColumnLayout { | 66 | ColumnLayout { | ||
67 | width: parent.width | 67 | width: parent.width | ||
68 | 68 | | |||
69 | RowLayout { | 69 | RowLayout { | ||
70 | visible: portbox.count > 1 | 70 | visible: portbox.count > 1 | ||
71 | 71 | | |||
72 | Label { | 72 | Label { | ||
73 | text: i18n("Port") | 73 | text: i18nd("kcm_pulseaudio", "Port") | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | ComboBox { | 76 | ComboBox { | ||
77 | id: portbox | 77 | id: portbox | ||
78 | readonly property var ports: Ports | 78 | readonly property var ports: Ports | ||
79 | Layout.fillWidth: true | 79 | Layout.fillWidth: true | ||
80 | onModelChanged: currentIndex = ActivePortIndex | 80 | onModelChanged: currentIndex = ActivePortIndex | ||
81 | currentIndex: ActivePortIndex | 81 | currentIndex: ActivePortIndex | ||
82 | onActivated: ActivePortIndex = index | 82 | onActivated: ActivePortIndex = index | ||
83 | 83 | | |||
84 | onPortsChanged: { | 84 | onPortsChanged: { | ||
85 | var items = []; | 85 | var items = []; | ||
86 | for (var i = 0; i < ports.length; ++i) { | 86 | for (var i = 0; i < ports.length; ++i) { | ||
87 | var port = ports[i]; | 87 | var port = ports[i]; | ||
88 | var text = port.description; | 88 | var text = port.description; | ||
89 | if (port.availability == Port.Unavailable) { | 89 | if (port.availability == Port.Unavailable) { | ||
90 | if (port.name == "analog-output-speaker" || port.name == "analog-input-microphone-internal") { | 90 | if (port.name == "analog-output-speaker" || port.name == "analog-input-microphone-internal") { | ||
91 | text += i18nc("Port is unavailable", " (unavailable)"); | 91 | text += i18ndc("kcm_pulseaudio", "Port is unavailable", " (unavailable)"); | ||
92 | } else { | 92 | } else { | ||
93 | text += i18nc("Port is unplugged", " (unplugged)"); | 93 | text += i18ndc("kcm_pulseaudio", "Port is unplugged", " (unplugged)"); | ||
94 | } | 94 | } | ||
95 | } | 95 | } | ||
96 | items.push(text); | 96 | items.push(text); | ||
97 | } | 97 | } | ||
98 | model = items; | 98 | model = items; | ||
99 | } | 99 | } | ||
100 | } | 100 | } | ||
101 | } | 101 | } | ||
102 | 102 | | |||
103 | VolumeSlider {} | 103 | VolumeSlider {} | ||
104 | } | 104 | } | ||
105 | 105 | | |||
106 | ListItemSeperator { view: delegate.ListView.view } | 106 | ListItemSeperator { view: delegate.ListView.view } | ||
107 | } | 107 | } |