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 | } | 50 | } | ||
51 | | ||||
53 | function action_showPortal() { | 52 | function action_showPortal() { | ||
54 | Qt.openUrlExternally("http://networkcheck.kde.org") | 53 | Qt.openUrlExternally("http://networkcheck.kde.org") | ||
55 | } | 54 | } | ||
56 | 55 | | |||
57 | Component.onCompleted: { | 56 | Component.onCompleted: { | ||
58 | if (kcmAuthorized) { | 57 | if (kcmAuthorized) { | ||
59 | plasmoid.setAction("openKCM", i18n("&Configure Network Connections..."), "preferences-system-network"); | 58 | plasmoid.setAction("openKCM", i18n("&Configure Network Connections..."), "preferences-system-network"); | ||
60 | } | 59 | } | ||
60 | plasmoid.removeAction("configure"); | ||||
61 | plasmoid.setAction("showPortal", i18n("Open Network Login Page..."), "internet-services"); | 61 | plasmoid.setAction("showPortal", i18n("Open Network Login Page..."), "internet-services"); | ||
62 | 62 | | |||
63 | var action = plasmoid.action("showPortal"); | 63 | var action = plasmoid.action("showPortal"); | ||
64 | action.visible = Qt.binding(function() { return connectionIconProvider.needsPortal; }) | 64 | action.visible = Qt.binding(function() { return connectionIconProvider.needsPortal; }) | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | PlasmaNM.NetworkStatus { | 67 | PlasmaNM.NetworkStatus { | ||
68 | id: networkStatus | 68 | id: networkStatus | ||
Show All 10 Lines | |||||
79 | Timer { | 79 | Timer { | ||
80 | id: scanTimer | 80 | id: scanTimer | ||
81 | interval: 10200 | 81 | interval: 10200 | ||
82 | repeat: true | 82 | repeat: true | ||
83 | running: plasmoid.expanded && !connectionIconProvider.airplaneMode | 83 | running: plasmoid.expanded && !connectionIconProvider.airplaneMode | ||
84 | 84 | | |||
85 | onTriggered: handler.requestScan() | 85 | onTriggered: handler.requestScan() | ||
86 | } | 86 | } | ||
87 | | ||||
88 | PlasmaNM.Configuration { | | |||
89 | id: configuration | | |||
90 | unlockModemOnDetection: plasmoid.configuration.unlockModemOnDetection | | |||
91 | manageVirtualConnections: plasmoid.configuration.manageVirtualConnections | | |||
92 | } | | |||
93 | } | 87 | } |