Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/main.qml
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 40 | Plasmoid.fullRepresentation: PopupDialog { | |||
---|---|---|---|---|---|
42 | Layout.minimumWidth: units.iconSizes.medium * 10 | 42 | Layout.minimumWidth: units.iconSizes.medium * 10 | ||
43 | Layout.minimumHeight: units.gridUnit * 20 | 43 | Layout.minimumHeight: units.gridUnit * 20 | ||
44 | anchors.fill: parent | 44 | anchors.fill: parent | ||
45 | focus: true | 45 | focus: true | ||
46 | } | 46 | } | ||
47 | 47 | | |||
48 | function action_openKCM() { | 48 | function action_openKCM() { | ||
49 | KCMShell.open(kcm) | 49 | KCMShell.open(kcm) | ||
50 | | ||||
51 | | ||||
52 | } | ||||
53 | function action_showPortal() { | ||||
54 | Qt.openUrlExternally("http://networkcheck.kde.org") | ||||
50 | } | 55 | } | ||
51 | 56 | | |||
52 | Component.onCompleted: { | 57 | Component.onCompleted: { | ||
53 | if (kcmAuthorized) { | 58 | if (kcmAuthorized) { | ||
54 | plasmoid.setAction("openKCM", i18n("&Configure Network Connections..."), "preferences-system-network"); | 59 | plasmoid.setAction("openKCM", i18n("&Configure Network Connections..."), "preferences-system-network"); | ||
55 | } | 60 | } | ||
61 | plasmoid.setAction("showPortal", i18n("Open Network Login Page..."), "internet-services"); | ||||
ngraham: This icon has no monochrome version, so it will stick out in the system tray where other icons… | |||||
62 | | ||||
63 | var action = plasmoid.action("showPortal"); | ||||
64 | action.visible = Qt.binding(function() { return connectionIconProvider.needsPortal; }) | ||||
56 | } | 65 | } | ||
57 | 66 | | |||
58 | PlasmaNM.NetworkStatus { | 67 | PlasmaNM.NetworkStatus { | ||
59 | id: networkStatus | 68 | id: networkStatus | ||
60 | } | 69 | } | ||
61 | 70 | | |||
62 | PlasmaNM.ConnectionIcon { | 71 | PlasmaNM.ConnectionIcon { | ||
63 | id: connectionIconProvider | 72 | id: connectionIconProvider | ||
Show All 27 Lines |
This icon has no monochrome version, so it will stick out in the system tray where other icons are generally monochrome.
If this is not intended, a better icon would be internet-services, which is monochrome only.