[gnome] Update extensions for v46

This commit is contained in:
2024-04-03 12:59:14 -04:00
parent 3fb1ec63ae
commit 7421cdba8f
251 changed files with 15759 additions and 3153 deletions

View File

@ -1,5 +1,5 @@
/* prefs.js
* Copyright (C) 2023 kosmospredanie, shyzus, Shinigaminai
* Copyright (C) 2024 kosmospredanie, shyzus, Shinigaminai
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -33,6 +33,10 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
orientationGroup.set_title('Orientation Settings')
page.add(orientationGroup);
const shellMenuGroup = new Adw.PreferencesGroup();
shellMenuGroup.set_title('GNOME Shell Menu Settings');
page.add(shellMenuGroup);
const debugGroup = new Adw.PreferencesGroup();
debugGroup.set_title('Debug Settings');
page.add(debugGroup);
@ -62,6 +66,17 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
orientationGroup.add(setOffsetRow);
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.'
});
shellMenuGroup.add(enableManualFlipRow);
const hideLockRotateRow = new Adw.ActionRow({
title: 'Hide the "Auto Rotate" quick toggle'
});
shellMenuGroup.add(hideLockRotateRow);
const toggleLoggingRow = new Adw.ActionRow({
title: 'Enable debug logging',
subtitle: 'Use "journalctl /usr/bin/gnome-shell -f" to see log output.'
@ -86,6 +101,16 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
const setOffsetSpinButton = Gtk.SpinButton.new_with_range(0, 3, 1);
setOffsetSpinButton.value = window._settings.get_int('orientation-offset');
const manualFlipSwitch = new Gtk.Switch({
active: window._settings.get_boolean('manual-flip'),
valign: Gtk.Align.CENTER,
});
const hideLockRotateSwitch = new Gtk.Switch({
active: window._settings.get_boolean('hide-lock-rotate'),
valign: Gtk.Align.CENTER,
});
const toggleLoggingSwitch = new Gtk.Switch({
active: window._settings.get_boolean('debug-logging'),
valign: Gtk.Align.CENTER
@ -103,6 +128,12 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
window._settings.bind('orientation-offset',
setOffsetSpinButton, 'value', Gio.SettingsBindFlags.DEFAULT);
window._settings.bind('manual-flip',
manualFlipSwitch, 'active', Gio.SettingsBindFlags.DEFAULT);
window._settings.bind('hide-lock-rotate',
hideLockRotateSwitch, 'active', Gio.SettingsBindFlags.DEFAULT);
window._settings.bind('debug-logging',
toggleLoggingSwitch, 'active', Gio.SettingsBindFlags.DEFAULT);
@ -118,7 +149,13 @@ export default class MyExtensionPreferences extends ExtensionPreferences {
setOffsetRow.add_suffix(setOffsetSpinButton);
setOffsetRow.activatable_widget = setOffsetSpinButton;
enableManualFlipRow.add_suffix(manualFlipSwitch);
enableManualFlipRow.activatable_widget = manualFlipSwitch;
hideLockRotateRow.add_suffix(hideLockRotateSwitch);
hideLockRotateRow.activatable_widget = hideLockRotateSwitch;
toggleLoggingRow.add_suffix(toggleLoggingSwitch);
toggleLoggingRow.activatable_widget = toggleLoggingSwitch;
}
}
}