[gnome] Updating extensions, back to Forge

This commit is contained in:
2026-02-18 11:13:53 -05:00
parent 9d4dd2863c
commit ede0687e11
107 changed files with 9856 additions and 4216 deletions

View File

@ -23,34 +23,36 @@ import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
export const ManualOrientationMenuToggle = GObject.registerClass(
class ManualOrientationMenuToggle extends QuickMenuToggle {
constructor(ext) {
const _ = ext.gettext.bind(ext);
super({
title: 'Rotate',
title: _('Rotate'),
iconName: 'object-rotate-left-symbolic',
menuEnabled: true,
toggleMode: true,
});
this.menu.setHeader('object-rotate-left-symbolic', 'Screen Rotate');
this.menu.setHeader('object-rotate-left-symbolic', _('Screen Rotate'));
this._section = new PopupMenu.PopupMenuSection();
this.menu.addMenuItem(this._section);
this.landscapeItem = new PopupMenu.PopupMenuItem('Landscape', {
this.landscapeItem = new PopupMenu.PopupMenuItem(_('Landscape'), {
reactive: true,
can_focus: true,
});
this.portraitLeftItem = new PopupMenu.PopupMenuItem('Portrait Left', {
this.portraitLeftItem = new PopupMenu.PopupMenuItem(_('Portrait Left'), {
reactive: true,
can_focus: true,
});
this.landscapeFlipItem = new PopupMenu.PopupMenuItem('Landscape Flipped', {
this.landscapeFlipItem = new PopupMenu.PopupMenuItem(_('Landscape Flipped'), {
reactive: true,
can_focus: true,
});
this.portraitRightItem = new PopupMenu.PopupMenuItem('Portrait Right', {
this.portraitRightItem = new PopupMenu.PopupMenuItem(_('Portrait Right'), {
reactive: true,
can_focus: true,
});
@ -78,7 +80,7 @@ class ManualOrientationMenuToggle extends QuickMenuToggle {
this._section.addMenuItem(this.portraitRightItem);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addSettingsAction('Extension Settings',
this.menu.addSettingsAction(_('Extension Settings'),
'com.mattjakeman.ExtensionManager.desktop');
this.connect('clicked', () => {
@ -99,4 +101,3 @@ class ManualOrientationMenuToggle extends QuickMenuToggle {
item.setOrnament(PopupMenu.Ornament.CHECK);
}
});

View File

@ -1,5 +1,6 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"commit": "d22c7f03313b06b2af6b9d7becfef9f248351dc5",
"description": "Enable screen rotation regardless of touch mode. Fork of Screen Autorotate by Kosmospredanie.",
"donations": {
"github": "shyzus"
@ -20,5 +21,5 @@
],
"url": "https://github.com/shyzus/gnome-shell-extension-screen-autorotate",
"uuid": "screen-rotate@shyzus.github.io",
"version": 27
"version": 28
}

View File

@ -19,7 +19,7 @@ import Gtk from 'gi://Gtk';
import Gio from 'gi://Gio';
import Adw from 'gi://Adw';
import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
import { Orientation } from './orientation.js';
@ -32,94 +32,91 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
window.add(page);
const orientationGroup = new Adw.PreferencesGroup();
orientationGroup.set_title('Orientation Settings')
orientationGroup.set_title(_('Orientation Settings'));
page.add(orientationGroup);
const shellMenuGroup = new Adw.PreferencesGroup();
shellMenuGroup.set_title('GNOME Shell Menu Settings');
shellMenuGroup.set_title(_('GNOME Shell Menu Settings'));
page.add(shellMenuGroup);
const oskSettingsGroup = new Adw.PreferencesGroup();
oskSettingsGroup.set_title('On-Screen-Keyboard Settings');
oskSettingsGroup.set_title(_('On-Screen-Keyboard Settings'));
page.add(oskSettingsGroup);
const disableOnRotateGroup = new Adw.PreferencesGroup();
disableOnRotateGroup.set_title('Disable-On-Rotation Settings');
disableOnRotateGroup.set_title(_('Disable-On-Rotation Settings'));
page.add(disableOnRotateGroup);
const debugGroup = new Adw.PreferencesGroup();
debugGroup.set_title('Debug Settings');
debugGroup.set_title(_('Debug Settings'));
page.add(debugGroup);
const invertHorizontalRow = new Adw.ActionRow({
title: 'Invert horizontal rotation'
title: _('Invert horizontal rotation')
});
orientationGroup.add(invertHorizontalRow);
const invertVerticalRow = new Adw.ActionRow({
title: 'Invert vertical rotation'
title: _('Invert vertical rotation')
});
orientationGroup.add(invertVerticalRow);
const flipOrientationRow = new Adw.ActionRow({
title: 'Flip orientation',
subtitle: 'e.g: Landscape to Portrait. Default is Landscape'
title: _('Flip orientation'),
subtitle: _('e.g: Landscape to Portrait. Default is Landscape')
});
orientationGroup.add(flipOrientationRow);
const setOffsetRow = new Adw.ActionRow({
title: 'Set orientation offset',
subtitle: 'Valid offset range: 0 to 3. Default is 0\nExperiment with' +
' this in case orientation is incorrect due to the display' +
' being mounted in a non-landscape orientation' +
' e.g PineTab2 or GPD Pocket 3'
title: _('Set orientation offset'),
subtitle: _('Valid offset range: 0 to 3. Default is 0') + '\n' +
_('Experiment with this in case orientation is incorrect due to the display being mounted in a non-landscape orientation') +
_(' e.g PineTab2 or GPD Pocket 3')
});
orientationGroup.add(setOffsetRow);
const skipInitRotationRow = new Adw.ActionRow({
title: 'Skip initial rotation',
subtitle: 'Skip initial rotation on extension startup ensures the' +
' last known orientation is loaded on startup and the' +
' overview screen is not skipped.'
title: _('Skip initial rotation'),
subtitle: _('Skip initial rotation on extension startup ensures the last known orientation is loaded on startup and the overview screen is not skipped.')
});
orientationGroup.add(skipInitRotationRow);
const enableManualFlipRow = new Adw.ActionRow({
title: 'Enable manual flip',
subtitle: 'Enable a toggle in the GNOME Shell System Menu to manually flip between landscape and portrait.'
title: _('Enable manual flip'),
subtitle: _('Enable a toggle in the GNOME Shell System Menu to manually flip between landscape and portrait.')
});
shellMenuGroup.add(enableManualFlipRow);
const hideLockRotateRow = new Adw.ActionRow({
title: 'Hide the "Auto Rotate" quick toggle'
title: _('Hide the "Auto Rotate" quick toggle')
});
shellMenuGroup.add(hideLockRotateRow);
const landscapeOskRow = new Adw.ActionRow({
title: 'Show OSK in landscape orientation'
title: _('Show OSK in landscape orientation')
});
oskSettingsGroup.add(landscapeOskRow);
const portraitRightOskRow = new Adw.ActionRow({
title: 'Show OSK in portrait (right) orientation'
title: _('Show OSK in portrait (right) orientation')
});
oskSettingsGroup.add(portraitRightOskRow);
const landscapeFlippedOskRow = new Adw.ActionRow({
title: 'Show OSK in landscape (flipped) orientation'
title: _('Show OSK in landscape (flipped) orientation')
});
oskSettingsGroup.add(landscapeFlippedOskRow);
const portraitLeftOskRow = new Adw.ActionRow({
title: 'Show OSK in portrait (left) orientation'
title: _('Show OSK in portrait (left) orientation')
});
oskSettingsGroup.add(portraitLeftOskRow);
const toggleLoggingRow = new Adw.ActionRow({
title: 'Enable debug logging',
subtitle: 'Use "journalctl /usr/bin/gnome-shell -f" to see log output.'
title: _('Enable debug logging'),
subtitle: _('Use "journalctl /usr/bin/gnome-shell -f" to see log output.')
});
debugGroup.add(toggleLoggingRow);
@ -188,19 +185,19 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
switch (orientation) {
case 'normal':
actionRowTitle = "Landscape";
actionRowTitle = _("Landscape");
checkButtonBoolId = "dor-keyboard-landscape";
break;
case 'left-up':
actionRowTitle = "Portrait (Left)";
actionRowTitle = _("Portrait (Left)");
checkButtonBoolId = "dor-keyboard-portrait-left";
break;
case 'bottom-up':
actionRowTitle = "Landscape Flipped";
actionRowTitle = _("Landscape Flipped");
checkButtonBoolId = "dor-keyboard-landscape-flipped";
break;
case 'right-up':
actionRowTitle = "Portrait (Right)";
actionRowTitle = _("Portrait (Right)");
checkButtonBoolId = "dor-keyboard-portrait-right";
break;
}
@ -232,19 +229,19 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
switch (orientation) {
case 'normal':
actionRowTitle = "Landscape";
actionRowTitle = _("Landscape");
checkButtonBoolId = "dor-touchpad-landscape";
break;
case 'left-up':
actionRowTitle = "Portrait (Left)";
actionRowTitle = _("Portrait (Left)");
checkButtonBoolId = "dor-touchpad-portrait-left";
break;
case 'bottom-up':
actionRowTitle = "Landscape Flipped";
actionRowTitle = _("Landscape Flipped");
checkButtonBoolId = "dor-touchpad-landscape-flipped";
break;
case 'right-up':
actionRowTitle = "Portrait (Right)";
actionRowTitle = _("Portrait (Right)");
checkButtonBoolId = "dor-touchpad-portrait-right";
break;
}
@ -267,10 +264,10 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
dorTouchpadPage.append(dorActionRow);
}
const dorKeyboardLabel = Gtk.Label.new('Keyboard');
const dorKeyboardLabel = Gtk.Label.new(_('Keyboard'));
dorNotebook.append_page(dorKeyboardPage, dorKeyboardLabel);
const dorTouchpadLabel = Gtk.Label.new('Touchpad');
const dorTouchpadLabel = Gtk.Label.new(_('Touchpad'));
dorNotebook.append_page(dorTouchpadPage, dorTouchpadLabel)
disableOnRotateGroup.add(dorNotebook);