status/system: Update text of orientation lock menu entry
Since the orientation lock menu entry is a proper menu entry instead of a icon-only button now, we also show a description-text for that entry, so update this text depending on whether orientation is locked or not to better reflect what clicking the menu entry will do. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/964
This commit is contained in:

committed by
Florian Müllner

parent
526c601512
commit
3f21c21532
@ -54,8 +54,10 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
let bindFlags = GObject.BindingFlags.DEFAULT | GObject.BindingFlags.SYNC_CREATE;
|
||||
let item;
|
||||
|
||||
item = new PopupMenu.PopupImageMenuItem(_('Lock Screen Rotation'),
|
||||
item = new PopupMenu.PopupImageMenuItem(
|
||||
this._systemActions.getName('lock-orientation'),
|
||||
this._systemActions.orientation_lock_icon);
|
||||
|
||||
item.connect('activate', () => {
|
||||
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
|
||||
this._systemActions.activateLockOrientation();
|
||||
@ -68,7 +70,10 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
bindFlags);
|
||||
this._systemActions.connect('notify::orientation-lock-icon', () => {
|
||||
let iconName = this._systemActions.orientation_lock_icon;
|
||||
let labelText = this._systemActions.getName("lock-orientation");
|
||||
|
||||
this._orientationLockItem.setIcon(iconName);
|
||||
this._orientationLockItem.label.text = labelText;
|
||||
});
|
||||
|
||||
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
|
||||
|
Reference in New Issue
Block a user