Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gnome 43 support #203

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="https://github.com/deinstapel/cpupower/releases">
<img alt="Lastest release" src="https://img.shields.io/github/v/release/deinstapel/cpupower?label=latest%20release&sort=semver">
</a>
<img alt="Gnome 42" src="https://img.shields.io/badge/gnome-42-blue?logo=gnome&logoColor=white">
<img alt="Gnome 43" src="https://img.shields.io/badge/gnome-43-blue?logo=gnome&logoColor=white">
<a href="https://github.com/deinstapel/cpupower/blob/master/LICENSE">
<img alt="License" src="https://img.shields.io/github/license/deinstapel/cpupower.svg">
</a>
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"localedir": "/usr/local/share/locale",
"shell-version": [
"3.28", "3.30", "3.36", "3.38", "40", "41", "42"
"3.28", "3.30", "3.36", "3.38", "40", "41", "42", "43"
],
"uuid": "[email protected]",
"name": "CPU Power Manager",
Expand Down
7 changes: 6 additions & 1 deletion src/indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ var CPUFreqIndicator = class CPUFreqIndicator extends baseindicator.CPUFreqBaseI
}

enable() {
this.power = Main.panel.statusArea["aggregateMenu"]._power;
if (parseFloat(Config.PACKAGE_VERSION.substring(0, 4)) >= 43) {
this.power = imports.ui.main.panel.statusArea.quickSettings._system._systemItem._powerToggle;
} else {
this.power = Main.panel.statusArea["aggregateMenu"]._power;
}

this.powerState = this.power._proxy.State;
this.powerConnectSignalId = this.power._proxy.connect(
"g-properties-changed",
Expand Down