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

inhibit applet: Pass a string to showOSD when using hotkeys #12409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
16 changes: 12 additions & 4 deletions files/usr/share/cinnamon/applets/[email protected]/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ class InhibitSwitch extends PopupMenu.PopupBaseMenuItem {
if (current_state & INHIBIT_IDLE_FLAG ||
current_state & INHIBIT_SLEEP_FLAG) {
this._applet.icon.toggleInhibitStatus(true);
this._applet.set_applet_tooltip(_("Power management: inhibited"));
this._applet.set_applet_tooltip(_("Power management: Inhibited"));
} else {
this._applet.icon.toggleInhibitStatus(false);
this._applet.set_applet_tooltip(_("Power management: active"));
this._applet.set_applet_tooltip(_("Power management: Active"));
}

if (current_state >= INHIBIT_SLEEP_FLAG && !this.sessionCookie) {
Expand Down Expand Up @@ -478,7 +478,11 @@ class CinnamonInhibitApplet extends Applet.IconApplet {
"inhibit-symbolic" :
"inhibit-active-symbolic";

Main.osdWindowManager.show(-1, Gio.ThemedIcon.new(_symbol));
let _text = this.inhibitSwitch._switch.state ?
_("Power management: Active") :
_("Power management: Inhibited");

Main.osdWindowManager.show(-1, Gio.ThemedIcon.new(_symbol), _text);
}

toggle_inhibit_notifications() {
Expand All @@ -488,7 +492,11 @@ class CinnamonInhibitApplet extends Applet.IconApplet {
"inhibit-notification-symbolic" :
"inhibit-notification-active-symbolic";

Main.osdWindowManager.show(-1, Gio.ThemedIcon.new(_symbol));
let _text = this.notificationsSwitch._switch.state ?
_("Notifications: Active") :
_("Notifications: Inhibited");

Main.osdWindowManager.show(-1, Gio.ThemedIcon.new(_symbol), _text);
}

get inhibitors() {
Expand Down
Loading