Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/ConnectionItem.qml
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Line(s) | 160 | PlasmaComponents.MenuItem { | |||
---|---|---|---|---|---|
162 | enabled: false | 162 | enabled: false | ||
163 | } | 163 | } | ||
164 | PlasmaComponents.MenuItem { | 164 | PlasmaComponents.MenuItem { | ||
165 | text: stateChangeButton.text | 165 | text: stateChangeButton.text | ||
166 | icon: (ConnectionState == PlasmaNM.Enums.Deactivated) ? "network-connect" : "network-disconnect" | 166 | icon: (ConnectionState == PlasmaNM.Enums.Deactivated) ? "network-connect" : "network-disconnect" | ||
167 | onClicked: changeState() | 167 | onClicked: changeState() | ||
168 | } | 168 | } | ||
169 | PlasmaComponents.MenuItem { | 169 | PlasmaComponents.MenuItem { | ||
170 | text: i18n("Show network's QR code") | ||||
ngraham: "Show network's QR code" | |||||
171 | icon: "view-barcode" | ||||
I think this should be limited to wireless connections only (Type == PlasmaNM.Enums.Wireless). jgrulich: I think this should be limited to wireless connections only (Type == PlasmaNM.Enums.Wireless). | |||||
172 | visible: Uuid && Type == PlasmaNM.Enums.Wireless && | ||||
173 | (SecurityType == PlasmaNM.Enums.StaticWep || SecurityType == PlasmaNM.Enums.WpaPsk || SecurityType == PlasmaNM.Enums.Wpa2Psk) | ||||
174 | onClicked: { | ||||
175 | const data = handler.wifiCode(ConnectionPath, Ssid, SecurityType) | ||||
176 | var obj = showQR.createObject(connectionItem, { content: data }); | ||||
177 | obj.showMaximized() | ||||
178 | } | ||||
179 | | ||||
180 | Component { | ||||
181 | id: showQR | ||||
182 | ShowQR {} | ||||
183 | } | ||||
184 | } | ||||
185 | PlasmaComponents.MenuItem { | ||||
170 | text: i18n("Configure...") | 186 | text: i18n("Configure...") | ||
171 | icon: "settings-configure" | 187 | icon: "settings-configure" | ||
172 | onClicked: KCMShell.open([mainWindow.kcm, "--args", "Uuid=" + Uuid]) | 188 | onClicked: KCMShell.open([mainWindow.kcm, "--args", "Uuid=" + Uuid]) | ||
173 | } | 189 | } | ||
174 | } | 190 | } | ||
175 | 191 | | |||
176 | Component { | 192 | Component { | ||
177 | id: detailsComponent | 193 | id: detailsComponent | ||
▲ Show 20 Lines • Show All 237 Lines • Show Last 20 Lines |
"Show network's QR code"