Changeset View
Changeset View
Standalone View
Standalone View
kcm/qml/ConnectionItem.qml
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Line(s) | 148 | onClicked: { | |||
---|---|---|---|---|---|
149 | if (mouse.button === Qt.LeftButton) { | 149 | if (mouse.button === Qt.LeftButton) { | ||
150 | aboutToChangeConnection(KcmVpnConnectionExportable, Name, ConnectionPath) | 150 | aboutToChangeConnection(KcmVpnConnectionExportable, Name, ConnectionPath) | ||
151 | } else if (mouse.button == Qt.RightButton) { | 151 | } else if (mouse.button == Qt.RightButton) { | ||
152 | connectionItemMenu.open(mouse.x, mouse.y) | 152 | connectionItemMenu.open(mouse.x, mouse.y) | ||
153 | } | 153 | } | ||
154 | } | 154 | } | ||
155 | } | 155 | } | ||
156 | 156 | | |||
157 | /* This generates the status description under each connection | ||||
158 | in the list at the left side of the applet. */ | ||||
157 | function itemText() { | 159 | function itemText() { | ||
158 | if (ConnectionState == PlasmaNM.Enums.Activated) { | 160 | if (ConnectionState == PlasmaNM.Enums.Activated) { | ||
159 | return i18n("Connected") | 161 | return i18n("Connected") | ||
160 | } else if (ConnectionState == PlasmaNM.Enums.Activating) { | 162 | } else if (ConnectionState == PlasmaNM.Enums.Activating) { | ||
161 | return i18n("Connecting") | 163 | return i18n("Connecting") | ||
162 | } else { | 164 | } else { | ||
163 | return LastUsed | 165 | return LastUsed | ||
164 | } | 166 | } | ||
165 | } | 167 | } | ||
166 | } | 168 | } |