Changeset View
Changeset View
Standalone View
Standalone View
applets/batterymonitor/package/contents/ui/PowerManagementItem.qml
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 52 | Components.ToolButton { | |||
---|---|---|---|---|---|
55 | tooltip: i18n("Configure Power Saving...") | 55 | tooltip: i18n("Configure Power Saving...") | ||
56 | visible: batterymonitor.kcmsAuthorized | 56 | visible: batterymonitor.kcmsAuthorized | ||
57 | } | 57 | } | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | ColumnLayout { | 60 | ColumnLayout { | ||
61 | Layout.fillWidth: true | 61 | Layout.fillWidth: true | ||
62 | Layout.leftMargin: units.gridUnit + units.smallSpacing // width of checkbox and spacer | 62 | Layout.leftMargin: units.gridUnit + units.smallSpacing // width of checkbox and spacer | ||
63 | visible: inhibitingAppsList.visible || laptopLidWarning.visible | ||||
63 | spacing: units.smallSpacing | 64 | spacing: units.smallSpacing | ||
64 | 65 | | |||
65 | InhibitionHint { | 66 | InhibitionHint { | ||
67 | id: laptopLidWarning | ||||
66 | Layout.fillWidth: true | 68 | Layout.fillWidth: true | ||
67 | visible: pmSource.data["PowerDevil"] && pmSource.data["PowerDevil"]["Is Lid Present"] && !pmSource.data["PowerDevil"]["Triggers Lid Action"] ? true : false | 69 | visible: pmSource.data["PowerDevil"] && pmSource.data["PowerDevil"]["Is Lid Present"] && !pmSource.data["PowerDevil"]["Triggers Lid Action"] ? true : false | ||
68 | iconSource: "computer-laptop" | 70 | iconSource: "computer-laptop" | ||
69 | text: i18n("Your notebook is configured not to suspend when closing the lid while an external monitor is connected.") | 71 | text: i18n("Your notebook is configured not to suspend when closing the lid while an external monitor is connected.") | ||
70 | } | 72 | } | ||
71 | 73 | | |||
72 | InhibitionHint { | 74 | InhibitionHint { | ||
75 | id: inhibitingAppsList | ||||
73 | Layout.fillWidth: true | 76 | Layout.fillWidth: true | ||
74 | visible: inhibitions.length > 0 | 77 | visible: inhibitions.length > 0 | ||
75 | iconSource: inhibitions.length > 0 ? inhibitions[0].Icon || "" : "" | 78 | iconSource: inhibitions.length > 0 ? inhibitions[0].Icon || "" : "" | ||
76 | text: { | 79 | text: { | ||
77 | if (inhibitions.length > 1) { | 80 | if (inhibitions.length > 1) { | ||
78 | return i18ncp("Some Application and n others are currently suppressing PM", | 81 | return i18ncp("Some Application and n others are currently suppressing PM", | ||
79 | "%2 and %1 other application are currently suppressing power management.", | 82 | "%2 and %1 other application are currently suppressing power management.", | ||
80 | "%2 and %1 other applications are currently suppressing power management.", | 83 | "%2 and %1 other applications are currently suppressing power management.", | ||
Show All 17 Lines |